nans.js 592 B

123456789101112131415161718192021
  1. // Copyright (C) 2016 the V8 project authors. All rights reserved.
  2. // This code is governed by the BSD license found in the LICENSE file.
  3. /*---
  4. description: |
  5. A collection of NaN values produced from expressions that have been observed
  6. to create distinct bit representations on various platforms. These provide a
  7. weak basis for assertions regarding the consistent canonicalization of NaN
  8. values in Array buffers.
  9. ---*/
  10. var NaNs = [
  11. NaN,
  12. Number.NaN,
  13. NaN * 0,
  14. 0/0,
  15. Infinity/Infinity,
  16. -(0/0),
  17. Math.pow(-1, 0.5),
  18. -Math.pow(-1, 0.5),
  19. Number("Not-a-Number"),
  20. ];