Community
Participate
Working Groups
Like 432200, it seems like sometimes the multiple and divide are reversed. You can see that in the first two examples, where 16lbs reports as 1 oz. But in the case of converting to Grams, it seems completely off. Here is a snippet of the code I ran (0.6.0): UcumService service = new UcumEssenceService(Play.application().resourceAsStream("ucum-essence.xml")); System.out.println("16 OZ to LBs = " + service.convert(new BigDecimal(16), "[oz_av]", "[lb_av]")); System.out.println("16 LBs to OZ = " + service.convert(new BigDecimal(16), "[lb_av]", "[oz_av]")); System.out.println("1 LBs to Grams = " + service.convert(new BigDecimal(1), "[lb_av]", "g")); System.out.println("16 Oz to Grams = " + service.convert(new BigDecimal(16), "[oz_av]", "g")); System.out.println("1 Oz to Grams = " + service.convert(new BigDecimal(1), "[oz_av]", "g")); The output of the above is as follows: 16 OZ to LBs = 256 16 LBs to OZ = 1 1 LBs to Grams = 453.59237000 16 Oz to Grams = 116119.64672000 1 Oz to Grams = 7257.47792000