AMDG alfC wrote:
that worked right away. What would be the drawback of using DEFAULT_CONVERSION macro? loss of precision perhaps?
actually, the question is more profound, from the design of the library it seems that you were very careful not to make any transformation automatically because loss of precision.
The idea is that you can specify as many direct conversions as you want, and the library will use the default one only if it can't find the one it really wants. In fact, we use DEFAULT_CONVERSION for most of the non-SI units.
If that is the case I would like to follow your design principle. On the other hand, even if I want to work in atomic units (motivated by the order of magnitudes of the quantities) it is inevitable to output some of the results in SI. The question is does it make sense to have this transformation from Hartree to Joule with such an huge exponent.
It's probably okay. double can handle values up to about 10^300
Following your design, would it be better to have a conversion from Hartree to some scaled unit of Joule (femtoJoule) instead, so all the machine number have small exponents?
I'm not a floating point expert, but if you're just doing the conversion for output, it probably doesn't matter. In Christ, Steven Watanabe