FloatQ do not read like they print (et vice et versa)

Tagged:
Project:GNU Smalltalk
Component:Base classes
Category:bug
Priority:normal
Assigned:Unassigned
Status:fixed
Description

The pi example gave me a clue.

st>3.1415926535897932384626433832795028841971693993751058209749445923078164062862q sin exponent
-61
st>-1.0q arcCos sin exponent
-64

What, I lost three bits?
Hmm fairly sure about my 256bits approximation of pi though...

st>-1.0q arcCos
3.1415926535897932385
st>3.1415926535897932385q
3.1415926535897932383
st> 3.1415926535897932385q sin exponent
-63

Yes, there might be a problem for reading these extended precision.

Updates

#1 submitted by Paolo Bonzini on Mon, 06/15/2009 - 12:46

Among others, there was a bug printing numbers very close to 1, like (1.0d - (1.0d timesTwoPower: -52)) or the equivalent FloatQ.

I fixed this by performing the floorLog after converting to a fraction, but there are still bugs reading.

#2 submitted by Paolo Bonzini on Sat, 07/11/2009 - 11:03
Status:active» fixed

should be fixed now.

User login