Author Topic: A cuestion on FIX.......  (Read 1266 times)

0 Members and 1 Guest are viewing this topic.

prexem

  • Guest
A cuestion on FIX.......
« on: July 26, 2008, 08:57:15 PM »
Reason
Code: [Select]
(fix (/ 1.2 0.2)) gives as result 5 and not 6?
....Thanks.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: A cuestion on FIX.......
« Reply #1 on: July 26, 2008, 09:21:33 PM »
It's an ACAD rounding error:
(rtos (/ 1.2 0.2) 2 16)
"5.999999999999999"

I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

prexem

  • Guest
Re: A cuestion on FIX.......
« Reply #2 on: July 27, 2008, 07:01:43 PM »
Hi CAB:
Really the correct result is 5, FIX does not fail then.
Thank You.