Opened 10 years ago

Last modified 8 years ago

#11155 closed defect

abs(pi+I) = pi+I — at Version 2

Reported by: benreynwar Owned by: burcin
Priority: critical Milestone: sage-5.1
Component: symbolics Keywords:
Cc: burcin Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by was)

abs(pi+I) returns pi+I

one would have expected:

sqrt(pi^2+1)

Change History (2)

comment:1 Changed 10 years ago by kcrisman

  • Component changed from PLEASE CHANGE to symbolics
  • Owner changed from tbd to burcin
  • Priority changed from minor to major

In the future, be sure to pick a component (for instance, calculus or symbolics); that will help people find it more easily. Thanks for the bug report; mathematically incorrect is definitely bad!

I can confirm this. Moving to major.

Note the following.

sage: abs(pi+i)
pi + I
sage: abs(1+i)
sqrt(2)
sage: abs(n(pi)+i)
3.29690830947562

Pynac is somehow missing this. Note that it gets e right.

sage: abs(e+i)
abs(e + I)

comment:2 Changed 9 years ago by was

  • Cc burcin added
  • Description modified (diff)
  • Milestone set to sage-5.0
  • Priority changed from major to critical

I can confirm this further. It's mathematically seriously incorrect... so now moving from major to critical, and cc'ing burcin.

Note:

sage: z = pi + i
sage: abs(z)
pi + I
sage: sqrt((z*z.conjugate()).expand())
sqrt(pi^2 + 1)
Note: See TracTickets for help on using tickets.