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

More doctests from the book "Calcul mathématique avec Sage" #14320

Closed
Thierry-Dumont mannequin opened this issue Mar 20, 2013 · 17 comments
Closed

More doctests from the book "Calcul mathématique avec Sage" #14320

Thierry-Dumont mannequin opened this issue Mar 20, 2013 · 17 comments

Comments

@Thierry-Dumont
Copy link
Mannequin

Thierry-Dumont mannequin commented Mar 20, 2013

The attached file provides doctests for examples in the chapter "float" (floating point numbers). Tests pass with 5.11.

Apply only attachment: trac_14320_doctests_from_french_book.patch​.

Upstream: Completely fixed; Fix reported upstream

Component: doctest coverage

Keywords: french book

Author: Thierry Dumont, Paul Zimmermann

Reviewer: Frédéric Chapoton

Merged: sage-5.13.beta3

Issue created by migration from https://trac.sagemath.org/ticket/14320

@Thierry-Dumont Thierry-Dumont mannequin added this to the sage-5.11 milestone Mar 20, 2013
@Thierry-Dumont Thierry-Dumont mannequin added t: tests labels Mar 20, 2013
@Thierry-Dumont
Copy link
Mannequin Author

Thierry-Dumont mannequin commented Mar 20, 2013

Attachment: float_doctest.sage.gz

doctets auto generated.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@zimmermann6

This comment has been minimized.

@zimmermann6
Copy link
Contributor

Changed author from Thierry Dumont to Thierry Dumont, Paul Zimmermann

@zimmermann6
Copy link
Contributor

comment:2

I've attached a well-formed patch. I had to modify two things with respect to the book (which was with Sage 5.9), due to some recent changes in RDF:

  • I added "abs tol 0.05" somewhere to avoid a failing test with 5.11

  • exact-sommation compensee now gives 0.0 with 5.11 (instead of -0.001953125 with 5.9).
    I thus changed to 0.0 in the doctest. This will thus differ from the book, which should be
    updated to 5.11 (adding "abs tol" is not enough).

Paul

@fchapoton
Copy link
Contributor

comment:3

same remark about indentation: should be 4 spaces rather than 2

@zimmermann6
Copy link
Contributor

comment:4

same remark about indentation: should be 4 spaces rather than 2

is it better with the new patch?

Paul

@fchapoton
Copy link
Contributor

comment:5

yes, it is much better that way.

@fchapoton
Copy link
Contributor

comment:6

Let me say that it is good to go.

@fchapoton
Copy link
Contributor

Reviewer: Frédéric Chapoton

@fchapoton
Copy link
Contributor

Changed keywords from none to french book

@jdemeyer
Copy link
Contributor

comment:7

On arando (Linux 32-bit i686):

sage -t --long devel/sage/sage/tests/french_book/float_doctest.py
**********************************************************************
File "devel/sage/sage/tests/french_book/float_doctest.py", line 206, in sage.tests.french_book.float_doctest
Failed example:
    print "exact - sommation classique:", s-ii # abs tol 0.05
Expected:
    exact - sommation classique: -45.5
Got:
    exact - sommation classique: -45.591796875
Tolerance exceeded: 9e-02 > 5e-02
**********************************************************************

@zimmermann6
Copy link
Contributor

comment:8

I will have a look next week, unless someone beats me. However I wonder why the patchbot did not find this before. Did it work before on arando?

Paul

@jdemeyer
Copy link
Contributor

comment:9

It seems the patchbot is having trouble itself... Also, I don't know whether we have any patchbots running on 32-bit i686.

@zimmermann6
Copy link
Contributor

comment:10

Attachment: trac_14320_doctests_from_french_book.patch.gz

I increased the tolerance to 0.1, it should be ok now.

Paul

@jdemeyer
Copy link
Contributor

jdemeyer commented Nov 4, 2013

comment:11

Should be good.

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Contributor

jdemeyer commented Nov 6, 2013

Merged: sage-5.13.beta3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants