|
|
|
|
||
|
DEFINITION MODULE ExtMathLib (* A.I. 10.10.86 *); (******************************************************************* Module ExtMathLib (Version 1.0) Copyright (c) 1986-2006 by Alex Itten and ETH Zurich. Purpose Basic functions and conversions for extended reals (80-bit, SANE). Remarks According to Inside the MacIntosh, Part III Page 194, the destination operand must always be in extended (80-bit) format, otherwise a Stack Overflow occurs. Programming o Design Alex Itten 10/10/1986 o Implementation Alex Itten 10/10/1986 ETH Zurich Systems Ecology CHN E 35.1 Universitaetstrasse 16 8092 Zurich SWITZERLAND URLs: <mailto:RAMSES@env.ethz.ch> <http://www.sysecol.ethz.ch> <http://www.sysecol.ethz.ch/SimSoftware/RAMSES> Last revision of definition: 03/07/2006 AF *******************************************************************) TYPE EXTREAL = ARRAY[1..5] OF CARDINAL; (* same Procedures as is MathLib and LongMathLib *) PROCEDURE ExtSqrt (x: EXTREAL; VAR res: EXTREAL); PROCEDURE ExtExp (x: EXTREAL; VAR res: EXTREAL); PROCEDURE ExtLn (x: EXTREAL; VAR res: EXTREAL); PROCEDURE ExtSin (x: EXTREAL; VAR res: EXTREAL); PROCEDURE ExtCos (x: EXTREAL; VAR res: EXTREAL); PROCEDURE ExtArcTan(x: EXTREAL; VAR res: EXTREAL); PROCEDURE ExtReal (x: LONGINT ; VAR res: EXTREAL); PROCEDURE ExtEntier(x: EXTREAL; VAR res: LONGINT ); (* Conversions to and from REAL and LONGREAL *) PROCEDURE LongToExt(x: LONGREAL; VAR res: EXTREAL ); PROCEDURE ExtToLong(e: EXTREAL; VAR res: LONGREAL); PROCEDURE RealToExt(x: REAL; VAR res: EXTREAL ); PROCEDURE ExtToReal(e: EXTREAL; VAR res: REAL ); (* basic Procedures *) PROCEDURE ExtAdd(a,b: EXTREAL; VAR res: EXTREAL); PROCEDURE ExtSub(a,b: EXTREAL; VAR res: EXTREAL); PROCEDURE ExtMul(a,b: EXTREAL; VAR res: EXTREAL); PROCEDURE ExtDiv(a,b: EXTREAL; VAR res: EXTREAL); PROCEDURE ExtAbs(e: EXTREAL; VAR res: EXTREAL); PROCEDURE ExtNeg(e: EXTREAL; VAR res: EXTREAL); END ExtMathLib.
|
||
|
|
|