From: Caleb Clausen Date: 2009-11-17T09:27:31+09:00 Subject: Re: Trajectories On 11/16/09, Marnen Laibow-Koser wrote: > Certain numbers, such as square roots, can be represented with tricks > like quadratic equations to which they are the root, but that won't work > for transcendental numbers like e or ð. We can calculate those numbers > to millions of decimal places if we need to -- but unlike rational > numbers, we can never store them exactly. transcendentals can also be represented exactly by formulae with a finite number of bits: pi/4 = 1 - 1/3 + 1/5 - 1/7 + .... #that might not be the exact right formula, but you get the idea this can also be represented by a (fairly short) program: def pi_over_4 result=0 sign=1 for i in 0..Infinity do result+= Rational.new(sign,2*i+1) sign=-sign end return result end of course, this would take an infinite amount of time to execute, and require an infinite amount of memory to store the result, but in a lazy functional language like haskell, that would not be true. also, in a functional language, I _believe_ you can manipulate programs like the one above as if they were numbers. how often is that capability really needed? maybe mathematica actually works this way, but it's probably the only one. on the other hand, there is another class of (real) numbers, the incomputables, beyond the transcendentals, for which there is no (finite length) formula or program possible.... but how often do you need to write a program which deals with (an exact representation of) those?