@@ -2235,10 +2235,6 @@ flo_ndigits(int argc, VALUE *argv)
2235
2235
* | -4 | 10000 | -20000 |
2236
2236
* | -5 | 100000 | -100000 |
2237
2237
* | -6 | 1000000 | -1000000 |
2238
- * | -7 | 10000000 | -10000000 |
2239
- * | -8 | 100000000 | -100000000 |
2240
- * | -9 | 1000000000 | -1000000000 |
2241
- * | -10 | 10000000000 | 0 |
2242
2238
*
2243
2239
* Note that the limited precision of floating-point arithmetic
2244
2240
* may lead to surprising results:
@@ -2744,13 +2740,16 @@ flo_truncate(int argc, VALUE *argv, VALUE num)
2744
2740
2745
2741
/*
2746
2742
* call-seq:
2747
- * floor(digits = 0) -> integer or float
2743
+ * floor(ndigits = 0) -> float or integer
2748
2744
*
2749
- * Returns the largest number that is less than or equal to +self+ with
2750
- * a precision of +digits+ decimal digits.
2745
+ * Returns the largest float or integer that is less than or equal to +self+,
2746
+ * as specified by the given `ndigits`,
2747
+ * which must be an
2748
+ * [integer-convertible object](rdoc-ref:implicit_conversion.rdoc@Integer-Convertible+Objects).
2751
2749
*
2752
- * \Numeric implements this by converting +self+ to a Float and
2753
- * invoking Float#floor.
2750
+ * Equivalent to <tt>self.to_f.floor(ndigits)</tt>.
2751
+ *
2752
+ * Related: #ceil, Float#floor.
2754
2753
*/
2755
2754
2756
2755
static VALUE
0 commit comments