decimal round off issue - Page 2

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: decimal round off issue

Quoted text here. Click to load it
Thats very true. And its non-repeating. Therefore, it should not be a
problem going from (1.001 x 2**1)base 2, to 2.25 base 10 and having it display
correctly when it comes to rounding and formatting string representation.
I'm not sure that rounding happens the same way on all systems when there is
a repeting binary fraction (like .55 base 10).

From wikipedia:

I wonder if you do a bitwise examination of a float variable if it
will show the sign, exp, fraction bits like in the standard?
Or on the language level, are the bitwise operators restricted to
operations on integers?

Where are the calculators that do binary <-> decimal fractions?
Don't want to do it by hand all the time.


Site Timeline