From: Libor S. <li...@gm...> - 2008-07-08 15:31:08
|
Well, yes, Scheme seems to take a step in the right direction. I notice that even Pure already does one of my listed promotions, provided math.pure is used: sqrt(-2); So perhaps there are no objections to this in principle? ;) I don't see the point of having a mixed type (1 1/3), except perhaps for the prettyprinting purposes, if desired. > > (sqrt 1/5) > 0.4472135954999579 > We don't want and exact approximation to an irrational number do we? > Yes, I know that is really a rational number in disguise, but it lets > the user know that it really is an approximation instead of letting > them believe it is exact. This is why I suggested that an exception is thrown at such times. (The bigint in the rational result will reach its preset "warning" limit whenever an irrational is produced. However, the user will mostly wish to continue with the calculation on the rational, not being any worse off than having to switch everything over to a separate "doubles code" at this point. Libor |