floating point - How do I math on floats? -
floating point - How do I math on floats? -
this question has reply here:
is floating point math broken? 26 answersi need alternative simple math.
float freqa = 28.333334; freqa = freqa+0.000001; println(freqa);
however results in 28.333336. how perform math right reply of 28.333335?
i have tried converting float integer performing math, converting float, same mathematical errors.
chances high programming environment has double
datatype. type uses more memory float
, offers higher precision.
https://en.wikipedia.org/wiki/double-precision_floating-point_format
floating-point
Comments
Post a Comment