diff options
author | Ben Lippmeier <benl@ouroborus.net> | 2011-08-25 16:54:35 +1000 |
---|---|---|
committer | Ben Lippmeier <benl@ouroborus.net> | 2011-08-25 16:54:35 +1000 |
commit | 95de2a564208992dc5d4bfd426bac65845b472f8 (patch) | |
tree | 123fc6ecc22a809fceab093c8a9508713240b134 /testsuite/tests/dph | |
parent | 0f02c5851fc4ad0623a30e072b6ee6d4d778745c (diff) | |
parent | e49956176c722a6edfc670c4fa1902ef9dfb32eb (diff) | |
download | haskell-95de2a564208992dc5d4bfd426bac65845b472f8.tar.gz |
Merge /Users/benl/devel/testsuite/roldugin/testsuite
Diffstat (limited to 'testsuite/tests/dph')
5 files changed, 11 insertions, 11 deletions
diff --git a/testsuite/tests/dph/diophantine/DiophantineVect.hs b/testsuite/tests/dph/diophantine/DiophantineVect.hs index bef6694b3d..b6f34eb397 100644 --- a/testsuite/tests/dph/diophantine/DiophantineVect.hs +++ b/testsuite/tests/dph/diophantine/DiophantineVect.hs @@ -11,7 +11,8 @@ solution3' = let pow x i = productP (replicateP i x) primes = [: 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73 :] - sumpri xx = productP [: pow p x | p <- primes | x <- xx :] + a `cutTo` b = sliceP 0 (lengthP b) a + sumpri xx = productP [: pow p x | p <- primes `cutTo` xx | x <- xx :] distinct xx = productP [: x + 1 | x <- xx :] series :: [:Int:] -> Int -> [:[:Int:]:] @@ -28,7 +29,7 @@ solution3' i = minIndexP [: a | (a, b) <- xx :] in xx !: i in - prob 7 2000 + prob 5 200 solution3 :: (Int, PArray Int) {-# NOINLINE solution3 #-} diff --git a/testsuite/tests/dph/diophantine/Main.hs b/testsuite/tests/dph/diophantine/Main.hs index eb8ae7ac28..e3130f03a8 100644 --- a/testsuite/tests/dph/diophantine/Main.hs +++ b/testsuite/tests/dph/diophantine/Main.hs @@ -19,7 +19,7 @@ solution1 prob x y = minimum [ (sumpri m ,m) | m <- series [1..3] x , (>y) $ distinct $ map (*2) m] - in prob 7 2000 + in prob 5 200 solution2 = let primes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73] @@ -31,7 +31,7 @@ solution2 prob x y = minimum [ (sumpri m ,m) | m <- series [1..3] x , (distinct $ map (*2) m) > y ] - in prob 7 2000 + in prob 5 200 main diff --git a/testsuite/tests/dph/diophantine/dph-diophantine-fast.stdout b/testsuite/tests/dph/diophantine/dph-diophantine-fast.stdout index 7088d6ced3..3fe0f66bd1 100644 --- a/testsuite/tests/dph/diophantine/dph-diophantine-fast.stdout +++ b/testsuite/tests/dph/diophantine/dph-diophantine-fast.stdout @@ -1,3 +1,3 @@ -(180180,[2,2,1,1,1,1,0]) -(180180,[2,2,1,1,1,1,0]) -(180180,[:2,2,1,1,1,1,0:]) +(1260,[2,2,1,1,0]) +(1260,[2,2,1,1,0]) +(1260,fromList<PArray> [2,2,1,1,0]) diff --git a/testsuite/tests/dph/diophantine/dph-diophantine-opt.stdout b/testsuite/tests/dph/diophantine/dph-diophantine-opt.stdout index 7088d6ced3..3fe0f66bd1 100644 --- a/testsuite/tests/dph/diophantine/dph-diophantine-opt.stdout +++ b/testsuite/tests/dph/diophantine/dph-diophantine-opt.stdout @@ -1,3 +1,3 @@ -(180180,[2,2,1,1,1,1,0]) -(180180,[2,2,1,1,1,1,0]) -(180180,[:2,2,1,1,1,1,0:]) +(1260,[2,2,1,1,0]) +(1260,[2,2,1,1,0]) +(1260,fromList<PArray> [2,2,1,1,0]) diff --git a/testsuite/tests/dph/diophantine/dph-diophantine.T b/testsuite/tests/dph/diophantine/dph-diophantine.T index 26672e66d0..ebba1cd490 100644 --- a/testsuite/tests/dph/diophantine/dph-diophantine.T +++ b/testsuite/tests/dph/diophantine/dph-diophantine.T @@ -13,7 +13,6 @@ test ('dph-diophantine-opt' test ('dph-diophantine-fast' , [ reqlib('dph-par') , reqlib('dph-prim-par') - , expect_broken(5065) , only_ways(['normal', 'threaded1', 'threaded2']) ] , multimod_compile_and_run , [ 'Main' |