You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the package isn't very arbitrary-precision-friendly, because conversion constants are often of Float64 type. My idea is to define them as Irrational:
The last three lines show that in this way the conversion factor has full precision as a BigFloat.
Edit: I initially proposed to define a type that was a simplification of Irrational, but in the end there wasn't much difference between my custom type and Irrational.
The text was updated successfully, but these errors were encountered:
Sorry for not getting back to you earlier. I like this idea a lot. I'm a little worried that we'd get collisions because someone else might define Irrational{:μ}, otherwise it seems great.
In practice, I'd imagine we could avoid this by using the irrational macro with very unique names like _Unitful_μ. Unique Irrational{:_Unitful_μ} methods would result, as well as a _Unitful_μ symbol. Then we could just say μ = _Unitful_μ so that the symbol is cleaner but we still avoid type collisions.
Also, while I defined float for quantities, I neglected to define big apparently. That'd need to be done too.
I'll get to this eventually but would also welcome a PR if you're feeling up for it.
Currently, the package isn't very arbitrary-precision-friendly, because conversion constants are often of
Float64
type. My idea is to define them asIrrational
:The last three lines show that in this way the conversion factor has full precision as a
BigFloat
.Edit: I initially proposed to define a type that was a simplification of
Irrational
, but in the end there wasn't much difference between my custom type andIrrational
.The text was updated successfully, but these errors were encountered: