From 26d12054a14220aa4c9f25b1b88e953c08b0dd1e Mon Sep 17 00:00:00 2001 From: "Stephen M. McQuay" Date: Fri, 31 Aug 2012 13:30:10 -0600 Subject: [PATCH] tweaked formatting and limits --- exercises/00-sqrt/go.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/00-sqrt/go.go b/exercises/00-sqrt/go.go index 972ce38..527404e 100644 --- a/exercises/00-sqrt/go.go +++ b/exercises/00-sqrt/go.go @@ -8,7 +8,7 @@ import ( ) const usage = "usage: sqrt " -const min_threshold = 1e-200 +const min_threshold = 1e-16 type ErrNegativeSqrt float64 @@ -50,7 +50,7 @@ func main() { if err != nil { panic(err) } - fmt.Printf("%0.4g %0.2d %0.20f %0.20f %0.4g\n", + fmt.Printf("%0.4E %0.4d %0.20f %0.20f %0.4e\n", threshold, iterations, right_answer, answer, right_answer-answer) threshold = threshold / 10.0