Add a note about NaN propagation for floating point specializations.

This commit is contained in:
Ilya Gorbunov
2017-01-09 23:53:21 +03:00
parent 897e9658ac
commit 3bf38e62c8
11 changed files with 104 additions and 1 deletions
@@ -159,7 +159,10 @@ fun aggregates(): List<GenericFunction> {
if (isFloat && isGeneric)
since("1.1")
}
doc { f -> "Returns the ${if (op == "max") "largest" else "smallest"} ${f.element} or `null` if there are no ${f.element.pluralize()}." }
doc { f ->
"Returns the ${if (op == "max") "largest" else "smallest"} ${f.element} or `null` if there are no ${f.element.pluralize()}." +
if (isFloat) "\n\n" + "If any of ${f.element.pluralize()} is `NaN` returns `NaN`." else ""
}
returns("T?")
body {
@@ -130,6 +130,7 @@ fun comparables(): List<GenericFunction> {
If values are equal, returns the first one.
"""
}
// TODO: Add a note about NaN propagation for floats.
doc(Primitives) {
"""Returns the smaller of two values."""
}
@@ -154,6 +155,7 @@ fun comparables(): List<GenericFunction> {
returns("T")
customReceiver("")
inline(Primitives) { Inline.Only }
// TODO: Add a note about NaN propagation for floats.
doc {
"""
Returns the smaller of three values.
@@ -215,6 +217,7 @@ fun comparables(): List<GenericFunction> {
If values are equal, returns the first one.
"""
}
// TODO: Add a note about NaN propagation for floats.
doc(Primitives) {
"""Returns the greater of two values."""
}
@@ -238,6 +241,7 @@ fun comparables(): List<GenericFunction> {
returns("T")
customReceiver("")
inline(Primitives) { Inline.Only }
// TODO: Add a note about NaN propagation for floats.
doc {
"""
Returns the greater of three values.