Kryvich 174 Posted Thursday at 08:53 PM (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 Thursday at 08:54 PM by Kryvich Share this post Link to post
David Heffernan 2415 Posted Thursday at 09:26 PM This is just a debugger issue, you shouldn't change your code because of this Share this post Link to post
DelphiUdIT 224 Posted Thursday at 10:22 PM 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 Friday at 04:39 AM @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 2415 Posted Friday at 08:03 AM 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