1
0
mirror of https://github.com/MikeMcl/decimal.js.git synced 2024-10-27 20:34:12 +00:00

Revert "advice about negative zeroes on README"

This commit is contained in:
Michael M 2020-05-26 20:39:05 +01:00 committed by GitHub
parent b53a593401
commit 24726f5950
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,17 +139,6 @@ Decimal.sqrt('6.98372465832e+9823') // '8.3568682281821340204e+4911'
Decimal.pow(2, 0.0979843) // '1.0702770511687781839'
```
Note that signed zeroes are implemented, following the IEEE Standard
for Floating-Point Arithmetic (IEEE 754).
```js
Decimal(0).valueOf() // '0'
Decimal(0).isNegative() // false
Decimal(0).negated().valueOf() // '-0'
Decimal(0).negated().isNegative() // true
```
There are `isNaN` and `isFinite` methods, as `NaN` and `Infinity` are valid `Decimal` values,
```js