This repository has been archived on 2021-05-25. You can view files and clone it, but cannot push or open issues or pull requests.
pyRCV2/html/vendor/big-6.0.0.min.js

8 lines
6.9 KiB
JavaScript
Raw Normal View History

/**
* Minified by jsDelivr using Terser v5.3.0.
* Original file: /npm/big.js@6.0.0/big.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
!function(r){"use strict";var e,t=1e6,n=1e6,i="[big.js] ",o=i+"Invalid ",s=o+"decimal places",c=i+"Division by zero",f={},u=void 0,h=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function l(r,t,n,i){var o=r.c;if(n===u&&(n=e.RM),0!==n&&1!==n&&2!==n&&3!==n)throw Error("[big.js] Invalid rounding mode");if(t<1)i=3===n&&(i||!!o[0])||0===t&&(1===n&&o[0]>=5||2===n&&(o[0]>5||5===o[0]&&(i||o[1]!==u))),o.length=1,i?(r.e=r.e-t+1,o[0]=1):o[0]=r.e=0;else if(t<o.length){if(i=1===n&&o[t]>=5||2===n&&(o[t]>5||5===o[t]&&(i||o[t+1]!==u||1&o[t-1]))||3===n&&(i||!!o[0]),o.length=t--,i)for(;++o[t]>9;)o[t]=0,t--||(++r.e,o.unshift(1));for(t=o.length;!o[--t];)o.pop()}return r}function a(r,e,t){var n=r.e,i=r.c.join(""),o=i.length;if(e)i=i.charAt(0)+(o>1?"."+i.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)i="0"+i;i="0."+i}else if(n>0)if(++n>o)for(n-=o;n--;)i+="0";else n<o&&(i=i.slice(0,n)+"."+i.slice(n));else o>1&&(i=i.charAt(0)+"."+i.slice(1));return r.s<0&&t?"-"+i:i}f.abs=function(){var r=new this.constructor(this);return r.s=1,r},f.cmp=function(r){var e,t=this,n=t.c,i=(r=new t.constructor(r)).c,o=t.s,s=r.s,c=t.e,f=r.e;if(!n[0]||!i[0])return n[0]?o:i[0]?-s:0;if(o!=s)return o;if(e=o<0,c!=f)return c>f^e?1:-1;for(s=(c=n.length)<(f=i.length)?c:f,o=-1;++o<s;)if(n[o]!=i[o])return n[o]>i[o]^e?1:-1;return c==f?0:c>f^e?1:-1},f.div=function(r){var e=this,n=e.constructor,i=e.c,o=(r=new n(r)).c,f=e.s==r.s?1:-1,h=n.DP;if(h!==~~h||h<0||h>t)throw Error(s);if(!o[0])throw Error(c);if(!i[0])return new n(0*f);var a,w,p,g,v,d=o.slice(),m=a=o.length,E=i.length,b=i.slice(0,a),P=b.length,M=r,x=M.c=[],D=0,N=h+(M.e=e.e-r.e)+1;for(M.s=f,f=N<0?0:N,d.unshift(0);P++<a;)b.push(0);do{for(p=0;p<10;p++){if(a!=(P=b.length))g=a>P?1:-1;else for(v=-1,g=0;++v<a;)if(o[v]!=b[v]){g=o[v]>b[v]?1:-1;break}if(!(g<0))break;for(w=P==a?o:d;P;){if(b[--P]<w[P]){for(v=P;v&&!b[--v];)b[v]=9;--b[v],b[P]+=10}b[P]-=w[P]}for(;!b[0];)b.shift()}x[D++]=g?p:++p,b[0]&&g?b[P]=i[m]||0:b=[i[m]]}while((m++<E||b[0]!==u)&&f--);return x[0]||1==D||(x.shift(),M.e--,N--),D>N&&l(M,N,n.RM,b[0]!==u),M},f.eq=function(r){return 0===this.cmp(r)},f.gt=function(r){return this.cmp(r)>0},f.gte=function(r){return this.cmp(r)>-1},f.lt=function(r){return this.cmp(r)<0},f.lte=function(r){return this.cmp(r)<1},f.minus=f.sub=function(r){var e,t,n,i,o=this,s=o.constructor,c=o.s,f=(r=new s(r)).s;if(c!=f)return r.s=-f,o.plus(r);var u=o.c.slice(),h=o.e,l=r.c,a=r.e;if(!u[0]||!l[0])return l[0]?(r.s=-f,r):new s(u[0]?o:0);if(c=h-a){for((i=c<0)?(c=-c,n=u):(a=h,n=l),n.reverse(),f=c;f--;)n.push(0);n.reverse()}else for(t=((i=u.length<l.length)?u:l).length,c=f=0;f<t;f++)if(u[f]!=l[f]){i=u[f]<l[f];break}if(i&&(n=u,u=l,l=n,r.s=-r.s),(f=(t=l.length)-(e=u.length))>0)for(;f--;)u[e++]=0;for(f=e;t>c;){if(u[--t]<l[t]){for(e=t;e&&!u[--e];)u[e]=9;--u[e],u[t]+=10}u[t]-=l[t]}for(;0===u[--f];)u.pop();for(;0===u[0];)u.shift(),--a;return u[0]||(r.s=1,u=[a=0]),r.c=u,r.e=a,r},f.mod=function(r){var e,t=this,n=t.constructor,i=t.s,o=(r=new n(r)).s;if(!r.c[0])throw Error(c);return t.s=r.s=1,e=1==r.cmp(t),t.s=i,r.s=o,e?new n(t):(i=n.DP,o=n.RM,n.DP=n.RM=0,t=t.div(r),n.DP=i,n.RM=o,this.minus(t.times(r)))},f.plus=f.add=function(r){var e,t=this,n=t.constructor,i=t.s,o=(r=new n(r)).s;if(i!=o)return r.s=-o,t.minus(r);var s=t.e,c=t.c,f=r.e,u=r.c;if(!c[0]||!u[0])return u[0]?r:new n(c[0]?t:0*i);if(c=c.slice(),i=s-f){for(i>0?(f=s,e=u):(i=-i,e=c),e.reverse();i--;)e.push(0);e.reverse()}for(c.length-u.length<0&&(e=u,u=c,c=e),i=u.length,o=0;i;c[i]%=10)o=(c[--i]=c[i]+u[i]+o)/10|0;for(o&&(c.unshift(o),++f),i=c.length;0===c[--i];)c.pop();return r.c=c,r.e=f,r},f.pow=function(r){var e=this,t=new e.constructor(1),i=t,s=r<0;if(r!==~~r||r<-1e6||r>n)throw Error(o+"exponent");for(s&&(r=-r);1&r&&(i=i.times(e)),r>>=1;)e=e.times(e);return s?t.div(i):i},f.prec=function(r,e){if(r!==~~r||r<1||r>t)throw Error(o+"precision");return l(new this.constructor(this),r,e)},f.round=function(r,e){if(r===u)r=0;else if(r!==~~r||r<-t||r>t)throw Error(s);return l(new this.constructor(this),r+this.e+1,e)},f.sqrt=function(){var r,e,t,n=this,o=n.constructor,s=n.s,c=n.e,f=new o(.5);if(!n.c[0])return new o(n);if(s<
//# sourceMappingURL=/sm/c58f4a0e51b7701d9481a8fae0eaff56ebaacb5269039a0257a6d63521297a0f.map