From 74bd3256f057c9331fdc108a7108e06415a30d82 Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Wed, 3 May 2017 13:50:44 +0700 Subject: [PATCH] runtime: Correct Float.MIN_VALUE --- backend.native/tests/build.gradle | 2 +- runtime/src/main/kotlin/kotlin/Primitives.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index 39097b9dac8..4f1841c0d28 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -389,7 +389,7 @@ task tostring2(type: RunKonanTest) { task tostring3(type: RunKonanTest) { goldValue = "-128\n127\n-32768\n32767\n" + "-2147483648\n2147483647\n-9223372036854775808\n9223372036854775807\n" + - "1.17549E-38\n3.40282E+38\n-INF\nINF\n" + + "1.4013E-45\n3.40282E+38\n-INF\nINF\n" + // Linux version prints -NAN. // "NAN\n" + "4.94066E-324\n1.79769E+308\n-INF\nINF\n" diff --git a/runtime/src/main/kotlin/kotlin/Primitives.kt b/runtime/src/main/kotlin/kotlin/Primitives.kt index a06489396a4..b77eeba89de 100644 --- a/runtime/src/main/kotlin/kotlin/Primitives.kt +++ b/runtime/src/main/kotlin/kotlin/Primitives.kt @@ -951,12 +951,12 @@ public final class Float : Number(), Comparable { /** * A constant holding the smallest *positive* nonzero value of Float. */ - public const val MIN_VALUE: Float = 1.17549435E-38f + public const val MIN_VALUE: Float = 1.40129846432481707e-45f /** * A constant holding the largest positive finite value of Float. */ - public const val MAX_VALUE: Float = 3.4028235E+38f + public const val MAX_VALUE: Float = 3.40282346638528860e+38f /** * A constant holding the positive infinity value of Float.