Pythons default round function uses bankers algorithm to round of number.
(uses rounding to the nearest even number when the value is exactly halfway between two numbers).
JS toFixed used standard rounding( It always rounds up when the next digit is 5 or greater, regardless of whether it’s odd or even.)
My backend application is in python and Frontend in JS, due to this validations are failing.
69.125.toFixed(2)
'69.13'
>>> round(69.125,2)
69.12
Is there any way i can match JS output using python.
I thought numpy will do the job but it uses same algorithm