-
-
Notifications
You must be signed in to change notification settings - Fork 0
Factorial
admin edited this page Jun 15, 2021
·
4 revisions
The factorial operation is encountered in many areas of mathematics, notably in combinatorics, algebra, and mathematical analysis. Its most basic use counts the possible distinct sequences – the permutations – of n distinct objects: there are n!.
import "github.com/digital-technology-agency/math"
func Example() {
n := 4
value := math.FactorialInt(n)
fmt.Printf("Result: %d", value)
/*
Result: 24
*/
}
import "github.com/digital-technology-agency/math"
func Example() {
n := 4
value := math.FactorialTreeString(n)
fmt.Printf("Result: %s", value)
/*
Result: 24
*/
}