[Thread Prev][Thread Next][Index]

odd numbers larger than 2^24



Dear ferreters,

There is an odd behavior on simple calculation.
Here are my results.
--------------------------
NOAA/PMEL TMAP
FERRET v5.70
Linux(g77) 2.4.20 - 06/28/04
2-Feb-05 15:21

yes? list/p=9 2^24
VARIABLE : 2^24
16777216.0 -> Correct !
yes? list/p=9 2^24-1
VARIABLE : 2^24-1
16777215.0 -> Correct !
yes? list/p=9 2^24+1
VARIABLE : 2^24+1
16777216.0 -> Wrong !
yes? list/p=9 2^24+9
VARIABLE : 2^24+9
16777224.0 -> Wrong !
-------------------------------------------

Some more tests show that odd numbers bigger than 2^24 is not
represented correctly.
It is always represented as an even number, sometimes smaller value by 1
or sometimes bigger by 1.

How about others?
Is this a bug?

Sincerely,

Hyoun-Woo

--
Hyoun-Woo Kang

Korea Ocean Research and Development Institute,
P.O.Box 29, Ansan, 425-600, Korea
Phone : 82-31-400-7801
Fax   : 82-31-408-5823
Email : hwkang@kordi.re.kr




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement