|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 10240 (0x2800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package Trig, seg_005383
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦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 fuction 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;
nblk1=9 nid=0 hdr6=12 [0x00] rec0=1e rec1=00 rec2=01 rec3=004 [0x01] rec0=00 rec1=00 rec2=09 rec3=028 [0x02] rec0=14 rec1=00 rec2=02 rec3=02c [0x03] rec0=19 rec1=00 rec2=03 rec3=006 [0x04] rec0=1a rec1=00 rec2=04 rec3=054 [0x05] rec0=1c rec1=00 rec2=05 rec3=00c [0x06] rec0=00 rec1=00 rec2=08 rec3=002 [0x07] rec0=17 rec1=00 rec2=06 rec3=05a [0x08] rec0=0d rec1=00 rec2=07 rec3=000 tail 0x215009ea4819788ed9ab9 0x42a00088462063203