diff options
| author | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-08-30 20:52:46 -0500 |
|---|---|---|
| committer | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-08-30 20:52:46 -0500 |
| commit | af9680f0ed8d9282a70d5b4099445133d7c69af5 (patch) | |
| tree | f927ea34ec0a9d201e8eb3ada624e0f38d68986a /factor_info.go | |
| parent | aa73f47a5e2535224aa772f163aed2b6802bd4ad (diff) | |
Raise precision in non-compact display
The non-compact display is intended as a "full info" display, so it
makes sense to have more precision in these numbers. The compact
display is unchanged.
Diffstat (limited to 'factor_info.go')
| -rw-r--r-- | factor_info.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/factor_info.go b/factor_info.go index a6b91a9..ce014ed 100644 --- a/factor_info.go +++ b/factor_info.go @@ -77,8 +77,8 @@ func GetFactorInfo(radix uint) *FactorInfo { func (fi *FactorInfo) WriteTo(w io.Writer) { fmt.Fprintln(w, fi.Radix, "=", fi.PrimeFactorization) - fmt.Fprintf(w, "Factors: %v (Score: %.2f)\n", fi.Factors, fi.Score) - fmt.Fprintf(w, "Totative Ratio: %.1f%%\n", fi.TotativeRatio * 100.0) + fmt.Fprintf(w, "Factors: %v (Score: %.4f)\n", fi.Factors, fi.Score) + fmt.Fprintf(w, "Totative Ratio: %.3f%%\n", fi.TotativeRatio * 100.0) fmt.Fprintln(w, "2345 Rank:", fi.BasicRank) if fi.Type != nil { writeTypeMessage(w, *fi.Type) @@ -89,7 +89,7 @@ func (fi *FactorInfo) WriteTo(w io.Writer) { fmt.Fprintf(w, "Multiplication Table Complexity ≤ %.4g\n", float32(fi.Radix)*float32(fi.Radix-2)) } - fmt.Fprintf(w, "Natural Logarithm: %.2f\n", fi.Ln) + fmt.Fprintf(w, "Natural Logarithm: %.3f\n", fi.Ln) if len(fi.DigitMap) > 0 { writeDigitMap(w, fi.DigitMap) } |
