-- ef_ada.adb calls to Elementart Functions -- abs, ... are primitive in the language with Ada.text_io; use Ada.text_io; with Ada.Numerics; use Ada.Numerics; with Ada.Numerics.Elementary_functions; use Ada.Numerics.Elementary_functions; with Ada.Numerics.Long_elementary_Functions; use Ada.Numerics.Long_elementary_Functions; procedure Ef_ada is X, Y, Z : Float; Xx, Yy, Zz : Long_Float; begin -- ef_ada put_line("Elementary Functions from Ada.Numerics.Elementary_functions "); X := 0.5; Xx := 0.5; Z := 0.5; Zz := 0.5; Y := abs(X); -- native for all numeric data types Yy := abs(Xx); Y := Sqrt(X); Yy := Sqrt(Xx); Y := X ** Z; Yy := Xx ** Zz; Y := 2.0 ** Z; Yy := 2.0 ** Zz; Y := Log(X); Yy := Log(Xx); Y := Log(X, 10.0); Yy := Log(Xx, 2.0); Y := Log(X, 10.0); Yy := Log(Xx, 2.0); Y := Exp(X); Yy := Exp(Xx); Y := Sin(X); Yy := Sin(Xx); Y := Cos(X); Yy := Cos(Xx); Y := Tan(X); Yy := Tan(Xx); Y := Cot(X); -- Y := csc(X); not available 1.0/sin(X) -- Y := sec(X); not available 1.0/cos(X) Y := Arcsin(X); Yy := Arcsin(Xx); Y := Arccos(X); Yy := Arccos(Xx); Y := Arctan(X); Yy := Arctan(Xx); Y := Arctan(X, Z); Yy := Arctan(Xx, Zz); Y := Arccot(X); Yy := Arccot(Xx); Y := Sinh(X); Yy := Sinh(Xx); Y := Cosh(X); Yy := Cosh(Xx); Y := Tanh(X); Yy := Tanh(Xx); Y := Coth(X); Yy := Coth(Xx); Y := Arcsinh(X); Yy := Arcsinh(Xx); Y := Arccosh(X); Yy := Arccosh(Xx); Y := Arctanh(X); Yy := Arctanh(Xx); Put_Line("end ef_ada.adb, no output intended."); end Ef_ada;