Skip to content

src/sage/tests: fix another "Computational Math..." doctest - #36185

Merged
vbraun merged 1 commit into
sagemath:developfrom
orlitzky:another-compmath-doctest
Sep 10, 2023
Merged

vbraun merged 1 commit into
sagemath:developfrom
orlitzky:another-compmath-doctest

Conversation

@orlitzky

@orlitzky orlitzky commented Sep 3, 2023

Copy link
Copy Markdown
Contributor

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.

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.
@github-actions

github-actions Bot commented Sep 3, 2023

Copy link
Copy Markdown

Documentation preview for this PR (built with commit bcd71cd; changes) is ready! 🎉

@kwankyu kwankyu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 5, 2023
… 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
@vbraun
vbraun merged commit 50b1d02 into sagemath:develop Sep 10, 2023
@orlitzky
orlitzky deleted the another-compmath-doctest branch September 22, 2023 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants