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

A floating world



Conclusion (help from Wood and Goldsmith, and the other office 
here). And now I've got the formula right.

SPoC does "denormalized", (which is in effect wrong?):
And VC++ complains rightly, it seems.
--

SPoC REAL32 is float
  As standard occam (mathvals.inc): (IEEE 754-1985)
  VAL REAL32 MINREAL  RETYPES #00000001(INT32): -- 1.40129846E-45
  See below, this is "denormalized".
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
  Not ported to PC yet                                         NA
Calculated by myself:
  #00000001 is 
   Normalized:
   2exp(exponent-126)*0.fraction = 
   2exp(-126)*(1+2expp(-23))=  
   1,175494350822e-38 *  1,000000119209 =      1,175494490952e-38
   in Windows "Calculator"

   Denormalized:
   1,175494350822e-38 *  0,000000119209 =      1,401295060671e-45

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

-- 
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 )
(------------------------------------------------------------------(