CURIUM
What does the decimal point in 1.75 hide when written as a fraction?

Decimal number

What does the decimal point in 1.75 hide when written as a fraction?

Division by 100: 1.75 = 175/100. Decimal notation reads as the quotient of the number without its decimal point divided by as many factors of 10 as there are digits after the decimal point. A decimal number is a number written this way, with a finite number of digits after the decimal point.

MathsArithmetic and numbers

The three levels

Beginner

What does the decimal point in 1.75 hide when written as a fraction?

Division by 100: 1.75 = 175/100. Decimal notation reads as the quotient of the number without its decimal point divided by as many factors of 10 as there are digits after the decimal point. A decimal number is a number written this way, with a finite number of digits after the decimal point.

Intermediate

1/3 is not decimal, 3/4 is: what accounts for the difference?

The denominator. An irreducible fraction describes a decimal number if and only if its denominator is the product of a power of 2 and a power of 5. The denominator 4 equals 2 × 2, so 3/4 = 0.75 writes exactly; 3 is neither a power of 2 nor a power of 5, and 1/3 = 0.333… never terminates.

Expert

How does a computer calculate 3 × 1.1 = 3.3000000000000003?

By working in base 2, not base 10. In binary, 1.1 writes as 1.0001100110011… without end, and IEEE 754 double-precision format truncates this expansion to 52 binary digits. The stored number is only an approximation of 1.1, and the rounding error shows up in the product: in Python, 3*1.1 returns 3.3000000000000003. The Decimal module sidesteps the trap.