Registry / utility / mathutil

mathutil

JSON →
library1.7.1gogounverified

Package mathutil provides utilities supplementing the standard math and math/rand packages, including overflow detection and nullable value functions.

go get modernc.org/mathutil
INSTALL
IMPORT
SIG · MATHUTIL
M
mathutil
utilitygov1.7.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mathutil
modernc.org/mathutil

Use mathutil to find the maximum of several integers.

package main import ( "fmt" "modernc.org/mathutil" ) func main() { max := mathutil.Max(3, 7, 2) fmt.Println(max) // 7 }
Debug
Known issues
breakingSome functions were removed or deprecated in early versions (2012-2013); check the changelog for compatibility.
fix
Use the latest version (v1.7.1) and avoid removed functions like those listed in the description.
affects: <1.0.0
Upgrade
Version history
1.7.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
mathutil — go get mathutil · libregistry