~ubuntu-branches/ubuntu/wily/julia/wily

« back to all changes in this revision

Viewing changes to debian/patches/testsuite-i386.patch

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot
  • Date: 2013-11-17 19:32:52 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20131117193252-tkrpclguqqebqa35
Tags: 0.2.0+dfsg-3
testsuite-i386.patch: loosen the numerical precision for yet another test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Fix testsuite crashes on i386
2
 
Origin: upstream,
3
 
        https://github.com/JuliaLang/julia/commit/00f6541333217654e3b62fa5109875de9d900133
4
 
        https://github.com/JuliaLang/julia/commit/41b85b02765fc064b11aa0da811a380dcaa1ff9f
5
 
Applied-Upstream: 0.2.0
6
 
Last-Update: 2013-11-03
 
1
Description: Fix some rounding errors on i386
 
2
 The problems appear only on i386 qemu guests, not on i386 chroots on an amd64
 
3
 machine.
 
4
Author: Sébastien Villemot <sebastien@debian.org>
 
5
Forwarded: no
 
6
Last-Update: 2013-11-17
7
7
---
8
8
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
9
 
--- a/test/core.jl
10
 
+++ b/test/core.jl
11
 
@@ -1067,7 +1067,7 @@
12
 
 # issue #4581
13
 
 bitstype 64 Date4581{T}
14
 
 let
15
 
-    x = Intrinsics.box(Date4581{Int}, Intrinsics.unbox(Int,1234))
16
 
+    x = Intrinsics.box(Date4581{Int}, Intrinsics.unbox(Int64,int64(1234)))
17
 
     xs = Date4581[x]
18
 
     ys = copy(xs)
19
 
     @test ys !== xs
20
 
--- a/test/bigint.jl
21
 
+++ b/test/bigint.jl
22
 
@@ -246,7 +246,7 @@
23
 
 
24
 
 n = bigfib(1000001)
25
 
 @test ndigits(n) == 208988
26
 
-@test mod(n,10^15) == 359244926937501
27
 
+@test mod(n,big(10)^15) == 359244926937501
28
 
 @test div(n,big(10)^208973) == 316047687386689
29
 
 
30
 
 s = string(n)
 
9
--- a/test/numbers.jl
 
10
+++ b/test/numbers.jl
 
11
@@ -752,7 +752,7 @@
 
12
 @test Complex(1,2) + 1//2 == Complex(3//2,2//1)
 
13
 @test Complex(1,2) + 1//2 * 0.5 == Complex(1.25,2.0)
 
14
 @test (Complex(1,2) + 1//2) * 0.5 == Complex(0.75,1.0)
 
15
-@test (Complex(1,2)/Complex(2.5,3.0))*Complex(2.5,3.0) == Complex(1,2)
 
16
+@test_approx_eq (Complex(1,2)/Complex(2.5,3.0))*Complex(2.5,3.0) Complex(1,2)
 
17
 @test 0.7 < real(sqrt(Complex(0,1))) < 0.707107
 
18
 
 
19
 for T in {Int8,Int16,Int32,Int64,Int128}
 
20
--- a/test/arrayops.jl
 
21
+++ b/test/arrayops.jl
 
22
@@ -339,7 +339,7 @@
 
23
     @test (es - cs[end]) < es * 1e-13
 
24
     @test (es2 - cs[10^5]) < es2 * 1e-13
 
25
 end
 
26
-@test sum(sin(z)) == sum(sin, z)
 
27
+@test_approx_eq sum(sin(z)) sum(sin, z)
 
28
 
 
29
 @test any([true false; false false], 2) == [true false]'
 
30
 @test any([true false; false false], 1) == [true false]
 
31
--- a/test/linalg.jl
 
32
+++ b/test/linalg.jl
 
33
@@ -471,7 +471,7 @@
 
34
     vals, Z = LinAlg.LAPACK.syevr!('V', copy(Asym))
 
35
     @test_approx_eq Z*scale(vals, Z') Asym
 
36
     @test all(vals .> 0.0)
 
37
-    @test_approx_eq LinAlg.LAPACK.syevr!('N','V','U',copy(Asym),0.0,1.0,4,5,-1.0)[1] vals[vals .< 1.0]
 
38
+    @test_approx_eq_eps LinAlg.LAPACK.syevr!('N','V','U',copy(Asym),0.0,1.0,4,5,-1.0)[1] vals[vals .< 1.0] 1e-5
 
39
     @test_approx_eq LinAlg.LAPACK.syevr!('N','I','U',copy(Asym),0.0,1.0,4,5,-1.0)[1] vals[4:5]
 
40
     @test_approx_eq vals LinAlg.LAPACK.syev!('N','U',copy(Asym))
 
41
 end
 
42
--- a/test/ranges.jl
 
43
+++ b/test/ranges.jl
 
44
@@ -88,7 +88,7 @@
 
45
 @test (3 in 3+0*(1:5))
 
46
 @test !(4 in 3+0*(1:5))
 
47
 
 
48
-r = 0.0:0.01:1.0
 
49
+r = 0.0:1/64:1.0
 
50
 @test (r[30] in r)
 
51
 r = (-4*int64(maxintfloat(is(Int,Int32) ? Float32 : Float64))):5
 
52
 @test (3 in r)
 
53
--- a/test/math.jl
 
54
+++ b/test/math.jl
 
55
@@ -11,8 +11,8 @@
 
56
 end
 
57
 
 
58
 for x = -3:0.3:3
 
59
-    @test_approx_eq_eps sinpi(x) sin(pi*x) eps(pi*x)
 
60
-    @test_approx_eq_eps cospi(x) cos(pi*x) eps(pi*x)
 
61
+    @test_approx_eq_eps sinpi(x) sin(pi*x) eps(2*pi*x)
 
62
+    @test_approx_eq_eps cospi(x) cos(pi*x) eps(2*pi*x)
 
63
 end
 
64
 
 
65