tweaked formatting and limits
This commit is contained in:
parent
b15585364e
commit
26d12054a1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user