Oldest QB45 bug ever known - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Oldest QB45 bug ever known (/showthread.php?tid=2845) Pages:
1
2
|
Oldest QB45 bug ever known - eoredson - 07-02-2024 This error reported in QB45 has been there forever: Code: (Select All) Rem oldest QB45 bug ever known. Am I incorrect in assuming this bug has been squashed? Erik. RE: Oldest QB45 bug ever known - euklides - 07-02-2024 The reason why QB64pe is better ! RE: Oldest QB45 bug ever known - SMcNeill - 07-02-2024 I'd never swear to this type of glitch being fully squashed. VAL returns a floating point value to us. Not all floating point values work out to be exactly what we'd think they might be. x = VAL("10") may somehow magically return a value of 9.9999999999999999 due to the way floating point numbers work. QB4PE tries to avoid this issue, as much as possible, but it's an underlying component of just the way floating point works. Any time you work with floating point values, I'd never swear that you'd get exact integers. If you want integers, then assign it to an integer variable. Chances are, if the value ends up being 9.99999999999 or 1.0000000000001e12, or whatever, it'll end up rounding to the proper value for you naturally. Code: (Select All) x$ = "9" RE: Oldest QB45 bug ever known - eoredson - 07-02-2024 (07-02-2024, 07:19 AM)SMcNeill Wrote: I'd never swear to this type of glitch being fully squashed. VAL returns a floating point value to us. Not all floating point values work out to be exactly what we'd think they might be. x = VAL("10") may somehow magically return a value of 9.9999999999999999 due to the way floating point numbers work. QB4PE tries to avoid this issue, as much as possible, but it's an underlying component of just the way floating point works.Alright. That's what I thought was happening. I am working on a project called Strek (which you can find in the Games forum). I was trying to convert a string array to Integer and it returned values of less than 1 for conversion. Thought it was an error in my code but apparently not. Erik. RE: Oldest QB45 bug ever known - Pete - 07-02-2024 Computers are great for data driven events, hell one day we may even have an A.I. President... Just don't ask him (it) to do simple math. Pete - Just because I live in base ten, doesn't make me non-binary. RE: Oldest QB45 bug ever known - eoredson - 07-15-2024 (07-02-2024, 05:39 PM)Pete Wrote: Computers are great for data driven events, hell one day we may even have an A.I. President... Just don't ask him (it) to do simple math. Which is why I carry around a calculator. I have no other way to figure out 2 plus 2 The last time I asked for the value of 2 plus 2 all I got was 3.999 RE: Oldest QB45 bug ever known - bplus - 07-15-2024 First documented computer bug: Caught trying to do trig RE: Oldest QB45 bug ever known - eoredson - 07-17-2024 @bplus: Can you do integral calc on a shroud??? RE: Oldest QB45 bug ever known - Pete - 07-17-2024 I wrote a 'Hello World' program on 30-some punch cards in 1979. I kept them until I went into practice in 1985; that was the same year I purchased a shredder. Hey, does anyone think shredding Fortran cards is the earliest form of encryption? Pete RE: Oldest QB45 bug ever known - bplus - 07-17-2024 (07-17-2024, 04:07 AM)eoredson Wrote: @bplus: Can you do integral calc on a shroud??? Are you looking for miracles? I just noticed the first actual case when when arctangent was started. |