[BACK]Return to standard_mathematical_functions.adb CVS log [TXT][DIR] 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
Branch: PHC, MAIN
CVS Tags: v2, maekawa-ipv6, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, HEAD
Changes since 1.1: +0 -0 lines

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;