Opened 4 years ago

Closed 3 years ago

#20099 closed enhancement (fixed)

test improved evaluation of trigonometric functions and complex exponential function

Reported by: behackl Owned by:
Priority: minor Milestone: sage-8.0
Component: symbolics Keywords: pynac
Cc: rws Merged in:
Authors: Benjamin Hackl Reviewers: Ralf Stephan, Julian Rüth, Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: edec004 (Commits) Commit: edec0041a0ef6df6df2acba2f20caea1b043178f
Dependencies: #20134 Stopgaps:

Description

In the current development version of pynac the evaluation of trigonometric functions has been improved. This enables the following behavior:

sage: var('k', domain='integer')
k
sage: sin(k*pi)
0
sage: cos(k*pi)
(-1)^k
sage: sin(1 + 2*k*pi)
sin(1)
sage: tan(k*pi)
0
sage: cos(2*k*pi + pi/3)
1/2

and so on. Additionally, this introduces simplification for the complex exponential function:

sage: exp(2*k*pi*I)
sage: 1

This ticket shall document these changes.

Change History (16)

comment:1 Changed 4 years ago by behackl

  • Dependencies changed from pynac-0.6.3 to #20134

comment:2 Changed 4 years ago by behackl

  • Branch set to u/behackl/symbolic/period-reduction-doctests
  • Commit set to 16045ae2a4f0765a879a78be0aa85f4d7451525c
  • Status changed from new to needs_review
  • Summary changed from test improved evaluation of trigonometric functions to test improved evaluation of trigonometric functions and complex exponential function

New commits:

9db23depackage version / checksum
7785109coth/acoth BuiltinFunction --> GinacFunction and fixes
2fab819doctest fixes
867bd3ddoctests for reduction of exp-arguments
f868e90doctests for argument reduction of sin, cos, tan
16045aeadditional doctest for computation of residues

comment:3 Changed 4 years ago by rws

  • Reviewers set to Ralf Stephan

Can be set positive as soon as the dependency is reviewed.

comment:4 Changed 4 years ago by rws

  • Status changed from needs_review to needs_work

comment:5 Changed 4 years ago by rws

  • Status changed from needs_work to needs_review

comment:6 Changed 4 years ago by rws

  • Status changed from needs_review to needs_work

Needs merge.

comment:7 Changed 4 years ago by git

  • Commit changed from 16045ae2a4f0765a879a78be0aa85f4d7451525c to 871c4c936410352ea5124df8f78013dd1c19a753

Branch pushed to git repo; I updated commit sha1. New commits:

871c4c9Merge tag '7.2.beta1' into symbolic/period-reduction-doctests

comment:8 Changed 4 years ago by behackl

  • Status changed from needs_work to needs_review

Done, back to needs_review.

comment:9 Changed 4 years ago by saraedum

  • Authors set to Benjamin Hackl

comment:10 Changed 4 years ago by saraedum

I think "For the sake of simplification, the argument is reduced the period of the complex exponential function" is missing a "modulo" or something like that. Once that is fixed, feel free to set it to positive review yourself.

comment:11 Changed 4 years ago by saraedum

  • Reviewers changed from Ralf Stephan to Ralf Stephan, Julian Rüth

comment:12 Changed 4 years ago by rws

  • Status changed from needs_review to needs_work

comment:13 Changed 3 years ago by chapoton

  • Branch changed from u/behackl/symbolic/period-reduction-doctests to public/20099
  • Commit changed from 871c4c936410352ea5124df8f78013dd1c19a753 to e91dda21be86d0db5c00daf9860fed6f6a4e0556
  • Status changed from needs_work to needs_review

New commits:

5b01423trac 23030 removing bad apply
7b4ec6cAdd sys.version_info as "PYTHON_VERSION" to cython compile-time environment
71b68d2tract #22305 -- split off del_dictitem_by_exact_value and compile conditionally based on Py2/Py3
54d8c2dCorrection: Py3 does provide PyDict_GetItemWithError but Cython doesn't provide it yet
5bc719cMerge branch 'public/22305' of ssh://trac.sagemath.org:22/sage into test
adabef0Merge branch 'u/behackl/symbolic/period-reduction-doctests' in 8.0.b7
e91dda2trac 20099 details

comment:14 Changed 3 years ago by git

  • Commit changed from e91dda21be86d0db5c00daf9860fed6f6a4e0556 to edec0041a0ef6df6df2acba2f20caea1b043178f

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

6e90839Merge branch 'u/behackl/symbolic/period-reduction-doctests' in 8.0.b7
edec004trac 20099 details

comment:15 Changed 3 years ago by tscrim

  • Milestone changed from sage-7.1 to sage-8.0
  • Reviewers changed from Ralf Stephan, Julian Rüth to Ralf Stephan, Julian Rüth, Travis Scrimshaw
  • Status changed from needs_review to positive_review

LGTM.

comment:16 Changed 3 years ago by vbraun

  • Branch changed from public/20099 to edec0041a0ef6df6df2acba2f20caea1b043178f
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.