Dear all,
On 5/10/07, Kyle Schalm <[EMAIL PROTECTED]> wrote:
>
>
> presumably you could do
>
> if CC(x).imag() != 0:
> # raise error
>
I don't know if things have changed, but usually you have to be
careful with testing equality of real numbers. Approximation errors
might
I experience the same problem. It happened after the upgrade so I just
did an fresh install
from source and got the same result...Dave
On May 10, 9:33 am, Martin Albrecht <[EMAIL PROTECTED]>
wrote:
> On Wednesday 09 May 2007 07:35, Brian Harris wrote:
>
> > Quotes didn't change the behavior for t
On Wednesday 09 May 2007 07:35, Brian Harris wrote:
> Quotes didn't change the behavior for that script. However I get part-
> way through the example.sage script before the error:
I get the same error with a fresh 2.5 install. ipython is at version 0.8.0.
sage: version()
'SAGE Version 2.5, Rel
Thank you Kyle. It seems to work. So now does someone have an example
of it failing on some number that is real?
{{{
CC(60).imag()
///
0.000
}}}
{{{
CC(pi).imag()
///
0.000
}}}
{{{
CC(sqrt(2)).imag()
///
0.000
}}}
{{{
CC(-90 + i).imag()
///
1.00
presumably you could do
if CC(x).imag() != 0:
# raise error
>
> Well I would like to make a Point class for a 2D coordinate system. So
> what is the best way to prevent most numbers with non-zero imaginary
> parts from becoming x and/or y in the definition of a given point