Closed mkostrze closed 4 years ago
I think it's caused by the following code in UCUMFormat, compare the comment with the actual code below:
// add power number if abs greater than 1
if (Math.abs(u.getValue()) < -1){
Patch attached.
Found a similar comment here:
https://github.com/unitsofmeasurement/uom-systems/issues/135#issuecomment-550207581
UCUM formatter doesn't add the power number to units in denominator. As a result it incorrectly formats units like Newton - it outputs kg.m/s, or m/s2 - it outputs m/s.
Sample unit test which fails (checked 2.0 and the newest from git)