Opened 10 years ago

Closed 10 years ago

#13134 closed defect (fixed)

real_double logarithm test fails due to ulp() bug

Reported by: jdemeyer Owned by: jason, jkantor
Priority: blocker Milestone: sage-5.1
Component: numerical Keywords:
Cc: Merged in: sage-5.1.beta6
Authors: Jeroen Demeyer Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by jdemeyer)

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.

Attachments (1)

13134_ulp.patch (3.8 KB) - added by jdemeyer 10 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 10 years ago by jdemeyer

  • Description modified (diff)

Changed 10 years ago by jdemeyer

comment:2 Changed 10 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Status changed from new to needs_review

comment:3 Changed 10 years ago by jdemeyer

  • Description modified (diff)

comment:4 Changed 10 years ago by kcrisman

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

comment:5 Changed 10 years ago by jdemeyer

  • Description modified (diff)
  • Summary changed from real_double logarithm test fails on Solaris to real_double logarithm test fails due to ulp() bug

comment:6 Changed 10 years ago by jdemeyer

  • Description modified (diff)

comment:7 Changed 10 years ago by vbraun

  • Reviewers set to Volker Braun
  • Status changed from needs_review to positive_review

Looks good to me!

comment:8 Changed 10 years ago by jdemeyer

  • Merged in set to sage-5.1.beta6
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.