# Base.runtests("math") failures on chips older than haswell

**URL:** <https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954>\
**Category:** New to Julia\
**Created:** [August 6, 2021, 4:43pm UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954 "2021-08-06T16:43:34Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Evan\_Dodge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evan_dodge/32/27918_2.png) [@Evan\_Dodge](https://discourse.julialang.org/u/Evan_Dodge)\
**Post date:** [August 6, 2021, 4:43pm UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954/1 "2021-08-06T16:43:35Z")

</div>

Hello all,

I’ve just started playing with Julia. At this point, I’m just downloading the binaries and running tests. So far anything haswell and newer runs the tests just fine, but when I run:

Base.runtests(“math”)

on anything Ivybridge and older, I get the errors below. I’ve tried building (on a sandybridge) and I got the same issue. Are ivybridge and older not supported?

julia\> Base.runtests(“math”)  
Test (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)  
math (1) | started at 2021-08-06T09:35:01.952  
math (1) | failed at 2021-08-06T09:36:20.429  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.944523863465552361567241714265293580330960142053956707348245762162446267954062e-11 \<= 2.9103830456733704e-11  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.239620282260873206209898403825869801009469955615602346959597919321384586334519e-10 \<= 1.1641532182693481e-10  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.208398170281759836009218990986729301057788040439471503398687866159506464463257e-10 \<= 1.1641532182693481e-10  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.47627877963448246139281304052899240647219697425288315010663855420264172632325e-10 \<= 2.3283064365386963e-10  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.605108531456578179829673301819172730739412111696025914478914399435490480802057e-10 \<= 2.3283064365386963e-10  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.477387838578831433630323999934486154823113319326355110970641933049857517391576e-10 \<= 2.3283064365386963e-10  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.478775289005531518827211075087809243630139221300062171051205945145799897450122e-10 \<= 2.3283064365386963e-10  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.349584940787210028151044089360728120286499165962432230702632231316709858620677e-10 \<= 2.3283064365386963e-10  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 9.886864436634399748241004932115747133388310463800831336556764588114818918907741e-10 \<= 9.313225746154785e-10  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 4.823588352461727291861554965112121088229437682143749089037056700959904090059565e-07 \<= 4.76837158203125e-7  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 9.832422504043911614672568645746468699749618874563042253403238641815601759807441e-07 \<= 9.5367431640625e-7  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 4.024522243057574020729461844930154048809148910536720401681924445062456231344194e-06 \<= 3.814697265625e-6  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.671096080451412160855988051660662099688638931875817473912035360241553260203968e-05 \<= 1.52587890625e-5  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 6.253028585631435401436436513153638670269367331587039038179288941589419884240247e-05 \<= 6.103515625e-5  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 6.152892080403847793533119813268375575438437323276936013781464852247444865044712e-05 \<= 6.103515625e-5  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.200336854259549472074926238941724855170910281948893693758563977706877442208179e-38 \<= 1.1754943508222875e-38  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.407534186038450553460324520873833223076559806755081343173968657075339966387494e-38 \<= 2.350988701644575e-38  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 4.04403479998216584240500353597032820416909909200572523597887708037061451531782e-34 \<= 3.851859888774472e-34  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.547000867037565887731033124057916742861446876878655292159330808009113589193681e-33 \<= 1.5407439555097887e-33  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.359381443902298604050333477102128548488187396439064659820736079955544135889552e-29 \<= 1.262177448353619e-29  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 7.622172891967228201974472453931445301626212887988520784804774877322523939447388e-15 \<= 7.105427357601002e-15  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.944523863465552361567241714265293580330960142053956707348245762162446267954062e-11 \<= 2.9103830456733704e-11  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.605108531456578179829673301819172730739412111696025914478914399435490480802057e-10 \<= 2.3283064365386963e-10  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.477387838578831433630323999934486154823113319326355110970641933049857517391576e-10 \<= 2.3283064365386963e-10  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 9.832422504043911614672568645746468699749618874563042253403238641815601759807441e-07 \<= 9.5367431640625e-7  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 4.121652904892606052685003491214126582282599824011749377470572011799259625487621 \<= 4.0  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 4163.426880704978502421816698819664749573392932735233623596233692188840003351208 \<= 4096.0  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 17822.67472567509917126448919163683321959654609696406980989364056689933505907784 \<= 16384.0  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 16527.93694692877878898624994027849956771816334482673658660075831545467265425888 \<= 16384.0  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 17512.91864800695083094188818273637839932993550170807086656350754272927340441028 \<= 16384.0  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.095124633509427465540275439400764106209920731364018235913546029993712043440284e+09 \<= 1.073741824e9  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.442598158324992290694219908876174156982453841420944535786070318064847936399543e+18 \<= 2.305843009213694e18  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 5.227490995007697337338820063112673023294806493480370801898843835496083049937824e+18 \<= 4.611686018427388e18  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.646238226925277080266453015385370447928355932630334495724553017617824145270275e+23 \<= 1.5111572745182865e23  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 3.116802563226568944214562002155919921995251306054576493147635003810339597006461e+23 \<= 3.022314549036573e23

Test Summary: | Pass Fail Total  
Overall | 1520108 35 1520143  
math | 1520108 35 1520143  
FAILURE

The global RNG seed was 0xbfaa57e47a413c78e5eead43b1ea8efa.

Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.944523863465552361567241714265293580330960142053956707348245762162446267954062e-11 \<= 2.9103830456733704e-11  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.239620282260873206209898403825869801009469955615602346959597919321384586334519e-10 \<= 1.1641532182693481e-10  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.208398170281759836009218990986729301057788040439471503398687866159506464463257e-10 \<= 1.1641532182693481e-10  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.47627877963448246139281304052899240647219697425288315010663855420264172632325e-10 \<= 2.3283064365386963e-10  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.605108531456578179829673301819172730739412111696025914478914399435490480802057e-10 \<= 2.3283064365386963e-10  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.477387838578831433630323999934486154823113319326355110970641933049857517391576e-10 \<= 2.3283064365386963e-10  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.478775289005531518827211075087809243630139221300062171051205945145799897450122e-10 \<= 2.3283064365386963e-10  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.349584940787210028151044089360728120286499165962432230702632231316709858620677e-10 \<= 2.3283064365386963e-10  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 9.886864436634399748241004932115747133388310463800831336556764588114818918907741e-10 \<= 9.313225746154785e-10  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 4.823588352461727291861554965112121088229437682143749089037056700959904090059565e-07 \<= 4.76837158203125e-7  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 9.832422504043911614672568645746468699749618874563042253403238641815601759807441e-07 \<= 9.5367431640625e-7  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 4.024522243057574020729461844930154048809148910536720401681924445062456231344194e-06 \<= 3.814697265625e-6  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.671096080451412160855988051660662099688638931875817473912035360241553260203968e-05 \<= 1.52587890625e-5  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 6.253028585631435401436436513153638670269367331587039038179288941589419884240247e-05 \<= 6.103515625e-5  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 6.152892080403847793533119813268375575438437323276936013781464852247444865044712e-05 \<= 6.103515625e-5  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.200336854259549472074926238941724855170910281948893693758563977706877442208179e-38 \<= 1.1754943508222875e-38  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.407534186038450553460324520873833223076559806755081343173968657075339966387494e-38 \<= 2.350988701644575e-38  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 4.04403479998216584240500353597032820416909909200572523597887708037061451531782e-34 \<= 3.851859888774472e-34  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.547000867037565887731033124057916742861446876878655292159330808009113589193681e-33 \<= 1.5407439555097887e-33  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.359381443902298604050333477102128548488187396439064659820736079955544135889552e-29 \<= 1.262177448353619e-29  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 7.622172891967228201974472453931445301626212887988520784804774877322523939447388e-15 \<= 7.105427357601002e-15  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.944523863465552361567241714265293580330960142053956707348245762162446267954062e-11 \<= 2.9103830456733704e-11  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.605108531456578179829673301819172730739412111696025914478914399435490480802057e-10 \<= 2.3283064365386963e-10  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.477387838578831433630323999934486154823113319326355110970641933049857517391576e-10 \<= 2.3283064365386963e-10  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 9.832422504043911614672568645746468699749618874563042253403238641815601759807441e-07 \<= 9.5367431640625e-7  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 4.121652904892606052685003491214126582282599824011749377470572011799259625487621 \<= 4.0  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 4163.426880704978502421816698819664749573392932735233623596233692188840003351208 \<= 4096.0  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 17822.67472567509917126448919163683321959654609696406980989364056689933505907784 \<= 16384.0  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 16527.93694692877878898624994027849956771816334482673658660075831545467265425888 \<= 16384.0  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 17512.91864800695083094188818273637839932993550170807086656350754272927340441028 \<= 16384.0  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.095124633509427465540275439400764106209920731364018235913546029993712043440284e+09 \<= 1.073741824e9  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 2.442598158324992290694219908876174156982453841420944535786070318064847936399543e+18 \<= 2.305843009213694e18  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 5.227490995007697337338820063112673023294806493480370801898843835496083049937824e+18 \<= 4.611686018427388e18  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 1.646238226925277080266453015385370447928355932630334495724553017617824145270275e+23 \<= 1.5111572745182865e23  
Error in testset math:  
Test Failed at /home/hexboy/julia-1.6.2/share/julia/test/math.jl:296  
Expression: abs(y - yb) \<= 1.0 \* eps(T(yb))  
Evaluated: 3.116802563226568944214562002155919921995251306054576493147635003810339597006461e+23 \<= 3.022314549036573e23  
ERROR: LoadError: Test run finished with errors  
in expression starting at /home/hexboy/julia-1.6.2/share/julia/test/runtests.jl:84  
ERROR: A test has failed. Please submit a bug report ([Issues · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues))  
including error messages above and the output of versioninfo():  
Julia Version 1.6.2  
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)  
Platform Info:  
OS: Linux (x86\_64-pc-linux-gnu)  
CPU: Intel(R) Core™ i7 CPU M 620 @ 2.67GHz  
WORD\_SIZE: 64  
LIBM: libopenlibm  
LLVM: libLLVM-11.0.1 (ORCJIT, westmere)

