| 1 |
// Copyright 2015 Microsoft Corporation. All rights reserved. |
| 2 |
// This code is governed by the license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
description: Math.Log10 with sample values. |
| 6 |
es6id: 20.2.2.20 |
| 7 |
---*/ |
| 8 |
|
| 9 |
assert.sameValue(Math.log10(-0), Number.NEGATIVE_INFINITY, |
| 10 |
"Math.log10 produces incorrect output for -0"); |
| 11 |
assert.sameValue(Math.log10(+0), Number.NEGATIVE_INFINITY, |
| 12 |
"Math.log10 produces incorrect output for +0"); |
| 13 |
assert.sameValue(Math.log10(-0.9), Number.NaN, |
| 14 |
"Math.log10 produces incorrect output for -0.9"); |
| 15 |
assert.sameValue(Math.log10(NaN), Number.NaN, |
| 16 |
"Math.log10 produces incorrect output for NaN"); |
| 17 |
assert.sameValue(Math.log10(-10), Number.NaN, |
| 18 |
"Math.log10 produces incorrect output for -10"); |
| 19 |
assert.sameValue(Math.log10(null), Number.NEGATIVE_INFINITY, |
| 20 |
"Math.log10 produces incorrect output for null"); |
| 21 |
assert.sameValue(Math.log10(undefined), Number.NaN, |
| 22 |
"Math.log10 produces incorrect output for undefined"); |
| 23 |
assert.sameValue(Math.log10(Number.POSITIVE_INFINITY), Number.POSITIVE_INFINITY, |
| 24 |
"Math.log10 produces incorrect output for Number.POSITIVE_INFINITY"); |
| 25 |
assert.sameValue(Math.log10(1), 0, |
| 26 |
"Math.log10 produces incorrect output for 1"); |
| 27 |
assert.sameValue(Math.log10(10.00), 1, |
| 28 |
"Math.log10 produces incorrect output for 10.00"); |
| 29 |
assert.sameValue(Math.log10(100.00), 2, |
| 30 |
"Math.log10 produces incorrect output for 100.00"); |
| 31 |
assert.sameValue(Math.log10(1000.00), 3, |
| 32 |
"Math.log10 produces incorrect output for 1000.00"); |