[Oberon] System-7 - Math popular consts

Tomas Kral thomas.kral at email.cz
Thu Feb 28 11:01:36 CET 2019


Hi,

Just discovered `Math.mod', such a tiny module! I wish to add two
consts to it.

pi = 3.14159265
e = 2.71828182

Float format on risc is 
x = 1.m * 2^(e-127)   
bit 0: sign, bits 1- 8: e, bits  9-31: m

I believe binary mantisa roughly corresponds to 8 decimal digits.

Now, how to code the consts to make most of the given mantisa?

-- 
Tomas Kral <thomas.kral at email.cz>


More information about the Oberon mailing list