Stacktrace:  
[1] error(s::String)  
@ Base ./error.jl:33  
[2] runtests(tests::String; ncores::Int64, exit\_on\_error::Bool, revise::Bool, seed::Nothing)  
@ Base ./util.jl:578  
[3] runtests(tests::String)  
@ Base ./util.jl:563  
[4] top-level scope  
@ REPL[1]:1

caused by: failed process: Process(setenv(`/home/hexboy/julia-1.6.2/bin/julia -Cnative -J/home/hexboy/julia-1.6.2/lib/julia/sys.so -g1 /home/hexboy/julia-1.6.2/bin/../share/julia/test/runtests.jl math`,[“PATH=/home/hexboy/blender-2.79b:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin”, “QT\_ACCESSIBILITY=1”, “DBUS\_SESSION\_BUS\_ADDRESS=unix:path=/run/user/1000/bus”, “XDG\_SEAT\_PATH=/org/freedesktop/DisplayManager/Seat0”, “XDG\_SESSION\_DESKTOP=cinnamon”, “GTK\_OVERLAY\_SCROLLING=1”, “SSH\_AGENT\_PID=1108”, “XDG\_SESSION\_TYPE=x11”, “USER=hexboy”, “XDG\_CONFIG\_DIRS=/etc/xdg/xdg-cinnamon:/etc/xdg” … “XDG\_SESSION\_CLASS=user”, “DISPLAY=:0”, “GJS\_DEBUG\_TOPICS=JS ERROR;JS LOG”, “LANGUAGE=en\_US”, “XDG\_GREETER\_DATA\_DIR=/var/lib/lightdm-data/hexboy”, “XDG\_SESSION\_PATH=/org/freedesktop/DisplayManager/Session0”, “XDG\_VTNR=7”, “XDG\_SESSION\_ID=c2”, “LS\_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:_.tar=01;31:_.tgz=01;31:_.arc=01;31:_.arj=01;31:_.taz=01;31:_.lha=01;31:_.lz4=01;31:_.lzh=01;31:_.lzma=01;31:_.tlz=01;31:_.txz=01;31:_.tzo=01;31:_.t7z=01;31:_.zip=01;31:_.z=01;31:_.dz=01;31:_.gz=01;31:_.lrz=01;31:_.lz=01;31:_.lzo=01;31:_.xz=01;31:_.zst=01;31:_.tzst=01;31:_.bz2=01;31:_.bz=01;31:_.tbz=01;31:_.tbz2=01;31:_.tz=01;31:_.deb=01;31:_.rpm=01;31:_.jar=01;31:_.war=01;31:_.ear=01;31:_.sar=01;31:_.rar=01;31:_.alz=01;31:_.ace=01;31:_.zoo=01;31:_.cpio=01;31:_.7z=01;31:_.rz=01;31:_.cab=01;31:_.wim=01;31:_.swm=01;31:_.dwm=01;31:_.esd=01;31:_.jpg=01;35:_.jpeg=01;35:_.mjpg=01;35:_.mjpeg=01;35:_.gif=01;35:_.bmp=01;35:_.pbm=01;35:_.pgm=01;35:_.ppm=01;35:_.tga=01;35:_.xbm=01;35:_.xpm=01;35:_.tif=01;35:_.tiff=01;35:_.png=01;35:_.svg=01;35:_.svgz=01;35:_.mng=01;35:_.pcx=01;35:_.mov=01;35:_.mpg=01;35:_.mpeg=01;35:_.m2v=01;35:_.mkv=01;35:_.webm=01;35:_.ogm=01;35:_.mp4=01;35:_.m4v=01;35:_.mp4v=01;35:_.vob=01;35:_.qt=01;35:_.nuv=01;35:_.wmv=01;35:_.asf=01;35:_.rm=01;35:_.rmvb=01;35:_.flc=01;35:_.avi=01;35:_.fli=01;35:_.flv=01;35:_.gl=01;35:_.dl=01;35:_.xcf=01;35:_.xwd=01;35:_.yuv=01;35:_.cgm=01;35:_.emf=01;35:_.ogv=01;35:_.ogx=01;35:_.aac=00;36:_.au=00;36:_.flac=00;36:_.m4a=00;36:_.mid=00;36:_.midi=00;36:_.mka=00;36:_.mp3=00;36:_.mpc=00;36:_.ogg=00;36:_.ra=00;36:_.wav=00;36:_.oga=00;36:_.opus=00;36:_.spx=00;36:\*.xspf=00;36:”, “OPENBLAS\_MAIN\_FREE=1”]), ProcessExited(1)) [1]

