Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/mikolalysenko/float-exponent
- Owner: mikolalysenko
- License: mit
- Created: 2015-04-05T19:45:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-05T19:47:07.000Z (over 9 years ago)
- Last Synced: 2024-12-16T22:34:55.742Z (9 days ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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