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
Post a Comment