Skip to content

Commit 4ec0dd4

Browse files
committed
sqrt: Clarified that NaN is returned for negative numbers #474 (#475)
1 parent 03e9fa4 commit 4ec0dd4

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased / Draft
88

9+
### Fixed
10+
11+
- `sqrt`: Clarified that NaN is returned for negative numbers.
12+
913
## [2.0.0-rc.1] - 2023-05-25
1014

1115
### Added

sqrt.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "sqrt",
33
"summary": "Square root",
4-
"description": "Computes the square root of a real number `x`, which is equal to calculating `x` to the power of *0.5*.\n\nA square root of x is a number a such that *`a² = x`*. Therefore, the square root is the inverse function of a to the power of 2, but only for *a >= 0*.\n\nThe no-data value `null` is passed through and therefore gets propagated.",
4+
"description": "Computes the square root of a real number `x`, which is equal to calculating `x` to the power of *0.5*. For negative `x`, the process returns `NaN`.\n\nA square root of x is a number a such that *`a² = x`*. Therefore, the square root is the inverse function of a to the power of 2, but only for *a >= 0*.\n\nThe no-data value `null` is passed through and therefore gets propagated.",
55
"categories": [
66
"math",
77
"math > exponential & logarithmic"
@@ -58,6 +58,11 @@
5858
"rel": "about",
5959
"href": "http://mathworld.wolfram.com/SquareRoot.html",
6060
"title": "Square root explained by Wolfram MathWorld"
61+
},
62+
{
63+
"rel": "about",
64+
"href": "https://ieeexplore.ieee.org/document/8766229",
65+
"title": "IEEE Standard 754-2019 for Floating-Point Arithmetic"
6166
}
6267
],
6368
"process_graph": {
@@ -72,4 +77,4 @@
7277
"result": true
7378
}
7479
}
75-
}
80+
}

0 commit comments

Comments
 (0)