New answers tagged

12

Mathematica will perform exact arithmetic only so long as all quantities are expressed as exact numbers. 90.12 is an inexact number with machine precision (i.e. floating point). Corresponding exact representations include 9012/1000 or 9012*^-2. For numbers with a finite decimal representation, we can use RealDigits to see all the digits along with a count ...


0

"I want to get a decimal representation" is not compatible with infinite precision because some rational numbers like 1/3 have infinite decimal representation that does not fit into a computer. You pointed out a solution: use fractions. Equivalently you could represent exactly a rational number using its period, like 1/3 == 0.Repeated[3] 1344/19 == ...


Top 50 recent answers are included