#18954: special values of trig. functions with arguments n*pi/5
-------------------------------------------------+-------------------------
       Reporter:  rws                            |        Owner:
           Type:  defect                         |       Status:  new
       Priority:  major                          |    Milestone:  sage-6.8
      Component:  symbolics                      |   Resolution:
       Keywords:                                 |    Merged in:
        Authors:                                 |    Reviewers:
Report Upstream:  Fixed upstream, but not in a   |  Work issues:
  stable release.                                |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:  pynac-0.4.3                    |
-------------------------------------------------+-------------------------
Changes (by rws):

 * dependencies:   => pynac-0.4.3
 * upstream:  N/A => Fixed upstream, but not in a stable release.


Comment:

 New code in Pynac does the following:
 {{{
 sage: sin(pi/5)
 1/4*sqrt(-2*sqrt(5) + 10)
 sage: sin(pi/8)
 1/2*sqrt(-sqrt(2) + 2)
 sage: sin(pi/24)
 1/4*sqrt(-2*sqrt(6) - 2*sqrt(2) + 8)
 sage: sin(pi/30)
 -1/8*sqrt(5) + 1/4*sqrt(-3/2*sqrt(5) + 15/2) - 1/8
 sage: cos(pi/8)
 1/2*sqrt(sqrt(2) + 2)
 sage: cos(pi/10)
 1/2*sqrt(1/2*sqrt(5) + 5/2)
 sage: cos(pi/12)
 1/12*sqrt(6)*(sqrt(3) + 3)
 sage: cos(pi/15)
 1/8*sqrt(5) + 1/4*sqrt(3/2*sqrt(5) + 15/2) - 1/8
 sage: cos(pi/24)
 1/4*sqrt(2*sqrt(6) + 2*sqrt(2) + 8)
 sage: tan(pi/5)
 sqrt(-2*sqrt(5) + 5)
 sage: tan(pi/8)
 sqrt(2) - 1
 sage: tan(pi/10)
 sqrt(-2/5*sqrt(5) + 1)
 sage: tan(pi/16)
 -sqrt(2) + sqrt(2*sqrt(2) + 4) - 1
 sage: tan(pi/20)
 sqrt(5) - 1/2*sqrt(8*sqrt(5) + 20) + 1
 sage: tan(pi/24)
 sqrt(6) - sqrt(-2*sqrt(6) + 5) - 2

 sage: all(sin(rat*pi).n(200)-sin(rat*pi,hold=True).n(200) < 1e-30 for rat
 in [1/5,2/5,1/30,7/30,11/30,13/30,1/8,3/8,1/24,5/24,7/24,11/24])
 True
 sage: all(cos(rat*pi).n(200)-cos(rat*pi,hold=True).n(200) < 1e-30 for rat
 in [1/10,3/10,1/12,5/12,1/15,2/15,4/15,7/15,1/8,3/8,1/24,5/24,11/24])
 True
 sage: all(tan(rat*pi).n(200)-tan(rat*pi,hold=True).n(200) < 1e-30 for rat
 in
 
[1/5,2/5,1/10,3/10,1/20,3/20,7/20,9/20,1/8,3/8,1/16,3/16,5/16,7/16,1/24,5/24,7/24,11/24])
 True
 }}}
 This ticket should merge them as doctests.

--
Ticket URL: <http://trac.sagemath.org/ticket/18954#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to