about

Epsilon-aware `==` for JavaScript's Number

npm install about
2 downloads in the last week
6 downloads in the last month

about

What?

Epsilon-aware == for JavaScript's Number

How?

JavaScript

var about = require('about');

about(0, 0);
// true

about(0, 1);
// false

about(0, 2.220460492503131e-16);
// true
CoffeeScript

about = require 'about'

about 0, 0
# true

about 0, 1
# false

about 0, 2.220460492503131e-16
# true

Why?

See http://en.wikipedia.org/wiki/Machine_epsilon

npm loves you