1.1 --- a/vm/src/test/java/org/apidesign/vm4brwsr/NumberTest.java Wed Feb 06 12:46:35 2013 +0100
1.2 +++ b/vm/src/test/java/org/apidesign/vm4brwsr/NumberTest.java Thu Feb 07 16:11:53 2013 +0100
1.3 @@ -143,372 +143,6 @@
1.4 s
1.5 );
1.6 }
1.7 -
1.8 - @Test public void longConversion() throws Exception {
1.9 - assertExec("Long from cPool",
1.10 - Numbers.class, "conversionL__J",
1.11 - Double.valueOf(Long.MAX_VALUE)
1.12 - );
1.13 - }
1.14 -
1.15 - @Test public void longNegate1() throws Exception {
1.16 - final long res = -0x00fa37d7763e0ca1l;
1.17 - assertExec("Long negate",
1.18 - Numbers.class, "negL__J_3B",
1.19 - Double.valueOf(res),
1.20 - new byte[] { (byte)0x00, (byte)0xfa, (byte)0x37, (byte)0xd7, (byte)0x76, (byte)0x3e, (byte)0x0c, (byte)0xa1 }
1.21 - );
1.22 - }
1.23 -
1.24 - @Test public void longNegate2() throws Exception {
1.25 - final long res = -0x80fa37d7763e0ca1l;
1.26 - assertExec("Long negate",
1.27 - Numbers.class, "negL__J_3B",
1.28 - Double.valueOf(res),
1.29 - new byte[] { (byte)0x80, (byte)0xfa, (byte)0x37, (byte)0xd7, (byte)0x76, (byte)0x3e, (byte)0x0c, (byte)0xa1 }
1.30 - );
1.31 - }
1.32 -
1.33 - @Test public void longNegate3() throws Exception {
1.34 - final long res = -0xfffffffffffffeddl;
1.35 - assertExec("Long negate",
1.36 - Numbers.class, "negL__J_3B",
1.37 - Double.valueOf(res),
1.38 - new byte[] { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xfe, (byte)0xdd }
1.39 - );
1.40 - }
1.41 -
1.42 - @Test public void longAddOverflow() throws Exception {
1.43 - final long res = Long.MAX_VALUE + 1l;
1.44 - assertExec("Addition 1+MAX",
1.45 - Numbers.class, "addL__J_3B_3B",
1.46 - Double.valueOf(res),
1.47 - new byte[] { (byte)0x7f, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff },
1.48 - new byte[] { (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)1 }
1.49 - );
1.50 - }
1.51 -
1.52 - @Test public void longAddMaxAndMax() throws Exception {
1.53 - final long res = Long.MAX_VALUE + Long.MAX_VALUE;
1.54 - assertExec("Addition MAX+MAX",
1.55 - Numbers.class, "addL__J_3B_3B",
1.56 - Double.valueOf(res),
1.57 - new byte[] { (byte)0x7f, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff },
1.58 - new byte[] { (byte)0x7f, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff }
1.59 - );
1.60 - }
1.61 -
1.62 - @Test public void longSubUnderflow() throws Exception {
1.63 - final long res = Long.MIN_VALUE - 1l;
1.64 - assertExec("Subtraction MIN-1",
1.65 - Numbers.class, "subL__J_3B_3B",
1.66 - Double.valueOf(res),
1.67 - new byte[] { (byte)0x80, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 },
1.68 - new byte[] { (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)0, (byte)1 }
1.69 - );
1.70 - }
1.71 -
1.72 - @Test public void longSubMinAndMin() throws Exception {
1.73 - final long res = Long.MIN_VALUE - Long.MIN_VALUE;
1.74 - assertExec("Subtraction MIN-MIN",
1.75 - Numbers.class, "subL__J_3B_3B",
1.76 - Double.valueOf(res),
1.77 - new byte[] { (byte)0x80, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 },
1.78 - new byte[] { (byte)0x80, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 }
1.79 - );
1.80 - }
1.81 -
1.82 - @Test public void longSubMinAndMax() throws Exception {
1.83 - final long res = Long.MIN_VALUE - Long.MAX_VALUE;
1.84 - assertExec("Subtraction MIN-MAX",
1.85 - Numbers.class, "subL__J_3B_3B",
1.86 - Double.valueOf(res),
1.87 - new byte[] { (byte)0x80, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 },
1.88 - new byte[] { (byte)0x7f, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff }
1.89 - );
1.90 - }
1.91 -
1.92 - @Test public void longMultiplyMax() throws Exception {
1.93 - final long res = Long.MAX_VALUE * 2l;
1.94 - assertExec("Multiplication MAX*2",
1.95 - Numbers.class, "mulL__J_3B_3B",
1.96 - Double.valueOf(res),
1.97 - new byte[] { (byte)0x7f, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff },
1.98 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x02 }
1.99 - );
1.100 - }
1.101 -
1.102 - @Test public void longMultiplyMaxAndMax() throws Exception {
1.103 - final long res = Long.MAX_VALUE * Long.MAX_VALUE;
1.104 - assertExec("Multiplication MAX*MAX",
1.105 - Numbers.class, "mulL__J_3B_3B",
1.106 - Double.valueOf(res),
1.107 - new byte[] { (byte)0x7f, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff },
1.108 - new byte[] { (byte)0x7f, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff }
1.109 - );
1.110 - }
1.111 -
1.112 - @Test public void longMultiplyMin() throws Exception {
1.113 - final long res = Long.MIN_VALUE * 2l;
1.114 - assertExec("Multiplication MIN*2",
1.115 - Numbers.class, "mulL__J_3B_3B",
1.116 - Double.valueOf(res),
1.117 - new byte[] { (byte)0x80, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 },
1.118 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x02 }
1.119 - );
1.120 - }
1.121 -
1.122 - @Test public void longMultiplyMinAndMin() throws Exception {
1.123 - final long res = Long.MIN_VALUE * Long.MIN_VALUE;
1.124 - assertExec("Multiplication MIN*2",
1.125 - Numbers.class, "mulL__J_3B_3B",
1.126 - Double.valueOf(res),
1.127 - new byte[] { (byte)0x80, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 },
1.128 - new byte[] { (byte)0x80, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 }
1.129 - );
1.130 - }
1.131 -
1.132 - @Test public void longMultiplyPrecision() throws Exception {
1.133 - final long res = 0x00fa37d7763e0ca1l * 0xa7b3432fff00123el;
1.134 - assertExec("Multiplication",
1.135 - Numbers.class, "mulL__J_3B_3B",
1.136 - Double.valueOf(res),
1.137 - new byte[] { (byte)0x00, (byte)0xfa, (byte)0x37, (byte)0xd7, (byte)0x76, (byte)0x3e, (byte)0x0c, (byte)0xa1 },
1.138 - new byte[] { (byte)0xa7, (byte)0xb3, (byte)0x43, (byte)0x2f, (byte)0xff, (byte)0x00, (byte)0x12, (byte)0x3e }
1.139 - );
1.140 - }
1.141 -
1.142 - @Test public void longDivideSmallPositiveNumbers() throws Exception {
1.143 - final long res = 0xabcdef / 0x123;
1.144 - assertExec("Division Small Positive Numbers",
1.145 - Numbers.class, "divL__J_3B_3B",
1.146 - Double.valueOf(res),
1.147 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xab, (byte)0xcd, (byte)0xef },
1.148 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x01, (byte)0x23 }
1.149 - );
1.150 - }
1.151 -
1.152 - @Test public void longDivideSmallNegativeNumbers() throws Exception {
1.153 - final long res = -0xabcdef / -0x123;
1.154 - assertExec("Division Small Negative Numbers",
1.155 - Numbers.class, "divL__J_3B_3B",
1.156 - Double.valueOf(res),
1.157 - new byte[] { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0x54, (byte)0x32, (byte)0x11 },
1.158 - new byte[] { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xfe, (byte)0xdd }
1.159 - );
1.160 - }
1.161 -
1.162 - @Test public void longDivideSmallMixedNumbers() throws Exception {
1.163 - final long res = 0xabcdef / -0x123;
1.164 - assertExec("Division Small Mixed Numbers",
1.165 - Numbers.class, "divL__J_3B_3B",
1.166 - Double.valueOf(res),
1.167 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xab, (byte)0xcd, (byte)0xef },
1.168 - new byte[] { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xfe, (byte)0xdd }
1.169 - );
1.170 - }
1.171 -
1.172 - @Test public void longDividePositiveNumbersOneDigitDenom()
1.173 - throws Exception {
1.174 - final long res = 0xabcdef0102ffffL / 0x654;
1.175 - assertExec("Division Positive Numbers One Digit Denom",
1.176 - Numbers.class, "divL__J_3B_3B",
1.177 - Double.valueOf(res),
1.178 - new byte[] { (byte)0x00, (byte)0xab, (byte)0xcd, (byte)0xef, (byte)0x01, (byte)0x02, (byte)0xff, (byte)0xff },
1.179 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x54 }
1.180 - );
1.181 - }
1.182 -
1.183 - @Test public void longDivideNegativeNumbersOneDigitDenom()
1.184 - throws Exception {
1.185 - final long res = -0xabcdef0102ffffL / -0x654;
1.186 - assertExec("Division Negative Numbers One Digit Denom",
1.187 - Numbers.class, "divL__J_3B_3B",
1.188 - Double.valueOf(res),
1.189 - new byte[] { (byte)0xff, (byte)0x54, (byte)0x32, (byte)0x10, (byte)0xfe, (byte)0xfd, (byte)0x00, (byte)0x01 },
1.190 - new byte[] { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xf9, (byte)0xac }
1.191 - );
1.192 - }
1.193 -
1.194 - @Test public void longDivideMixedNumbersOneDigitDenom()
1.195 - throws Exception {
1.196 - final long res = -0xabcdef0102ffffL / 0x654;
1.197 - assertExec("Division Mixed Numbers One Digit Denom",
1.198 - Numbers.class, "divL__J_3B_3B",
1.199 - Double.valueOf(res),
1.200 - new byte[] { (byte)0xff, (byte)0x54, (byte)0x32, (byte)0x10, (byte)0xfe, (byte)0xfd, (byte)0x00, (byte)0x01 },
1.201 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x54 }
1.202 - );
1.203 - }
1.204 -
1.205 - @Test public void longDividePositiveNumbersMultiDigitDenom()
1.206 - throws Exception {
1.207 - final long res = 0x7ffefc003322aabbL / 0x89ab1000L;
1.208 - assertExec("Division Positive Numbers Multi Digit Denom",
1.209 - Numbers.class, "divL__J_3B_3B",
1.210 - Double.valueOf(res),
1.211 - new byte[] { (byte)0x7f, (byte)0xfe, (byte)0xfc, (byte)0x00, (byte)0x33, (byte)0x22, (byte)0xaa, (byte)0xbb },
1.212 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x89, (byte)0xab, (byte)0x10, (byte)0x00 }
1.213 - );
1.214 - }
1.215 -
1.216 - @Test public void longDivideNegativeNumbersMultiDigitDenom()
1.217 - throws Exception {
1.218 - final long res = -0x7ffefc003322aabbL / -0x123489ab1001L;
1.219 - assertExec("Division Negative Numbers Multi Digit Denom",
1.220 - Numbers.class, "divL__J_3B_3B",
1.221 - Double.valueOf(res),
1.222 - new byte[] { (byte)0x80, (byte)0x01, (byte)0x03, (byte)0xff, (byte)0xcc, (byte)0xdd, (byte)0x55, (byte)0x45 },
1.223 - new byte[] { (byte)0xff, (byte)0xff, (byte)0xed, (byte)0xcb, (byte)0x76, (byte)0x54, (byte)0xef, (byte)0xff }
1.224 - );
1.225 - }
1.226 -
1.227 - @Test public void longDivideMixedNumbersMultiDigitDenom()
1.228 - throws Exception {
1.229 - final long res = 0x7ffefc003322aabbL / -0x38f49b0b7574e36L;
1.230 - assertExec("Division Mixed Numbers Multi Digit Denom",
1.231 - Numbers.class, "divL__J_3B_3B",
1.232 - Double.valueOf(res),
1.233 - new byte[] { (byte)0x7f, (byte)0xfe, (byte)0xfc, (byte)0x00, (byte)0x33, (byte)0x22, (byte)0xaa, (byte)0xbb },
1.234 - new byte[] { (byte)0xfc, (byte)0x70, (byte)0xb6, (byte)0x4f, (byte)0x48, (byte)0xa8, (byte)0xb1, (byte)0xca }
1.235 - );
1.236 - }
1.237 -
1.238 - @Test public void longDivideWithOverflow() throws Exception {
1.239 - final long res = 0x8000fffe0000L / 0x8000ffffL;
1.240 - assertExec("Division With Overflow",
1.241 - Numbers.class, "divL__J_3B_3B",
1.242 - Double.valueOf(res),
1.243 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x80, (byte)0x00, (byte)0xff, (byte)0xfe, (byte)0x00, (byte)0x00 },
1.244 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x80, (byte)0x00, (byte)0xff, (byte)0xff }
1.245 - );
1.246 - }
1.247 -
1.248 - @Test public void longDivideWithCorrection() throws Exception {
1.249 - final long res = 0x7fff800000000000L / 0x800000000001L;
1.250 - assertExec("Division With Correction",
1.251 - Numbers.class, "divL__J_3B_3B",
1.252 - Double.valueOf(res),
1.253 - new byte[] { (byte)0x7f, (byte)0xff, (byte)0x80, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 },
1.254 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x80, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x01 }
1.255 - );
1.256 - }
1.257 -
1.258 - @Test public void longModuloSmallPositiveNumbers() throws Exception {
1.259 - final long res = 0xabcdef % 0x123;
1.260 - assertExec("Modulo Small Positive Numbers",
1.261 - Numbers.class, "modL__J_3B_3B",
1.262 - Double.valueOf(res),
1.263 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xab, (byte)0xcd, (byte)0xef },
1.264 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x01, (byte)0x23 }
1.265 - );
1.266 - }
1.267 -
1.268 - @Test public void longModuloSmallNegativeNumbers() throws Exception {
1.269 - final long res = -0xabcdef % -0x123;
1.270 - assertExec("Modulo Small Negative Numbers",
1.271 - Numbers.class, "modL__J_3B_3B",
1.272 - Double.valueOf(res),
1.273 - new byte[] { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0x54, (byte)0x32, (byte)0x11 },
1.274 - new byte[] { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xfe, (byte)0xdd }
1.275 - );
1.276 - }
1.277 -
1.278 - @Test public void longModuloSmallMixedNumbers() throws Exception {
1.279 - final long res = 0xabcdef % -0x123;
1.280 - assertExec("Modulo Small Mixed Numbers",
1.281 - Numbers.class, "modL__J_3B_3B",
1.282 - Double.valueOf(res),
1.283 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xab, (byte)0xcd, (byte)0xef },
1.284 - new byte[] { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xfe, (byte)0xdd }
1.285 - );
1.286 - }
1.287 -
1.288 - @Test public void longModuloPositiveNumbersOneDigitDenom()
1.289 - throws Exception {
1.290 - final long res = 0xabcdef0102ffffL % 0x654;
1.291 - assertExec("Modulo Positive Numbers One Digit Denom",
1.292 - Numbers.class, "modL__J_3B_3B",
1.293 - Double.valueOf(res),
1.294 - new byte[] { (byte)0x00, (byte)0xab, (byte)0xcd, (byte)0xef, (byte)0x01, (byte)0x02, (byte)0xff, (byte)0xff },
1.295 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x54 }
1.296 - );
1.297 - }
1.298 -
1.299 - @Test public void longModuloNegativeNumbersOneDigitDenom()
1.300 - throws Exception {
1.301 - final long res = -0xabcdef0102ffffL % -0x654;
1.302 - assertExec("Modulo Negative Numbers One Digit Denom",
1.303 - Numbers.class, "modL__J_3B_3B",
1.304 - Double.valueOf(res),
1.305 - new byte[] { (byte)0xff, (byte)0x54, (byte)0x32, (byte)0x10, (byte)0xfe, (byte)0xfd, (byte)0x00, (byte)0x01 },
1.306 - new byte[] { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xf9, (byte)0xac }
1.307 - );
1.308 - }
1.309 -
1.310 - @Test public void longModuloMixedNumbersOneDigitDenom()
1.311 - throws Exception {
1.312 - final long res = -0xabcdef0102ffffL % 0x654;
1.313 - assertExec("Modulo Mixed Numbers One Digit Denom",
1.314 - Numbers.class, "modL__J_3B_3B",
1.315 - Double.valueOf(res),
1.316 - new byte[] { (byte)0xff, (byte)0x54, (byte)0x32, (byte)0x10, (byte)0xfe, (byte)0xfd, (byte)0x00, (byte)0x01 },
1.317 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x54 }
1.318 - );
1.319 - }
1.320 -
1.321 - @Test public void longModuloPositiveNumbersMultiDigitDenom()
1.322 - throws Exception {
1.323 - final long res = 0x7ffefc003322aabbL % 0x89ab1000L;
1.324 - assertExec("Modulo Positive Numbers Multi Digit Denom",
1.325 - Numbers.class, "modL__J_3B_3B",
1.326 - Double.valueOf(res),
1.327 - new byte[] { (byte)0x7f, (byte)0xfe, (byte)0xfc, (byte)0x00, (byte)0x33, (byte)0x22, (byte)0xaa, (byte)0xbb },
1.328 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x89, (byte)0xab, (byte)0x10, (byte)0x00 }
1.329 - );
1.330 - }
1.331 -
1.332 - @Test public void longModuloNegativeNumbersMultiDigitDenom()
1.333 - throws Exception {
1.334 - final long res = -0x7ffefc003322aabbL % -0x123489ab1001L;
1.335 - assertExec("Modulo Negative Numbers Multi Digit Denom",
1.336 - Numbers.class, "modL__J_3B_3B",
1.337 - Double.valueOf(res),
1.338 - new byte[] { (byte)0x80, (byte)0x01, (byte)0x03, (byte)0xff, (byte)0xcc, (byte)0xdd, (byte)0x55, (byte)0x45 },
1.339 - new byte[] { (byte)0xff, (byte)0xff, (byte)0xed, (byte)0xcb, (byte)0x76, (byte)0x54, (byte)0xef, (byte)0xff }
1.340 - );
1.341 - }
1.342 -
1.343 - @Test public void longModuloMixedNumbersMultiDigitDenom()
1.344 - throws Exception {
1.345 - final long res = 0x7ffefc003322aabbL % -0x38f49b0b7574e36L;
1.346 - assertExec("Modulo Mixed Numbers Multi Digit Denom",
1.347 - Numbers.class, "modL__J_3B_3B",
1.348 - Double.valueOf(res),
1.349 - new byte[] { (byte)0x7f, (byte)0xfe, (byte)0xfc, (byte)0x00, (byte)0x33, (byte)0x22, (byte)0xaa, (byte)0xbb },
1.350 - new byte[] { (byte)0xfc, (byte)0x70, (byte)0xb6, (byte)0x4f, (byte)0x48, (byte)0xa8, (byte)0xb1, (byte)0xca }
1.351 - );
1.352 - }
1.353 -
1.354 - @Test public void longModuloWithOverflow() throws Exception {
1.355 - final long res = 0x8000fffe0000L % 0x8000ffffL;
1.356 - assertExec("Modulo With Overflow",
1.357 - Numbers.class, "modL__J_3B_3B",
1.358 - Double.valueOf(res),
1.359 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x80, (byte)0x00, (byte)0xff, (byte)0xfe, (byte)0x00, (byte)0x00 },
1.360 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x80, (byte)0x00, (byte)0xff, (byte)0xff }
1.361 - );
1.362 - }
1.363 -
1.364 - @Test public void longModuloWithCorrection() throws Exception {
1.365 - final long res = 0x7fff800000000000L % 0x800000000001L;
1.366 - assertExec("Modulo With Correction",
1.367 - Numbers.class, "modL__J_3B_3B",
1.368 - Double.valueOf(res),
1.369 - new byte[] { (byte)0x7f, (byte)0xff, (byte)0x80, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 },
1.370 - new byte[] { (byte)0x00, (byte)0x00, (byte)0x80, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x01 }
1.371 - );
1.372 - }
1.373
1.374 @Test public void longShiftL1() throws Exception {
1.375 final long res = 0x00fa37d7763e0ca1l << 5;