[BACK]Return to standard_mathematical_functions.adb CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Numbers

Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Numbers/standard_mathematical_functions.adb, Revision 1.1.1.1

1.1       maekawa     1: with Ada.Numerics.Generic_Elementary_Functions;
                      2: with Ada.Numerics;                     use Ada.Numerics;
                      3:
                      4: package body Standard_Mathematical_Functions is
                      5:
                      6:   package Double_Elementary_Functions is new
                      7:                   Ada.Numerics.Generic_Elementary_Functions (double_float);
                      8:
                      9:   function "**" ( x,y : double_float ) return double_float is
                     10:   begin
                     11:     return Double_Elementary_Functions."**"(x,y);
                     12:   end "**";
                     13:
                     14:   function LOG2 ( x : double_float ) return double_float is
                     15:   begin
                     16:     return Double_Elementary_Functions.LOG(x,2.0);
                     17:   end LOG2;
                     18:
                     19:   function LOG10 ( x : double_float ) return double_float is
                     20:   begin
                     21:     return Double_Elementary_Functions.LOG(x,10.0);
                     22:   end LOG10;
                     23:
                     24:   function SQRT ( x : double_float ) return double_float is
                     25:   begin
                     26:     return Double_Elementary_Functions.SQRT(x);
                     27:   end SQRT;
                     28:
                     29:   function SIN ( x : double_float ) return double_float is
                     30:   begin
                     31:     return Double_Elementary_Functions.SIN(x);
                     32:   end SIN;
                     33:
                     34:   function COS ( x : double_float ) return double_float is
                     35:   begin
                     36:     return Double_Elementary_Functions.COS(x);
                     37:   end COS;
                     38:
                     39:   function TAN ( x : double_float ) return double_float is
                     40:   begin
                     41:     return Double_Elementary_Functions.TAN(x);
                     42:   end TAN;
                     43:
                     44:   function ARCSIN ( x : double_float ) return double_float is
                     45:   begin
                     46:     return Double_Elementary_Functions.ARCSIN(x);
                     47:   end ARCSIN;
                     48:
                     49:   function ARCCOS ( x : double_float ) return double_float is
                     50:   begin
                     51:     return Double_Elementary_Functions.ARCCOS(x);
                     52:   end ARCCOS;
                     53:
                     54:   function ARCTAN ( x : double_float ) return double_float is
                     55:   begin
                     56:     return Double_Elementary_Functions.ARCTAN(x);
                     57:   end ARCTAN;
                     58:
                     59:   function Radius ( x,y : double_float ) return double_float is
                     60:   begin
                     61:     return Sqrt(x**2+y**2);
                     62:   end Radius;
                     63:
                     64:   function Angle ( x,y : double_float ) return double_float is
                     65:   begin
                     66:     return Double_Elementary_Functions.ARCTAN(x,y);
                     67:   end Angle;
                     68:
                     69: end Standard_Mathematical_Functions;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>