ð Syntax10.Scn.Fnt´ýÿÿÐûÐûInfoElemsAllocUSyntax10.Scn.Fnt«öÿÿÿzÀÔStampElemsAlloc8 Feb 95K÷"Title": MoreMathL "Author": Christoph Steindl (CS) "Abstract": Implementation of the mathematical functions not exported by MathL. The previously used MathLib shipped with the Metrowerks C-Compiler was slow and inaccurate. "Keywords": trigonimetric functions, inverse trigonometric functions, hyperbolic functions, inverse hyperbolic functions, IEEE floating-point format "Version": 1.0 "From": 11.11.94 15:40:26 "Until":  "Changes": "Hints": This text can again contain arbitrary text elements! Syntax10i.Scn.Fnt'öÿÿÿ€°­StampElemsAlloc8 Feb 95:ªÿÿÿ€8ÀÔFoldElemsNew#Syntax10.Scn.Fnt44Floating point format according to the IEEE standardOCourier10.Scn.Fnt"[DMÿÿÿÿ€8ÀÔÆÿÿÿ€8ÀÔ#Syntax10.Scn.FntImplementation hierarchyeüÿÿ,g:˜»)KeplerElemsAllocKeplerGraphsGraphDescKeplerGraphsStarDesc§€}óÄz¤ ˆ}Ä„}”Äz­ Äz¤Äz¢÷x¥ Äzä Äzü ÷x²÷x–šw”šw²÷xú ÷xˆ šwÐ šw³ šwð¬KeplerFramesCaptionDescSinSyntax10.Scn.FntKepler1AttrDescCosinSyntax10.Scn.FntArcTanSyntax10.Scn.FntSqrtSyntax10.Scn.FntExpSyntax10.Scn.FntLnSyntax10.Scn.FntTangensSyntax10.Scn.FntCotangensSyntax10.Scn.FntArcSinSyntax10.Scn.FntArcCotSyntax10.Scn.Fnt  ArcCosSyntax10.Scn.Fnt  TanhSyntax10.Scn.Fnt  SinhSyntax10.Scn.Fnt   CoshSyntax10.Scn.Fnt   CothSyntax10.Scn.FntArcTanhSyntax10.Scn.FntArcSinhSyntax10.Scn.FntArCoshSyntax10.Scn.FntArCothSyntax10.Scn.Fnt"exported from MathL"Syntax10.Scn.FntKepler1LineDescpŽûûÿÿFÿÿÿÿ€8ÀÔ Syntax10b.Scn.Fntÿÿÿÿ€8ÀÔ ÿÿÿÿ€8ÀÔ ÿÿÿÿ€8ÀÔ#ÿÿÿÿ€8ÀÔ ÿÿÿÿ€8ÀÔCÿÿÿÿ€8ÀÔ ÿÿÿÿ€8ÀÔ5ÿÿÿÿ€8ÀÔ ÿÿÿÿ€8ÀÔ/ÿÿÿÿ€8ÀÔ ÿÿÿÿ€8ÀÔ¤ÿÿÿÿ€8ÀÔ ÿÿÿÿ€8ÀÔYÿÿÿÿ€8ÀÔ ÿÿÿÿ€8ÀÔXÿÿÿÿ€8ÀÔ ÿÿÿÿ€8ÀÔiÿÿÿÿ€8ÀÔ ÿÿÿÿ€8ÀÔ>ÿÿÿÿ€8ÀÔ ÿÿÿÿ€8ÀÔ?ÿÿÿÿ€8ÀÔ ÿÿÿÿ€8ÀÔ>ÿÿÿÿ€8ÀÔ ÿÿÿÿ€8ÀÔ*ÿÿÿÿ€8ÀÔÆMODULE MoreMathL;  (* Christoph Steindl (CS), 11.11.94 -  *) IMPORT SYSTEM, MathL; CONST piOver2 = MathL.pi / 2; (* Floating point format according to the IEEE standard: single precision: S EEEEEEEE MMMMMMMMMMMMMMMMMMMMMMM 1 bit for the sign 8 bits for the exponent 23 bits for the mantissa ____________________________________________________________________________________________________ 32 bits = 4 bytes for one single precision floating point number The exponent is stored as an unbiased exponent, to get the real exponent (within range -126..127) you have to subtract 127 from the resulting number). The number 0 is represented as exponent = 0 and mantissa = 0. An exponent of 255 and a mantissa of 0 denotes infinity. An exponent of 255 and a mantissa of #0 denotes NaN. double precision: S EEEEEEEEEEE MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 1 bit for the sign 11 bits for the exponent 52 bits for the mantissa ______________________________________________________________________________________________________ 64 bits = 8 bytes for one double precision floating point number The exponent is stored as an unbiased exponent, to get the real exponent (within range -1022..1024) you have to subtract 1023 from the resulting number). The number 0 is represented as exponent = 0 and mantissa = 0. An exponent of 2047 and a mantissa of 0 denotes infinity. An exponent of 2047 and a mantissa of #0 denotes NaN. *) (* in NNMathL.Dep.Kep *)  PROCEDURE tan* (x: LONGREAL): LONGREAL; VAR neg: BOOLEAN; y, s1: LONGREAL; BEGIN y := x - ENTIER(x / MathL.pi) * MathL.pi; IF y > piOver2 THEN neg := TRUE ELSE neg := FALSE END; s1 := MathL.sin(y); IF neg THEN RETURN - s1 / MathL.sqrt(1 - s1 * s1) ELSE RETURN s1 / MathL.sqrt(1 - s1 * s1) END END tan;  PROCEDURE cot* (x: LONGREAL): LONGREAL; BEGIN RETURN 1 / tan(x) END cot;  PROCEDURE arcsin* (x: LONGREAL): LONGREAL; BEGIN RETURN MathL.arctan(x / MathL.sqrt(1 - x * x)) END arcsin;  PROCEDURE arccot* (x: LONGREAL): LONGREAL; BEGIN RETURN piOver2 - MathL.arctan(x) END arccot;  PROCEDURE arccos* (x: LONGREAL): LONGREAL; BEGIN RETURN piOver2 - arcsin(x) END arccos;  PROCEDURE tanh* (x: LONGREAL): LONGREAL; VAR e1, e2, e3, e4, e5, e6, t1, t2: LONGREAL; BEGIN IF ABS(x) < 3.7D-9 THEN RETURN x ELSIF x >= 20.101 THEN RETURN 1 ELSIF x <= -0.54931D0 THEN RETURN - tanh(-x) ELSIF x >= 0.54931 THEN RETURN 1 - 2 / (MathL.exp(2 * x) + 1) ELSE (* with Mathematica: <