Bigdecimal vs double performance

**BigDecimal**(**double**val) Translates a**double**into a**BigDecimal**which is the exact decimal representation of the**double**'s binary floating-point value.**BigDecimal**(**double**val, MathContext mc) ...**Performance****vs**Precision. Another benefit of generic numeric programming, is that you can push the choice of numeric type off to someone else. ...- Question Is there a generally accepted way to get Euler's number in
**BigDecimal**? I basically want to do Math.exp(double a) and I basically want the same function but calculated using**BigDecimal**to prevent precision loss with other calculations. I thought of just doing,**BigDecimal**.valueOf(Math.E).pow(BigDecimal.SOMEOTHERNUMBER) But not sure if that's the right way to approach the problem. **BigDecimal**is fine for money and also results in "absolute" precision. Using cents as integers has also some minor problems, for example countries sometimes change the divisions of their money, for example when due to inflation a country starts to use the equivalent of dollars or dimes as the smallest unit instead of cents. 5.- The
**BigDecimal**class provides operations on**double**numbers for arithmetic, scale handling, rounding, comparison, format conversion and hashing. It can handle very large and very small floating point numbers with great precision but compensating with the time complexity a bit.**Double**. 8 bytes / 16 bytes. - Basically both the
**BigDecimal**from**double**(immediately loss of precision) and the**BigDecimal**from String (no loss of precision) seem to be stored as 0.99 in Couchbase, and both are read back as 0.99. If Couchbase stores numbers as**doubles**in Java, should have seen a loss of precision in the storage (console) and reading back in**BigDecimal**.