Home > Floating Point > Floating Point Error Example Java

## Contents |

As the computer can store only a finite number of digits, at some point this has to get chopped off, so the answer is not precise. This improves portability at the expense of efficiency. d1/10 + d2/100 + d3/1000 ... Find a value of x for which Math.abs(x) doesn't equal Math.sqrt(x*x). navigate here

This challenging problem is further exacerbated since many important scientific algorithms make additional approximations to accommodate a discrete computer. The next 8 bits represent the exponent. Implementations are free to put system-dependent information into the significand. More like this Java 101: Elementary Java language features Bytecode basics Logic and integer arithmetic