Skip to content

Commit

Permalink
sagemathgh-36185: src/sage/tests: fix another "Computational Math..."…
Browse files Browse the repository at this point in the history
… doctest

One doctest for the Computational Math book fails for me,

```
  Failed example:
    limit(f(t * cos(theta), t * sin(theta)) / t, t=0)
  Expected:
    cos(theta)^2/sin(theta)
  Got:
    -1/2*(sin(3*theta) + sin(theta))/(cos(2*theta) - 1)
```

These results are equivalent, and the ugly one simplifies to the pretty
one. We add a full_simplify() to the test to support both outputs. The
discrepancy is most likely due to the version of Giac installed on the
system.

URL: sagemath#36185
Reported by: Michael Orlitzky
Reviewer(s): Kwankyu Lee
  • Loading branch information
Release Manager committed Sep 5, 2023
2 parents ff9b73d + bcd71cd commit 05a0abe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=80ee52a3b6855149693204f0816bd0690947e7ae
md5=4292c175bba9299bd057980cec7060fd
cksum=3914108326
sha1=8b9b98e674c6778e06b8aa394792d1b1001242c2
md5=8d3df0abf1ffc33d148fae406b4c14a7
cksum=1056911720
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
57852a89c5c274ec6dbdd9269042972c7343e3ec
5f50955b08fd8de497cf30491893375c4ef1c989
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,13 @@
sage: plot3d(h, (u,-1,1), (v,-1,1), aspect_ratio=[1,1,1])
Graphics3d Object
Sage example in ./graphique.tex, line 1833::
Sage example in ./graphique.tex, line 1833. Sometimes the result
needs to be simplified to obtain a nice short expression::
sage: f(x, y) = x^2 * y / (x^4 + y^2)
sage: t, theta = var('t, theta')
sage: limit(f(t * cos(theta), t * sin(theta)) / t, t=0)
sage: result = limit(f(t * cos(theta), t * sin(theta)) / t, t=0)
sage: result.full_simplify()
cos(theta)^2/sin(theta)
Sage example in ./graphique.tex, line 1847::
Expand Down

0 comments on commit 05a0abe

Please sign in to comment.