var count = (function exp(Decimal) {
var start = +new Date(),
sum,
log,
error,
passed = 0,
total = 0;
if (typeof window === 'undefined') {
log = console.log;
error = console.error;
} else {
log = function (str) { document.body.innerHTML += str.replace('\n', '
') };
error = function (str) { document.body.innerHTML += '
' +
str.replace('\n', '
') + '
' };
}
if (!Decimal && typeof require === 'function') Decimal = require('../decimal');
function T(arg, expected, pr, rm) {
total++;
Decimal.rounding = rm;
Decimal.precision = pr;
var actual = new Decimal(arg).exp().toString();
//if ( total % 100 == 0 ) log( total);
if ( expected !== actual ) {
error('\n Test number: ' + total + ' failed');
error(' Expected: ' + expected);
error(' Actual: ' + actual);
error(' precision: ' + pr );
error(' rm: ' + ['UP', 'DOWN', 'CEIL', 'FLOOR', 'HALF_UP', 'HALF_DOWN', 'HALF_EVEN'][rm]);
log('');
//process.exit();
} else {
passed++;
//log('\n Expected and actual: ' + actual);
}
}
log('\n Testing exp...');
Decimal.config({
precision: 40,
rounding: 4,
toExpNeg: -9e15,
toExpPos: 9e15,
minE: -9e15,
maxE: 9e15,
errors: true
});
T('0', '1', 40, 4);
T('0', String(Math.exp(0)), 40, 4);
T('-0', '1', 40, 4);
T('-0', String(Math.exp(-0)), 40, 4);
T('Infinity', 'Infinity', 40, 4);
T('Infinity', String(Math.exp(Infinity)), 40, 4);
T('-Infinity', '0', 40, 4);
T('-Infinity', String(Math.exp(-Infinity)), 40, 4);
T('NaN', 'NaN', 40, 4);
T('NaN', String(Math.exp(NaN)), 40, 4);
T('1', '2.718281828459045235360287471352662497757', 40, 4);
T('4.504575', '90.42990317191332252519829', 25, 5);
T('6.3936622751479561979', '598.04277120550571020949043340838952845520759628012', 50, 4);
T('0.000000000000000004', '1.000000000000000004000000000000000008001', 40, 2);
T('0.9', '2.45960311115694966380012656360247069542177230644', 48, 1);
T('-0.0000000000000005', '0.999999999999999500000000000000124', 33, 1);
T('-0.00000000000000000001', '0.99999999999999999999000000000000000000004999', 44, 3);
T('-0.000000000000004', '0.999999999999996000000000000008', 31, 0);
T('-0.0000000000000000006', '0.99999', 5, 3);
T('0.0000000000000000006', '1', 5, 3);
T('-0.0000003', '1', 1, 4);
// Exponent estimate incorrect by -1.
T('20.72326583694641116', '1000000000.0000000038', 20, 1);
// Exponent estimate incorrect by +1.
T('-27.6310211159285483', '0.000000000000999', 3, 1);
T('-0.9', '0.40656965974059911188345423964562', 32, 1);
T('-0.00000000000005', '0.999', 3, 3);
T('-0.9999999999999999', '0.367879441171442358383467887305694866395394004', 45, 4);
T('-0.99999', '0.36788311998424806939070532012638041', 35, 3);
T('-0.00000000001', '0.99999999999000000000004999999999983333333333375', 49, 2);
T('-0.9999999999999', '0.367879441171479109539640916233017625680100198337', 48, 0);
T('-0.999999999', '0.36787944153932176295090581241', 29, 0);
T('-0.0000000003', '0.9999999997000000001', 19, 2);
T('-0.0000001', '0.99999990000000499999983333333749999991667', 41, 2);
T('-0.0000000000000001', '0.9999999999999999', 26, 1);
T('-0.999999999999999', '0.36788', 5, 2);
T('-0.999999999', '0.367879441539321762951', 21, 4);
T('-0.000000000001', '0.9999999999990000000000005', 31, 0);
T('-0.1', '0.9048374180359595731642491', 25, 0);
T('-0.99999999', '0.36787944485', 12, 3);
T('-0.99999999', '0.36787944485023675170391910600205499737', 38, 0);
T('-0.1', '0.9048374180359595731642491', 25, 0);
T('-0.9', '0.4065696597', 10, 3);
T('-0.9999999999999', '0.367879441171479', 15, 3);
T('-0.99', '0.371576691022045690531524119908201386918028', 42, 3);
T('-0.999999999999999', '0.3678794411714426894749649417', 28, 0);
T('-0.9', '0.4', 2, 1);
T('-0.00000000009', '0.99999', 5, 1);
T('0.9', '2.45960311115694966380012656360247069542177230644', 48, 1);
T('40.95984262795251', '614658133673303019.41715', 23, 1);
T('50.57728', '9234930123395249855007.64784227728909958776637', 45, 0);
T('-9.295952106254287693', '0.00009179505707794839996147521992', 28, 3);
T('24.429', '40679902037.5', 12, 1);
T('3.085347', '21.875056169741656067', 20, 2);
T('6.079163', '436.663554324263441178', 21, 0);
T('0.89588138', '2.4494937731', 11, 5);
T('3.06', '21.3', 3, 4);
T('0.828620743', '2.2901578446832146', 17, 6);
T('0.8747', '2.39815573', 9, 1);
T('4', '54.5', 3, 3);
T('1.74023', '5.698653962365493026791', 22, 3);
T('0.3178134', '1.37411982654', 12, 5);
T('1.0212228', '2.77658790066265475', 18, 0);
T('2.8', '16.444646771097049871498016', 26, 6);
T('2', '7.389', 5, 1);
T('2.13349', '8.44428600324102919', 19, 1);
T('1.0306766', '2.8029617', 8, 4);
T('1.38629371', '3.99999739553', 12, 0);
T('2.140864956', '8.5', 2, 4);
T('1', '2.7182818284590452353602874713', 29, 1);
T('2.8', '16.4446467711', 13, 4);
T('1.7923271', '6.0034067514286690274238254973', 29, 0);
T('2', '7.38905609893065', 15, 4);
T('1.839758663', '6.2950188567239', 14, 1);
T('3.1541', '23.4319388536798', 15, 3);
T('6.23103', '508.27874', 8, 1);
T('0.15', '1.16183424272828312261663', 24, 0);
T('3.6454', '38.298089', 8, 4);
T('2.8086602', '16.5877', 6, 2);
T('1', '2.71828182845904523536', 22, 4);
T('3.712', '40.9355959021562903', 19, 2);
T('1.742336005', '5.71066800248', 12, 5);
T('1.94829406', '7.0167073', 8, 4);
T('4.53792106', '93.49622', 7, 6);
T('6.64122444', '766.032379703051467163', 22, 5);
T('0.59', '1.8039884153978569', 17, 4);
T('1.069', '2.912466', 7, 5);
T('5.47', '237.460192761166777', 18, 6);
T('1', '2.7182818284590452353602874', 26, 3);
T('1.05262', '2.8651479805939498363151', 23, 4);
T('2', '7.3890560989307', 14, 0);
T('0.770663108', '2.161198887', 10, 1);
T('3.10396411', '22.28612104395503868020057367', 28, 2);
T('0.070843718', '1.0734134', 8, 1);
T('3.16756', '23.74', 4, 3);
T('3.09319', '22.047296794', 12, 4);
T('4.22287929', '68.229654700624870971', 20, 0);
T('0.049', '1.050220350740028148477052382', 28, 6);
T('2.979', '19.668138', 8, 1);
T('2.16997957', '8.75810511', 9, 1);
T('2.28877132', '9.86281199356347203004036437', 27, 6);
T('4.194', '66.29', 4, 5);
T('5.91', '368.70615540935695963731067791320655388190326', 44, 1);
T('-5.902609', '0.00273230692267056246438147723389194384', 36, 2);
T('2.51702817133177045', '12.391715832605823799395356049382091406182442225751401702194', 59, 6);
T('-5.3248998735809373', '0.00486883848918771313614028943', 27, 5);
T('86.0308014196048618', '23051666630029629891752615873650659516.8', 39, 5);
T('82.80005620234729889', '911186989442424636345046399000294573.16', 38, 4);
T('-42.42', '0.0000000000000000003777705319209947865643111962982101072978098117086239', 52, 5);
T('60.521486473024083703969', '200000000000000000000000000', 2, 0);
T('-4.17474993628772754887607024407', '0.015379036913283326051932', 23, 6);
T('5.15848192994892205', '173.900262343770154193777636990155123', 36, 4);
T('48.51280530953109845281121', '1171773433869775271496.705353549248239249', 40, 4);
T('-83.31692810858358074846', '0.00000000000000000000000000000000000065', 2, 6);
T('5.0', '148.41315910257661', 17, 0);
T('-26.157235080322', '0.000000000004365732710654570876745768055064377', 34, 6);
T('4.839', '126.3429455919875779876042641029434173522444372921366', 52, 0);
T('0.49', '1.63231621995537897012241', 24, 3);
T('-7.00103148362379565132988', '0.00091094185917573214870501234047096488410149985981648084', 53, 1);
T('-39.650608828557189278296702', '0.0000000000000000060250323299891995263128384036579347198767321183', 47, 0);
T('7.85808372', '2586.559051908298187507224798651134032', 37, 5);
T('-25.4986333', '0.000000000008434983972929977172646073526', 28, 5);
T('-0.303041962020968342', '0.738568103909971139152808715117610617846094274382929416993', 58, 5);
T('10.472755756976268129267', '35339.47029633505016404775786755427053', 37, 6);
T('1.524289787555734346062054445', '5', 1, 5);
T('-3.32', '0.0361528317540464190553217816871620314298225205616', 48, 3);
T('2.857520575008267515709626', '17.418286018757914', 17, 1);
T('-60.878327095631005', '0.00000000000000000000000000363813218954008631796290164687837', 33, 1);
T('6.250931474675900676', '518.49556529174126624424204821981669896', 38, 4);
T('-5.254191', '0.00522557207022572211145726388606', 30, 2);
T('73.6006591118691311536', '92121312451766132662051939400000', 27, 5);
T('67.0234090932359557332', '129000000000000000000000000000', 3, 2);
T('6.4350484439574', '623.3127778698531510658792212713024749828103299', 46, 3);
T('-90.6147801309103528', '0.0000000000000000000000000000000000000004430992452392223286671364132586', 31, 0);
T('52.6735295600', '75131702520984694212520.839', 26, 5);
T('4.91754742409', '136.667015585278752656929641054712859399847337855456678258883', 60, 0);
T('-8.291786018917236430647515856', '0.0002505', 4, 3);
//T('-78.03021995', '0.00000000000000000000000000000000012939159130723785626819625049185391066817380332355631249360200246949630969671500298529462669748895678232581244175004509555737871158164223260482581933406189750840064313874290525472150304', 185, 2);
//T('-65.5697', '0.00000000000000000000000000003337652437455562867073994751282372838994769667915347141869977866029382739578532846650664126707722701801316210471349464487191237181322988487166228369151950649514595392574324567119830354411963426', 193, 5);
//T('0.96430545924571', '2.62296526741079188717419416037670893092556438984286053788563773704812088645688785151143663574250042985145383111131544859879755', 126, 6);
//T('60.1451295803099', '132037681591763789045100900.6939187978126186891786471239491104148439035633584291177021254669438544553160555103733290585', 118, 6);
//T('8.906696112088566691635215334442', '7381.233998522082693862325039489266505109300425685385103444940108779932106425752592429084345836417728790308900023992044559', 121, 5);
//T('-7.6361617319741493', '0.00048267754692256448785514689616329113897932837215780936160152445059198141566339654670119718101507', 95, 3);
//T('2.2847262734631786625993104', '9.822997041022537939460657363745567812129850509193830846260108728127774226066405012998851925020414630467970448731497809048192183655220296245719654252789298101900175713452', 169, 4);
//T('-1.751068587', '0.173588350052541809092671571396485290831945336467484513092245615654671658593803202983882869040826121983204816598516666763555817201006319488674783046', 147, 6);
//T('-56.121971', '0.0000000000000000000000004231922260123080225416084760213136093584213955067689036101877712291906545157435155523987472402', 94, 6);
//T('-57.690414043058125421322186594', '0.00000000000000000000000008818028992320569897455339220986133154974823015862849888226359090922324890216749325639317431725311012337973785711517060848693072713095743058979757475602435590352812393443910956397581939545729', 190, 0);
//T('-47.1', '0.00000000000000000000350533801181874441811469677551581468577709830105775954176554434690403590610547218351841339269315144253721986305449170234760309378200184804357833', 144, 5);
//T('-65.47337667', '0.0000000000000000000000000000367513926368590248765223057526457211208181074386730408507383748728330232411422736130730332078225570932897797438984308803608', 123, 2);
Decimal.toExpNeg = Decimal.toExpPos = 0;
// Max integer argument
T('20723265836946413', '6.3207512951460243608e+9000000000000000', 20, 4);
// Min integer argument
T('-20723265836946411', '1.1690154783664756563e-9000000000000000', 20, 4);
T('2.08E+16', 'Infinity', 10, 1);
T('9.99999999e+9000000000000000', 'Infinity', 100, 4);
T('-2.08E+16', '0e+0', 10, 1);
T('1e-9000000000000000', '1e+0', 10, 1);
// Exponent estimate incorrect by +1.
T('2302585095.29663062096', '9.999998439e+1000000000', 10, 1);
// Exponent estimate incorrect by -1.
T('557.22559250455906', '1.0000000000000044e+242', 17, 1);
T('-7.2204571E-4550853476128405', '9.99999e-1', 6, 1);
T('-1.239848698043325450682384840', '2.894280056499551869832955260486309228756785711877e-1', 49, 2);
T('-358219354.0214584957674057041104824439823073474823', '1.7279578060422445345064581640966e-155572689', 32, 3);
T('8.82661445434039879925209590467500361019097244359748402', '6.813181388774733211e+3', 19, 6);
T('9.02366224E-9', '1.00000000902366228071324023326175156155718e+0', 43, 6);
T('-4.4768686752786086271180252E+574398129049502', '0e+0', 15, 3);
T('6.75038673622177', '8.54389121861983647815713666082881938951322130680514e+2', 51, 0);
T('4398.97294167362710274034929973848797228', '2.81e+1910', 3, 1);
T('-1484825.49833369444515197353', '3.01636873384e-644852', 12, 4);
T('0.065440317047917450552572898380917566295', '1.0676290161605702e+0', 17, 3);
T('-5901709079.09', '1.421971806677231650130742690252423304677744948915688926e-2563079687', 55, 6);
T('-86163.294461', '5.71048483678681595944539134785275858233917748536153915e-37421', 54, 3);
T('2.88239839811E-8', '1.00000002882398439651103026262165361e+0', 36, 5);
T('4.872597579273030979E-9', '1.000000004872597591144134583049737594772e+0', 40, 3);
T('-0.006757678445087613180', '9.9326510331773435581771e-1', 23, 4);
T('-1719061.5525618361809019383320908921878454', '1.131541164e-746579', 12, 6);
T('3.71051', '4.087464728225990240044723377214455688119502630072e+1', 49, 2);
T('-0.710995', '4.911552547738170878579930706792986093798e-1', 40, 6);
T('-6430924786.8769350318286788585173815', '3.345810365131120619165374101594810429694464421676283e-2792915149', 52, 2);
T('34642362.26867654539909580015', '5.93443858705705339e+15044986', 18, 0);
T('-7E+9', '4.755949192618e-3040061374', 13, 6);
T('-4.47019198135193978079214717754', '1.14451183902750885e-2', 18, 1);
T('51.34638954589307373157723989', '1.99275379758365308341255892760527578727823654790483676129019e+22', 60, 1);
T('-81401.3615', '6.8846384527819219975911487677597427557337305e-35353', 44, 1);
T('756198.669234325520158524481477094', '8.11467349161070913472039775323650842804795027540355532e+328412', 55, 4);
T('-9400.940934454609508553', '1.67196610124e-4083', 13, 5);
T('5.696', '2.9767431911766615488230490231563e+2', 32, 4);
T('38968.323782499938173874579040559', '5.34549292380094578902304159007522885358394e+16923', 42, 4);
T('62.9891003860774546630961822849372513516610', '2.26891756745795123507049600807686043e+27', 36, 4);
T('-4.8E+7', '7.38999104745748e-20846136', 15, 4);
T('-0.00211257', '9.9789e-1', 6, 4);
T('-0.0000050272045563902', '9.9999e-1', 5, 5);
T('-781312946.5632340188253766262', '4.6560453442132538317833940921452340405282959703223e-339319902', 50, 6);
T('-539.351152188976861', '5.79122977047606582711e-235', 21, 0);
T('-0.000003191', '9.999968090050912350846215082855477065451902402451e-1', 49, 1);
T('2491.6138389220662918906233', '1.2421e+1082', 5, 5);
T('6.5331E+5', '8.4717320950869955184340179326124820815021e+283728', 41, 6);
T('92689392.7817092', '6.547257272694308679468101443589658377028634845214991e+40254491', 53, 2);
T('-2.896540084258306486858073681654344E+6811156578945', '0e+0', 53, 0);
T('-39207182.50724003262', '9.685720935811140481048654824107565400809255139636e-17027464', 49, 2);
T('7252999.481974401492086089772266652', '4.49023040782864506582532036714073311031e+3149937', 40, 2);
T('266860.99729013895036', '1.81367015289299e+115896', 15, 4);
T('554.714299304131', '8.116321104500913004975e+240', 22, 4);
T('-5.39E-9', '9.999999946100000145260499739015302018344e-1', 40, 6);
T('-6.1956126230176979843715238', '2.038354074486265884213790326313520268133059783156e-3', 49, 3);
T('-179079.468663437447364925039698865156', '5.955761566079939707214078176734503062189331061405114979e-77774', 55, 4);
T('0.0004272552696486380060251990096888432070184565922867687789', '1.000427346556181780477698753215244914199293256647682497e+0', 55, 4);
T('-3604941.277081', '7.86644408655531682331137104e-1565607', 27, 5);
T('0.00392514874030933504732799676958623', '1.00393286222551638245758336302140689303e+0', 39, 3);
T('-8.070278020750073242509686640353603E-6533213', '1e+0', 37, 6);
T('-60.027781', '8.51e-27', 3, 3);
T('-5.151759E+4667803654705425', '0e+0', 24, 4);
T('-1.6415863E+316', '0e+0', 26, 2);
T('14444.797502185090179819521204795229610403898990', '1.9762752e+6273', 8, 0);
T('-7.9538558E+8', '4.174289266691080722771583364812366141505670477566749e-345431569', 52, 3);
T('-5.24', '5.30025683587e-3', 12, 3);
T('8770981783.8768836961', '4.0895045834438370341124833e+3809188989', 26, 1);
T('-7781095035.8787823767376187', '5.6632e-3379286638', 5, 2);
T('4280.31872095948288', '8.294711777842760220189848873553814022570332637458e+1858', 49, 1);
T('419522830.42755215461439329805041612595938252479988924364672', '1.9369550145179668054855717656498132e+182196450', 35, 6);
T('22204.72689074417274008', '2.45674917534239889126155594669739769204350979022435e+9643', 51, 3);
T('193143291.17221363238156', '4e+83881065', 1, 2);
T('-3.3269283071078E+3105804030310579', '0e+0', 37, 5);
T('-8.0492E+6', '7.18231329681123631192574e-3495724', 24, 0);
T('-8.2E-7', '9.9999918000033619990810535217173691050172889810529415773493e-1', 59, 1);
T('67538.931211623', '6.0973180748876020894953118261270483e+29331', 35, 4);
T('-2407.658244174797831950742368037560548516', '2.329754965378927665184597e-1046', 25, 6);
T('7.126663757956691E-7', '1.000000712e+0', 10, 3);
T('-8676.117277', '1.02362822745e-3768', 13, 4);
T('-44563.67436389', '1.74634654439880489827627486840970065e-19354', 36, 6);
T('-4.77838156949708135194588629542265625E+505476', '0e+0', 31, 0);
T('-1.883462276255022060068783713668189011761149256412782839814E+90148', '0e+0', 56, 6);
T('-6758.44188742150205573936972028595077986', '7.0142627304093313514490351637550786117813876056148253994e-2936', 56, 5);
T('648374386.8454786539250981171527107608073', '2.5965442555841821646e+281585418', 20, 6);
T('-18935271.6751', '9.9578395934e-8223485', 11, 0);
T('-1828.9535229', '4.9610927564232141817416706579973675e-795', 35, 0);
T('-970517.1659009', '6e-421491', 1, 0);
T('-29164.29207900217', '1.28493593415121280566442e-12666', 24, 3);
T('6698643518.220071149702566573678899151073324730343386674566', '1.58475395523360337062144184558308465480566891047377328e+2909183916', 54, 1);
T('-1.228963425393376142204523523367867E+38670263', '0e+0', 42, 0);
T('12.28462457248174674', '2.16343904820253358102399514306929165e+5', 36, 2);
T('-1406895221.617695531859022088478547953084394157514360', '4.31899059503150821494312668700741280316233831045635e-611006832', 51, 4);
T('-5464971607.2426373191', '1.64655936028692914480673449308075079881431973e-2373407013', 45, 1);
T('3917982.761376313384123284170581080', '1.96543098291186591077226844907e+1701558', 30, 6);
T('-2.67337924185113452801381547E+62', '0e+0', 35, 2);
T('-3.23925924417871900610119818564E-51571806070210', '1e+0', 52, 4);
T('-95956.28263404765534567752652673855344056495958804881', '5.19e-41674', 3, 3);
T('2.062', '7.861677452345232127891940658427123462730566099e+0', 46, 5);
T('-2.636653938950473266562426470563546906283343399', '7.160044865166421077350801345790271714163e-2', 40, 0);
T('67.0398031069', '1.303216461822694955321864e+29', 25, 1);
T('435029945.228734', '5e+188931104', 1, 2);
T('-7E-431', '1e+0', 19, 5);
T('561690400.8295265089', '4.1523032738483148535256191020203081982783134145061136572e+243939041', 57, 6);
T('6.71501831417284738990640952632075989921369685E-8954800535452', '1e+0', 16, 4);
T('951324.40298784730', '8.684e+413154', 4, 4);
T('101.8581637893332049152879', '1.723607878310329717394363029e+44', 29, 3);
T('-8.4616875278931291409525352275E-74255734837', '1e+0', 22, 6);
T('-4.48333446062045843605E+2891890077362', '0e+0', 22, 3);
T('-4733476.33934857674525911436192438770558502', '2.21616100477564906494357644077395286035437795151209665e-2055723', 54, 2);
T('-9E+8350994284697', '0e+0', 2, 2);
T('-2.59092369214850687887297928934274952E+15093499179', '0e+0', 48, 5);
T('6.94481E+6', '4.580011013258511348327640529505139178762663557127e+3016092', 49, 5);
T('-5.306593163163116266439E+32', '0e+0', 39, 6);
T('-8812510.98065065091256792468975697664659', '1.28644613902718205e-3827225', 18, 4);
T('-6.7E+29900513741', '0e+0', 28, 1);
T('0.000002514468289207001024863622086943168979951212204851901477945', '1.00000251447145048503938255996372459e+0', 36, 2);
T('-52626.9809769628976655', '2.469236e-22856', 7, 2);
T('-7.182696E+691', '0e+0', 52, 1);
T('0.912506453988875268663913120314486124504360042269', '2.49055718367631688222592171757840884345156946e+0', 45, 4);
T('-8.4230491536070E-9', '9.999999915769508818668784e-1', 25, 4);
T('3.771403590061E-29926', '1.0000000000001e+0', 14, 0);
T('-446.30408660719608455426202', '1.487982883988403390825709e-194', 25, 6);
T('618361.54116592', '1.0119278522063e+268551', 14, 0);
T('-9613.258278989752964742967465688250500721591497815', '1.035085736399780132274292916671435710997585584152744627545e-4175', 58, 2);
T('-3.599813101198099745394491250E-52863', '1e+0', 21, 6);
T('8934251869.70509916655', '8.845756812926329107811969e+3880096286', 26, 3);
T('7855419.967463209585539869194725832755166821616420', '3.50672648908711338945919e+3411565', 24, 2);
T('-93.032345940324798771195234705684685176321683166', '3.949712819836329105068e-41', 22, 0);
T('-11.35', '1.176948962493174023609e-5', 23, 4);
T('-276080277.17373478014980', '1.151136148083759924472639599e-119900141', 28, 5);
T('-9024.9373198895597966096346284177871', '3.3076720940073134958705073e-3920', 27, 6);
T('7477832507.9032', '6.013322857098335653837e+3247581394', 22, 6);
T('-87275.52487305417025633', '5.2618979682795171690116206e-37904', 26, 5);
T('-4.8535479887310024460060041733378168099389727345263378E-3126214409912517', '1e+0', 7, 6);
T('-1.508830E+9', '7.411678029552501726030879351530397448445e-655276544', 41, 1);
T('-2.8289809421082857219160789803542065437166E+89062671910696', '0e+0', 22, 4);
T('1.04849280004E-85410018295', '1e+0', 24, 1);
T('-5.68600E+204864013879', '0e+0', 58, 5);
T('-9.849150684976800', '5.279201102858537143500027599653116576517114e-5', 43, 1);
T('-7.047265544829266331642000314503945043394541857255190088', '8.6e-4', 2, 1);
T('-7661.37071783597688218395168714356213724640', '5.116505304086334166136461683364e-3328', 31, 4);
T('-2244343.1065029498995591566524191883433246173', '1.49055555235318519649688137e-974706', 28, 3);
T('-6114285103.366747598804331', '6.67679134689133733e-2655400282', 18, 2);
T('-0.00000580025971697798003818318457832024974772396564244054765', '9.999941997571044958892e-1', 22, 0);
T('-5.089247245102748788890E+7626459', '0e+0', 33, 1);
T('3207.0074216806456875151728', '6.104170542e+1392', 10, 2);
T('-80419846.22836357706354612659743327225903307', '3.52787882576328800568927309247e-34925896', 30, 4);
T('-7.98541613782832011E+6723', '0e+0', 32, 3);
T('-9.596932364405894312026643548991705122339774816698', '6.8e-5', 2, 5);
T('4.935246952949651272858021831479390226', '1.39e+2', 3, 5);
T('-531.6784214980321886974779464', '1.2445014196851604e-231', 19, 0);
T('-4.739E+1946136908872', '0e+0', 25, 5);
T('-0.01572268858755079', '9.844002676364299520864907e-1', 25, 1);
T('-579096033.9505229314113261994543', '9.188184615720464240471695850252709e-251498213', 34, 1);
T('0.00009389319853973274722619083766246456', '1.0000938976066440613502042057296e+0', 32, 4);
T('-37555.3344', '8.423722442596589600279765854984943551317911562042659e-16311', 52, 2);
T('-1.95935319094250841299718333E-9', '9.99999998040646811e-1', 18, 4);
T('8.8082297739838814733818533E-499208659', '1e+0', 23, 3);
T('-7.0515915591849E-7', '1e+0', 1, 2);
T('-0.002938308763435210899326052363477937844398106330598158693', '9.9706600384080442298699e-1', 23, 4);
T('-4687980.714965767635940561505490', '6.9858861864156761389498600852369559945e-2035965', 38, 6);
T('-118181608.73475834214480841859810569284', '2.911020776248796477233979e-51325621', 25, 1);
T('-27749.05223777560549446143398857182877847303717', '5.49205767029747647750398388611802e-12052', 33, 3);
T('-171072.90446684238722603078340853702012370010124898774', '9.584884594681422574319e-74297', 22, 1);
T('504284606.023382353403823645166', '5.066526343118473926417712611714042955313894412464e+219008021', 49, 1);
T('-45923250.0456552932187869600478411602688855582497508713', '8.205567995038854456e-19944215', 19, 6);
T('-78.5765353866969685265699193648183539711921582107046908576639', '7.4928023126342711451765e-35', 23, 5);
T('-61.98488954832959431787', '1.203107704018125105e-27', 19, 6);
T('-8847387724.5367366666884569160104766', '9.45e-3842371669', 3, 0);
T('-6.25E+3', '4.565497451354961248083150215077477303875629e-2715', 43, 3);
T('5.860E+9', '8.97543921445671647226260745544950893481e+2544965663', 39, 4);
T('7252457734.4849935833858729076273919595507202403356104488', '2.10567e+3149702374', 6, 3);
T('-4.3862970217733830473904720685818862615844', '1.2446733975475708833005974385328167538080828967597890932e-2', 56, 4);
T('-4.68934787890988807211444814851E-79789912', '1e+0', 19, 6);
T('53050.2039105320', '2.575266547064047627057929848861121028197850194380460494978e+23039', 59, 0);
T('-5.9878797445E+3760252320', '0e+0', 8, 0);
T('-9.020351799344287452628267E+619931548698281', '0e+0', 18, 2);
T('-3.408053670415183195657633495676602E+7356059680465606', '0e+0', 51, 3);
T('-5.09176714096460076E+14574387', '0e+0', 54, 5);
T('1.11637E+8', '1.1919e+48483333', 5, 5);
T('-0.00074381', '9.992564665580849103129003991e-1', 28, 6);
T('6E+9', '2.627307864980124157947705731161461284923491e+2605766891', 43, 2);
T('-2.946847002254208208778140940E+73', '0e+0', 29, 1);
T('9266.981936837000050214623147', '3.973004577e+4024', 10, 6);
T('-0.00003597602918', '9.999640246179495773726538747849433155e-1', 38, 5);
T('-429160.7559606346157904985705860675328786999238177329480', '7.109464145080662262774044985869664257213386372e-186383', 47, 4);
T('-648878.2', '6.002230722e-281805', 10, 0);
T('16.5253443376539291260', '1.5026777551646922421e+7', 20, 6);
T('5306698950.837477401048404827816985193451853343112', '2.9545564317306745907155920150679272935106790390724796662e+2304670071', 56, 4);
T('-88.6577409807824760086030795365823402237900907234', '3.136406274721600338623406478e-39', 28, 1);
T('-9.37E+4', '4.04618434380113177881778074205e-40694', 30, 0);
T('-63.257345094437457682030579895958920384250992524', '3.37042048439e-28', 12, 0);
T('-0.00000477150291930', '1e+0', 3, 5);
T('-844839.5', '7.36302199269051751169281578441834018715206033191716981747966e-366910', 60, 3);
T('-9.60490645978663911094666506641660930135564363069196E-4522558128', '1e+0', 60, 4);
T('-9358.925393136069132854850960921', '2.9535560489873714567138990832905195490519253782320583102309e-4065', 59, 3);
T('-865261.219611027358842', '6.71302173120865859435636879e-375779', 27, 3);
T('603567872.879120488508439678', '4.42064247873697079062e+262126196', 22, 4);
T('-0.471857991528865341609540775858032230406225060206423011', '6.2384209749021740782416505778e-1', 29, 0);
T('-8.0E+5', '2.59703258366139809054380138862e-347436', 30, 4);
T('-60.302335669148993629', '6.471849e-27', 8, 4);
T('62623796.5468058153449566517692997772537684633672450182478478', '1.8884682276005656212170815041697442265326639581524604352e+27197169', 56, 3);
T('-48.553924855981485096634227653075627806863881900625', '8.1902726662034e-22', 14, 6);
T('-3587.1381583700904849385031812103', '1.335647929594325224571385891e-1558', 28, 5);
T('-9.69198538848682887121627322264761026844E-67075626', '1e+0', 12, 5);
T('-50.7760561277', '8.87644386517672310743901058e-23', 27, 1);
T('-833.8172', '7.547292e-363', 7, 0);
T('0.000007878726144730576281142460329153106627045103316048112349', '1.0000079e+0', 8, 4);
T('-4E+8748594574', '0e+0', 50, 5);
T('6E+3', '5.846438956502114727850463535700123362780731971728e+2605', 49, 3);
T('-4.8821013132742502966450440E+3614608', '0e+0', 13, 1);
T('8.044E+9', '2.69003358149422826966036199693345465325421330326351698e+3493464812', 54, 2);
T('71179.39573699949056115908959847127731381113858917558448', '6.59e+30912', 3, 0);
T('-1.37E+9', '6.202188995867221908509949e-594983441', 25, 1);
T('-5.69620613352909376544642278439908175721060560741319E+8688769', '0e+0', 14, 5);
T('-1471672480.0738587102408', '5.43312669474655741e-639139238', 18, 3);
T('590730.3321031024414299257979388800', '8.385428356536552e+256550', 16, 0);
T('-60.89557919718450', '3.57590508114398588678207895721413537571e-27', 39, 6);
T('-2761507.0', '5.5996746785704194931311e-1199308', 23, 4);
T('198214.59589706259035750663520644', '3.20059540370481547485293577625754483845229753e+86083', 45, 2);
T('3.98404381174717436228401637500065496134160352', '5.373e+1', 4, 1);
T('-2.7933892295985002533148877132521390363228176450757E-6849654', '1e+0', 55, 6);
T('-4.607470472360977321677009341368730', '9.9770235725838785333721011723268189899453e-3', 41, 0);
T('4E+8', '5.771659887496014191829519e+173717792', 25, 4);
T('26989323.9384597741276273360182517003085710709957957514448', '2.862677468062e+11721314', 13, 6);
T('1982.67804963846670829039696512311674728663365524161003570', '1.1644915693429422090661483073823e+861', 32, 5);
T('2.312712520453006155305277051215E-966684305342', '1e+0', 32, 3);
T('-0.079241668813823896297184805509227188136', '9.2381663979417533e-1', 17, 0);
T('-7.688568386264063474826911053471204738263444451802620E-324922020138799', '9.99999999999999999999999999999999999999e-1', 39, 1);
T('-7.305094225925E-98705932828', '1e+0', 15, 5);
T('-27193.09105963791865212391852529008352836876', '1.55e-11810', 4, 3);
T('4E+5', '6.20527882613588673626e+173717', 21, 4);
T('-1.995919734E-8', '9.9999998004e-1', 12, 3);
T('-4083312085.13', '3.46082571227260141989249138182703943854064440051514225e-1773359907', 54, 1);
T('3.95084818023937700604675550481579437722396407984433395E-8200841523936978', '1.000000000000000000000000000000000000001e+0', 40, 0);
T('-90559.2451560', '4.164313582093632454540322279075574117497371193329543e-39330', 52, 5);
T('92092.2767439047124009947106002375774419044032914', '1.4710105415708809121746920993811e+39995', 32, 4);
T('72.04903391663415974995136499534181873911433084830820302664', '1.9520810991406029504505878089e+31', 29, 6);
T('34.69052508722296764076631217454', '1.1638677107734747705843067730591703481767725570233718484813e+15', 59, 3);
T('0.000741671391959064355247599949976506540964380747774691231', '1.001e+0', 4, 0);
T('841348.304475', '8.43319513400894367304409974588146e+365392', 33, 2);
T('123822.65013725', '3.116658689758209388503610924383e+53775', 31, 0);
T('-5960667203.802488752442867386', '8.45e-2588684876', 3, 1);
T('4E+3', '1.5063559700505249009759190747414992458097e+1737', 41, 2);
T('-0.00000783514268781890972746', '9.99992164888006831393806301832147045916749165e-1', 45, 2);
T('6.9E-9', '1.000000006900000023805000054751500094446337630336e+0', 49, 0);
T('305155.72764993972564517', '2.8095679521281084951012803831304299857163496186e+132527', 47, 2);
T('2034841.534415453716037408621096503934082445550167', '2.8180206903608061507101910350075349e+883720', 36, 3);
T('2545141627.98', '4.94279962988124992988887881698092e+1105340964', 33, 2);
T('0.003456485541607408664012431739377', '1.0034624660763157833821887059e+0', 29, 5);
T('0.00048178897456179800519303750034', '1.0004819e+0', 8, 4);
T('-1.4811873578429339516146825701788853245875879906979042410E+72605', '0e+0', 4, 1);
T('-3.0714157907710673653E-8107005448411807', '1e+0', 59, 6);
T('0.0003129138765143464883823736210681842794827503440653514696', '1.0003129628391683022163e+0', 23, 0);
T('-9.3327409050543206953670E+131180977', '0e+0', 6, 0);
T('-1E-7', '9.99999900000005e-1', 19, 2);
T('-0.3445495279070169584', '7.0853945884135634925014671658652560447191937821e-1', 47, 1);
T('2.25051849596497241967352487', '9.49265646465912365377289454355252e+0', 33, 2);
T('-67.963750482920796905913629710401961', '3.0459179188004299035995603e-30', 26, 4);
T('0.337320146', '1.401187576537793e+0', 16, 4);
T('-2.2713E+9', '1.79120017852431842298947e-986413057', 24, 4);
T('-6.64870032493454828741112E-6776', '9.99999999999999999999999999999999999999999e-1', 42, 3);
T('7021850.11260080215885061268655272015672825', '5.71023860575880222265485e+3049550', 24, 4);
T('-2.0515545E+662214112126232', '0e+0', 47, 3);
T('2957797835.8932577253481756853632731222315814045', '5.173945340113688270718638e+1284555278', 25, 6);
T('-35.4384823', '4.06689247392565826039961568289935115764584923877809e-16', 51, 0);
T('933.826978527752257585969585221682736305117', '3.5966967873001430219224114539e+405', 29, 4);
T('-5.629837408193', '3.589158847715504981e-3', 19, 5);
T('0.098887749540990386230695224887553630245651731897792', '1.10394237456542819e+0', 18, 3);
T('-6178.578818796317272266065847381165952721343853821647', '4.75678e-2684', 6, 4);
T('-0.00235659', '9.976461845782716291e-1', 19, 0);
T('-391393.3630624422845', '1.052369918014655240761093524557205117100010284177e-169980', 49, 5);
T('-0.4869312266345366794989117009036180748664436275333', '6.14509293363631602887407244384521502505994676972e-1', 48, 2);
T('589.007821555', '6.35106707e+255', 9, 1);
T('6.9E+6', '8.41651763267734118568759237292604145293295813726609653847322e+2996631', 60, 2);
T('-5.013342E+7688736', '0e+0', 40, 2);
T('-99203.98160158821556981821877062655348086', '1.81220614417096157740427353081667296927920648015826e-43084', 51, 0);
T('-0.012169447574280893468602026868779312386533694638', '9.879043e-1', 7, 5);
T('-336.2955189849', '8.886113e-147', 7, 0);
T('-0.0511195005030005301788909364635510380021762', '9.5016512e-1', 8, 6);
T('-1.165566116907531216714416836918486143313411185177518641754', '3.11746127314187147654404e-1', 24, 0);
T('-8.11E+7', '3.29341e-35221283', 6, 1);
T('6.7E-8', '1.0000000670000022445000501271675062967195843e+0', 44, 3);
T('-936.4918528162902030566588492010221267608', '1.9353342145915577342e-407', 21, 3);
T('6944779', '1.5766583069682807158185490274259561064055723e+3016079', 44, 4);
T('1.5565847195195926700694715755E-2036687', '1e+0', 51, 6);
T('-190562626.1162471451160352499905', '1e-82760297', 1, 6);
T('-5E+1', '1.92874984796391778301734e-22', 24, 1);
T('5717.80873119769611139073', '1.63222692405910843260564015e+2483', 27, 6);
T('4826561.868945951907995629717907045526779', '1.5354931135171e+2096149', 14, 3);
T('-5008845855.2856', '2.21559342680400786e-2175314116', 18, 0);
T('-1.20827044448276358E+8178688297534794', '0e+0', 18, 0);
T('20614806.1194031494', '3.492707172941925579964900276501e+8952896', 31, 0);
T('-5.91126459112161796319224642922215757742522049407E-64612884', '1e+0', 5, 5);
T('8.5052595389354880301833994128050929444686896463910E-1426620730709', '1e+0', 6, 4);
T('5.69367424103244983564962068038157191864666910236983', '2.969828048600207499273983417195805345305540798642082508e+2', 55, 5);
T('789391360.59555761873990640645908909860673298488856', '9.3057361824431439172040625633393796044026224352373e+342828311', 50, 3);
T('7.863438787771571071335613542611450957858008225457283E-3629884487', '1e+0', 17, 5);
T('7.7746276218545896715411897618069920827', '2.3794570772848399465881307293917698818154272277095636175e+3', 56, 1);
T('529234708.3605546004223022298100', '2.969379040006493e+229843713', 17, 6);
T('-9.4226846E+9321323138', '0e+0', 13, 2);
T('-391747.113534650200186050404342978105602790292760', '2.46e-170134', 3, 5);
T('-8.1325881821414760241953252309577296544283', '2.9380679040846155362110181018808794406319680017541e-4', 50, 2);
T('-83299.0041880', '5.036549605690286414151859066643158778019627221306e-36177', 49, 4);
T('-74442429.480917608255860428160266', '4.539055860043039e-32329937', 16, 6);
T('-78209.5483006', '1.0586e-33966', 5, 3);
T('1371674414.4782798006474442513325367511', '1.4e+595710629', 2, 3);
T('0.18', '1.1972173631218101648768239736004794798688224554646251713e+0', 57, 6);
T('-2.59968935154212E+640214', '0e+0', 52, 4);
T('-21931.088850397678155410801650980642806094692701180', '2.812743581e-9525', 10, 3);
T('1.06800773102405E-8', '1.0000000106800773672725258793924583128971640347e+0', 47, 3);
T('73.186845', '6.090359536580918670465514922962424848022134024e+31', 46, 4);
T('86513.751209187670', '2.78457488e+37572', 9, 6);
T('-4.4248744070865983825689279887432768346742E+2320751954', '0e+0', 59, 5);
T('-47771.82438970366542437504706798117298', '9.1259293129171539627304039278272e-20748', 32, 5);
T('87620.80589239557089341997186454400068405670609', '1.7081e+38053', 5, 2);
T('-0.0005255055', '9.994747e-1', 7, 2);
T('-6.171622E+3192918596', '0e+0', 11, 2);
T('-74231.5799564343750256169689119415859716043415211329112845', '4.309649596367124306e-32239', 19, 5);
T('1214586007.2', '5.294967442073563946946e+527488000', 22, 4);
T('11819.315346', '1.1572698593143973580600227470387584732318087962884284085e+5133', 56, 6);
T('3.359012E+7', '5.787194214907765811784571024538182849685958293767517123e+14588003', 55, 0);
T('8.5617961670211748089749295450727155148', '5.228063218806710296762681e+3', 26, 5);
T('8811.8741490751854844607187', '8.8780619114358641401102283e+3826', 26, 6);
T('52160610.212513659', '1.54170430724264983039790913572445593420539875754401e+22653065', 51, 5);
T('-9.3532702531262197619807634384413419286795', '8.6681484e-5', 8, 3);
T('-0.36145995164469064639321602456568627444990521225958364208', '6.9665849554378670792390678384991701954077e-1', 41, 3);
T('6.7365387886080957143036410304081694350511E-850853', '1e+0', 32, 1);
T('-4.12045065E+9017133661', '0e+0', 5, 6);
T('-1.9583E-772666713078175', '1e+0', 1, 2);
T('-95316324.450979907665643940391257489874110', '1.8015214057492e-41395354', 14, 2);
T('-9.60626078852727745956443154E-66505783139', '1e+0', 10, 4);
T('5.624914202E-3292151007465', '1e+0', 32, 1);
T('0.00095632', '1.0009567774197728e+0', 18, 4);
T('572.250874833453739', '3.3527193771992483060917268990517797994590446367282e+248', 50, 1);
T('7.061118724709411E-8', '1.0000000706111897e+0', 17, 5);
T('-3.47342149715648741231749076186152333298225E-7', '9.999996526579106076287590398262e-1', 31, 3);
T('0.000003233216257806967940204807227510000289843462516243918458', '1.0000032332e+0', 11, 1);
T('57757010.086062973164715', '5.91027391788e+25083550', 12, 1);
T('-23873009.1260', '7.415701281249413990635434257516836728566958573e-10367917', 46, 5);
T('605.0770657001636023391929015529833078', '6.048264284301187978321475653528383322610238e+262', 43, 3);
T('-6.19079', '2.04820802962117862947601102928920975e-3', 36, 5);
T('283316004.403238205573741', '2.22435320495564731565809774681597795937722266368e+123042577', 48, 3);
T('-407774536.4087', '9.485165966160525479712039149429210834615195546681288e-177094232', 52, 4);
T('7.4646E+9', '4.1211041725630244805175433086287961628331772430159e+3241834589', 52, 2);
T('-936724046.0023013524956116', '5.6900057170766157035788756e-406814085', 26, 2);
T('-5.4711980517E+609015923073', '0e+0', 14, 4);
T('-9.075152424E-9', '9.99999990924847617179195634847378765808e-1', 39, 4);
T('-511798242.732886492435249127253106888981401637', '2.1544001e-222271153', 8, 0);
T('-7.57651', '5.12346e-4', 6, 3);
T('-8.743393066562572849006726953E-7', '9.9999912566107557824289628094487200725231047007075128030919e-1', 59, 2);
T('-9255827.04458', '2.44955966e-4019755', 9, 3);
T('40216642.51588', '8.4201997586589672583424602415454114664730709783089914467842e+17465865', 59, 6);
T('0.0000018353509099015847382000862768838612931823929620557963693257', '1.00000183535259415909637751549891279996e+0', 39, 6);
T('0.0000397391631073482165324026618632283670', '1.000039739952718349911570036708835430112516828147828189581e+0', 58, 0);
T('-8.42271438550089937699047920E+878408157', '0e+0', 46, 3);
T('-1.718977747558816965149259925978126281768954542470854535814E+661320705271', '0e+0', 3, 0);
T('815941574.959696224225621673679816232641937219342', '3.6344992741237470277099161527389162559e+354358923', 38, 1);
T('-18532215.720776624649552', '9.44117433576543205198312171177100127989596e-8048440', 42, 4);
T('-0.000675295449079737950484815015243664218609899340258043751247', '9.993249325115755507335216575676760854708009000360799e-1', 52, 4);
T('-7993439211.464893455705253', '1.0757621750625665818743411103007433e-3471506541', 35, 1);
T('-4.347985E-8', '9.999999565201509452486643114932381e-1', 34, 2);
T('-2.417252360011198402000401E+643', '0e+0', 32, 1);
T('-0.3541043447128080262722112509998', '7.01801734234309135112196072e-1', 27, 0);
T('6.18E-8', '1e+0', 4, 4);
T('0.0000820490395255055006816269', '1.00008205240564001055421670409599157335247125054165035568627e+0', 60, 6);
T('-2.522202158301361178E+12405070195', '0e+0', 28, 3);
log('\n ' + passed + ' of ' + total + ' tests passed in ' + (+new Date() - start) + ' ms \n');
return [passed, total];
})(this.Decimal);
if (typeof module !== 'undefined' && module.exports) module.exports = count;