3 ms·
You should perhaps be using a rational number datatype instead of floating point arithmetic. It depends what calculations you're doing: if you need to use tran
by mooism2 14y ago
You should perhaps be using a rational number datatype instead of floating point arithmetic.
It depends what calculations you're doing: if you need to use transcendental functions then you're stuck with floating point, and you'll have to decide how close two numbers need to be for you to consider them equal. n.b. you need to do this: no programming language can know whether false positives are more or less harmful than false negatives in your program.