Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Sep 10, 2023

Conversation

orlitzky
Copy link
Contributor

@orlitzky orlitzky commented Sep 3, 2023

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
Copy link

github-actions bot commented Sep 3, 2023

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

Copy link
Collaborator

@kwankyu kwankyu left a comment

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
15 checks passed
@mkoeppe mkoeppe added this to the sage-10.2 milestone 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.

None yet

4 participants