[fpc-pascal] Floating point question

James Richters james.richters at productionautomation.net
Fri Feb 16 15:57:11 CET 2024


>So you are saying when constant propagation is on, an expression should have a different result than with constant propagation off?

The result of math when using constants MUST be the same as the result of identical math using variables.

There should never be a difference if I did my formula with hard coded constants vs variables.

  Const_Ans = 2.00000010627116630224
 Const_Ans1 = 2.00000010627116630224
   Var_Ans1 = 2.00000000000000000000

This should not be happening.

James



More information about the fpc-pascal mailing list