Documentation
¶
Index ¶
- func BaseExp(N int, eps ...float64) (int, int, bool)
- func ContinuedFraction(real float64, eps ...float64) []int
- func Convergent(cfx []int) (int, int, float64)
- func FindOrder(a, N int, binary string, eps ...float64) (int, int, float64, bool)
- func GCD(a, b int) int
- func IsEven(v int) bool
- func IsOdd(v int) bool
- func IsPrime(N int) bool
- func IsTrivial(N int, factor ...int) bool
- func Max(p []float64) float64
- func Min(p []float64) float64
- func ModExp(a, r, N int) int
- func ModExp2(a, j, N int) int
- func Must[T any](v T, err error) T
- func ParseFloat(binary string) (float64, error)
- func Pow(a, r int) int
- func Sum(p []float64) float64
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContinuedFraction ¶
func Convergent ¶
Example ¶
Output: 0.00101010101=0.16650390625 <nil> [0]: 0/1=0 [0 6]: 1/6=0.16666666666666666 [0 6 170]: 170/1021=0.1665034280117532 [0 6 170 1]: 171/1027=0.1665043816942551 [0 6 170 1 1]: 341/2048=0.16650390625
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.