有没有人知道ada中Real_Matrix的精度,使用下面的包?
with Ada.Numerics.Real_Arrays
Run Code Online (Sandbox Code Playgroud)
无论如何增加它?
好的,所以我尝试运行调用包dirforinv.adb的代码:
WITH Text_IO;
WITH Ada.Numerics.Generic_Real_Arrays;
WITH Ada.Numerics.Generic_Elementary_functions;
WITH Ada.Strings.Fixed;
WITH dirforinv;
PROCEDURE levfordir IS
J : CONSTANT Integer := 100;
TYPE Real IS DIGITS 13;
PACKAGE Real_IO IS NEW Text_IO.Float_IO (Real);
PACKAGE Int_IO IS NEW Text_IO.Integer_IO (Integer);
TYPE Gen_arr IS ARRAY (INTEGER RANGE <>, INTEGER RANGE <>) OF Real;
TYPE var_array IS ARRAY (INTEGER RANGE <>) OF Real;
PACKAGE Real_arrays IS NEW Ada.numerics.Generic_Real_Arrays (Real);
USE Real_arrays;
PACKAGE sdirect IS NEW dirforinv (var_array, Gen_arr);
PACKAGE Math IS NEW Ada.numerics.Generic_Elementary_functions (Real);
USE …Run Code Online (Sandbox Code Playgroud)