|
20 | 20 |
|
21 | 21 | # TODO: copy of gpl license |
22 | 22 |
|
23 | | -function test_series_precision() |
| 23 | +function test_series_precision_example(p,n,d) |
| 24 | + r_m = DeRham.calculate_relative_precision(hodge_polygon(p,n,d),n-1,p) |
| 25 | + N = DeRham.calculate_series_precision(p,n,r_m) |
24 | 26 |
|
| 27 | + if ( n == 2 && d == 3 ) |
| 28 | + if ( p < 5) |
| 29 | + @test N == [2 3] |
| 30 | + elseif ( 5 <= p && p < 17 ) |
| 31 | + @test N == [2,2] |
| 32 | + elseif ( 17 <= p ) |
| 33 | + @test N == [0,1] |
| 34 | + end |
| 35 | + elseif ( n == 2 && d == 4 ) |
| 36 | + if ( p < 5) |
| 37 | + @test N == [4,4] |
| 38 | + elseif ( 5 <= p && p < 17 ) |
| 39 | + @test N == [3,3] |
| 40 | + elseif ( 17 <= p ) |
| 41 | + @test N == [2,2] |
| 42 | + end |
| 43 | + elseif ( n == 2 && d == 5 ) |
| 44 | + if ( p < 5) |
| 45 | + @test N == [6,6] |
| 46 | + elseif ( 5 <= p && p < 7 ) |
| 47 | + @test N == [4,5] |
| 48 | + elseif ( 7 <= p ) |
| 49 | + @test N == [4,4] |
| 50 | + end |
| 51 | + elseif ( n == 2 && d == 6 ) |
| 52 | + if ( p < 5) |
| 53 | + @test N == [8,9] |
| 54 | + elseif ( 5 <= p && p < 7 ) |
| 55 | + @test N == [7,7] |
| 56 | + elseif ( 7 <= p && p < 11 ) |
| 57 | + @test N == [6,7] |
| 58 | + elseif ( 11 <= p ) |
| 59 | + @test N == [6,6] |
| 60 | + end |
| 61 | + elseif ( n == 2 && d == 7 ) |
| 62 | + if ( p < 5) |
| 63 | + @test N == [11,11] |
| 64 | + elseif ( 5 <= p && p < 7 ) |
| 65 | + @test N == [10,10] |
| 66 | + elseif ( 7 <= p && p < 11 ) |
| 67 | + @test N == [10,10] |
| 68 | + elseif ( 11 <= p && p < 17 ) |
| 69 | + @test N == [9,9] |
| 70 | + elseif ( 17 <= p ) |
| 71 | + @test N == [8,8] |
| 72 | + end |
| 73 | + elseif ( n == 2 && d == 8 ) |
| 74 | + if ( p < 5) |
| 75 | + @test N == [14,14] |
| 76 | + elseif ( 5 <= p && p < 7 ) |
| 77 | + @test N == [13,13] |
| 78 | + elseif ( 7 <= p && p < 13 ) |
| 79 | + @test N == [13,13] |
| 80 | + elseif ( 13 <= p && p < 17 ) |
| 81 | + @test N == [12,13] |
| 82 | + elseif ( 17 <= p ) |
| 83 | + @test N == [11,11] |
| 84 | + end |
| 85 | + elseif ( n == 2 && d == 9 ) |
| 86 | + if ( p < 5) |
| 87 | + @test N == [18,18] |
| 88 | + elseif ( 5 <= p && p < 7 ) |
| 89 | + @test N == [16,16] |
| 90 | + elseif ( 7 <= p && p < 11 ) |
| 91 | + @test N == [16,16] |
| 92 | + elseif ( 11 <= p && p < 17 ) |
| 93 | + @test N == [16,16] |
| 94 | + elseif ( 17 <= p ) |
| 95 | + @test N == [15,15] |
| 96 | + end |
| 97 | + elseif ( n == 3 && d == 4 ) |
| 98 | + if ( p < 5) |
| 99 | + @test N == [7,7,8] |
| 100 | + elseif ( 5 <= p && p < 7 ) |
| 101 | + @test N == [4,5,5] |
| 102 | + elseif ( 7 <= p && p < 23 ) |
| 103 | + @test N == [4,4,3] |
| 104 | + elseif ( 23 <= p && p < 43 ) |
| 105 | + @test N == [3,3,3] |
| 106 | + elseif ( 43 <= p ) |
| 107 | + @test N == [3,3,2] |
| 108 | + end |
| 109 | + elseif ( n == 3 && d == 5 ) |
| 110 | + if ( p < 5) |
| 111 | + @test N == [11,11,10] |
| 112 | + elseif ( 5 <= p && p < 7 ) |
| 113 | + @test N == [8,8,9] |
| 114 | + elseif ( 7 <= p && p < 11 ) |
| 115 | + @test N == [8,8,7] |
| 116 | + elseif ( 11 <= p && p < 23 ) |
| 117 | + @test N == [7,7,6] |
| 118 | + elseif ( 23 <= p && p < 29 ) |
| 119 | + @test N == [6,6,6] |
| 120 | + elseif ( 29 <= p ) |
| 121 | + @test N == [6,6,5] |
| 122 | + end |
| 123 | + elseif ( n == 3 && d == 6 ) |
| 124 | + if ( p < 5) |
| 125 | + @test N == [17,18,17] |
| 126 | + elseif ( 5 <= p && p < 7 ) |
| 127 | + @test N == [15,15,14] |
| 128 | + elseif ( 7 <= p && p < 11 ) |
| 129 | + @test N == [15,15,14] |
| 130 | + elseif ( 11 <= p && p < 17 ) |
| 131 | + @test N == [14,14,13] |
| 132 | + elseif ( 17 <= p && p < 23 ) |
| 133 | + @test N == [13,13,12] |
| 134 | + elseif ( 23 <= p ) |
| 135 | + @test N == [12,12,11] |
| 136 | + end |
| 137 | + end |
| 138 | + |
25 | 139 | end |
26 | 140 |
|
| 141 | + |
27 | 142 | function test_algorithm_precision_example(p,n,d) |
28 | 143 |
|
29 | 144 | r_m = DeRham.calculate_relative_precision(hodge_polygon(p,n,d),n-1,p) |
@@ -183,9 +298,26 @@ function test_algorithm_precision() |
183 | 298 | test_algorithm_precision_example(p,3,4) |
184 | 299 | test_algorithm_precision_example(p,3,5) |
185 | 300 | end |
| 301 | +end |
186 | 302 |
|
| 303 | +function test_series_precision() |
| 304 | + #TODO: add the bound and fix for small p |
| 305 | + |
| 306 | + # p = 11 |
| 307 | + test_series_precision_example(11,2,3) |
| 308 | + test_series_precision_example(11,2,4) |
| 309 | + |
| 310 | + # p = 13 |
| 311 | + test_series_precision_example(13,2,3) |
| 312 | + test_series_precision_example(13,2,4) |
| 313 | + test_series_precision_example(13,2,5) |
| 314 | + |
| 315 | + # k3 surfaces |
| 316 | + test_series_precision_example(11,3,4) |
| 317 | + test_series_precision_example(13,3,4) |
187 | 318 | end |
188 | 319 |
|
| 320 | + |
189 | 321 | function test_hodge_polygon_values() |
190 | 322 | k3 = DeRham.SlopesPolygon([1,20,1]) |
191 | 323 |
|
|
0 commit comments