how solve java rounding double issue


seems multiplication triggering kind emanate indirect value wrong.



double tempcommission = targetpremium.doublevalue()*rate.doublevalue()/100d;


78.75 = 787.5 * 10.0/100d



double nettocompany = targetpremium.doublevalue() - tempcommission;


708.75 = 787.5 - 78.75



double dcommission = request.getpremium().doublevalue() - nettocompany;


877.8499999999999 = 1586.6 - 708.75



the indirect approaching value 877.85.



what should finished pledge repremand calculation?



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?