[ooc-compiler] mantissa
Brought to you by:
mva
|
From: texts w. <tex...@go...> - 2007-06-05 15:36:10
|
Hello. First of all, I want to thanks you for great compiler, oo2c I am porting one application from blackbox cp to oo2c, and created CompatMath.Mod to solve compatibility problems. In the original application I am trying to make minimal changes like IMPORT Math := CompatMath; And this is the listing of emulation module: MODULE CompatMath; IMPORT LowReal, RealMath; (* PROCEDURE Mantissa* (x : REAL) : REAL; BEGIN RETURN LowReal.fracpart(x); END Mantissa; *) PROCEDURE Exponent* (x : REAL) : INTEGER; BEGIN RETURN LowReal.exponent(x); END Exponent; PROCEDURE IntPower* (x : REAL; n : INTEGER) : REAL; VAR i : INTEGER; BEGIN IF (n = 0) THEN RETURN 1 END; RETURN RealMath.power (x, n); END IntPower; PROCEDURE Log*( x : REAL) : REAL; BEGIN RETURN RealMath.log(x, 10); END Log; PROCEDURE Eps*() : REAL; BEGIN RETURN LowReal.ulp(1.0); END Eps; END CompatMath. Question is, I am not sure howto make wrapper for Mantissa function. If anyone has an idea then please, help me :) Thanks Norayr Chilingaryan |