Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Could anybody tell me why the following lisp line returns 9 and not 10 ?
(FIX (* (- 70.1 70) 100))
If you increase the multiplication factor it keeps returning 9 up till 1.0+e10
It appears that the minus function calculates this to be 0.099999999999 not 0.1
It is doing this in a short routine that I have been using for over 10 years and I do not recall it being a problem. It also gives the same answer if the line is typed at the command prompt.
I have precision set to 0.0000
Any ideas appreciated
Thanks
Chris
Solved! Go to Solution.