Ticket #59 (new defect)

Opened 6 years ago

Last modified 6 years ago

missing and/or erroneous output in deteministic function run from WinHUGS cmd line!

Reported by: ettinger@… Owned by:
Priority: critical Milestone:
Component: hugs Version: 200609
Keywords: inconsistent expression evaluation Cc:

Description (last modified by ross) (diff)

(Output showing the bug is appended below. It isn't part of the program).

PLEASE run the function called bug. It will tell you to type a short expression at the WinHUGS command line. Retry the expression ten times. I do not get the same result every time! Do you find the same problem? Please, please let me know either way. See below for printout of my "impossible" results.

The functions os and s below will be used to demonstrate the WinHUGS bug:

os :: Int -> Int -> Double
os i j = -22.0/7.1
s :: [[Int]] -> [[Double]]
s dat = [[      
   sum [ fromIntegral (dat!!i!!j) * os i x * os j y 
                              | i <-[0..7] , j <-[0..7] ]
              | x <- [0..7] ]
              | y <- [0..7] ]

The following functions produce the bug test data:

insig :: [Int]
insig = [0 | i <-[0..7]]
signif :: [Int]
signif = [ 1 ] ++ [0 | i <-[1..7]]
i = [insig] ++ [signif | i <- [1..7]]

Type the following to demonstrate the bug: (take 4.s)i

Main> (take 4.s)i
[[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703],[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703],[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703],[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703]]
Main> (take 4.s)i
[[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703],[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703],[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703],[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703]]
Main>

Attachments

rdebugreport.hs Download (2.2 KB) - added by neil 6 years ago.
Move attachment from ticket 60 to 59

Change History

Changed 6 years ago by neil

Move attachment from ticket 60 to 59

Changed 6 years ago by neil

  • owner neil deleted
  • component changed from winhugs to hugs

I have tried this on both Hugs and WinHugs? Sep 2006 and cannot replicate, can you pleave give your version? And your OS, and processor.

This looks like its floating point rounding errors etc - and is almost certainly not a bug in WinHugs?, but in the underlying Hugs, so am reassigning it.

Changed 6 years ago by ross

  • description modified (diff)

I cannot replicate the misbehaviour with the Sep 2006 release under Linux (ix86).

Changed 6 years ago by ross

Environment details from the original poster:

The OS is:
Microsoft Windows XP
Home Edition
Version 2002
Service pack 2

The hardware is:
Dell Dimension DV051
Intel Pentium 4 CPU 3.00GHZ
2.99 GHZ, 504 MB of RAM
Physical Address Extension

The version of WinHUGS is:
Sep 2006

(I don't see how it can be a floating point problem, as the enumerations are all over Int or Integer.)

Changed 6 years ago by guest

Test Trac email again.  seduction  pickup

Note: See TracTickets for help on using tickets.