Java tutorial
//package com.java2s; import java.math.BigDecimal; public class Main { public static float subFloat(Float v1, Float v2) { BigDecimal b1 = new BigDecimal(Float.toString(v1)); BigDecimal b2 = new BigDecimal(Float.toString(v2)); return b1.subtract(b2).floatValue(); } }