[issue45966] Error in Multiplication

2021-12-02 Thread Steven D'Aprano
Steven D'Aprano added the comment: https://docs.python.org/3/faq/design.html#why-am-i-getting-strange-results-with-simple-arithmetic-operations -- nosy: +steven.daprano ___ Python tracker

[issue45966] Error in Multiplication

2021-12-02 Thread Eric V. Smith
Eric V. Smith added the comment: This isn't a bug, it's a function of the IEEE-754 double precision floating point type that python uses. See: https://docs.python.org/3/tutorial/floatingpoint.html You might want to consider the decimal module, although that will also have limitations.

[issue45966] Error in Multiplication

2021-12-02 Thread Mukesh
New submission from Mukesh : I've tried various methods to multiply some numbers but every time I get an unsatisfying result when I try to evaluate 48*1.2 or 41*1.2 or 51*1.4 etc. For example if I run import math NUM3 = eval(input("Your Input: ")) print(NUM3) Output: Your Input: 51*1.4