Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mikolalysenko/float-exponent

Extracts previous power of 2 for a float number
https://github.com/mikolalysenko/float-exponent

Last synced: 6 days ago
JSON representation

Extracts previous power of 2 for a float number

Awesome Lists containing this project

README

        

float-exponent
==============
Extracts the exponent from a floating point number, effectively rounding down to the previous power of 2 for non-denormal numbers. For denormals returns 2^-1024.

#### `require('float-exponent')(x)`
Returns the previous power of 2 for `x`

# License
(c) 2015 Mikola Lysenko. MIT License