You have stumbled upon a feature of floating point numbers.
Decimal 1/10 is an unending decimal fraction in binary floating point,
like 1/3 is unending in decimal representation.
There is no exact floating point representation of .1 iin AI2.
If you must deal in decimal fractions, use the math block that formats them as decimal text.
Well I tried that but it still doesn't work
If I set variable to decimal 1 then do a while loop subtracting decimal 0.1 while > decimal 0.1
then I get 1.3878E-16
please provide the solution to your problem...
your question and answers are not only for you, but also for others which might have the same question in future
thank you
When decrementing a decimal number in a while loop, the result comes back with random numbers 16 decimal places out. to fix the result I had to put a "format as decimal number" block in the equation to round off the random numbers as shown.