We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I notice Processing error with float calculation.. My code float a=0.12+0.12+0.12; println(a); Why I got 0.359xx instead 0.36?
This discussion talks about this in some detail. The answers by blindfish are very clear.
Thanks @quark. I read this post https://support.microsoft.com/en-gb/kb/214118 then I use "nfc" function to correct the calculation (4 digit after comma)..
float a=0.12+0.12+0.12; String aconv=nfc(a, 4); String[] asplit=split(aconv, ","); aconv=join(asplit, "."); a=float(aconv); println(a);
Answers
This discussion talks about this in some detail. The answers by blindfish are very clear.
Thanks @quark. I read this post https://support.microsoft.com/en-gb/kb/214118 then I use "nfc" function to correct the calculation (4 digit after comma)..