1
0
Fork 0

tweaked formatting and limits

This commit is contained in:
Stephen M. McQuay 2012-08-31 13:30:10 -06:00
parent b15585364e
commit 26d12054a1
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ import (
)
const usage = "usage: sqrt <number>"
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