Module 936287

869 characters · in no known chunk
Dependencies
Required by (1)
Lazily required by (0)none
Requires (0)none
Lazily requires (0)none
Source Raw
function(e,t){t.read=function(e,t,n,i,r){var s,a,o=8*r-i-1,l=(1<<o)-1,u=l>>1,d=-7,c=n?r-1:0,_=n?-1:1,h=e[t+c];for(c+=_,s=h&(1<<-d)-1,h>>=-d,d+=o;d>0;s=256*s+e[t+c],c+=_,d-=8);for(a=s&(1<<-d)-1,s>>=-d,d+=i;d>0;a=256*a+e[t+c],c+=_,d-=8);if(0===s)s=1-u;else{if(s===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,i),s-=u}return(h?-1:1)*a*Math.pow(2,s-i)},t.write=function(e,t,n,i,r,s){var a,o,l,u=8*s-r-1,d=(1<<u)-1,c=d>>1,_=5960464477539062e-23*(23===r),h=i?0:s-1,f=i?1:-1,E=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(o=+!!isNaN(t),a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+c>=1?t+=_/l:t+=_*Math.pow(2,1-c),t*l>=2&&(a++,l/=2),a+c>=d?(o=0,a=d):a+c>=1?(o=(t*l-1)*Math.pow(2,r),a+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,r),a=0));r>=8;e[n+h]=255&o,h+=f,o/=256,r-=8);for(a=a<<r|o,u+=r;u>0;e[n+h]=255&a,h+=f,a/=256,u-=8);e[n+h-f]|=128*E}}