-
Notifications
You must be signed in to change notification settings - Fork 4
fix float overflow defect #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The branch for 0 denominator slows down this proc without fixing any bugs (it returns the correct bool without the check). |
|
on my computer, the application, even demo examples crashes without this check. |
|
Hm, my Intel and AMD hardware, ARM M1 Mac, and all Github Actions on Mac Windows and Linux work. What is your hardware? Something must be different and it would be good to know what. |
|
Thank you for the issue. Could you provide a minimal example that causes this error, the compile flags you use and the nim -v of your install? We use this path a lot in pixie filling and have optimized it a ton, so we don't want to change it without evidence. If there is a real thing we will fix it. |
|
I understand your sentiment, but I repeatedly ran into it. if you put a doAssert on that line, you'll probably reach it sometimes.
the branch for 0 denominator may happen. why not test that branch? |
|
Ah, so, dividing by 0 is perfectly fine with floats. A bit more on this here: https://stackoverflow.com/questions/13110825/divide-by-zero-c-programming (It is not at all the same as integers.) |
That is different. I have updated the bumpy examples to use the latest pixie. What examples where you running that had that issue? These bumpy examples would not have compiled with the latest Pixie so I'm thinking it was something else. (see #14) If it was the Fidget examples, those are probably locked to a very old version of Pixie and out of date. We're working on a new Fidget that is pretty different so those are probably not the best to look at right now unfortunately. |
|
(If it is Fidget examples, we could look at updating them, just noting that could explain the bad behavior.) |
|
Sorry I am going to close this. We rely on the behavior of the divide by zero to produce the inf. Its part of float point standard. Feel free to reopen if you can produce an example where there is a bug happens, and we will take a look at this again. |
|
sure thing. when I have more time, will try the examples again. There should be an easy nimble update all pkgs command. |
No description provided.