factorial

package module
v0.0.0-...-654030a Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package factorial represents examples of calculations of factorial (n!). Read more about factorial: https://en.wikipedia.org/wiki/Factorial

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Calculate

func Calculate[T constraints.Integer](x T) T

Calculate calculates factorial in imperative way. This way is much more performing than recursive way.

func Recursive

func Recursive[T constraints.Integer](x T) T

Recursive calculates the factorial in unsigned way.

Types

This section is empty.

Jump to

Keyboard shortcuts

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