Hello Stefan, Stefan Monnier writes: > Emacs Lisp, like most common programming language doesn't support > rational numbers (and even less real numbers, which can't be faithfully > represented in a computer) but only floating point numbers. I find this characterization a little bit misleading, and I know it’s common jargon in computer science backed up by the specialized literature and such, but I’d like to express my view on the matter. Rigorously speaking there is no such thing as floating pointing /numbers/ as there is no such thing as roman /numbers/ or even Arabic decimal /numbers/. All of those are /numerals/, that is, sequence of symbols which represent (true) /numbers/. All floating point numerals demonstrably represent rational numbers, which are by definition also real numbers. Therefore, Emacs support arithmetic on some (finitely many) rational and real numbers. Not all rational numbers can be represented by floating point numerals, though. Yet, all rational numbers can be represented by pairs of arbitrarily large integers, which Emacs support (theoretically) by means of its built-in Calc library. Regarding irrational numbers, computers can faithfully represent any one that is computable. There are infinitely many of those (countably many, still). For instance, they may be represented by procedures that take an arbitrarily large natural number =n= and outputs a rational number that differs from the irrational number they represent in less than =10^-n= units. Being Lisp a Turing-complete language, Emacs can represent all such real numbers. To write an Emacs generalized real number arithmetic package remains as an (exciting?) open exercise for the free software community. In my view and experience the rigor and distinctions I tried to convey above make all the difference in truly understanding the Math-computer and number-numeral dichotomy that seems to confuse so many programmers. > IIUC those calculators used a decimal floating point representation, > which suffers from the same kinds of problems of course, but works > better in this specific case. Trivially, "decimal" floating point numerals (of sorts) would still be a super-set of binary floating point numerals if independent integer exponents were allowed for the denominator factors of 2 and 5. -- Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]