mirror of
https://github.com/MikeMcl/decimal.js.git
synced 2024-10-27 20:34:12 +00:00
454 lines
22 KiB
JavaScript
454 lines
22 KiB
JavaScript
|
var count = (function log(Decimal) {
|
||
|
var start = +new Date(),
|
||
|
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', '<br>') };
|
||
|
error = function (str) { document.body.innerHTML += '<div style="color: red">' +
|
||
|
str.replace('\n', '<br>') + '</div>' };
|
||
|
}
|
||
|
|
||
|
if (!Decimal && typeof require === 'function') Decimal = require('../decimal');
|
||
|
|
||
|
function assert(expected, actual) {
|
||
|
total++;
|
||
|
|
||
|
//if ( total % 100 == 0 ) log(total);
|
||
|
|
||
|
if (expected !== actual) {
|
||
|
error('\n Test number: ' + total + ' failed');
|
||
|
error(' Expected: ' + expected);
|
||
|
error(' Actual: ' + actual);
|
||
|
//process.exit();
|
||
|
} else {
|
||
|
passed++;
|
||
|
//log('\n Expected and actual: ' + actual);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function T(n, base, result, pr, rm) {
|
||
|
Decimal.precision = pr;
|
||
|
Decimal.rounding = rm;
|
||
|
assert(result, new Decimal(n).log(base).toFixed());
|
||
|
}
|
||
|
|
||
|
log('\n Testing log...');
|
||
|
|
||
|
Decimal.config({
|
||
|
precision: 40,
|
||
|
rounding: 4,
|
||
|
toExpNeg: -9e15,
|
||
|
toExpPos: 9e15,
|
||
|
minE: -9e15,
|
||
|
maxE: 9e15,
|
||
|
errors: true
|
||
|
});
|
||
|
|
||
|
/*
|
||
|
Example of a log that will fail.
|
||
|
It results in 2.6 due to having 15 or more zeros from the first rounding digit.
|
||
|
*/
|
||
|
//T('4503599627370502', '1048576', '2.7', 2, 2); // 2.60000000000000009610279511444746656225...
|
||
|
|
||
|
T('0', '10', '-Infinity', 40, 4);
|
||
|
T('-0', '10', '-Infinity', 40, 4);
|
||
|
T('1', '10', '0', 40, 4);
|
||
|
T('-1', '10', 'NaN', 40, 4);
|
||
|
T('Infinity', '10', 'Infinity', 40, 4);
|
||
|
T('Infinity', '0', 'NaN', 40, 4);
|
||
|
T('-Infinity', 'Infinity', 'NaN', 40, 4);
|
||
|
T('NaN', '10', 'NaN', 40, 4);
|
||
|
|
||
|
T('1', '0', 'NaN', 40, 4); // Math.log(1) / Math.log(0) == -0
|
||
|
T('10', '0', 'NaN', 40, 4); // Math.log(10) / Math.log(0) == -0
|
||
|
T('10', '-0', 'NaN', 40, 4); // Math.log(10) / Math.log(-0) == -0
|
||
|
T('10', '1', 'NaN', 40, 4); // Math.log(10) / Math.log(1) == Infinity
|
||
|
T('10', '-1', 'NaN', 40, 4);
|
||
|
T('10', 'Infinity', 'NaN', 40, 4); // Math.log(10) / Math.log(Infinity) == 0
|
||
|
T('10', '-Infinity', 'NaN', 40, 4);
|
||
|
T('10', 'NaN', 'NaN', 40, 4);
|
||
|
T('-1', '-1', 'NaN', 40, 4);
|
||
|
T('0', '0', 'NaN', 40, 4);
|
||
|
|
||
|
T('7625597484987', '59049', '2.7', 2, 5);
|
||
|
T('839756321.64088511', '28', '6.16667503', 9, 0);
|
||
|
T('94143178827', '3486784401', '1.15', 3, 0);
|
||
|
T('243', '9', '3', 1, 4);
|
||
|
T('512', '16', '2.25', 7, 0);
|
||
|
T('512', '16', '2.25', 7, 2);
|
||
|
T('512', '16', '2.2', 2, 5);
|
||
|
T('512', '16', '2.2', 2, 6);
|
||
|
|
||
|
T('16', '2', '4', 7, 0);
|
||
|
T('16', '2', '4', 7, 2);
|
||
|
T('243', '3', '5', 7, 1);
|
||
|
T('243', '9', '2.5', 7, 1);
|
||
|
T('243', '3', '5', 7, 3);
|
||
|
T('243', '9', '2.5', 7, 3);
|
||
|
T('32', '4', '2.5', 7, 0);
|
||
|
T('32', '4', '2.5', 7, 2);
|
||
|
T('4', '2', '2', 1, 2);
|
||
|
T('8', '2', '3', 2, 0);
|
||
|
T('16', '2', '4', 2, 0);
|
||
|
T('32', '2', '5', 3, 0);
|
||
|
T('64', '2', '6', 3, 0);
|
||
|
T('64', '2', '6', 2, 0);
|
||
|
T('64', '2', '6', 1, 2);
|
||
|
T('128', '2', '7', 1, 0);
|
||
|
T('256', '2', '8', 1, 2);
|
||
|
T('1024', '2', '10', 2, 0);
|
||
|
T('1024', '2', '10', 10, 0);
|
||
|
T('16384', '2', '14', 2, 0);
|
||
|
T('16384', '2', '14', 10, 0);
|
||
|
T('243', '3', '5', 7, 4);
|
||
|
T('243', '9', '2.5', 7, 4);
|
||
|
T('243', '3', '5', 7, 4);
|
||
|
T('243', '9', '2.5', 7, 4);
|
||
|
T('16', '2', '4', 7, 4);
|
||
|
T('32', '4', '2.5', 7, 4);
|
||
|
T('16', '2', '4', 7, 4);
|
||
|
T('32', '4', '2.5', 7, 4);
|
||
|
|
||
|
T('1.2589254117', 10, '0.1', 1, 2);
|
||
|
T('1.023292992', 10, '0.01', 1, 2);
|
||
|
T('1.258925411794167210423954106395800606', 10, '0.1', 1, 4);
|
||
|
T('1.25892541179416721', 10, '0.1', 1, 0);
|
||
|
T('1.258925411', 10, '0.1', 1, 5);
|
||
|
T('1.258925411794167210423954', 10, '0.1', 1, 4);
|
||
|
|
||
|
/*
|
||
|
6.166675020000903537297764507632802193308677149
|
||
|
28^6.16667502 = 839756321.6383567959704282429971526703012698
|
||
|
28^6.16667503 = 839756349.6207552863005150010387178739013142
|
||
|
*/
|
||
|
T('839756321.64088511', '28', '6.16667503', 9, 0);
|
||
|
T('576306512.96177', '985212731.27158', '0.9742', 4, 2);
|
||
|
T('97.65625', '6.25', '2.5', 3, 0);
|
||
|
T('223677472.0384754303304727631735', '26', '5.900904252190486450814', 22, 5);
|
||
|
T('2063000845.3020737243910803079', '35', '6.0324410183892767982149330415', 29, 0);
|
||
|
T('302381977.956021650184952836276441035025875682714942', '2623', '2.4805663226398755020289647999', 29, 6);
|
||
|
T('456870693.58', '238920772.66', '1.0336035877093034523', 21, 4);
|
||
|
T('16', '2', '4', 10, 4);
|
||
|
T('32', '4', '2.5', 10, 1);
|
||
|
T('316.2277660168379331998893544432645719585553021316022642247511089459022980600999502961482777894980004', '10', '2.49999999999999999999', 21, 1);
|
||
|
|
||
|
// Base 10 therefore the following tests pass despite 15 or more zeros or nines as the rounding digits.
|
||
|
|
||
|
// 4.0000000000000000000173...
|
||
|
T('10000.0000000000000004', 10, '4.01', 3, 2);
|
||
|
|
||
|
// 4.00000000000000000173...
|
||
|
T('10000.00000000000004', 10, '4.01', 3, 2);
|
||
|
|
||
|
// 2.000000000000000000000004342944...
|
||
|
T('100.000000000000000000001', 10, '2.1', 2, 0);
|
||
|
|
||
|
// 2.00000000000000004342944...
|
||
|
T('100.00000000000001', 10, '2.1', 2, 0);
|
||
|
|
||
|
// 4.9999999999999999999960913...
|
||
|
T('99999.9999999999999991', 10, '4.999', 4, 1);
|
||
|
|
||
|
// 0.09360000000000000000000000020197...
|
||
|
T('124050.923004222533485495840', 10, '5.093601', 7, 2);
|
||
|
|
||
|
// 0.09999999999999999999999999999972381...
|
||
|
// 10^0.1 = 1.258925411794167210423954106395800606093617409466...
|
||
|
T('1.258925411794167210423954106395', 10, '0.09999', 4, 1);
|
||
|
|
||
|
// 8.959609629999999999999999999999431251938064
|
||
|
T('911191437.48166728043529900000', 10, '8.959609629999999999999999', 25, 3);
|
||
|
|
||
|
// 2.4038746000000000000000000000000268051243...
|
||
|
T('253.4396732554691740503010363220', 10, '2.403874600001', 13, 2);
|
||
|
|
||
|
// 3.391702100000000000000000000000000025534271040...
|
||
|
T('2464.348361986885121671329250344224', 10, '3.3917021', 18, 1);
|
||
|
T('2464.348361986885121671329250344224', 10, '3.39170210000000001', 18, 0);
|
||
|
|
||
|
// 4.0000000000000000173...
|
||
|
T('10000.0000000000004', 10, '4.01', 3, 2);
|
||
|
|
||
|
// 4.00000000000000173...
|
||
|
T('10000.00000000004', 10, '4.01', 3, 2);
|
||
|
|
||
|
// 2.0000000000000004342944...
|
||
|
T('100.0000000000001', 10, '2.1', 2, 0);
|
||
|
|
||
|
// 4.99999999999999999960913...
|
||
|
T('99999.99999999999991', 10, '4.999', 4, 1);
|
||
|
|
||
|
// 4.9999999999999999960913...
|
||
|
T('99999.9999999999991', 10, '4.999', 4, 1);
|
||
|
|
||
|
// 4.99999999999960913...
|
||
|
T('99999.99999991', 10, '4.999', 4, 1);
|
||
|
|
||
|
T('6.626757835589191227753975149737456562020794782', 10, '0.8213011002743699999999999999999999999999999', 43, 1);
|
||
|
T('4.20732041199815040736678139715312481859825562145776045079', 10, '0.6240055873352599999999999999999999999999999999999999', 52, 3);
|
||
|
T('64513410281785809574142282220919135969.8537876292904158501590880', 10, '37.80964999999999999999', 22, 1);
|
||
|
T('33.51145738694771448172942314968136067036971739113975569076629', 10, '1.5251933153717162999999999999999999999999999999999999999', 56, 3);
|
||
|
T('10232.9299228075413096627', 10, '4.009999999999999', 16, 1);
|
||
|
T('1.258925411794167210423954106395', 10, '0.099999999999999999999999999999723814', 35, 0);
|
||
|
T('1.29891281037500', 10, '0.11357', 5, 1);
|
||
|
T('16.399137225681149762104868844', 10, '1.21482099999999999999999', 24, 3);
|
||
|
T('0.01', 10, '-2', 17, 3);
|
||
|
T('0.0000000001', 10, '-10', 4, 2);
|
||
|
T('0.00001', 10, '-5', 35, 3);
|
||
|
T('0.00000001', 10, '-8', 24, 2);
|
||
|
T('0.0000100000000000010000005060000000000800030000000400908', 10, '-4.99', 3, 1);
|
||
|
|
||
|
T('94143178827', '3486784401', '1.15', 3, 0);
|
||
|
T('15625', '3125', '1.2', 2, 3);
|
||
|
T('3', '3486784401', '0.05', 1, 8);
|
||
|
T('268435456', '1048576', '1.4', 2, 3);
|
||
|
T('25', '9765625', '0.2', 1, 7);
|
||
|
T('524288', '256', '2.375', 4, 8);
|
||
|
T('177147', '81', '2.75', 3, 5);
|
||
|
T('531441', '59049', '1.2', 2, 8);
|
||
|
T('387420489', '59049', '1.8', 2, 6);
|
||
|
T('16384', '65536', '0.875', 3, 6);
|
||
|
T('31381059609', '59049', '2.2', 2, 5);
|
||
|
T('8589934592', '65536', '2.0625', 5, 3);
|
||
|
T('33554432', '256', '3.125', 4, 3);
|
||
|
T('4503599627370496', '65536', '3.25', 3, 3);
|
||
|
T('68630377364883', '59049', '2.9', 2, 3);
|
||
|
T('68630377364883', '847288609443', '1.16', 3, 5);
|
||
|
T('16', '1125899906842624', '0.08', 1, 2);
|
||
|
T('3814697265625', '390625', '2.25', 3, 8);
|
||
|
T('8', '4294967296', '0.09375', 4, 1);
|
||
|
T('22876792454961', '59049', '2.8', 2, 2);
|
||
|
T('32', '33554432', '0.2', 1, 2);
|
||
|
T('16', '1125899906842624', '0.08', 1, 2);
|
||
|
T('16777216', '1024', '2.4', 2, 2);
|
||
|
T('31381059609', '3486784401', '1.1', 2, 4);
|
||
|
T('131072', '16', '4.25', 3, 7);
|
||
|
T('17179869184', '65536', '2.125', 4, 2);
|
||
|
T('131072', '32', '3.4', 2, 5);
|
||
|
T('31381059609', '6561', '2.75', 3, 4);
|
||
|
T('1162261467', '81', '4.75', 3, 2);
|
||
|
T('5', '152587890625', '0.0625', 3, 8);
|
||
|
T('2048', '32', '2.2', 2, 5);
|
||
|
T('15625', '390625', '0.75', 2, 0);
|
||
|
T('3125', '390625', '0.625', 3, 8);
|
||
|
T('17592186044416', '65536', '2.75', 3, 4);
|
||
|
T('4194304', '1048576', '1.1', 2, 2);
|
||
|
T('125', '390625', '0.375', 3, 5);
|
||
|
T('134217728', '256', '3.375', 4, 2);
|
||
|
T('762939453125', '625', '4.25', 3, 7);
|
||
|
T('8', '4294967296', '0.09375', 4, 0);
|
||
|
T('4', '1125899906842624', '0.04', 1, 5);
|
||
|
T('2384185791015625', '390625', '2.75', 3, 7);
|
||
|
T('4', '1024', '0.2', 1, 2);
|
||
|
T('268435456', '1048576', '1.4', 2, 8);
|
||
|
T('17592186044416', '4294967296', '1.375', 4, 0);
|
||
|
T('32', '4294967296', '0.15625', 5, 7);
|
||
|
T('256', '32', '1.6', 2, 2);
|
||
|
T('531441', '59049', '1.2', 2, 3);
|
||
|
T('67108864', '1048576', '1.3', 2, 2);
|
||
|
T('3814697265625', '3125', '3.6', 2, 5);
|
||
|
T('4096', '1024', '1.2', 2, 6);
|
||
|
T('78125', '625', '1.75', 3, 3);
|
||
|
T('1162261467', '81', '4.75', 3, 1);
|
||
|
T('4782969', '6561', '1.75', 3, 0);
|
||
|
T('4', '1024', '0.2', 1, 1);
|
||
|
T('59049', '6561', '1.25', 3, 2);
|
||
|
T('1024', '1099511627776', '0.25', 2, 2);
|
||
|
T('134217728', '1048576', '1.35', 3, 4);
|
||
|
T('65536', '32', '3.2', 2, 5);
|
||
|
T('19073486328125', '9765625', '1.9', 2, 2);
|
||
|
T('19073486328125', '3125', '3.8', 2, 5);
|
||
|
T('34359738368', '65536', '2.1875', 5, 4);
|
||
|
T('387420489', '59049', '1.8', 2, 1);
|
||
|
T('1125899906842624', '1099511627776', '1.25', 3, 3);
|
||
|
T('4', '1024', '0.2', 1, 8);
|
||
|
T('3125', '95367431640625', '0.25', 2, 4);
|
||
|
T('9', '6561', '0.25', 2, 0);
|
||
|
|
||
|
T('456870693.58', '238920772.66', '1.0336035877093034523', 21, 4);
|
||
|
T('575547956.8582', '824684975.3545', '0.98248076', 8, 4);
|
||
|
T('82275648.874341603', '959190115.624130088', '0.88124641544168894893181429200832363', 35, 4);
|
||
|
T('74257343.4', '743703514.4', '0.88720377341908842250463392057841865999040289364224', 50, 4);
|
||
|
T('617556576.22', '1390349767.37', '0.96145220002205342499', 20, 4);
|
||
|
T('385659206.402956', '306197094.245356', '1.0118079926535367225661814147003237994862', 41, 4);
|
||
|
T('1739848017', '139741504', '1.134455757605027173760473871049514546484', 40, 4);
|
||
|
T('684413372.332', '749444030.62', '0.99556', 5, 4);
|
||
|
T('1276559129.76358811', '1814329747.19301894', '0.983510102095361604388', 21, 4);
|
||
|
T('470873324.56', '770017206.95', '0.975963952980122531477453931545461086248352', 42, 4);
|
||
|
T('142843622.855', '188030025.676', '0.985573716314165', 15, 4);
|
||
|
T('208762187.506204', '15673510.715596', '1.1563', 5, 4);
|
||
|
T('1066260899.1963', '954219284.761', '1.005369396783858165862954752482856604', 37, 4);
|
||
|
T('98615189.15', '75483684.05', '1.0147363402964731399253', 23, 4);
|
||
|
T('134306349.93018997', '262971762.95484809', '0.965342550919082621945239', 24, 4);
|
||
|
T('964681161.089224', '1910911588.814815', '0.9680153968863558918522522557796148', 34, 4);
|
||
|
T('9303669', '272208139', '0.8262', 4, 4);
|
||
|
T('388804210', '196979048', '1.035603565223696855965', 22, 4);
|
||
|
T('699589959.2322617', '574032511.7854473', '1.0098079347111332288609', 23, 4);
|
||
|
T('100575245.36', '172874206.82', '0.971443699412905370317336892965778', 33, 4);
|
||
|
T('188632711.8541175', '1056627336.0975408', '0.9170754305183363941127042', 25, 4);
|
||
|
T('267522787.94', '528716571.79', '0.966083390988836341228896', 24, 4);
|
||
|
T('145509306.43395', '472783713.04935', '0.941003844701466585568051857', 28, 4);
|
||
|
T('991525965.6381098', '609527830.0476525', '1.024053580832128', 16, 4);
|
||
|
T('1023653880.6218838', '953120602.1428507', '1.00345303146', 13, 4);
|
||
|
T('55755796.19', '1330531177.01', '0.84899920538009273', 17, 4);
|
||
|
T('334096229.1342503', '563056758.6770503', '0.97409528', 8, 4);
|
||
|
T('9635164', '231514430', '0.834932623823994616103829175346875687708', 39, 4);
|
||
|
T('131654133.157309973', '115412751.259558256', '1.007092396906741330059871530698890891053443', 43, 4);
|
||
|
T('28107031.16903', '323908252.33297', '0.87525800295707725472', 20, 4);
|
||
|
T('942124652.44', '686394876.98', '1.01556421460608796561', 21, 4);
|
||
|
T('134207809', '170927649', '0.9872419619471883239821215', 26, 4);
|
||
|
T('198609255.296', '765215848.971', '0.9340613778607868792216981337564', 31, 4);
|
||
|
T('664631640.1191', '376279805.8674', '1.0288111231512597915756117213', 29, 4);
|
||
|
T('647566101.164328642', '407052201.855466296', '1.023419534517733289078130759686', 31, 4);
|
||
|
T('242605467.6', '3268140.5', '1.287152826698319781357494634688', 31, 4);
|
||
|
T('5396771.02937553', '1411282.60639346', '1.0947246452397777430415523165413422902424568', 45, 4);
|
||
|
T('6228580.16566', '453960426.11951', '0.7848417390817178840972620893811037531107708294', 46, 4);
|
||
|
T('878490932.5', '189566553.9', '1.080453580440657158456', 22, 4);
|
||
|
T('1500680766.6371536', '1494780181.6442677', '1.0001864920020959610926036', 27, 4);
|
||
|
T('173605161', '989556046', '0.91597101071520992883356353020920075841', 38, 4);
|
||
|
T('570910553.14918', '616094822.16082', '0.996236539891160511560385433132728465017198', 42, 4);
|
||
|
T('37195924.394254207', '127531072.030845613', '0.9339814946288269', 16, 4);
|
||
|
T('22164450.211923', '243265988.586396', '0.87593437485408990967662593016805664894656', 41, 4);
|
||
|
T('175111472.895051078', '561767815.122048785', '0.94214081222679273276622917511607118811', 38, 4);
|
||
|
T('92702966.55', '562074647.894', '0.910546423686847055179464329092669', 33, 4);
|
||
|
T('260084613', '160581316', '1.0255212564415', 14, 4);
|
||
|
T('213030852.3', '47040534.8', '1.08549659522166864397502645463300419005653', 42, 4);
|
||
|
T('1327668611.05913', '848611793.9525', '1.02177029434766261729', 21, 4);
|
||
|
T('66944433.91', '37665148.37', '1.03296947987902231513689373', 27, 4);
|
||
|
T('333313135.0827385', '147427566.3086553', '1.043370303', 10, 4);
|
||
|
T('756767858.792642', '513855352.06323', '1.019', 4, 4);
|
||
|
T('551590228.4822', '253966714.4708', '1.04007718126961747868602448117617608919458655503', 48, 4);
|
||
|
T('1882211388.983751503', '1593467634.878447375', '1.007859427551369756176720215269895309219252795831', 49, 4);
|
||
|
T('496604846.993369651', '1250937096.045637042', '0.955895995137179786819967061075092', 33, 4);
|
||
|
T('460938387.41106403', '892723899.76771112', '0.97', 2, 4);
|
||
|
T('1208583543.0755', '1801535412.788', '0.981269142418459120915', 21, 4);
|
||
|
T('71809284.33940128', '1599263904.61399344', '0.853568966592640560288310566832707', 34, 4);
|
||
|
T('165181894', '197693262', '0.9905943222681096997828', 22, 4);
|
||
|
T('172342892.2755695', '1013895675.5730544', '0.91454580627089536191594420786355067402436333108', 47, 4);
|
||
|
T('76327930.1691', '605058531.8951', '0.8976161867656397914685427265032120246028151', 44, 4);
|
||
|
T('157359823.532684', '53839744.709721', '1.060248953923960673498498182556874', 35, 4);
|
||
|
T('278952919.13814458', '409957472.74412763', '0.980585978464508766054991193215240504363', 39, 4);
|
||
|
T('1258423560.1', '1619810525.2', '0.98809514066162', 14, 4);
|
||
|
T('798939732.686433', '1672296635.208782', '0.96521864919758039929', 20, 4);
|
||
|
T('334706290.845', '330433505.915', '1.000654976135280091123085197917', 31, 4);
|
||
|
T('921610727.8', '1683508825.7', '0.971638655200833693263145748073', 30, 4);
|
||
|
T('91469509.55', '84500848.95', '1.0043416023016102807100081454879', 32, 4);
|
||
|
T('1238654120.34', '419789841.51', '1.0545', 5, 4);
|
||
|
T('779032702.616761', '656872953.495305', '1.00840084663', 12, 4);
|
||
|
|
||
|
// base 2
|
||
|
T('26880.2432276408875624', 2, '14.7142585720457255', 19, 3);
|
||
|
T('18216.8140929585641372', 2, '14.152983050314836771855701', 26, 1);
|
||
|
T('28062.73494235358182', 2, '14.776367997755111083362495', 26, 0);
|
||
|
T('7408.82842447993', 2, '12.8550297084583087071', 21, 1);
|
||
|
T('395.067', 2, '8.62595353', 9, 3);
|
||
|
T('27442.6587462411378', 2, '14.74414', 7, 0);
|
||
|
T('29259.23925137426', 2, '14.83660463902', 13, 1);
|
||
|
T('31809.09321', 2, '14.95715162', 10, 3);
|
||
|
T('21088.306138691278', 2, '14.3641556', 9, 4);
|
||
|
T('21417.99322', 2, '14.386535691235055367', 20, 4);
|
||
|
T('30749.008158228314845157', 2, '14.9', 3, 3);
|
||
|
T('11701.5', 2, '13.51440585840535244680127', 25, 0);
|
||
|
T('31737.6741', 2, '14.954', 5, 2);
|
||
|
T('1688.88816886', 2, '10.7218580867075137099751634', 27, 3);
|
||
|
T('31553.4', 2, '14.945507849063278420302384', 26, 1);
|
||
|
T('28215.19', 2, '14.7841844442', 12, 3);
|
||
|
T('6080.97', 2, '12.57008575', 10, 1);
|
||
|
T('575.881932366571406', 2, '9.16962924962079798', 18, 1);
|
||
|
T('4573.55560689675', 2, '12.1591004766309775332', 21, 1);
|
||
|
T('24202.85989198517539', 2, '15', 2, 4);
|
||
|
T('18334.9', 2, '14.16230477704721387108079127958', 31, 4);
|
||
|
T('20179.623017', 2, '14.4', 3, 0);
|
||
|
T('8607.97004888426002071', 2, '13.07145734276093159769689946319', 31, 1);
|
||
|
T('27231.463745', 2, '14.732986911725376996874804951679', 32, 3);
|
||
|
T('24325.08', 2, '14.57015693', 10, 0);
|
||
|
T('826.3541073', 2, '9.69', 3, 3);
|
||
|
T('6877.51851488', 2, '12.7476724030697', 15, 3);
|
||
|
T('13510.031', 2, '13.7217433646123774736072103937', 30, 4);
|
||
|
T('559.1647711259', 2, '9.12712965971023632', 18, 1);
|
||
|
T('1262.018796786493279', 2, '10.30151768', 10, 3);
|
||
|
T('31897.9889', 2, '14.9611778475691091525075', 24, 1);
|
||
|
T('24187.818942357666924548', 2, '14.561', 5, 3);
|
||
|
T('7233.846688339241', 2, '12.820547306996872048936910678432', 32, 3);
|
||
|
T('10162.3041', 2, '13.31093992111', 13, 4);
|
||
|
T('9091.859714971663525', 2, '13.1503597085807068872335', 24, 1);
|
||
|
T('16205.492', 2, '13.984195201', 11, 3);
|
||
|
T('17578.3501161869916711', 2, '14.101512046680555', 18, 3);
|
||
|
T('5661.58', 2, '12.466989012642603919950322048', 29, 1);
|
||
|
T('6674.6', 2, '12.704465665236394967162', 23, 3);
|
||
|
T('5063.035517', 2, '12.305786889', 11, 1);
|
||
|
T('10067.374870965783416', 2, '13.297399920454024702032', 23, 3);
|
||
|
T('22864.071031662628282003', 2, '14.480794683114196339697931635', 29, 0);
|
||
|
T('15588.7831039333836277142', 2, '13.9282207', 9, 0);
|
||
|
T('17513.7015', 2, '14.09619640742934', 16, 2);
|
||
|
T('6136.604218568458', 2, '12.58322482425266756363155737198', 31, 0);
|
||
|
T('26016.619885247', 2, '14.667145916871983257557509389', 29, 2);
|
||
|
T('3486.883295195387', 2, '11.76772236306965954', 20, 1);
|
||
|
T('29853.4019880856169328', 2, '14.9', 3, 4);
|
||
|
T('32174.410652492293356508', 2, '14.97362610199656', 16, 0);
|
||
|
T('10790.71404', 2, '13.3975027131319239178743446', 27, 4);
|
||
|
T('3869.9702839155983', 2, '11.918106773147484057', 20, 3);
|
||
|
T('14572.9804731649161632826', 2, '13.831008347831373539', 20, 1);
|
||
|
T('3530.1698', 2, '11.7855218629818768241', 21, 3);
|
||
|
T('24098.35633479612268105', 2, '14.55664712', 10, 3);
|
||
|
T('9625.5360719', 2, '13.23', 4, 3);
|
||
|
T('21545.8', 2, '14.395', 5, 3);
|
||
|
T('19975.55193', 2, '14.28594774531463052', 19, 3);
|
||
|
T('11981.45533497274', 2, '13.548515', 8, 3);
|
||
|
T('2944.587874', 2, '11.52386', 7, 0);
|
||
|
T('17730.0672623', 2, '14.11391038892776450560262608325', 31, 3);
|
||
|
T('27232.2', 2, '14.7330259172334297642766', 24, 0);
|
||
|
T('16141.46080336', 2, '13.9784835280781625406', 21, 3);
|
||
|
T('22862.35', 2, '14.48068608402465290616804821871', 31, 3);
|
||
|
T('19701.97134401560579604', 2, '14.26605237', 12, 2);
|
||
|
T('1582.14854859', 2, '10.62766934', 10, 1);
|
||
|
T('11629.28476612279', 2, '13.505474749', 11, 3);
|
||
|
T('12024.272', 2, '13.553', 5, 1);
|
||
|
T('30287.02241583997417078439', 2, '14.88641213011400845046', 22, 3);
|
||
|
T('10681.405529866718069', 2, '13.38281387840546429058', 22, 4);
|
||
|
T('17028.3', 2, '14.055647', 8, 2);
|
||
|
T('31450.5123172489', 2, '14.940795897815678146773997', 26, 2);
|
||
|
T('10267.630410391621', 2, '13.325815651', 11, 2);
|
||
|
T('30041.03308734805248601613', 2, '14.874646806395182486207', 24, 2);
|
||
|
T('9098.63993126244373708', 2, '13.1514351913945', 15, 4);
|
||
|
T('30885.4583445139003016', 2, '14', 2, 3);
|
||
|
T('1771.1692', 2, '10.79048632416067', 16, 0);
|
||
|
T('31464.3', 2, '14.9414282265508731233', 21, 0);
|
||
|
T('22935.2', 2, '14.485275867643', 14, 0);
|
||
|
T('8314.31328', 2, '13.02138139382', 14, 3);
|
||
|
T('16288.48033937', 2, '13.991564391078708126', 20, 4);
|
||
|
T('16341.375474', 2, '13.9962418015', 12, 3);
|
||
|
T('29335.7329578096819103831', 2, '14.840371417967011524840917', 26, 4);
|
||
|
T('22186.7391341699826076', 2, '14.437411', 8, 0);
|
||
|
T('4148.563221253323604', 2, '12.01839605666979644655634094031', 31, 2);
|
||
|
T('30958.95586132340163', 2, '14.9180691947303244998231', 24, 4);
|
||
|
T('27227.216131376', 2, '14.73276186', 11, 4);
|
||
|
T('2893.149172764447', 2, '11.498', 5, 4);
|
||
|
T('11428.90884008455568467895', 2, '13.4804', 8, 4);
|
||
|
T('6665.09', 2, '12.702408641', 12, 1);
|
||
|
T('23660.7112925', 2, '14.5302058244333', 16, 1);
|
||
|
T('15779.58', 2, '13.94577118566247809264782829', 28, 2);
|
||
|
T('24758.13481636580123', 2, '14.595615011042757456588', 23, 2);
|
||
|
T('21545.2581', 2, '14.4', 3, 0);
|
||
|
T('8445.30210341451', 2, '13.0439333163687263747352981', 27, 1);
|
||
|
T('19723.89194345160270028329', 2, '14.2676566337760362079360509651', 30, 3);
|
||
|
T('8131.76680164600944819', 2, '12.98936', 7, 0);
|
||
|
T('10409.9459240778764723', 2, '13.35', 4, 4);
|
||
|
T('23008.0741775', 2, '14.48985261166230230904434431', 28, 0);
|
||
|
T('27113.61586019', 2, '14.7268', 6, 0);
|
||
|
T('18807.87914187401201', 2, '14.199', 6, 1);
|
||
|
T('14724.76659275464725898566', 2, '13.8459', 6, 1);
|
||
|
T('32358.7', 2, '14.981', 5, 1);
|
||
|
T('8736.77', 2, '13.092884295936739139012765', 26, 0);
|
||
|
|
||
|
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;
|