Return to standard_floating_numbers.ads CVS log | Up to [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Numbers |
File: [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Numbers / standard_floating_numbers.ads (download)
Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:26 2000 UTC (23 years, 8 months ago) by maekawa
Import the second public release of PHCpack. OKed by Jan Verschelde. |
package Standard_Floating_Numbers is -- DESCRIPTION : -- This package sets floating-point types to be independent -- of the compiler predefined floating-point declarations. type single_float is digits 7; -- single precision type double_float is digits 15; -- double precision function Create ( n : natural ) return single_float; function Create ( n : natural ) return double_float; function Equal ( a,b : single_float ) return boolean; function Equal ( a,b : double_float ) return boolean; function AbsVal ( a : single_float ) return single_float; function AbsVal ( a : double_float ) return double_float; procedure Copy ( a : in single_float; b : in out single_float ); procedure Copy ( a : in double_float; b : in out double_float ); procedure Add ( a : in out single_float; b : in single_float ); -- a := a+b procedure Add ( a : in out double_float; b : in double_float ); procedure Sub ( a : in out single_float; b : in single_float ); -- a := a-b procedure Sub ( a : in out double_float; b : in double_float ); procedure Min ( a : in out single_float ); -- a := -a procedure Min ( a : in out double_float ); procedure Mul ( a : in out single_float; b : in single_float ); -- a := a*b procedure Mul ( a : in out double_float; b : in double_float ); procedure Div ( a : in out single_float; b : in single_float ); -- a := a/b procedure Div ( a : in out double_float; b : in double_float ); procedure Clear ( a : in out single_float ); procedure Clear ( a : in out double_float ); end Standard_Floating_Numbers;