ucum-org / ucum

https://ucum.org
Other
55 stars 10 forks source link

dot as decimal separator and not UCUM dot #147

Open timbrisc opened 7 years ago

timbrisc commented 7 years ago

Issue migrated from trac ticket # 199

component: help | priority: minor

2017-05-26 14:40:29: vojtech.huser@nih.gov created the issue


CDISC has a unit (per 4mL)

the NLM UCUM validator at https://lhncbc.github.io/ucum-lhc/demo.html validates this just fine and it is valid.

But there is also unit "per 7.5mL" for that, I need UCUM /7.5mL

how to express decimal multipliers?

timbrisc commented 7 years ago

2017-05-31 17:39:59: gschadow@pragmaticdata.com commented


Since the dot was reserved for multiplication based on early ISO standards, you can use ratios. 75/10.mL. I know it's a bit clunky, but it works.

timbrisc commented 7 years ago

2017-05-31 17:41:26: gschadow@pragmaticdata.com commented


I should correct "2 mg per 7.5 mL" would be "2 mg/75.10/mL" or using parentheses "2 mg/(75/10.mL)"

timbrisc commented 3 years ago

2021-01-15 23:11:49: mitchbre@regenstrief.org changed status from new to assigned

timbrisc commented 3 years ago

2021-01-15 23:11:49: mitchbre@regenstrief.org set owner to Simon Cox

timbrisc commented 3 years ago

2021-01-17 23:09:44: simon.cox@csiro.au commented


7.5 mL is equal to 7500 uL. So 7500.uL might be easier? e.g.

2 mg/(7500.uL)
timbrisc commented 3 years ago

2021-01-17 23:09:44: simon.cox@csiro.au

chgessner commented 2 years ago

No. It is an essential feature of UCUM to treat a numerical value as a different entity from unit symbols.

dr-shorthair commented 2 years ago

@chgessner I don't understand which part of the thread you are responding to. Can you spell it out a bit please?

Are you saying that the whole idea of 'per 4mL' and 'per 7.5mL' is wrong-headed? Or that the solutions offered by @gschadow and @dr-shorthair are wrong? Or something else?

chgessner commented 2 years ago

I was referring to the original post, trying to say that according to UCUM §7 and §8 you can't use floating point numerical values as part of a unit expression. @gschadow already pointed out a viable solution.