in reply to Calculation discrepancy between Perl versions
Following on from ig's comment a couple of alarm bell stimulating items in relation to your code, data and results should be mentioned:
This sort of code can be very tricky to get right with careful attention needing to be paid to expected ranges of values at each step and consideration given to changing calculation order to minimise errors propagating through the calculation chain. Using higher precision numerical representation is a quick way around what can otherwise often be a difficult problem.
|
|---|