From: John C. <co...@cc...> - 2008-07-08 15:16:49
|
Libor Spacek scripsit: > Also, replace doubles with rationals. (All numbers with limited > precision are de facto rationals anyway). For pragmatic reasons place > some limit on the size of the bigints and raise an exception when it > is reached. You really, really don't want to go there. Operations on machine floats are fast, as fast as integer math for the same word size, usually. Dealing with equivalent rationals is very slow because of all the conditional memory fetches you have to do. In Scheme, the difference between hopelessly slow and acceptably fast is often as simple as adding a judicious decimal point to some constant. -- Where the wombat has walked, John Cowan <co...@cc...> it will inevitably walk again. http://www.ccil.org/~cowan |