Opened 5 years ago
Closed 5 years ago
#18954 closed defect (fixed)
doctest special values of trig. functions with arguments (m/n)*pi
Reported by:  rws  Owned by:  

Priority:  major  Milestone:  sage6.9 
Component:  symbolics  Keywords:  
Cc:  Merged in:  
Authors:  Ralf Stephan  Reviewers:  Vincent Delecroix 
Report Upstream:  N/A  Work issues:  
Branch:  e7ce7ce (Commits)  Commit:  e7ce7ce90a010ec3b617fa23af893f19a6f00bca 
Dependencies:  #18980  Stopgaps: 
Description (last modified by )
Sage immediately returns exact expressions for trig. functions with argument a multiple of pi/3
, pi/4
, pi/6
and some of pi/5
because they are just square roots. The other values of e.g. sin(n*pi/5)
are quite simple too, but they are roots of 4degree so they were not added.
sage: sin(3*pi/4) 1/2*sqrt(2) sage: sec(3*pi/5) 4/(sqrt(5)  1) sage: cos(3*pi/5) 1/4*sqrt(5) + 1/4 sage: sin(3*pi/5) sin(3/5*pi) sage: tan(3*pi/5) tan(3/5*pi) sage: cot(3*pi/5) cot(3/5*pi) sage: cos(pi/6) 1/2*sqrt(3)
However, people expect this so they should be added.
Change History (8)
comment:1 Changed 5 years ago by
 Description modified (diff)
comment:2 Changed 5 years ago by
 Dependencies set to pynac0.4.3
 Report Upstream changed from N/A to Fixed upstream, but not in a stable release.
comment:3 Changed 5 years ago by
 Summary changed from special values of trig. functions with arguments n*pi/5 to special values of trig. functions with arguments (m/n)*pi
comment:4 Changed 5 years ago by
This is fine with #18980. Could you add doctests for them
sage: sin(pi/5) 1/4*sqrt(2*sqrt(5) + 10) sage: sin(2*pi/5) 1/4*sqrt(2*sqrt(5) + 10)
comment:5 Changed 5 years ago by
 Branch set to u/rws/special_values_of_trig__functions_with_arguments__m_n__pi
comment:6 Changed 5 years ago by
 Commit set to e7ce7ce90a010ec3b617fa23af893f19a6f00bca
 Dependencies changed from pynac0.4.3 to #18980
 Milestone changed from sage6.8 to sage6.9
 Report Upstream changed from Fixed upstream, but not in a stable release. to N/A
 Status changed from new to needs_review
 Summary changed from special values of trig. functions with arguments (m/n)*pi to doctest special values of trig. functions with arguments (m/n)*pi
New commits:
e7ce7ce  18954: doctest special values of trig. functions with arguments (m/n)*pi

comment:7 Changed 5 years ago by
 Reviewers set to Vincent Delecroix
 Status changed from needs_review to positive_review
The patchbot is not happy because it is not able to apply #18980. But it is fine for me.
comment:8 Changed 5 years ago by
 Branch changed from u/rws/special_values_of_trig__functions_with_arguments__m_n__pi to e7ce7ce90a010ec3b617fa23af893f19a6f00bca
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
New code in Pynac does the following:
This ticket should merge them as doctests.