$ npm install test-float-overlapTest if the significands of two floating point numbers overlap.
var testOverlap = require("test-float-overlap")
console.log(testOverlap(0.5, 1.0), testOverlap(1.5, 1.0))
Output:
false true
npm install test-float-overlap
require("test-float-overlap")(a, b)Test if a pair of floating point numbers' significands overlap.
a and b are both double precision IEEE754 numbersReturns true if the binary representations of the significands of the numbers of overlap, false otherwise
(c) 2014 Mikola Lysenko. MIT License