BITRSHIFT.php 1001 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. return [
  3. [5, '20, 2'],
  4. [3, '52, "4"'],
  5. ['#VALUE!', '"ABC", 5'],
  6. ['#VALUE!', '5, "ABC"'],
  7. ['#NUM!', '1, -48'], // result too large
  8. ['#NUM!', '1.1, 2'], // first arg must be integer
  9. [1, '4, 2.1'], // second arg will be truncated
  10. ['#NUM!', '0, 54'], // second arg too large
  11. [0, '0, 5'],
  12. ['#NUM!', '-16, 2'], // first arg can't be negative
  13. [4, '1, -2'], // negative shift permitted
  14. [4, '1, -2.1'], // negative shift and (ignored) fraction permitted
  15. [4, '4, Q15'],
  16. [4, '4, null'],
  17. [4, '4, false'],
  18. [2, '4, true'],
  19. ['exception', ''],
  20. ['exception', '2'],
  21. [0, ', 4'],
  22. [0, 'Q15, 4'],
  23. [4, '4, q15'],
  24. [4, '4, false'],
  25. [2, '4, true'],
  26. [0, 'false, 4'],
  27. [0, 'true, 4'],
  28. [16, 'true, -4'],
  29. [4, 'A2, 1'],
  30. [8000000000, '1000000000, -3'], // result > 2**32
  31. [8000000000, '16000000000, 1'], // argument > 2**32
  32. ['#NUM!', 'power(2,50), 1'], // argument >= 2**48
  33. ['1', 'power(2, 47), 47'],
  34. ];