Skip to content

Commit

Permalink
Add Number (#1567)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel D. Beck <[email protected]>
  • Loading branch information
petele and ddbeck authored Aug 16, 2024
1 parent 84c12f1 commit 398385f
Show file tree
Hide file tree
Showing 2 changed files with 349 additions and 0 deletions.
80 changes: 80 additions & 0 deletions features/number.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Math and numbers
description: The number type (and `Number` object) represents floating-point numbers, such as 42 or -4.201, while the `Math` API contains mathematical functions and constants. JavaScript can also represent boundless negative and positive values as `Infinity` or not-a-number as `NaN` (as in `0 * Infinity`).
spec: https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-number-objects
group: primitive-types
status:
compute_from: javascript.builtins.Number
compat_features:
- javascript.builtins.Infinity
- javascript.builtins.isNaN
- javascript.builtins.Math
- javascript.builtins.Math.abs
- javascript.builtins.Math.acos
- javascript.builtins.Math.acosh
- javascript.builtins.Math.asin
- javascript.builtins.Math.asinh
- javascript.builtins.Math.atan
- javascript.builtins.Math.atan2
- javascript.builtins.Math.atanh
- javascript.builtins.Math.cbrt
- javascript.builtins.Math.ceil
- javascript.builtins.Math.clz32
- javascript.builtins.Math.cos
- javascript.builtins.Math.cosh
- javascript.builtins.Math.E
- javascript.builtins.Math.exp
- javascript.builtins.Math.expm1
- javascript.builtins.Math.floor
- javascript.builtins.Math.fround
- javascript.builtins.Math.hypot
- javascript.builtins.Math.imul
- javascript.builtins.Math.LN10
- javascript.builtins.Math.LN2
- javascript.builtins.Math.log
- javascript.builtins.Math.log10
- javascript.builtins.Math.LOG10E
- javascript.builtins.Math.log1p
- javascript.builtins.Math.log2
- javascript.builtins.Math.LOG2E
- javascript.builtins.Math.max
- javascript.builtins.Math.min
- javascript.builtins.Math.PI
- javascript.builtins.Math.pow
- javascript.builtins.Math.random
- javascript.builtins.Math.round
- javascript.builtins.Math.sign
- javascript.builtins.Math.sin
- javascript.builtins.Math.sinh
- javascript.builtins.Math.sqrt
- javascript.builtins.Math.SQRT1_2
- javascript.builtins.Math.SQRT2
- javascript.builtins.Math.tan
- javascript.builtins.Math.tanh
- javascript.builtins.Math.trunc
- javascript.builtins.NaN
- javascript.builtins.Number
- javascript.builtins.Number.EPSILON
- javascript.builtins.Number.isFinite
- javascript.builtins.Number.isInteger
- javascript.builtins.Number.isNaN
- javascript.builtins.Number.isSafeInteger
- javascript.builtins.Number.MAX_SAFE_INTEGER
- javascript.builtins.Number.MAX_VALUE
- javascript.builtins.Number.MIN_SAFE_INTEGER
- javascript.builtins.Number.MIN_VALUE
- javascript.builtins.Number.NaN
- javascript.builtins.Number.NEGATIVE_INFINITY
- javascript.builtins.Number.Number
- javascript.builtins.Number.parseFloat
- javascript.builtins.Number.parseInt
- javascript.builtins.Number.POSITIVE_INFINITY
- javascript.builtins.Number.toExponential
- javascript.builtins.Number.toFixed
- javascript.builtins.Number.toPrecision
- javascript.builtins.Number.toString
- javascript.builtins.Number.valueOf
- javascript.builtins.parseInt
- javascript.grammar.binary_numeric_literals
- javascript.grammar.decimal_numeric_literals
- javascript.grammar.hexadecimal_numeric_literals
- javascript.grammar.octal_numeric_literals
269 changes: 269 additions & 0 deletions features/number.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
# Generated from: number.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: high
baseline_low_date: 2015-07-29
baseline_high_date: 2018-01-29
support:
chrome: "1"
chrome_android: "18"
edge: "12"
firefox: "1"
firefox_android: "4"
safari: "1"
safari_ios: "1"
compat_features:
# ⬇️ Same status as overall feature ⬇️
# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "1"
# chrome_android: "18"
# edge: "12"
# firefox: "1"
# firefox_android: "4"
# safari: "1"
# safari_ios: "1"
- javascript.builtins.Infinity
- javascript.builtins.Math
- javascript.builtins.Math.E
- javascript.builtins.Math.LN10
- javascript.builtins.Math.LN2
- javascript.builtins.Math.LOG10E
- javascript.builtins.Math.LOG2E
- javascript.builtins.Math.PI
- javascript.builtins.Math.SQRT1_2
- javascript.builtins.Math.SQRT2
- javascript.builtins.Math.abs
- javascript.builtins.Math.acos
- javascript.builtins.Math.asin
- javascript.builtins.Math.atan
- javascript.builtins.Math.atan2
- javascript.builtins.Math.ceil
- javascript.builtins.Math.cos
- javascript.builtins.Math.exp
- javascript.builtins.Math.floor
- javascript.builtins.Math.log
- javascript.builtins.Math.max
- javascript.builtins.Math.min
- javascript.builtins.Math.pow
- javascript.builtins.Math.random
- javascript.builtins.Math.round
- javascript.builtins.Math.sin
- javascript.builtins.Math.sqrt
- javascript.builtins.Math.tan
- javascript.builtins.NaN
- javascript.builtins.Number
- javascript.builtins.Number.MAX_VALUE
- javascript.builtins.Number.MIN_VALUE
- javascript.builtins.Number.NEGATIVE_INFINITY
- javascript.builtins.Number.NaN
- javascript.builtins.Number.Number
- javascript.builtins.Number.POSITIVE_INFINITY
- javascript.builtins.Number.toString
- javascript.builtins.Number.valueOf
- javascript.builtins.isNaN
- javascript.builtins.parseInt
- javascript.grammar.decimal_numeric_literals
- javascript.grammar.hexadecimal_numeric_literals

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "1"
# chrome_android: "18"
# edge: "12"
# firefox: "1"
# firefox_android: "4"
# safari: "2"
# safari_ios: "1"
- javascript.builtins.Number.toExponential
- javascript.builtins.Number.toFixed
- javascript.builtins.Number.toPrecision

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "28"
# chrome_android: "28"
# edge: "12"
# firefox: "20"
# firefox_android: "20"
# safari: "7"
# safari_ios: "7"
- javascript.builtins.Math.imul

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "38"
# chrome_android: "38"
# edge: "12"
# firefox: "25"
# firefox_android: "25"
# safari: "8"
# safari_ios: "8"
- javascript.builtins.Math.acosh
- javascript.builtins.Math.asinh
- javascript.builtins.Math.atanh
- javascript.builtins.Math.cbrt
- javascript.builtins.Math.cosh
- javascript.builtins.Math.expm1
- javascript.builtins.Math.log10
- javascript.builtins.Math.log1p
- javascript.builtins.Math.log2
- javascript.builtins.Math.sinh
- javascript.builtins.Math.tanh
- javascript.builtins.Math.trunc

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "38"
# chrome_android: "38"
# edge: "12"
# firefox: "26"
# firefox_android: "26"
# safari: "8"
# safari_ios: "8"
- javascript.builtins.Math.fround

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "38"
# chrome_android: "38"
# edge: "12"
# firefox: "27"
# firefox_android: "27"
# safari: "8"
# safari_ios: "8"
- javascript.builtins.Math.hypot

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "38"
# chrome_android: "38"
# edge: "12"
# firefox: "31"
# firefox_android: "31"
# safari: "7"
# safari_ios: "7"
- javascript.builtins.Math.clz32

# baseline: high
# baseline_low_date: 2015-09-30
# baseline_high_date: 2018-03-30
# support:
# chrome: "19"
# chrome_android: "25"
# edge: "12"
# firefox: "16"
# firefox_android: "16"
# safari: "9"
# safari_ios: "9"
- javascript.builtins.Number.isFinite

# baseline: high
# baseline_low_date: 2015-09-30
# baseline_high_date: 2018-03-30
# support:
# chrome: "25"
# chrome_android: "25"
# edge: "12"
# firefox: "15"
# firefox_android: "15"
# safari: "9"
# safari_ios: "9"
- javascript.builtins.Number.isNaN

# baseline: high
# baseline_low_date: 2015-09-30
# baseline_high_date: 2018-03-30
# support:
# chrome: "34"
# chrome_android: "34"
# edge: "12"
# firefox: "16"
# firefox_android: "16"
# safari: "9"
# safari_ios: "9"
- javascript.builtins.Number.isInteger

# baseline: high
# baseline_low_date: 2015-09-30
# baseline_high_date: 2018-03-30
# support:
# chrome: "34"
# chrome_android: "34"
# edge: "12"
# firefox: "25"
# firefox_android: "25"
# safari: "9"
# safari_ios: "9"
- javascript.builtins.Number.EPSILON
- javascript.builtins.Number.parseFloat
- javascript.builtins.Number.parseInt

# baseline: high
# baseline_low_date: 2015-09-30
# baseline_high_date: 2018-03-30
# support:
# chrome: "34"
# chrome_android: "34"
# edge: "12"
# firefox: "31"
# firefox_android: "31"
# safari: "9"
# safari_ios: "9"
- javascript.builtins.Number.MAX_SAFE_INTEGER
- javascript.builtins.Number.MIN_SAFE_INTEGER

# baseline: high
# baseline_low_date: 2015-09-30
# baseline_high_date: 2018-03-30
# support:
# chrome: "34"
# chrome_android: "34"
# edge: "12"
# firefox: "32"
# firefox_android: "32"
# safari: "9"
# safari_ios: "9"
- javascript.builtins.Number.isSafeInteger

# baseline: high
# baseline_low_date: 2015-09-30
# baseline_high_date: 2018-03-30
# support:
# chrome: "38"
# chrome_android: "38"
# edge: "12"
# firefox: "25"
# firefox_android: "25"
# safari: "9"
# safari_ios: "9"
- javascript.builtins.Math.sign

# baseline: high
# baseline_low_date: 2015-09-30
# baseline_high_date: 2018-03-30
# support:
# chrome: "41"
# chrome_android: "41"
# edge: "12"
# firefox: "25"
# firefox_android: "25"
# safari: "9"
# safari_ios: "9"
- javascript.grammar.binary_numeric_literals
- javascript.grammar.octal_numeric_literals

0 comments on commit 398385f

Please sign in to comment.