How to write a very small number, which is approaching the limit 0? Like this:
double eps = 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001;
This is a constant, but in the code it looks terrible. Is there a shorter form?
Java supports scientific notation for expressing double literals. You can write a small number, say, 10-12 like this:
double eps = 1E-12;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With