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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Nicolas Cellier-3
Issue status update for
http://smalltalk.gnu.org/node/313
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/313

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    Base classes
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  nice
 Updated by:   nice
 Status:       active

The pi example gave me a clue.

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

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

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

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




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] FloatQ do not read like they print (et vice et versa)

Paolo Bonzini-3
Issue status update for
http://smalltalk.gnu.org/project/issue/313
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/313

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    Base classes
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  nice
 Updated by:   bonzinip
 Status:       active

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.




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] FloatQ do not read like they print (et vice et versa)

Paolo Bonzini-3
In reply to this post by Nicolas Cellier-3
Issue status update for
http://smalltalk.gnu.org/project/issue/313
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/313

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    Base classes
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  nice
 Updated by:   bonzinip
-Status:       active
+Status:       fixed

should be fixed now.




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk