[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A floating world



VC++ has been updated with the correct value, stated a little
further down in their help system. "approximately 3.4E 38" is
not the same as  1.175494351 E   38, good to see that even Bill
can err..
--

SPoC REAL32 is float
  As standard occam (mathvals.inc): (IEEE 754-1985)
  VAL REAL32 MINREAL  RETYPES #00000001(INT32): -- 1.40129846E-45
Java float
  As IEEE 754
  Minimum:                                      +/-1.40239856E-45
  According to Java in a Nutsehell
Visual C++
  As IEEE they say.
  Minimum:                                        1.175494351E 38
KRoC
  ???                                                         ???
Calculated by myself:
  #00000001 is 
   2exp(exponent-127)*1.fraction = 
   2exp(-127)*1.1=                             6.465218929523e-39
   in Windows "Calculator"

VC++ complains about this one, generated by SPoC:
  max_878 = 1.4012985e-045;
  warning C4305: '=' : truncation from 'const double ' to 'float '

Does anybody know anything about this?

I could RETYPE differently in mathvals.inc, and SPoC would give
another value, but I need to understand first. What does KRoC do?
  
-- 
Oyvind
(------------------------------------------------------------------(
)       Oyvind Teig )          oyvind.teig@xxxxxxxxxxxx ) Tel: +47 )
( Navia Maritime AS (          oyvind.teig@xxxxxxxxxxxx ( 73581268 (
)    div. Autronica )                                   ) Fax: +47 )
(    7005 Trondheim (           http://www.autronica.no ( 73581001 (
)            Norway )                                   )          )
(------------------------------------------------------------------(
)                    http://www.autronica.no/pub/tech/rd/index.htm )
(------------------------------------------------------------------(

-- 
Oyvind
(------------------------------------------------------------------(
)       Oyvind Teig )          oyvind.teig@xxxxxxxxxxxx ) Tel: +47 )
( Navia Maritime AS (          oyvind.teig@xxxxxxxxxxxx ( 73581268 (
)    div. Autronica )                                   ) Fax: +47 )
(    7005 Trondheim (           http://www.autronica.no ( 73581001 (
)            Norway )                                   )          )
(------------------------------------------------------------------(
)                    http://www.autronica.no/pub/tech/rd/index.htm )
(------------------------------------------------------------------(