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
@@ -5753,12 +5753,16 @@ public header inline fun CharArray.forEachIndexed(action: (Int, Char) -> Unit):
/**
* Returns the largest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Array<out Double>.max(): Double?
/**
* Returns the largest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Array<out Float>.max(): Float?
@@ -5790,11 +5794,15 @@ public header fun LongArray.max(): Long?
/**
* Returns the largest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
public header fun FloatArray.max(): Float?
/**
* Returns the largest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
public header fun DoubleArray.max(): Double?
@@ -5895,12 +5903,16 @@ public header fun CharArray.maxWith(comparator: Comparator<in Char>): Char?
/**
* Returns the smallest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Array<out Double>.min(): Double?
/**
* Returns the smallest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Array<out Float>.min(): Float?
@@ -5932,11 +5944,15 @@ public header fun LongArray.min(): Long?
/**
* Returns the smallest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
public header fun FloatArray.min(): Float?
/**
* Returns the smallest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
public header fun DoubleArray.min(): Double?
@@ -767,12 +767,16 @@ public header inline fun <T> Iterable<T>.forEachIndexed(action: (Int, T) -> Unit
/**
* Returns the largest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Iterable<Double>.max(): Double?
/**
* Returns the largest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Iterable<Float>.max(): Float?
@@ -794,12 +798,16 @@ public header fun <T> Iterable<T>.maxWith(comparator: Comparator<in T>): T?
/**
* Returns the smallest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Iterable<Double>.min(): Double?
/**
* Returns the smallest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Iterable<Float>.min(): Float?
@@ -494,12 +494,16 @@ public header inline fun <T> Sequence<T>.forEachIndexed(action: (Int, T) -> Unit
/**
* Returns the largest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Sequence<Double>.max(): Double?
/**
* Returns the largest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Sequence<Float>.max(): Float?
@@ -521,12 +525,16 @@ public header fun <T> Sequence<T>.maxWith(comparator: Comparator<in T>): T?
/**
* Returns the smallest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Sequence<Double>.min(): Double?
/**
* Returns the smallest element or `null` if there are no elements.
*
* If any of elements is `NaN` returns `NaN`.
*/
@SinceKotlin("1.1")
public header fun Sequence<Float>.min(): Float?