gcd

package
v1.0.4023 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extended

func Extended(a, b int64) (int64, int64, int64)

Extended simple extended gcd

func ExtendedIterative

func ExtendedIterative(a, b int64) (int64, int64, int64)

ExtendedIterative finds and returns gcd(a, b), x, y satisfying a*x + b*y = gcd(a, b).

func ExtendedRecursive

func ExtendedRecursive(a, b int64) (int64, int64, int64)

ExtendedRecursive finds and returns gcd(a, b), x, y satisfying a*x + b*y = gcd(a, b).

func Iterative

func Iterative(a, b int64) int64

Iterative Faster iterative version of GcdRecursive without holding up too much of the stack

func Recursive

func Recursive(a, b int64) int64

Recursive finds and returns the greatest common divisor of a given integer.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL