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
It appears that when a unit has multiple prefixes, all but the last one are ignored. That is to say, the following all equal 3 cg:
Unit.new('3 mcg')# this is how I originally discovered the issue,# mistakenly thinking this would be microgramsUnit.new('3 ccg')Unit.new('3 cccccg')Unit.new('3 yottagigamicrocg')
I don't know what should happen (is a ccg a hundredth of a hundredth of a gram, or just meaningless garbage?), but I presume silently throwing away input is not the desired behavior.
The text was updated successfully, but these errors were encountered:
I think the intended behavior would be to only recognize a single prefix, centi-centi-meters is silly and I'm fairly sure there's a standard somewhere that says you can only have one prefix.
At least for SI units, @olbrich Is correct. You are only supposed to have one prefix. SI Brochure
From Wikipedia:
The prefixes are never combined, and multiples of the kilogram are named as if the gram was the base unit. Thus a millionth of a metre is a micrometre, not a millimillimetre, and a millionth of a kilogram is a milligram, not a microkilogram.
It appears that when a unit has multiple prefixes, all but the last one are ignored. That is to say, the following all equal
3 cg
:I don't know what should happen (is a ccg a hundredth of a hundredth of a gram, or just meaningless garbage?), but I presume silently throwing away input is not the desired behavior.
The text was updated successfully, but these errors were encountered: