Hej all :)
I'm a little confused by the results of (floor .) in a simple
computation to get the fractional part of a monetary value. Maybe
someone can comment on this, as especially in the last test case below
the results seem very strange to me...
The starting point is:
guile> (rationalize (floor (* (- 12.34 (floor 12.34)) 100)) .0)
33
The actual result shoud be 34.
I tired the following simplifications:
guile> (rationalize (floor (* (- 12.34 (floor 12.34)) 100)) .0)
33
guile> (floor (* (- 12.34 (floor 12.34)) 100))
33.0
guile> (* (- 12.34 (floor 12.34)) 100)
34.0
And checked, if this might be some sort of expected behaviour:
guile> (floor 34.0)
34.0
I'm using guile 1.8.5.
Thanks, and have a nice time :)
Kai