I am running a simple arithmetic operation in a charting software sierra chart: Eg
float x = 1.2f;
float y = 1.0f; //this variable is set as "float" type by the charting software automatically
result = x - y;
float z = 0.2f;
I have a preprogrammed output command from the charting software, but a desired result of this simple calculation fails to register all the time Eg
if (result <= z){alert;}
Because it works sometimes, I am wondering if there is a challenge with the float point types, with the fixed variable y, or with the preprogrammed alert output itself. Certainly I can only expect comments regarding the calculation and variable type.
We’ve finally reached the point in this series that I’ve been waiting for. In this post I am going to share the most crucial piece of floating-point math knowledge that I have. Here it is: