New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

js-float-calculation

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-float-calculation

Js precision floating point calculation

latest
Source
npmnpm
Version
0.1.6
Version published
Weekly downloads
87
42.62%
Maintainers
1
Weekly downloads
 
Created
Source

js-float-calculation

Build Status

Js precision floating point calculation

#Useage

##1. install
npm i js-float-calculation -S ##2.

var jspfpc = require("js-float-calculation");
 
var f1 = 1.01;
var f2 = 2.02;

var f3 = f1.add(f2),
    f4 = f2.sub(f1),
    f5 = f1.mul(f2),
    f6 = f2.div(f1);

console.log("f3="+f3);
console.log("f4="+f4);
console.log("f5="+f5);
console.log("f6="+f6);
 
//"f3=3.03"
//"f4=1.01"
//"f5=2.0402"
//"f6=2"
 
 
 

Keywords

javascript floating calculation bug

FAQs

Package last updated on 03 May 2016

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