[bug] Number comparisons not transitive

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

[bug] Number comparisons not transitive

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

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

See http://bugs.squeak.org/view.php?id=3374

 a := 16rFFFFFFFFFFFFF81.
 b := 16rFFFFFFFFFFFFF82.
 c := a asFloat.
 {a = b.
  a = c.
  b = c.}

gives

(false true true )

(should all be false).

To fix this one would need to define a separate generality for
comparisons and arithmetic, and adjust hashes similarly.




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

Re: [bug] Number comparisons not transitive

Nicolas Cellier-3
"Hi Paolo,"

"I just checked gst3.1 complex package comparison, try this:"

PackageLoader fileInPackage: 'Complex'.
-1 > 2 i. "is true"
2 i > -1. "is also true"
FloatD nan < 1 i. "err..."

"-------------------------------"
"I noted this one does not print:"

FloatQ fmax.

"Nicolas"



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