Stacktrace:  
[1] pipeline\_error  
@ ./process.jl:525 [inlined]  
[2] run(::Cmd; wait::Bool)  
@ Base ./process.jl:440  
[3] run  
@ ./process.jl:438 [inlined]  
[4] runtests(tests::String; ncores::Int64, exit\_on\_error::Bool, revise::Bool, seed::Nothing)  
@ Base ./util.jl:572  
[5] runtests(tests::String)  
@ Base ./util.jl:563  
[6] top-level scope  
@ REPL[1]:1

julia\>

---

<div class="post-metadata">

**Author:** ![Evan\_Dodge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evan_dodge/32/27918_2.png) [@Evan\_Dodge](https://discourse.julialang.org/u/Evan_Dodge)\
**Post date:** [August 6, 2021, 5:41pm UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954/2 "2021-08-06T17:41:01Z")

</div>

I just tested on a Westmere as well and I received the same errors.

---

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [August 6, 2021, 6:14pm UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954/3 "2021-08-06T18:14:37Z")

</div>

It relies on `muladd` → `fma` for accuracy. This happens on Haswell and newer, because Haswell and newer have dedicated `fma` instructions, while Ivy Bridge and Westmere do not.

`fma` is unfortunately very slow on these CPUs, but might be worth using it anyway, favoring speed over accuracy. This does mean that the implementations would be highly suboptimal for these CPUs, but base Julia doesn’t provide good functionality for switching implementations.  
The change the older architectures would want, using compensated arithmetic, has only minor performance implications unlike whatever LLVM does to guarantee exact rounding.

This is what I use in VectorizationBase and SLEEFPirates:

```julia
# fma_fast() returns either `True()` or `False()`
# It gets redefined in the ` __init__ ()` if it happens to be wrong
@inline fast_fma(a, b, c) = fast_fma(a, b, c, fma_fast())
@inline fast_fma(a, b, c, ::True) = fma(a, b, c)
@inline function fast_fma(a, b, c, ::False)
    # dadd and dmul use double-double arithmetic
    d = dadd(dmul(Double(a),Double(b),False()),Double(c))
    add_ieee(d.hi, d.lo) # add obeys IEEE semantics
end

```

This could be written more explicitly by inlining things, but was my lazy implementation that got SLEEFPirates.jl’s tests to pass on Ivy Bridge.  
It’d likely be good enough for base’s tests as well. But we unfortunately have no way to dispatch in base based on the CPU having FMA instructions.

@Oscar_Smith  
Maybe just replace `muladd`s with `fma`s?

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [August 6, 2021, 6:45pm UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954/4 "2021-08-06T18:45:34Z")

</div>

The reason I did this the way I did was I figured that people would prefer losing a little accuracy rather than have 100x slower elementary functions. As such, I think the 2 best solutions are either to shortly loosen the tray on CPUs without fma, or to just write a fallback implimentation for them.

---

<div class="post-metadata">

**Author:** ![Evan\_Dodge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evan_dodge/32/27918_2.png) [@Evan\_Dodge](https://discourse.julialang.org/u/Evan_Dodge)\
**Post date:** [August 6, 2021, 7:07pm UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954/5 "2021-08-06T19:07:33Z")

</div>

Makes sense. I’m happy having an explanation. I can update the user documentation on my end for now.

---

<div class="post-metadata">

**Author:** ![blackeneth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blackeneth/32/10353_2.png) [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Post date:** [August 6, 2021, 7:26pm UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954/6 "2021-08-06T19:26:54Z")

</div>

This is the test set that fails:

```julia
@testset "exp function" for T in (Float64, Float32)
    @testset "$T accuracy" begin
        X = map(T, vcat(-10:0.0002:10, -80:0.001:80, 2.0^-27, 2.0^-28, 2.0^-14, 2.0^-13))
        for x in X
            y, yb = exp(x), exp(big(x))
            @test abs(y-yb) <= 1.0*eps(T(yb))
        end
    end
    @testset "$T edge cases" begin
        @test isnan_type(T, exp(T(NaN)))
        @test exp(T(-Inf)) === T(0.0)
        @test exp(T(Inf)) === T(Inf)
        @test exp(T(0.0)) === T(1.0) # exact
        @test exp(T(5000.0)) === T(Inf)
        @test exp(T(-5000.0)) === T(0.0)
    end
end

```

Fails on my IvyBridge as well. There is one little boo-boo in the code–the conversion of x to BigFloat. For example, one of the test values is x=-7.988

```julia
julia> x=-7.988
-7.988

julia> z=big(x)
-7.98800000000000043343106881366111338138580322265625

julia> exp(x)-exp(z)
-6.875357276975877021034327111301830058376032887058691738948989190690502068289917e-21

julia> w=BigFloat(string(x))
-7.987999999999999999999999999999999999999999999999999999999999999999999999999993

julia> exp(x)-exp(w)
-1.540305925358389286374676262298504478625373433257642019437989077979534631976859e-19

julia> exp(z)
0.0003395124296503243699399635581465312771639644718746449997822828870586917389489892

julia> exp(w)
0.0003395124296503245170951988170095828935972635904232628039435933257642019437989078

```

What is the “correct” value of exp(-7.988)?

```julia
0.0003395124296503245170951988170095828935972635904232628039435933257642019437989041010722263991870498980819486361427826398053908

```

Although this little correction makes it worse, not better! Prior error -6.87 E-21 versus new error -1.54E-19 !

Explanation was to why IvyBridge is worse has already been provided.

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [August 6, 2021, 7:39pm UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954/7 "2021-08-06T19:39:48Z")

</div>

This is wrong. -7.88 in Julia doesn’t mean -788//100, it means the closest floating point number to -7.88. as such, big(x) is the correct value to compare against.

---

<div class="post-metadata">

**Author:** ![blackeneth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blackeneth/32/10353_2.png) [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Post date:** [August 6, 2021, 8:04pm UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954/8 "2021-08-06T20:04:38Z")

</div>

```julia
julia> x=-7.988
-7.988

julia> z=big(x)
-7.98800000000000043343106881366111338138580322265625

julia> w=BigFloat(string(x))
-7.987999999999999999999999999999999999999999999999999999999999999999999999999993

```

```julia
-7.988 - (-7.987999999999999999999999999999999999999999999999999999999999999999999999999993)
= -7E-78

```

```julia
-7.988 - (-7.98800000000000043343106881366111338138580322265625) 
= 4.3343106881366111338138580322265625E-16

```

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [August 6, 2021, 8:15pm UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954/9 "2021-08-06T20:15:43Z")

</div>

Did you run the last 2 code blocks? That’s not what Julia answers. It will give 0.0 for both of them.

---

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [August 6, 2021, 8:19pm UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954/10 "2021-08-06T20:19:56Z")

</div>

```julia
julia> function signif(x::Float64)
           xu = reinterpret(UInt64, x)
           s = big"0" // big"1"
           for i ∈ 0:51
               if xu % Bool
                   s += big"1" // big"2"^(52-i)
               end
               xu >>= 1
           end
           s
       end
signif (generic function with 1 method)

julia> x
-7.988

julia> xbigrational = (-1) ^ signbit(x) * (signif(x) + 1) * big(2) ^ (exponent(x))
-8993688455858881//1125899906842624

julia> Float64(xbigrational)
-7.988

julia> BigFloat(xbigrational)
-7.98800000000000043343106881366111338138580322265625

julia> big(x)
-7.98800000000000043343106881366111338138580322265625

julia> numerator(xbigrational) / denominator(xbigrational)
-7.98800000000000043343106881366111338138580322265625

```

For `Float64`, Julia prints something that looks pretty and can be parsed back to the exact binary representation. That doesn’t mean the printing is not rounded.

Above, I use the [definition of Float64](https://en.wikipedia.org/wiki/Double-precision_floating-point_format#IEEE_754_double-precision_binary_floating-point_format:_binary64) to convert `x` into a representation using `Rational{BigInt}`, which we can then convert into `Float64` and `BigFloat` at our leisure.  
The rational representation `xbigrational` is “exact”.  
Performing the division (converting to big float) gives us the same thing we got with `big(x)`.

In terms of representations of what `x` actually is, the `Rational{BigInt}` is exact, the decimal `BigFloat` representation is close, and the `Float64` representation is slightly less close – but still close enough to recover the exact binary representation (if we know the decimals are representing a `Float64`).

Don’t confuse the `show` method with what is under the hood.

Also, FWIW, `Rational{Int64}` would’ve been enough for an exact representation.

```julia
julia> function signifint64(x::Float64)
           xu = reinterpret(UInt64, x)
           s = 0 // 1
           for i ∈ 0:51
               if xu % Bool
                   s += 1 // 2^(52-i)
               end
               xu >>= 1
           end
           s
       end
signifint64 (generic function with 1 method)

julia> xrational = (-1) ^ signbit(x) * (signifint64(x) + 1) * 2 ^ (exponent(x))
-8993688455858881//1125899906842624

julia> typeof(ans)
Rational{Int64}

julia> convert(Rational, x)
-8993688455858881//1125899906842624

julia> typeof(ans)
Rational{Int64}

```

---

<div class="post-metadata">

**Author:** ![blackeneth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blackeneth/32/10353_2.png) [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Post date:** [August 7, 2021, 6:47am UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954/11 "2021-08-07T06:47:20Z")

</div>

While

```julia
-8993688455858881/1125899906842624 =
-7.98800000000000043343106881366111338138580322265625

```

The value -7.988 is exactly represented by 1997/250

```julia
-1997/250 =
-7.988

```

The difference between -8993688455858881/1125899906842624 and -1997/250 represents the **error** if the Float64 representation of -7.988.

```julia
julia> bitstring(-7.988)
"1100000000011111111100111011011001000101101000011100101011000001"

```

Breaking this down into IEEE 754 format we have:

| Part | Binary | Decimal |
| --- | --- | --- |
| sign | 1 | -1 |
| Exponent | 10000000001 | 1025 |
| Fraction | 1111111100111011011001000101101000011100101011000001 | 0.9970000000000001083577672034152783453464508056640625 |
| Exact | | -7.98800000000000043343106881366111338138580322265625 |

The IEEE 754 double precision (64 bit) format has 15.95 decimal digits of precision. Let’s look a little closer at the exact decimal value:

![Numberprecission](https://global.discourse-cdn.com/julialang/original/3X/7/5/751bf1efe535ce26d115ac00a6caa11fa4e9ebd7.png)

We see that `-7.988` is represented represented to 15 digits as `-7.988000000000000`

What is `43343106881366111338138580322265625`? It’s **error.**

So if you want to compute the Float64 accuracy for the exp() function, you compare it to a higher precision representation of -7.988.

A higher precision representation of -7.988 is:

```julia
julia> w=BigFloat(string(-7.988),RoundUp)
-7.987999999999999999999999999999999999999999999999999999999999999999999999999993

```

You could also do

```julia
julia> v=BigFloat(string(-7.988),RoundDown)
-7.988000000000000000000000000000000000000000000000000000000000000000000000000062

```

However, “w” is slightly closer to -7.988 that “v” is. So use “w”.

exp(w) gives us a higher accuracy value of exp(-7.988):

```julia
julia> exp(w)
0.0003395124296503245170951988170095828935972635904232628039435933257642019437989078

```

Compare this to the exact value:

 ![w vs exact](https://global.discourse-cdn.com/julialang/original/3X/f/a/fa2856e7bf74af997b041e844f1a471751330354.png)  
We see that exp(w) only mismatches the exact value at the last two digits.

Now compare this to:

```julia
julia> x = -7.988 # Float64
-7.988

julia> z=big(x)
-7.98800000000000043343106881366111338138580322265625

julia> exp(x)
0.00033951242965032436

julia> exp(z)
0.0003395124296503243699399635581465312771639644718746449997822828870586917389489892

```

Now compare exp(x), exp(z) to the exact value:

 ![x z exact](https://global.discourse-cdn.com/julialang/original/3X/3/f/3fe3fc55d2339286437749c7f1fa54565f1a61de.png)

You see that exp(x) and exp(z) are well matched, but exp(z) is mismatched from the exact value.

In effect, by using `z=big(x)`, one is copying the **error** from the Float64 representation to a higher bit (BigFloat, 256 bit) representation.

It’s no wonder that exp(x)-exp(z) (about -6.87E-21) is lower than exp(x)-exp(w) (about -1.54E-19), as **z copies the error from x.**

But if your goal is to check the **accuracy** for Float64 in computing exp()

```julia
@testset "exp function" for T in (Float64, Float32)
    @testset "$T accuracy" begin

```

Then you would compare exp(x) to a exp(w), as “w” is closer to -7.988 than “x” is.

_Furthermore,_ what do you compare the difference to?

Currently, the test compares it to eps(BigFloat):

```julia
            y, yb = exp(x), exp(big(x))
            @test abs(y-yb) <= 1.0*eps(T(yb))

```

For the value x=-7.988, eps(T(yb)) evaluates to about 4.2E-81; if we used eps(T(y)) instead, it would evaluate to about 5.4E-20.

It would seem if you’re checking the accuracy of Float64, you would compare it to the `eps` of Float64, and not the `eps` of BigFloat.

So perhaps that check should be:

```julia
            y, yb = exp(x), exp(BigFloat(string(x)))
            @test abs(y-yb) <= one(T)*eps(T(y))

```

---

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [August 7, 2021, 6:58am UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954/12 "2021-08-07T06:58:24Z")

</div>

> [@blackeneth](#):
>
> The difference between -8993688455858881/1125899906842624 and -1997/250 represents the **error** if the Float64 representation of -7.988.
> 
> ```julia
> 
> ```

Yes.  
When measuring the accuracy of `exp(x::Float64)`, we’d want to use the exact value of `x` as a big float, meaning `big(x)` and not `BigFloat(string(-7.988),RoundUp)` would be the correct comparison.

> [@blackeneth](#):
>
> But if your goal is to check the accuracy for Float64 in computing exp()

By this do you mean “including the impact of Float64’s error on the result”?  
If someone is interested in particular decimal values (like `-7.988`), then I could see how that may be a priority / something worth analyzing.

But for testing functions and developing the polynomial approximations needed, we’d fit towards the exact values.  
It’d be more complicated, but perhaps some concept of “minmax over range of representable floating points” makes sense. I.e., you’d consider the maximum deviation of `exp(::BigFloat)` over the entire range of `BigFloat` values that would round to the given `x`.

---

<div class="post-metadata">

**Author:** ![blackeneth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blackeneth/32/10353_2.png) [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Post date:** [August 7, 2021, 7:42am UTC](https://discourse.julialang.org/t/base-runtests-math-failures-on-chips-older-than-haswell/65954/13 "2021-08-07T07:42:51Z")

</div>

As a user, I want the value of exp(-7.988).  
When I set a variable to -7.988 with Float64, it gets stored as  
`-7.98800000000000043343106881366111338138580322265625`

So when I compute exp(-7.988), I get:  
`0.00033951242965032436`

However, the exact value of exp(-7.988) is  
`0.00033951242965032452`

![x 15 dig vs exact](https://global.discourse-cdn.com/julialang/original/3X/9/7/97d66ad12b9d0dda5d5cd880597b63d1e80da71c.png)

The error is:  
`1.9E-16`

That’s the error I want to know about.

You can’t separate the error of the representation of x as Float64 from the calculation of exp().

If you wanted to compute the accuracy of exp() independent of the representation of Float64, you would skip Float64 use BigFloat and compare it to known exact values.

```julia
julia> w=BigFloat(string(-7.988),RoundUp)
-7.987999999999999999999999999999999999999999999999999999999999999999999999999993

julia> exp(w)
0.0003395124296503245170951988170095828935972635904232628039435933257642019437989078

```

Then the comparison is:

![exact comparison](https://global.discourse-cdn.com/julialang/original/3X/6/d/6d071fba6c82975e5104e3256a7044aeb884b3c0.png)

The error is 3.7E-81 .

To compare Float64(-7.988) with big(-7.988) seems kind of pointless because, duh, you would expect them to match closely. It’s not checking the “accuracy” of exp(), as the inputs are essentially the same.
