Socket
Socket
Sign inDemoInstall

fraction.js

Package Overview
Dependencies
0
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.5 to 4.0.6

2

bower.json
{
"name": "fraction.js",
"main": "fraction.js",
"version": "4.0.5",
"version": "4.0.6",
"homepage": "http://www.xarg.org/2014/03/rational-numbers-in-javascript/",

@@ -6,0 +6,0 @@ "description": "A rational number library",

/**
* @license Fraction.js v4.0.5 09/09/2015
* @license Fraction.js v4.0.6 09/09/2015
* http://www.xarg.org/2014/03/rational-numbers-in-javascript/

@@ -827,5 +827,5 @@ *

Object.defineProperty(exports, "__esModule", {'value': true});
Fraction['default'] = Fraction;
Fraction['Complex'] = Fraction;
module['exports'] = Fraction;
exports['Angles'] = Fraction;
exports['default'] = Fraction;
} else {

@@ -832,0 +832,0 @@ root['Fraction'] = Fraction;

/*
Fraction.js v4.0.5 09/09/2015
http://www.xarg.org/2014/03/rational-numbers-in-javascript/
Fraction.js v4.0.6 09/09/2015
http://www.xarg.org/2014/03/rational-numbers-in-javascript/
Copyright (c) 2015, Robert Eisele (robert@xarg.org)
Dual licensed under the MIT or GPL Version 2 licenses.
Copyright (c) 2015, Robert Eisele (robert@xarg.org)
Dual licensed under the MIT or GPL Version 2 licenses.
*/

@@ -17,3 +17,3 @@ (function(w){function k(a,c){var d=0,l=1,h=1,e=0,k=0,p=0,t=1,q=1,f=0,g=1,r=1,n=1;if(void 0!==a&&null!==a)if(void 0!==c)d=a,l=c,h=d*l;else switch(typeof a){case "object":"d"in a&&"n"in a?(d=a.n,l=a.d,"s"in a&&(d*=a.s)):0 in a?(d=a[0],1 in a&&(l=a[1])):u();h=d*l;break;case "number":0>a&&(h=a,a=-a);if(0===a%1)d=a;else if(0<a){1<=a&&(q=Math.pow(10,Math.floor(1+Math.log(a)/Math.LN10)),a/=q);for(;1E7>=g&&1E7>=n;)if(d=(f+r)/(g+n),a===d){1E7>=g+n?(d=f+r,l=g+n):n>g?(d=r,l=n):(d=f,l=g);break}else a>d?(f+=r,

d="",b=this.n,e=this.d;0>this.s&&(d+="-");1===e?d+=b:(a&&0<(c=Math.floor(b/e))&&(d+=c,b%=e),d=d+"\\frac{"+b+"}{"+e,d+="}");return d},toContinued:function(){var a=this.n,c=this.d,d=[];if(isNaN(this.n)||isNaN(this.d))return d;do{d.push(Math.floor(a/c));var b=a%c;a=c;c=b}while(1!==a);return d},toString:function(){var a=this.n,c=this.d;if(isNaN(a)||isNaN(c))return"NaN";if(!e.REDUCE){var d=p(a,c);a/=d;c/=d}a:{for(d=c;0===d%2;d/=2);for(;0===d%5;d/=5);if(1===d)d=0;else{for(var b=10%d,h=1;1!==b;h++)if(b=
10*b%d,2E3<h){d=0;break a}d=h}}a:{b=1;h=10;for(var k=d,m=1;0<k;h=h*h%c,k>>=1)k&1&&(m=m*h%c);h=m;for(k=0;300>k;k++){if(b===h){h=k;break a}b=10*b%c;h=10*h%c}h=0}b=-1===this.s?"-":"";b+=a/c|0;(a=a%c*10)&&(b+=".");if(d){for(;h--;)b+=a/c|0,a%=c,a*=10;for(b+="(";d--;)b+=a/c|0,a%=c,a*=10;b+=")"}else for(d=15;a&&d--;)b+=a/c|0,a%=c,a*=10;return b}};"function"===typeof define&&define.amd?define([],function(){return e}):"object"===typeof exports?(Object.defineProperty(exports,"__esModule",{value:!0}),module.exports=
e,exports.Angles=e,exports["default"]=e):w.Fraction=e})(this);
10*b%d,2E3<h){d=0;break a}d=h}}a:{b=1;h=10;for(var k=d,m=1;0<k;h=h*h%c,k>>=1)k&1&&(m=m*h%c);h=m;for(k=0;300>k;k++){if(b===h){h=k;break a}b=10*b%c;h=10*h%c}h=0}b=-1===this.s?"-":"";b+=a/c|0;(a=a%c*10)&&(b+=".");if(d){for(;h--;)b+=a/c|0,a%=c,a*=10;for(b+="(";d--;)b+=a/c|0,a%=c,a*=10;b+=")"}else for(d=15;a&&d--;)b+=a/c|0,a%=c,a*=10;return b}};"function"===typeof define&&define.amd?define([],function(){return e}):"object"===typeof exports?(Object.defineProperty(exports,"__esModule",{value:!0}),e["default"]=
e,e.Complex=e,module.exports=e):w.Fraction=e})(this);
{
"name": "fraction.js",
"title": "fraction.js",
"version": "4.0.5",
"version": "4.0.6",
"homepage": "http://www.xarg.org/2014/03/rational-numbers-in-javascript/",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/infusion/Fraction.js/issues",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc