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

Fix two "Computational Math.." book doctests #36143

Merged
merged 2 commits into from
Sep 1, 2023

Conversation

orlitzky
Copy link
Contributor

Nothing interesting here, just two minor tweaks that are needed probably due to a giac upgrade.

@@ -253,7 +253,7 @@
Sage example in ./integration.tex, line 1363::

sage: t, y = var('t, y')
sage: desolve_rk4(t*y*(2-y), y, ics=[0,1], end_points=[0, 1], step=0.5)
sage: desolve_rk4(t*y*(2-y), y, ics=[0,1], end_points=[0, 1], step=0.5) # abs tol 1e-12
[[0, 1], [0.5, 1.12419127424558], [1.0, 1.461590162288825]]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please two spaces ...) # abs ... instead of one ...) # abs ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, done.

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 27, 2023

Otherwise, lgtm.

A "Computational Math..." book test fails for me with,

  Expected:
    [[0, 1], [0.5, 1.12419127424558], [1.0, 1.461590162288825]]
  Got:
    [[0, 1], [0.5, 1.12419127424558], [1.0, 1.4615901622888245]]

An "abs tol" fixes the issue backwards-compatibly.
One "Computational Math..." book test fails for me with,

  Expected:
    [[y(x) == -_C^2 + _C*x, y(x) == 1/4*x^2], 'clairault']
  Got:
    [[y(x) == -_C^2 + _C*x, y(x) == 1/4*x^2], 'clairaut']

This looks like a typo that was fixed. For backwards compatibility,
the doctest has been updated to accept both outputs in the second
component.
@github-actions
Copy link

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

sage: solution
[y(x) == -_C^2 + _C*x, y(x) == 1/4*x^2]
sage: method in ["clairaut", "clairault"]
True

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you mean that the typo "clairault" is hard-coded into giac, you expect that it would be fixed in future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm only guessing that giac is to blame:

  1. my giac is newer than sage's
  2. both "clairaut" and "clairault" appear in the giac source code
  3. there's no changelog for giac

But yes, my guess is that "clairault" was hard-coded somewhere and now it's "clairaut".

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 27, 2023

There is a new failure in Build & Test. I checked that It is unrelated though.

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.

Thanks.

@vbraun vbraun merged commit 0d42e23 into sagemath:develop Sep 1, 2023
17 of 18 checks passed
@mkoeppe mkoeppe added this to the sage-10.2 milestone Sep 1, 2023
@orlitzky orlitzky deleted the fix-two-compmath-doctests branch September 22, 2023 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants