Re: handling underflow in macro calculations
hy hansen
regardless of cnc brand, or pc software, 0.5 - 0.1 is not always 0.4
thus 0.5 - 0.1 - 0.1 - 0.1 - 0.1 - 0.1 is not always 0
that's because of variable's nature/type that holds that data
to fix your code, consider a tolerance, like #101=5, if ABS[#101-5]<=0.0003 then do something
Apparantly either 0 isn't actually 0(i.e. 0.000000001) or 1 (1.00000000001) is the problem.
for this instance, 0.0003 has to be small enough not to affect your calculations, but also bigger than 0.00000000001
please feel free to ask anything / kindly
Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg