{"library":"bit-twiddle","type":"library","category":null,"description":"The `bit-twiddle` package provides a highly optimized collection of fundamental bit manipulation functions, ported primarily from Stanford's extensive \"Bit Twiddling Hacks\" guide. It offers utilities for common bitwise operations such as computing the sign of an integer, absolute value, checking if a number is a power of two, logarithmic approximations (`log2`, `log10`), population count (`popCount`), and finding the next or previous power of two. Additionally, it includes specialized functions for interleaving and deinterleaving bits (`interleave2`, `interleave3`), crucial for efficient spatial indexing schemes like quadtrees and octrees (Z-order curves). The current stable version is 1.0.2, published in 2014. Due to the static nature of bitwise algorithms and the package's age, it is considered abandoned, with no active development or planned release cadence. Its primary differentiator remains its direct, performant JavaScript implementations of these classic algorithms, making it valuable for performance-critical numerical computing or graphics applications where low-level bit manipulation is essential.","language":"javascript","status":"abandoned","version":"1.0.2","tags":["javascript","bit","twiddle","hacks","graphics","logarithm","exponent","base 2","binary"],"last_verified":"Wed May 27","install":[{"cmd":"npm install bit-twiddle","imports":["import { sign } from 'bit-twiddle';","import { isPow2 } from 'bit-twiddle';","import { interleave2, deinterleave2 } from 'bit-twiddle';"]},{"cmd":"yarn add bit-twiddle","imports":[]},{"cmd":"pnpm add bit-twiddle","imports":[]}],"homepage":null,"github":"https://github.com/mikolalysenko/bit-twiddle","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/bit-twiddle","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/bit-twiddle/compatibility"}}