Lines Matching refs:Decimal

6     T.assertEqual(expected, new Decimal(n).toSD(sd, rm).valueOf());
13 Decimal.config({
22 T.assert(Decimal.prototype.toSD === Decimal.prototype.toSignificantDigits);
43 Decimal.precision = 5;
45 Decimal.rounding = 0;
48 Decimal.rounding = 1;
51 Decimal.rounding = 2;
54 Decimal.rounding = 3;
57 Decimal.rounding = 4;
60 Decimal.rounding = 5;
63 Decimal.rounding = 6;
66 Decimal.rounding = 7;
69 Decimal.rounding = 8;
445 Decimal.toExpNeg = Decimal.toExpPos = 0;
524 tx(function () {new Decimal('12.345').toSD('3')}, ".toSD('3')");
525 tx(function () {new Decimal('12.345').toSD(new Decimal('3'))}, ".toSD(new Decimal('3'))");
526 tx(function () {new Decimal('12.345').toSD(NaN)}, ".toSD(NaN)");
527 tx(function () {new Decimal('12.345').toSD(null)}, ".toSD(null)");
529 tx(function () {new Decimal('12.345').toSD(NaN)}, ".toSD(NaN)");
530 tx(function () {new Decimal('12.345').toSD('NaN')}, ".toSD('NaN')");
531 tx(function () {new Decimal('12.345').toSD([])}, ".toSD([])");
532 tx(function () {new Decimal('12.345').toSD({})}, ".toSD({})");
533 tx(function () {new Decimal('12.345').toSD('')}, ".toSD('')");
534 tx(function () {new Decimal('12.345').toSD(' ')}, ".toSD(' ')");
535 tx(function () {new Decimal('12.345').toSD('hello')}, ".toSD('hello')");
536 tx(function () {new Decimal('12.345').toSD('\t')}, ".toSD('\t')");
537 tx(function () {new Decimal('12.345').toSD(new Date)}, ".toSD(new Date)");
538 tx(function () {new Decimal('12.345').toSD(new RegExp)}, ".toSD(new RegExp)");
539 tx(function () {new Decimal('12.345').toSD(7.5)}, ".toSD(7.5)");
540 tx(function () {new Decimal('12.345').toSD('1.1e1')}, ".toSD('1.1e1')");
541 tx(function () {new Decimal('12.345').toSD(0, 1)}, ".toSD(0, 1)");
542 tx(function () {new Decimal('12.345').toSD(1, '2')}, ".toSD(1, '2')");
543 tx(function () {new Decimal('12.345').toSD(1, 2.3)}, ".toSD(1, 2.3)");
544 tx(function () {new Decimal('12.345').toSD('0')}, ".toSD('0')");
545 tx(function () {new Decimal('12.345').toSD('-1')}, ".toSD('-1')");
546 tx(function () {new Decimal('12.345').toSD(-23)}, ".toSD(-23)");
547 tx(function () {new Decimal('12.345').toSD(1e9 + 1)}, ".toSD(1e9 + 1)");
548 tx(function () {new Decimal('12.345').toSD('-0.01')}, ".toSD('-0.01')");
549 tx(function () {new Decimal('12.345').toSD('-1e-1')}, ".toSD('-1e-1')");
550 tx(function () {new Decimal('12.345').toSD(Infinity)}, ".toSD(Infinity)");
551 tx(function () {new Decimal('12.345').toSD('-Infinity')}, ".toSD('-Infinity')");