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 i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members