Opened 9 years ago

Last modified 16 months ago

#2370 new bug

num009 fails on OS X 10.5?

Reported by: batterseapower Owned by:
Priority: lowest Milestone:
Component: Compiler Version: 6.9
Keywords: Cc: pho@…
Operating System: MacOS X Architecture: x86
Type of failure: None/Unknown Test Case: num009
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Running on an 8-core system based on Xeon 5400s.

Full error:

=====> num009(threaded2)
cd . && '/Users/mbolingbroke/Programming/Checkouts/ghc.working/compiler/stage2/ghc-inplace' -fforce-recomp -dcore-lint -dcmm-lint -Di386_apple_darwin  -dno-debug-output -o num009 num009.hs -O -threaded   >num009.comp.stderr 2>&1
cd . && ./num009  +RTS -N2 -RTS  </dev/null >num009.run.stdout 2>num009.run.stderr
Actual stdout output differs from expected:
--- ./num009.stdout.normalised	2008-06-17 09:55:40.000000000 +0100
+++ ./num009.run.stdout.normalised	2008-06-17 09:55:40.000000000 +0100
@@ -1 +1,31 @@
+sind
+-0.6452512852657808
+-0.7469218912594929
+(-5811906895766608,-53)
+(-6727674302302237,-53)
+sinf
+0.6565767
+-0.7710884
+(11015529,-24)
+(-12936717,-24)
+cosd
+0.7639704044417284
+-0.6649117899070088
+(6881233657531710,-53)
+(-5988992978518909,-53)
+cosf
+0.7542593
+0.63672805
+(12654371,-24)
+(10682524,-24)
+tand
+-0.8446024630198841
+1.123339821307656
+(-7607502675465106,-53)
+(5059072800651599,-52)
+tanf
+0.87049204
+-1.2110169
+(14604433,-24)
+(-10158746,-23)
 Done
*** unexpected failure for num009(threaded2)

Change History (25)

comment:1 Changed 9 years ago by igloo

difficulty: Unknown
Milestone: 6.10 branch

Is it only the threaded2 way that fails?

comment:2 Changed 9 years ago by batterseapower

Test Case: lib/Numirc/num009lib/Numeric/num009

No, it fails in all ways.

comment:3 Changed 8 years ago by igloo

Might be related to #2059.

comment:4 Changed 8 years ago by igloo

Milestone: 6.10 branch6.12 branch

comment:5 Changed 7 years ago by igloo

Milestone: 6.12 branch6.12.3

comment:6 Changed 7 years ago by igloo

Milestone: 6.12.36.14.1
Priority: normallow

comment:7 Changed 6 years ago by igloo

Milestone: 7.0.17.0.2

comment:8 Changed 6 years ago by PHO

Cc: pho@… added
Type of failure: None/Unknown

comment:9 Changed 6 years ago by igloo

Milestone: 7.0.27.2.1

comment:10 Changed 6 years ago by batterseapower

What is happening is that GHC is using the algorithm described in #2059 to implement the trig functions tested by num009. The answers returned are exactly as they are on other platforms. However, those answers do not agree with whatever is being returned by the implementation of the math.h functions on OS X.

Given that the arguments being tested are so large, pretty much any answer would be acceptable from these functions as long as it is within the right range, which these are. So everything is working as expected, but the test is failing.

comment:11 Changed 6 years ago by simonmar

So could someone mark it as an expected failure on OS X please?

comment:12 Changed 6 years ago by batterseapower

comment:13 Changed 6 years ago by igloo

Milestone: 7.2.17.4.1

comment:14 Changed 6 years ago by dterei

The comments seem to indicate that this bug is fixed? Can we close?

comment:15 Changed 6 years ago by thorkilnaur

The test verifies that GHC and (presumably) gcc return the same value for various trigonometric functions, applied to rather large arguments. The test fails on my

$ uname -a
Darwin thorkil-naurs-intel-mac-mini.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
$

and is marked "if_os('darwin', expect_broken(2370))". I'm not sure that I would interpret that as "fixed". But the problem is, admittedly, minor.

Best regards Thorkil

comment:16 Changed 5 years ago by igloo

Architecture: x86_64 (amd64)x86

I can now only reproduce this on i386, not x86_64.

(OS X 10.7.2, Xcode 4.1).

comment:17 Changed 5 years ago by igloo

Milestone: 7.4.17.6.1
Priority: lowlowest

comment:18 Changed 5 years ago by igloo

Milestone: 7.6.17.6.2

comment:19 Changed 4 years ago by morabbin

I think num009 is now to be found as numeric/should_run/numrun009.

comment:20 Changed 4 years ago by igloo

Test Case: lib/Numeric/num009num009

It's in libraries/base/tests/Numeric/num009.

comment:21 Changed 3 years ago by thoughtpolice

Milestone: 7.6.27.10.1

Moving to 7.10.1.

comment:22 Changed 2 years ago by thoughtpolice

Milestone: 7.10.17.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:23 Changed 2 years ago by thoughtpolice

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:24 Changed 21 months ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

comment:25 Changed 16 months ago by thomie

Milestone: 8.0.1
Note: See TracTickets for help on using tickets.