Hello. I made the following verb to get the decimal value of a floating point number:
decimal=: 3 : 0
y - <. y
)
The problem is this:
decimal 5.1
0.0999999999999996
But using a decimal value greater than 1 would return the correct result:
decimal 5.2
0.2
decimal 5.11
0.11
Any idea what I should do next?
Thanks.
r/Alex
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
