On 5 Mai, 23:15, rjf <[email protected]> wrote: > I disagree with much of the above sentiments.
Not that precise... (or is the following meant to be a complete enumeration?) > If you are using a number which might be complex and your intention is > to drop the imaginary part if it is very small, then you can do so, by > taking its real part. > > The producer of the complex number with zero imaginary part could have > dropped that imaginary part if it intended for it to be equal to a > real. > > If the imaginary part is the integer 0, then there is probably no > confusion, and > the imaginary part might just as well be dropped. > > I think that associating the number of bits of precision with the > number of decimal digits typed in, is a mistake, whether it is > 1.000000000 or 0.000000000. Yes. As I mentioned earlier in another thread, that's the reason for having hexadecimal float literals in e.g. C99. If the number of *decimal* digits matters, one should also do base-10 arithmetic (or keep track of it in computations). On the other hand, one could simply *define* decimal numbers with n digits to the right of the point to be converted to binary numbers with m bits precision/mantissa. There are of course corner cases when allowing arbitrary bases. > There is a substantial difference between a real number and a complex > number > whose imaginary part is very small. How small? This obviously depends on the application, but one should never *implicitly* discard the imaginary part. -Leif -- To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
