Kryvich 174 Posted April 17 (edited) Something went wrong with system functions Int and Frac in Delphi 12, Win32 platform. At runtime, the result of the expression Frac(1.9) can be either 0.9 (as expected) or 0 or 0.89. I couldn't determine what affects this. Interestingly, in the Evaluate/Modify window, the expressions Frac(1.9) and Int(1.9) always return -NAN, whatever that means. Has anyone encountered these issues? As a temporary workaround, I used x-Trunc(x) instead of Frac(x). Edited April 17 by Kryvich Share this post Link to post
David Heffernan 2433 Posted April 17 This is just a debugger issue, you shouldn't change your code because of this Share this post Link to post
DelphiUdIT 229 Posted April 17 With 12.3 Enterprise I cannot replicate any of these issues. Not even with evaluation panel. Share this post Link to post
Kryvich 174 Posted April 18 @David Heffernan This is evident not only in the debugger, but also at runtime. That's the question. Processor - AMD Ryzen 5 3600. @DelphiUdIT That's good! I have the community edition, its version is 29.0.51961.7529, Delphi 12 Update 1. Share this post Link to post
David Heffernan 2433 Posted April 18 3 hours ago, Kryvich said: @David Heffernan This is evident not only in the debugger, but also at runtime. That's the question. Processor - AMD Ryzen 5 3600. @DelphiUdIT That's good! I have the community edition, its version is 29.0.51961.7529, Delphi 12 Update 1. Then please provide a complete but minimal reproduction. Share this post Link to post