dnc

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Mod is the global digit mask. Don't change this. Unless you hate yourself.
	Mod = 10000000
)

Functions

func Factorial

func Factorial(n int) int

Factorial returns the low-order log10(Mod) non-zero digits of n!

func FactorialEven

func FactorialEven(n int) int

FactorialEven returns k where 2^k*m*5^? = n!

func Fix

func Fix(f, twos, fives int) int

Fix returns (f*2^(twos-fives))%Mod if twos > fives else (f*2^(fives-twos))%Mod (i.e., it puts back the excess 2's or 5's that multiply removed)

Types

This section is empty.

Jump to

Keyboard shortcuts

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