Smalltalk
›
Pharo
›
Pharo Smalltalk Users
Search
everywhere
only in this topic
Advanced Search
From vwnc interesting..
‹
Previous Topic
Next Topic
›
Classic
List
Threaded
♦
♦
Locked
1 message
S Krish
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
From vwnc interesting..
| x y |
x := 2.0.
[x > 0] whileTrue: [x := x / 2].
y := -2.0.
[y < 0] whileTrue: [y := y / 2].
(x = 0.0) -> (x = y) -> ((x basicAt: 1) = (y basicAt: 1))
printIt returns
true->true->false
and:
x = 0.0 and y = -0.0 the negative 0.0
https://en.wikipedia.org/wiki/Signed_zero
Free forum by Nabble
Edit this page