Return to standard_mathematical_functions.adb CVS log | Up to [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Numbers |
File: [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Numbers / standard_mathematical_functions.adb (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. |
with Ada.Numerics.Generic_Elementary_Functions; with Ada.Numerics; use Ada.Numerics; package body Standard_Mathematical_Functions is package Double_Elementary_Functions is new Ada.Numerics.Generic_Elementary_Functions (double_float); function "**" ( x,y : double_float ) return double_float is begin return Double_Elementary_Functions."**"(x,y); end "**"; function LOG2 ( x : double_float ) return double_float is begin return Double_Elementary_Functions.LOG(x,2.0); end LOG2; function LOG10 ( x : double_float ) return double_float is begin return Double_Elementary_Functions.LOG(x,10.0); end LOG10; function SQRT ( x : double_float ) return double_float is begin return Double_Elementary_Functions.SQRT(x); end SQRT; function SIN ( x : double_float ) return double_float is begin return Double_Elementary_Functions.SIN(x); end SIN; function COS ( x : double_float ) return double_float is begin return Double_Elementary_Functions.COS(x); end COS; function TAN ( x : double_float ) return double_float is begin return Double_Elementary_Functions.TAN(x); end TAN; function ARCSIN ( x : double_float ) return double_float is begin return Double_Elementary_Functions.ARCSIN(x); end ARCSIN; function ARCCOS ( x : double_float ) return double_float is begin return Double_Elementary_Functions.ARCCOS(x); end ARCCOS; function ARCTAN ( x : double_float ) return double_float is begin return Double_Elementary_Functions.ARCTAN(x); end ARCTAN; function Radius ( x,y : double_float ) return double_float is begin return Sqrt(x**2+y**2); end Radius; function Angle ( x,y : double_float ) return double_float is begin return Double_Elementary_Functions.ARCTAN(x,y); end Angle; end Standard_Mathematical_Functions;