When debugging, JITTER behaves differently.
First, local variables in many cases change the lifetime so that they can be checked. Consider hitting a breakpoint after using the variable during the calculation. If JITTER knows that the variable will not be used after the expression, and this does not extend the life of the variable, you may not be able to look at this variable, which is the main debugging function.
JITER has a very clear knowledge of when a variable is useful for keeping it still. If a register is available during this time, it can use this register to store the variable.
However, when connecting a debugger, it can use a memory cell instead, because the lifetime has changed so much that the register is not accessible for this part of the code.
The floating point registers of the CPU are more accurate than the corresponding floating point storage formats, which means that as soon as you either raise the value from the register and into memory, or simply store it in memory all the time, you will experience lower accuracy.
The difference between the RELEASE and DEBUG versions can lead to dictation of these things, as well as the presence of a debugger.
In addition, there may be differences between different versions of the .NET runtime that may affect this.
Writing floating-point code correctly requires intimate knowledge of what you are trying to do and how different parts of the machine and platform will influence. I will try to avoid writing such code.
source share