Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#23354 closed defect (fixed)

numerical noise in libs/lcalc/lcalc_Lfuntion.pyx with clang-4 and icc

Reported by: fbissey Owned by:
Priority: major Milestone: sage-8.1
Component: porting Keywords:
Cc: dimpase Merged in:
Authors: François Bissey Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: 6ec19b5 (Commits, GitHub, GitLab) Commit:
Dependencies: Stopgaps:

Status badges

Description

One doctest in libs/lcalc/lcalc_Lfuntion.pyx fails because of excessive numerical noise when sage is compiled with clang >= 4.0 or icc (17.04).

clang-4.0.1

File "src/sage/libs/lcalc/lcalc_Lfunction.pyx", line 188, in sage.libs.lcalc.lcalc_Lfunction.Lfunction.hardy_z_function
Failed example:
    L.hardy_z_function(0)
Expected:
    0.7939675904771...
Got:
    0.793967590477206 - 4.03312243040125e-17*I

icc:

File "src/sage/libs/lcalc/lcalc_Lfunction.pyx", line 188, in sage.libs.lcalc.lcalc_Lfunction.Lfunction.hardy_z_function
Failed example:
    L.hardy_z_function(0)
Expected:
    0.7939675904771...
Got:
    0.793967590477208 - 4.03312243040124e-17*I

Change History (9)

comment:1 Changed 4 years ago by fbissey

  • Authors set to Francois Bissey
  • Branch set to u/fbissey/lcalc_numerical_noise
  • Cc dimpase added
  • Commit set to 7de256c24f2c63df50b667a32d7c4969524693af
  • Status changed from new to needs_review

comment:2 Changed 4 years ago by jdemeyer

  • Status changed from needs_review to needs_work

No commit on the branch.

comment:3 Changed 4 years ago by git

  • Commit changed from 7de256c24f2c63df50b667a32d7c4969524693af to 6ec19b5c462c5a8d058a251364ab6512c3d1b03f

Branch pushed to git repo; I updated commit sha1. New commits:

6ec19b5fix numerical noise

comment:4 Changed 4 years ago by fbissey

Ooops. There is now.

comment:5 Changed 4 years ago by dimpase

The question is whether we should rather remove -ffast-math from the flags---which probably will fix this noise by itself. I haven't tried this yet.

comment:6 Changed 4 years ago by fbissey

If we have the flag for gcc as well, it is not obvious which way things will go. All three may converge to something slightly different again.

comment:7 Changed 4 years ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_work to positive_review

OK.

comment:8 Changed 4 years ago by vbraun

  • Branch changed from u/fbissey/lcalc_numerical_noise to 6ec19b5c462c5a8d058a251364ab6512c3d1b03f
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:9 Changed 4 years ago by jdemeyer

  • Authors changed from Francois Bissey to François Bissey
  • Commit 6ec19b5c462c5a8d058a251364ab6512c3d1b03f deleted
Note: See TracTickets for help on using tickets.