id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
16491 doctest trigonometric functions for complex input ppurka "This is a follow up to #16439.
1. The functions `atan, acos, asin` give `TypeError` on Python `complex` input.
2. The output of trigonometric functions are inconsistent depending on whether `complex` or `CDF` or `CC` is used as the input type.
From #16439 discussion by @kcrisman:
Just one point - almost certainly some of those digits are 'extra' from Python. Compare (after this):
{{{
sage: sec(1.+i)
0.498337030555187 + 0.591083841721045*I
sage: sec(complex(1,1))
(0.49833703055518686+0.5910838417210451j)
sage: sec(CDF(complex(1,1)))
0.498337030555 + 0.591083841721*I
}}}
Interesting.
Here is something else I don't know what to do with.
{{{
sage: arccot(1.+i)
arccot(1.00000000000000 + 1.00000000000000*I) # in SR
sage: cot(1.+i)
0.217621561854403 - 0.868014142895925*I
}}}
One would think this should be the same type of output.
That said, SR is useful for some other cases of exact input.
I'm wondering whether we want to try to fix all of this here, though." defect closed major sage-7.2 symbolics fixed burcin kcrisman rws Ralf Stephan Vincent Delecroix N/A 5e18f344b2016d6e7eea64c06d398017da851761 5e18f344b2016d6e7eea64c06d398017da851761