Open ggggggggg opened 9 years ago
Simpler case
julia> KiloGram*KiloGram
1.0e6 g²
It has to do with remove_prefix not knowing about prefixed base units.
For: E=2.409866751432028e-24 g⁻¹J²s²m⁻² E1=as(E,eV) equals E1=1.504120584507506e-8 eV This is wrong!
Should be 0.0150412053 eV
I think in has to do with the g unit
I think in has to do with default, const KiloGram = BaseUnit("g", prefix=3) Why is this not in kg?
Update: Yes this worked. Change the a_si_plus.jl file to reflect the above [KiloGram = BaseUnit("kg")]. I'm new to github, so not sure how to change/ or if possible to change the master. Also, this change may affect others...
Rant: Was so close to going back to maple... but I must say, it is very nice to be able to update the source file, the potential is limitless :) Thanks for the package
The base unit is prefixed g instead of kg, because it's easier to support prefixes other than k. If I used kg without a prefix, then a gram would be mkg (milli kg). At least the way I programmed it. Prefixed base units turned out to be way trickier than I expected. I'll take another look at it.
I fixed your example. I'm leaving the issue open because it was actually a different (but more serious) issue than the original. The original is just a cosmetic issue.
c8266e34c588dcd32da92e437609457fcb838b0b
These should both go to
kg
.