sqrt

0.0.1 • Public • Published

sqrt

Babylonian method for calculating square root of a number.

Install

npm install sqrt
bower install sqrt

Usage

const sqrt = require('sqrt');
 
console.log(sqrt(25)); // 5
console.log(sqrt(49)); // 7
console.log(sqrt(100000000)); // 10000
console.log(sqrt(5)); // 2.23606797749979
console.log(sqrt(-5)); // NaN

Test

npm test

License

MIT

Package Sidebar

Install

npm i sqrt

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • miguelmota