Annotation of embedaddon/php/ext/standard/tests/math/atan2_basiclong_64bit.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test atan2 function : 64bit long tests
! 3: --SKIPIF--
! 4: <?php
! 5: if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
! 6: ?>
! 7: --FILE--
! 8: <?php
! 9:
! 10: define("MAX_64Bit", 9223372036854775807);
! 11: define("MAX_32Bit", 2147483647);
! 12: define("MIN_64Bit", -9223372036854775807 - 1);
! 13: define("MIN_32Bit", -2147483647 - 1);
! 14:
! 15: $longVals = array(
! 16: MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
! 17: MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
! 18: MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
! 19: );
! 20:
! 21: $otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MIN_32Bit, MAX_64Bit, MIN_64Bit);
! 22:
! 23:
! 24: foreach ($longVals as $longVal) {
! 25: foreach($otherVals as $otherVal) {
! 26: echo "--- testing: $longVal, $otherVal ---\n";
! 27: var_dump(atan2($longVal, $otherVal));
! 28: }
! 29: }
! 30:
! 31: ?>
! 32: ===DONE===
! 33: --EXPECT--
! 34: --- testing: 9223372036854775807, 0 ---
! 35: float(1.5707963267949)
! 36: --- testing: 9223372036854775807, 1 ---
! 37: float(1.5707963267949)
! 38: --- testing: 9223372036854775807, -1 ---
! 39: float(1.5707963267949)
! 40: --- testing: 9223372036854775807, 7 ---
! 41: float(1.5707963267949)
! 42: --- testing: 9223372036854775807, 9 ---
! 43: float(1.5707963267949)
! 44: --- testing: 9223372036854775807, 65 ---
! 45: float(1.5707963267949)
! 46: --- testing: 9223372036854775807, -44 ---
! 47: float(1.5707963267949)
! 48: --- testing: 9223372036854775807, 2147483647 ---
! 49: float(1.5707963265621)
! 50: --- testing: 9223372036854775807, -2147483648 ---
! 51: float(1.5707963270277)
! 52: --- testing: 9223372036854775807, 9223372036854775807 ---
! 53: float(0.78539816339745)
! 54: --- testing: 9223372036854775807, -9223372036854775808 ---
! 55: float(2.3561944901923)
! 56: --- testing: -9223372036854775808, 0 ---
! 57: float(-1.5707963267949)
! 58: --- testing: -9223372036854775808, 1 ---
! 59: float(-1.5707963267949)
! 60: --- testing: -9223372036854775808, -1 ---
! 61: float(-1.5707963267949)
! 62: --- testing: -9223372036854775808, 7 ---
! 63: float(-1.5707963267949)
! 64: --- testing: -9223372036854775808, 9 ---
! 65: float(-1.5707963267949)
! 66: --- testing: -9223372036854775808, 65 ---
! 67: float(-1.5707963267949)
! 68: --- testing: -9223372036854775808, -44 ---
! 69: float(-1.5707963267949)
! 70: --- testing: -9223372036854775808, 2147483647 ---
! 71: float(-1.5707963265621)
! 72: --- testing: -9223372036854775808, -2147483648 ---
! 73: float(-1.5707963270277)
! 74: --- testing: -9223372036854775808, 9223372036854775807 ---
! 75: float(-0.78539816339745)
! 76: --- testing: -9223372036854775808, -9223372036854775808 ---
! 77: float(-2.3561944901923)
! 78: --- testing: 2147483647, 0 ---
! 79: float(1.5707963267949)
! 80: --- testing: 2147483647, 1 ---
! 81: float(1.5707963263292)
! 82: --- testing: 2147483647, -1 ---
! 83: float(1.5707963272606)
! 84: --- testing: 2147483647, 7 ---
! 85: float(1.5707963235353)
! 86: --- testing: 2147483647, 9 ---
! 87: float(1.5707963226039)
! 88: --- testing: 2147483647, 65 ---
! 89: float(1.5707962965269)
! 90: --- testing: 2147483647, -44 ---
! 91: float(1.570796347284)
! 92: --- testing: 2147483647, 2147483647 ---
! 93: float(0.78539816339745)
! 94: --- testing: 2147483647, -2147483648 ---
! 95: float(2.3561944904252)
! 96: --- testing: 2147483647, 9223372036854775807 ---
! 97: float(2.3283064354545E-10)
! 98: --- testing: 2147483647, -9223372036854775808 ---
! 99: float(3.141592653357)
! 100: --- testing: -2147483648, 0 ---
! 101: float(-1.5707963267949)
! 102: --- testing: -2147483648, 1 ---
! 103: float(-1.5707963263292)
! 104: --- testing: -2147483648, -1 ---
! 105: float(-1.5707963272606)
! 106: --- testing: -2147483648, 7 ---
! 107: float(-1.5707963235353)
! 108: --- testing: -2147483648, 9 ---
! 109: float(-1.5707963226039)
! 110: --- testing: -2147483648, 65 ---
! 111: float(-1.5707962965269)
! 112: --- testing: -2147483648, -44 ---
! 113: float(-1.570796347284)
! 114: --- testing: -2147483648, 2147483647 ---
! 115: float(-0.78539816363028)
! 116: --- testing: -2147483648, -2147483648 ---
! 117: float(-2.3561944901923)
! 118: --- testing: -2147483648, 9223372036854775807 ---
! 119: float(-2.3283064365387E-10)
! 120: --- testing: -2147483648, -9223372036854775808 ---
! 121: float(-3.141592653357)
! 122: --- testing: 9223372034707292160, 0 ---
! 123: float(1.5707963267949)
! 124: --- testing: 9223372034707292160, 1 ---
! 125: float(1.5707963267949)
! 126: --- testing: 9223372034707292160, -1 ---
! 127: float(1.5707963267949)
! 128: --- testing: 9223372034707292160, 7 ---
! 129: float(1.5707963267949)
! 130: --- testing: 9223372034707292160, 9 ---
! 131: float(1.5707963267949)
! 132: --- testing: 9223372034707292160, 65 ---
! 133: float(1.5707963267949)
! 134: --- testing: 9223372034707292160, -44 ---
! 135: float(1.5707963267949)
! 136: --- testing: 9223372034707292160, 2147483647 ---
! 137: float(1.5707963265621)
! 138: --- testing: 9223372034707292160, -2147483648 ---
! 139: float(1.5707963270277)
! 140: --- testing: 9223372034707292160, 9223372036854775807 ---
! 141: float(0.78539816328103)
! 142: --- testing: 9223372034707292160, -9223372036854775808 ---
! 143: float(2.3561944903088)
! 144: --- testing: -9223372034707292160, 0 ---
! 145: float(-1.5707963267949)
! 146: --- testing: -9223372034707292160, 1 ---
! 147: float(-1.5707963267949)
! 148: --- testing: -9223372034707292160, -1 ---
! 149: float(-1.5707963267949)
! 150: --- testing: -9223372034707292160, 7 ---
! 151: float(-1.5707963267949)
! 152: --- testing: -9223372034707292160, 9 ---
! 153: float(-1.5707963267949)
! 154: --- testing: -9223372034707292160, 65 ---
! 155: float(-1.5707963267949)
! 156: --- testing: -9223372034707292160, -44 ---
! 157: float(-1.5707963267949)
! 158: --- testing: -9223372034707292160, 2147483647 ---
! 159: float(-1.5707963265621)
! 160: --- testing: -9223372034707292160, -2147483648 ---
! 161: float(-1.5707963270277)
! 162: --- testing: -9223372034707292160, 9223372036854775807 ---
! 163: float(-0.78539816328103)
! 164: --- testing: -9223372034707292160, -9223372036854775808 ---
! 165: float(-2.3561944903088)
! 166: --- testing: 2147483648, 0 ---
! 167: float(1.5707963267949)
! 168: --- testing: 2147483648, 1 ---
! 169: float(1.5707963263292)
! 170: --- testing: 2147483648, -1 ---
! 171: float(1.5707963272606)
! 172: --- testing: 2147483648, 7 ---
! 173: float(1.5707963235353)
! 174: --- testing: 2147483648, 9 ---
! 175: float(1.5707963226039)
! 176: --- testing: 2147483648, 65 ---
! 177: float(1.5707962965269)
! 178: --- testing: 2147483648, -44 ---
! 179: float(1.570796347284)
! 180: --- testing: 2147483648, 2147483647 ---
! 181: float(0.78539816363028)
! 182: --- testing: 2147483648, -2147483648 ---
! 183: float(2.3561944901923)
! 184: --- testing: 2147483648, 9223372036854775807 ---
! 185: float(2.3283064365387E-10)
! 186: --- testing: 2147483648, -9223372036854775808 ---
! 187: float(3.141592653357)
! 188: --- testing: -2147483649, 0 ---
! 189: float(-1.5707963267949)
! 190: --- testing: -2147483649, 1 ---
! 191: float(-1.5707963263292)
! 192: --- testing: -2147483649, -1 ---
! 193: float(-1.5707963272606)
! 194: --- testing: -2147483649, 7 ---
! 195: float(-1.5707963235353)
! 196: --- testing: -2147483649, 9 ---
! 197: float(-1.5707963226039)
! 198: --- testing: -2147483649, 65 ---
! 199: float(-1.5707962965269)
! 200: --- testing: -2147483649, -44 ---
! 201: float(-1.570796347284)
! 202: --- testing: -2147483649, 2147483647 ---
! 203: float(-0.78539816386311)
! 204: --- testing: -2147483649, -2147483648 ---
! 205: float(-2.3561944899595)
! 206: --- testing: -2147483649, 9223372036854775807 ---
! 207: float(-2.3283064376229E-10)
! 208: --- testing: -2147483649, -9223372036854775808 ---
! 209: float(-3.141592653357)
! 210: --- testing: 4294967294, 0 ---
! 211: float(1.5707963267949)
! 212: --- testing: 4294967294, 1 ---
! 213: float(1.5707963265621)
! 214: --- testing: 4294967294, -1 ---
! 215: float(1.5707963270277)
! 216: --- testing: 4294967294, 7 ---
! 217: float(1.5707963251651)
! 218: --- testing: 4294967294, 9 ---
! 219: float(1.5707963246994)
! 220: --- testing: 4294967294, 65 ---
! 221: float(1.5707963116609)
! 222: --- testing: 4294967294, -44 ---
! 223: float(1.5707963370394)
! 224: --- testing: 4294967294, 2147483647 ---
! 225: float(1.1071487177941)
! 226: --- testing: 4294967294, -2147483648 ---
! 227: float(2.034443935982)
! 228: --- testing: 4294967294, 9223372036854775807 ---
! 229: float(4.656612870909E-10)
! 230: --- testing: 4294967294, -9223372036854775808 ---
! 231: float(3.1415926531241)
! 232: --- testing: 4294967295, 0 ---
! 233: float(1.5707963267949)
! 234: --- testing: 4294967295, 1 ---
! 235: float(1.5707963265621)
! 236: --- testing: 4294967295, -1 ---
! 237: float(1.5707963270277)
! 238: --- testing: 4294967295, 7 ---
! 239: float(1.5707963251651)
! 240: --- testing: 4294967295, 9 ---
! 241: float(1.5707963246994)
! 242: --- testing: 4294967295, 65 ---
! 243: float(1.5707963116609)
! 244: --- testing: 4294967295, -44 ---
! 245: float(1.5707963370394)
! 246: --- testing: 4294967295, 2147483647 ---
! 247: float(1.1071487178872)
! 248: --- testing: 4294967295, -2147483648 ---
! 249: float(2.0344439358888)
! 250: --- testing: 4294967295, 9223372036854775807 ---
! 251: float(4.6566128719932E-10)
! 252: --- testing: 4294967295, -9223372036854775808 ---
! 253: float(3.1415926531241)
! 254: --- testing: 4294967293, 0 ---
! 255: float(1.5707963267949)
! 256: --- testing: 4294967293, 1 ---
! 257: float(1.5707963265621)
! 258: --- testing: 4294967293, -1 ---
! 259: float(1.5707963270277)
! 260: --- testing: 4294967293, 7 ---
! 261: float(1.5707963251651)
! 262: --- testing: 4294967293, 9 ---
! 263: float(1.5707963246994)
! 264: --- testing: 4294967293, 65 ---
! 265: float(1.5707963116609)
! 266: --- testing: 4294967293, -44 ---
! 267: float(1.5707963370394)
! 268: --- testing: 4294967293, 2147483647 ---
! 269: float(1.107148717701)
! 270: --- testing: 4294967293, -2147483648 ---
! 271: float(2.0344439360751)
! 272: --- testing: 4294967293, 9223372036854775807 ---
! 273: float(4.6566128698248E-10)
! 274: --- testing: 4294967293, -9223372036854775808 ---
! 275: float(3.1415926531241)
! 276: --- testing: 9223372036854775806, 0 ---
! 277: float(1.5707963267949)
! 278: --- testing: 9223372036854775806, 1 ---
! 279: float(1.5707963267949)
! 280: --- testing: 9223372036854775806, -1 ---
! 281: float(1.5707963267949)
! 282: --- testing: 9223372036854775806, 7 ---
! 283: float(1.5707963267949)
! 284: --- testing: 9223372036854775806, 9 ---
! 285: float(1.5707963267949)
! 286: --- testing: 9223372036854775806, 65 ---
! 287: float(1.5707963267949)
! 288: --- testing: 9223372036854775806, -44 ---
! 289: float(1.5707963267949)
! 290: --- testing: 9223372036854775806, 2147483647 ---
! 291: float(1.5707963265621)
! 292: --- testing: 9223372036854775806, -2147483648 ---
! 293: float(1.5707963270277)
! 294: --- testing: 9223372036854775806, 9223372036854775807 ---
! 295: float(0.78539816339745)
! 296: --- testing: 9223372036854775806, -9223372036854775808 ---
! 297: float(2.3561944901923)
! 298: --- testing: 9.2233720368548E+18, 0 ---
! 299: float(1.5707963267949)
! 300: --- testing: 9.2233720368548E+18, 1 ---
! 301: float(1.5707963267949)
! 302: --- testing: 9.2233720368548E+18, -1 ---
! 303: float(1.5707963267949)
! 304: --- testing: 9.2233720368548E+18, 7 ---
! 305: float(1.5707963267949)
! 306: --- testing: 9.2233720368548E+18, 9 ---
! 307: float(1.5707963267949)
! 308: --- testing: 9.2233720368548E+18, 65 ---
! 309: float(1.5707963267949)
! 310: --- testing: 9.2233720368548E+18, -44 ---
! 311: float(1.5707963267949)
! 312: --- testing: 9.2233720368548E+18, 2147483647 ---
! 313: float(1.5707963265621)
! 314: --- testing: 9.2233720368548E+18, -2147483648 ---
! 315: float(1.5707963270277)
! 316: --- testing: 9.2233720368548E+18, 9223372036854775807 ---
! 317: float(0.78539816339745)
! 318: --- testing: 9.2233720368548E+18, -9223372036854775808 ---
! 319: float(2.3561944901923)
! 320: --- testing: -9223372036854775807, 0 ---
! 321: float(-1.5707963267949)
! 322: --- testing: -9223372036854775807, 1 ---
! 323: float(-1.5707963267949)
! 324: --- testing: -9223372036854775807, -1 ---
! 325: float(-1.5707963267949)
! 326: --- testing: -9223372036854775807, 7 ---
! 327: float(-1.5707963267949)
! 328: --- testing: -9223372036854775807, 9 ---
! 329: float(-1.5707963267949)
! 330: --- testing: -9223372036854775807, 65 ---
! 331: float(-1.5707963267949)
! 332: --- testing: -9223372036854775807, -44 ---
! 333: float(-1.5707963267949)
! 334: --- testing: -9223372036854775807, 2147483647 ---
! 335: float(-1.5707963265621)
! 336: --- testing: -9223372036854775807, -2147483648 ---
! 337: float(-1.5707963270277)
! 338: --- testing: -9223372036854775807, 9223372036854775807 ---
! 339: float(-0.78539816339745)
! 340: --- testing: -9223372036854775807, -9223372036854775808 ---
! 341: float(-2.3561944901923)
! 342: --- testing: -9.2233720368548E+18, 0 ---
! 343: float(-1.5707963267949)
! 344: --- testing: -9.2233720368548E+18, 1 ---
! 345: float(-1.5707963267949)
! 346: --- testing: -9.2233720368548E+18, -1 ---
! 347: float(-1.5707963267949)
! 348: --- testing: -9.2233720368548E+18, 7 ---
! 349: float(-1.5707963267949)
! 350: --- testing: -9.2233720368548E+18, 9 ---
! 351: float(-1.5707963267949)
! 352: --- testing: -9.2233720368548E+18, 65 ---
! 353: float(-1.5707963267949)
! 354: --- testing: -9.2233720368548E+18, -44 ---
! 355: float(-1.5707963267949)
! 356: --- testing: -9.2233720368548E+18, 2147483647 ---
! 357: float(-1.5707963265621)
! 358: --- testing: -9.2233720368548E+18, -2147483648 ---
! 359: float(-1.5707963270277)
! 360: --- testing: -9.2233720368548E+18, 9223372036854775807 ---
! 361: float(-0.78539816339745)
! 362: --- testing: -9.2233720368548E+18, -9223372036854775808 ---
! 363: float(-2.3561944901923)
! 364: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>