1. Pynac
  2. Untitled project
  3. pynac
  4. Issues
Issue #15 new

wrong result from real part

Burcin Erocal
created an issue

Reported in Sage issue #12807:

sage: a = exp(i*2*pi/3)
sage: b = exp(i*pi/3)
sage: c = 2*a-b
sage: c.real()
1/2

Numerically:

sage: N(c).real()
-1.50000000000000

Note that we can compute the real part of a and b correctly. Something goes wrong when combining the result. Probably because Python int's get involved at some point.

sage: a.real()
-1/2
sage: b.real()
1/2

Comments (0)

  1. Log in to comment