2.0.49 • Published 3 years ago

extra-integer.min v2.0.49

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

32-bit integer can store values from −2^31 to 2^31 − 1. :package: NPM, :smiley_cat: GitHub, :running: RunKit, :vhs: Asciinema, :moon: Minified, :scroll: Files, :newspaper: JSDoc, :blue_book: Wiki.

This package includes bit twiddling hacks, for integers, by Sean Eron Anderson and many others.

Methods as separate packages:

Stability: Experimental

This is browserified, minified version of extra-integer. It is exported as global variable integer. CDN: unpkg, jsDelivr.

const integer = require("extra-integer");
// import * as integer from "extra-integer";
// import * as integer from "https://unpkg.com/extra-integer@2.0.30/index.mjs"; (deno)

integer.is(9.11e-31);
// false

integer.log10(10000);
// 4

integer.nextPow2(63);
// 64

Index

MethodAction
isChecks if value is int32.
absGets absolute value.
log2Finds log-base-2.
pow2Finds power-of-2.
isPow2Checks if value is a power-of-2.
nextPow2Finds next power-of-2.
prevPow2Finds previous power-of-2.
signEqualChecks if two values have equal sign.
MIN_VALUEMinimum int32 value.

npm.io

2.0.49

3 years ago

2.0.48

3 years ago

2.0.46

3 years ago

2.0.47

3 years ago

2.0.45

3 years ago

2.0.43

3 years ago

2.0.42

4 years ago

2.0.41

4 years ago

2.0.29

4 years ago

2.0.38

4 years ago

2.0.35

4 years ago

2.0.33

4 years ago

2.0.30

4 years ago

2.0.40

4 years ago

2.0.28

4 years ago

2.0.27

4 years ago

2.0.26

4 years ago

2.0.25

4 years ago

2.0.16

4 years ago

2.0.18

4 years ago

2.0.20

4 years ago

2.0.21

4 years ago

2.0.7

4 years ago

2.0.9

4 years ago

2.0.10

4 years ago

2.0.8

4 years ago

2.0.5

4 years ago

2.0.6

4 years ago

2.0.3

4 years ago

2.0.4

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.2.19

4 years ago

1.2.20

4 years ago

1.1.7

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.0

5 years ago

1.0.11

5 years ago