add more help text

This commit is contained in:
filifa
2025-09-17 21:02:05 -04:00
parent 4b4858c54f
commit 9e6f648f0b
14 changed files with 126 additions and 42 deletions

View File

@@ -52,10 +52,17 @@ func sqrtRepetend(cmd *cobra.Command, args []string) {
// sqrtRepetendCmd represents the sqrtRepetend command
var sqrtRepetendCmd = &cobra.Command{
Use: "sqrt-repetend N [N ...]",
Short: "Compute the repetend of the square root of the input",
Long: `Compute the repetend of the square root of the input.`,
Args: cobra.MinimumNArgs(1),
Run: sqrtRepetend,
Short: "Compute the repetend of the continued fraction of square roots",
Long: `Compute the repetend of the continued fraction of the square root of the input.
For each argument n, this will output the repetend of the continued fraction of sqrt(n). For example,
mathtools sqrt-repetend 12 15 19
will output
2 6
1 6
2 1 3 1 2 8`,
Args: cobra.MinimumNArgs(1),
Run: sqrtRepetend,
}
func init() {