FHIR / FHIR/Ucum-java

Unexpected result converting to canonical type

Open
#21 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
26
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Decimal m = ucum.convert(new Decimal("1",15), "[mi_i]","m");
System.out.println("one mile = " + m + "m expect 1609.344");

Internally convert() first correctly converts 1[mi_i] to canonical unit [m] as 1609.344 but the
conversion from canonical [m] to destination type [m] converts 1609.344 to 1609 because
the identity conversion m->m uses Decimal("1",precision=1)

I would expect the unity conversion to be a noop.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.