sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.36k stars 462 forks source link

tan(pi/48) only in ascii_art #25004

Open 6e13b9f9-7d47-4ee3-90c5-28b8906e7320 opened 6 years ago

6e13b9f9-7d47-4ee3-90c5-28b8906e7320 commented 6 years ago
%display ascii_art
tan(pi/48)

gives the exact value, but

%display typeset
tan(pi/48)

is returned unevaluated.

Component: calculus

Keywords: trig functions exact values

Issue created by migration from https://trac.sagemath.org/ticket/25004

rwst commented 6 years ago
comment:2

I guess SymPy is used for ascii because only SymPy solves that case. As workaround use (tan(pi/48))._sympy_().

rwst commented 6 years ago
comment:3

This is now https://github.com/pynac/pynac/issues/318

fchapoton commented 4 years ago
comment:4

Works fine now

sage: version()
'SageMath version 9.1.rc5, Release Date: 2020-05-13'
sage: unicode_art(tan(pi/48))
       ________          ________                                    
      ╱ 1   √2          ╱ √2   1                                     
     ╱  ─ - ──    √3⋅  ╱  ── + ─                                     
   ╲╱   2   4        ╲╱   4    2                                     
   ──────────── + ───────────────                                    
        2                2                          1                
- ──────────────────────────────── + ────────────────────────────────
           ________       ________            ________       ________
          ╱ 1   √2       ╱ √2   1            ╱ 1   √2       ╱ √2   1 
    √3⋅  ╱  ─ - ──      ╱  ── + ─      √3⋅  ╱  ─ - ──      ╱  ── + ─ 
       ╲╱   2   4     ╲╱   4    2         ╲╱   2   4     ╲╱   4    2 
  - ─────────────── + ────────────   - ─────────────── + ────────────
           2               2                  2               2      

EDIT: wrong answer, as the ticket is concerned with the LaTeX output, not the unicode one.