Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

test-float-overlap

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-float-overlap

Test if two floating point numbers overlap

Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
2
-93.33%
Maintainers
1
Weekly downloads
 
Created
Source

test-float-overlap

Test if the significands of two floating point numbers overlap.

Example

var testOverlap = require("test-float-overlap")

console.log(testOverlap(0.5, 1.0), testOverlap(1.5, 1.0))

Output:

false true

Install

npm install test-float-overlap

API

require("test-float-overlap")(a, b)

Test if a pair of floating point numbers' significands overlap.

  • a and b are both double precision IEEE754 numbers

Returns true if the binary representations of the significands of the numbers of overlap, false otherwise

Credits

(c) 2014 Mikola Lysenko. MIT License

Keywords

float

FAQs

Package last updated on 30 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts