Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possible floating point error?
#7
Thanks for the insights everyone. Sorry to have reported this as a possible bug. And yes, this is interesting:

Interesting.
f = 2 / 454
x = 227 * f
yields .9999999

while
x = (2 / 454) * 227
yields 1.

Knowing this perhaps I can rework the code to report the exact time of change again if ever needed.
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply


Messages In This Thread
Possible floating point error? - by TerryRitchie - 05-30-2024, 01:02 AM
RE: Possible floating point error? - by Jack - 05-30-2024, 01:34 AM
RE: Possible floating point error? - by JRace - 05-30-2024, 01:48 AM
RE: Possible floating point error? - by SMcNeill - 05-30-2024, 02:30 AM
RE: Possible floating point error? - by SMcNeill - 05-30-2024, 03:31 AM
RE: Possible floating point error? - by TerryRitchie - 05-30-2024, 04:18 AM



Users browsing this thread: 2 Guest(s)