Numeric overflow
Posted: Thu Apr 16, 2020 3:20 pm
I have an application from VO that does a long series of complicated calculations (too much to show here), and uses the run-time compiler to evaluate expressions read from a file, using code-blocks. While using the Vulcan run-time library it was working well, but since updating to version 2.2, and changing to the X# library, it occasionally fails with a numeric overflow error. Inspecting the variable concerned, a USUAL type, at the point of failure in the debugger, shows it to contain a FLOAT with a value of 24736.73, but the 'Digits' property is only 4. Unfortunately I haven't been able to reproduce it in a simple example. I have fixed it by using “result := REAL8(result)”, but is there a better way, or is this a bug?