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
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.
The text was updated successfully, but these errors were encountered:
I think this is an error in UCUM itself. The UCUM value for inch is given as 2.54cm, which is a precision of 3, so 1 mile is 1.60e3m - which becomes 1609 in decimal form. The correct conversion value is 2.539999962 - so raise an issue against UCUM
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.
The text was updated successfully, but these errors were encountered: