Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignored prefixes #66

Closed
hynkle opened this issue Mar 20, 2013 · 2 comments
Closed

ignored prefixes #66

hynkle opened this issue Mar 20, 2013 · 2 comments

Comments

@hynkle
Copy link

hynkle commented Mar 20, 2013

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 micrograms
Unit.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.

@olbrich
Copy link
Owner

olbrich commented Mar 22, 2013

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.

@Nkburdick
Copy link

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.

@olbrich olbrich closed this as completed Jul 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants