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

real_double logarithm test fails due to ulp() bug #13134

Closed
jdemeyer opened this issue Jun 19, 2012 · 10 comments
Closed

real_double logarithm test fails due to ulp() bug #13134

jdemeyer opened this issue Jun 19, 2012 · 10 comments

Comments

@jdemeyer
Copy link

This is a doctest error on Solaris SPARC and FreeBSD introduced by #12557:

sage -t  --long -force_lib devel/sage/sage/rings/real_double.pyx
**********************************************************************
File "/home/buildbot/build/sage/mark-1/mark_full/build/sage-5.1.beta5/devel/sage-main/sage/rings/real_double.pyx", line 1741:
    sage: all( check_error(x) for x in sxrange(0.01, 2.00, 0.01) )
Expected:
    True
Got:
    False
**********************************************************************

It turns out that the bug is actually in the ulp() method which returns a value which is a factor 2 too small. Since in all other systems (except Solaris SPARC and FreeBSD) the RDF log() method is accurate up to 0.5 ulp for these inputs, the tests for #12557 passed.

Component: numerical

Author: Jeroen Demeyer

Reviewer: Volker Braun

Merged: sage-5.1.beta6

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

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

Author: Jeroen Demeyer

@jdemeyer
Copy link
Author

comment:2

Attachment: 13134_ulp.patch.gz

@jdemeyer

This comment has been minimized.

@kcrisman
Copy link
Member

comment:4

A similar error was reported on FreeBSD here; I've asked whether this patch fixes it.

@jdemeyer

This comment has been minimized.

@jdemeyer jdemeyer changed the title real_double logarithm test fails on Solaris real_double logarithm test fails due to ulp() bug Jun 20, 2012
@jdemeyer

This comment has been minimized.

@vbraun
Copy link
Member

vbraun commented Jun 20, 2012

comment:7

Looks good to me!

@vbraun
Copy link
Member

vbraun commented Jun 20, 2012

Reviewer: Volker Braun

@jdemeyer
Copy link
Author

Merged: sage-5.1.beta6

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

4 participants