[Patch] Optimised/Fixed "Int" function
Original Reporter info from Mantis: CuriousKit @CuriousKit
-
Reporter name: J. Gareth Moreton
Original Reporter info from Mantis: CuriousKit @CuriousKit
- Reporter name: J. Gareth Moreton
Description:
As initially touched upon in #33635 (closed), the Int as well as the Frac function was faulty when it came to handling values whose magnitude was larger than 2^63 (too large for an Int64), causing a crash. The Frac function already implements an inlined and rearranged version of this proposed Int function, and this completes the set by providing robust code that is also small and very fast to execute.
Steps to reproduce:
Run the supplied "inttest.pp" file to compare timings and correctness, then apply the patch to merge the new Int function into the RTL.
Additional information:
Find attached inttest.log for a sample run of the timings. If compiled under Linux, the timings are not shown or calculated.
Mantis conversion info:
- Mantis ID: 33693
- OS: Microsoft Windows
- OS Build: 10 Professional
- Build: x86_64-win64-win32/win64
- Platform: Win64
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 38993 (#7990b2e3)