3 // Copyright 2011 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Troublesome floating point constants. Issue 1463.
13 func check(test string, got, want float64) bool {
15 fmt.Println(test, "got", got, "want", want)
23 // http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
24 good = good && check("2.2250738585072012e-308", 2.2250738585072012e-308, 2.2250738585072014e-308)
25 // http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/
26 good = good && check("2.2250738585072011e-308", 2.2250738585072011e-308, 2.225073858507201e-308)