mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-18 14:59:29 +00:00
More fixes for unite tests on IE11 and Edge (part IV)
This commit is contained in:
parent
30eee5076f
commit
a19ebaca1c
@ -59,7 +59,7 @@ module.exports = function(config) {
|
||||
browser: 'IE',
|
||||
browser_version: '11',
|
||||
os: 'Windows',
|
||||
os_version: '7'
|
||||
os_version: '10'
|
||||
},
|
||||
bs_edge: {
|
||||
base: 'BrowserStack',
|
||||
|
||||
@ -32,10 +32,16 @@ describe('sinh', function() {
|
||||
// skip this test on node v0.10 and v0.12, which have a numerical issue
|
||||
|
||||
it('should return the sinh of very small numbers (avoid returning zero)', function() {
|
||||
// If sinh returns 0, that is bad, so we are using assert.equal, not approx.equal
|
||||
// If sinh returns 0, that is bad, so we are using assert, not approx.equal
|
||||
assert(sinh(-1e-10) !== 0);
|
||||
assert(sinh(-1e-50) !== 0);
|
||||
assert(Math.abs(sinh(-1e-10) - -1e-10) < EPSILON);
|
||||
});
|
||||
|
||||
// FIXME: this test doesn't work on IE11, find a solution for that
|
||||
it('should return the sinh of very large numbers (avoid returning zero)', function() {
|
||||
// If sinh returns 0, that is bad, so we are using assert.equal, not approx.equal
|
||||
console.log('process.version=', process.version)
|
||||
assert(sinh(1e-50) !== 0);
|
||||
assert(Math.abs(sinh(1e-50) - 1e-50) < EPSILON);
|
||||
});
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ describe('physical constants', function() {
|
||||
approx.equal(math.efimovFactor, 22.7);
|
||||
|
||||
// Physico-chemical constants
|
||||
assert.equal(math.atomicMass.toString(), '1.6605389217299995e-27 kg'); // round-off error
|
||||
assert.equal(math.atomicMass.format({precision: 14}), '1.66053892173e-27 kg'); // round-off error
|
||||
assert.equal(math.avogadro.toString(), '6.0221412927e+23 mol^-1');
|
||||
assert.equal(math.boltzmann.toString(), '1.380648813e-23 J / K');
|
||||
assert.equal(math.faraday.toString(), '96485.336521 C / mol');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user