|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T V
Length: 6270 (0x187e)
Types: TextFile
Names: »V«
└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00
└─⟦0c20f784e⟧ »DATA«
└─⟦1abbe589f⟧
└─⟦306851c02⟧
└─⟦this⟧
with Xlbt_Arithmetic;
use Xlbt_Arithmetic;
package Trig is
------------------------------------------------------------------------------
-- Date - /Name/ Comment
--
-- 01-FEB-89 - /GEB/ Created.
-- 27-FEB-89 - /GEB/ Add Float Decomposition routines.
-- 05-JUL-90 - /GEB/ Add structured comments, port to TeleGen2/TeleSoft.
------------------------------------------------------------------------------
subtype Integer32 is S_Long;
subtype Natural32 is S_Natural;
subtype Positive32 is S_Positive;
----Useful constants.
Pi : constant Float :=
3.1415926535897932384626433832795028841971693993750990044278398981733785;
Two_Pi : constant Float := Pi + Pi;
Pi_Over_2 : constant Float := Pi / 2.0;
Pi_Over_4 : constant Float := Pi / 4.0;
E : constant Float :=
2.7182818284590452353602874713526624977572470936999595749669676277240766;
----Float/Integer32 conversions
function Truncate (X : Float) return Float;
----Truncates the floating-point value. Returns just the integral portion
-- of the value. abs Truncate(X) <= abs X.
function Truncate (X : Float) return Integer32;
----Truncates the floating-point value. Returns just the integral portion
-- of the value. abs Truncate(X) <= abs X.
-- Note: Numeric_Error will be raised unless X is in the range
-- Integer32'First..Integer32'Last.
function Round (X : Float) return Float;
----Rounds the floating-point value so that it contains no fractional part.
-- Functionally identical to the expression Float(Integer32(X)) except that
-- Numeric_Error is not possible.
-- abs Truncate(X) <= abs Round(X) <= abs Truncate(X)+1.0.
function Round (X : Float) return Integer32;
----Functionally identical with the expression Integer32(X). The
-- floating-point value is rounded so that it contains no fractional part.
----Float Decomposition
procedure Fraction_Exponent (X : Float;
Fraction : out Float;
Exponent : out Integer32);
----Returns both the fraction and the exponent of the Float.
-- Fraction in 0.0..1.0/float(Float'Machine_Radix)
-- Exponent in Float'Machine_Emin..Float'Machine_Emax
function Odd (X : Float) return Boolean;
----Returns TRUE if Aint(X) is an ODD value. Any value < 1.0 is even
-- because it is less than 1;
-- and any value > Float'Machine_Radix ** Float'Machine_Mantissa is
-- even because the even/odd bit has been lost due to insufficient
-- precision in the Float representation.
----Square-Root - returns the positive root of positive numbers
-- - raises Constraint_Error for negative numbers
function Sqrt (A : Float) return Float;
----Cube-Root - returns the real root
function Cbrt (A : Float) return Float;
----In_Radians - Set this to TRUE to cause the trigonometric functions to work
-- in Radians and FALSE to cause them to work in degrees.
In_Radians : Boolean := True;
----Sin - returns the sine of its argument
-- Cos - returns the cosine of its argument
-- Tan - returns the tangent of its argument
function Sin (A : Float) return Float;
function Cos (A : Float) return Float;
function Tan (A : Float) return Float;
----Sec - returns the secant of its argument
-- Csc - returns the cosecant of its argument
-- Cot - returns the cotangent of its argument
function Sec (A : Float) return Float;
function Csc (A : Float) return Float;
function Cot (A : Float) return Float;
----Asin - returns the inverse sine of its argument
-- Acos - returns the inverse cosine of its argument
-- Atan - returns the inverse tangent of its argument
function Asin (A : Float) return Float;
function Acos (A : Float) return Float;
function Atan (A : Float) return Float;
----Asec - returns the inverse secant of its argument
-- Acsc - returns the inverse cosecant of its argument
-- Acot - returns the inverse cotangent of its argument
function Asec (A : Float) return Float;
function Acsc (A : Float) return Float;
function Acot (A : Float) return Float;
----Ln - returns the natural logarithm of its positive argument
-- Exp - returns E to the power represented by its argument
function Ln (A : Float) return Float;
function Exp (A : Float) return Float;
----Log10 - returns log-base-10 of its positive argument
-- Exp10 - returns 10 to the power represented by its argument
function Log10 (A : Float) return Float;
function Exp10 (A : Float) return Float;
----Logx - returns log-base-X of its positive argument Y
-- Expx - returns X ** Y;
-- X ** 0.0 = 1.0;
-- X ** Y where X < 0.0 raises Constraint_Error
function Logx (X : Float; Y : Float) return Float;
function Expx (X : Float; Y : Float) return Float;
----Sinh - returns the hyperbolic sine of its argument
-- Cosh - returns the hyperbolic cosine of its argument
-- Tanh - returns the hyperbolic tangent of its argument
function Sinh (A : Float) return Float;
function Cosh (A : Float) return Float;
function Tanh (A : Float) return Float;
----Sech - returns the hyperbolic secant of its argument
-- Csch - returns the hyperbolic cosecant of its argument
-- Coth - returns the hyperbolic cotangent of its argument
function Sech (A : Float) return Float;
function Csch (A : Float) return Float;
function Coth (A : Float) return Float;
----Asinh - returns the inverse hyperbolic sine of its argument
-- Acosh - returns the inverse hyperbolic cosine of its argument
-- Atanh - returns the inverse hyperbolic tangent of its argument
function Asinh (A : Float) return Float;
function Acosh (A : Float) return Float;
function Atanh (A : Float) return Float;
----Asech - returns the inverse hyperbolic secant of its argument
-- Acsch - returns the inverse hyperbolic cosecant of its argument
-- Acoth - returns the inverse hyperbolic cotangent of its argument
function Asech (A : Float) return Float;
function Acsch (A : Float) return Float;
function Acoth (A : Float) return Float;
end Trig;