Skip to content

Commit e654291

Browse files
kotlin-samples-pusher-botAlexanderPrendota
authored andcommitted
test(samples): add new samples
1 parent d37ab40 commit e654291

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/test/resources/test-compile-data/jvm/kotlin-web-site/numbers/f56d9449111795feee96b7f922b3320d.8.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
fun main() {
22
//sampleStart
3+
// Operand statically typed as floating-point number
34
println(Double.NaN == Double.NaN) // false
5+
// Operand NOT statically typed as floating-point number
6+
// So NaN is equal to itself
47
println(listOf(Double.NaN) == listOf(Double.NaN)) // true
5-
8+
9+
// Operand statically typed as floating-point number
610
println(0.0 == -0.0) // true
11+
// Operand NOT statically typed as floating-point number
12+
// So -0.0 is less than 0.0
713
println(listOf(0.0) == listOf(-0.0)) // false
814

915
println(listOf(Double.NaN, Double.POSITIVE_INFINITY, 0.0, -0.0).sorted())

0 commit comments

Comments
 (0)