Lines Matching refs:ndigits

12308     $def(self, '$ceil', function $$ceil(ndigits) {  argument
12312 if (ndigits == null) ndigits = 0;
12313 return self.$to_f().$ceil(ndigits);
12346 $def(self, '$floor', function $$floor(ndigits) { argument
12350 if (ndigits == null) ndigits = 0;
12351 return self.$to_f().$floor(ndigits);
12597 $def(self, '$truncate', function $$truncate(ndigits) { argument
12601 if (ndigits == null) ndigits = 0;
12602 return self.$to_f().$truncate(ndigits);
17519 $def(self, '$ceil', function $$ceil(ndigits) { argument
17523 if (ndigits == null) ndigits = 0;
17527 if (f % 1 === 0 && ndigits >= 0) {
17531 var factor = Math.pow(10, ndigits),
17607 $def(self, '$floor', function $$floor(ndigits) { argument
17611 if (ndigits == null) ndigits = 0;
17615 if (f % 1 === 0 && ndigits >= 0) {
17619 var factor = Math.pow(10, ndigits),
17838 $def(self, '$round', function $$round(ndigits) { argument
17845 if ($truthy(ndigits == null)) {
17848 if (($eqeqeq($$$('Float'), ndigits) && ($truthy(ndigits['$infinite?']())))) {
17851 ndigits = $Opal['$coerce_to!'](ndigits, $$$('Integer'), "to_int");
17852 if ($truthy($rb_lt(ndigits, $$$($$$('Integer'), 'MIN')))) {
17855 if ($truthy(ndigits >= 0)) {
17858 ndigits = ndigits['$-@']();
17860 if (0.415241 * ndigits - 0.125 > self.$size()) {
17864 var f = Math.pow(10, ndigits),
17871 if (($truthy(self['$nan?']()) && ($truthy(ndigits == null)))) {
17874 ndigits = $Opal['$coerce_to!'](ndigits || 0, $$$('Integer'), "to_int");
17875 if ($truthy($rb_le(ndigits, 0))) {
17881 } else if ($eqeq(ndigits, 0)) {
17887 …if ($truthy($rb_ge(ndigits, $rb_minus($rb_plus($$$($$$('Float'), 'DIG'), 2), ($truthy($rb_gt(exp, …
17890 …if ($truthy($rb_lt(ndigits, ($truthy($rb_gt(exp, 0)) ? ($rb_plus($rb_divide(exp, 3), 1)) : ($rb_di…
17893 return Math.round(self * Math.pow(10, ndigits)) / Math.pow(10, ndigits);;
17953 $def(self, '$truncate', function $$truncate(ndigits) { argument
17957 if (ndigits == null) ndigits = 0;
17961 if (f % 1 === 0 && ndigits >= 0) {
17965 var factor = Math.pow(10, ndigits),