[前][次][番号順一覧][スレッド一覧]

ruby-changes:69925

From: Burdette <ko1@a...>
Date: Thu, 25 Nov 2021 08:44:47 +0900 (JST)
Subject: [ruby-changes:69925] 635efa594a (master): Whats here for float (#5170)

https://git.ruby-lang.org/ruby.git/commit/?id=635efa594a

From 635efa594a08f0f1a80d9a2b3cd663368b777c38 Mon Sep 17 00:00:00 2001
From: Burdette Lamar <BurdetteLamar@Y...>
Date: Wed, 24 Nov 2021 17:44:27 -0600
Subject: Whats here for float (#5170)

* What's Here for Float
---
 numeric.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/numeric.c b/numeric.c
index b589acd192a..518f43d5951 100644
--- a/numeric.c
+++ b/numeric.c
@@ -945,6 +945,63 @@ num_negative_p(VALUE num) https://github.com/ruby/ruby/blob/trunk/numeric.c#L945
  *  - https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
  *  - https://github.com/rdp/ruby_tutorials_core/wiki/Ruby-Talk-FAQ#floats_imprecise
  *  - https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
+ *
+ *  == What's Here
+ *
+ *  First, what's elsewhere. \Class \Float:
+ *
+ *  - Inherits from {class Numeric}[Numeric.html#class-Numeric-label-What-27s+Here].
+ *
+ *  Here, class \Float provides methods for:
+ *
+ *  - {Querying}[#class-Float-label-Querying]
+ *  - {Comparing}[#class-Float-label-Comparing]
+ *  - {Converting}[#class-Float-label-Converting]
+ *
+ *  === Querying
+ *
+ *  - #finite?:: Returns whether +self+ is finite.
+ *  - #hash:: Returns the integer hash code for +self+.
+ *  - #infinite?:: Returns whether +self+ is infinite.
+ *  - #nan?:: Returns whether +self+ is a NaN (not-a-number).
+ *
+ *  === Comparing
+ *
+ *  - {<}[#method-i-3C]:: Returns whether +self+ is less than the given value.
+ *  - {<=}[#method-i-3C-3D]:: Returns whether +self+ is less than
+ *                            or equal to the given value.
+ *  - {<=>}[#method-i-3C-3D-3E]:: Returns a number indicating whether +self+ is less than,
+ *                                equal to, or greater than the given value.
+ *  - {==}[#method-i-3D-3D] (aliased as #=== and #eql>):: Returns whether +self+ is
+ *                                                        equal to the given value.
+ *  - {>}[#method-i-3E]:: Returns whether +self+ is greater than the given value.
+ *  - {>=}[#method-i-3E-3D]:: Returns whether +self+ is greater than
+ *                            or equal to the given value.
+ *
+ *  === Converting
+ *
+ *  - #% (aliased as #modulo):: Returns +self+ modulo the given value.
+ *  - #*:: Returns the product of +self+ and the given value.
+ *  - {**}[#method-i-2A-2A]:: Returns the value of +self+ raised to the power of the given value.
+ *  - #+:: Returns the sum of +self+ and the given value.
+ *  - #-:: Returns the difference of +self+ and the given value.
+ *  - {/}[#method-i-2F]:: Returns the quotient of +self+ and the given value.
+ *  - #ceil:: Returns the smallest number greater than or equal to +self+.
+ *  - #coerce:: Returns a 2-element array containing the given value converted to a \Float
+                and +self+
+ *  - #divmod:: Returns a 2-element array containing the quotient and remainder
+ *              results of dividing +self+ by the given value.
+ *  - #fdiv:: Returns the Float result of dividing +self+ by the given value.
+ *  - #floor:: Returns the greatest number smaller than or equal to +self+.
+ *  - #next_float:: Returns the next-larger representable \Float.
+ *  - #prev_float:: Returns the next-smaller representable \Float.
+ *  - #quo:: Returns the quotient from dividing +self+ by the given value.
+ *  - #round:: Returns +self+ rounded to the nearest value, to a given precision.
+ *  - #to_i (aliased as #to_int):: Returns +self+ truncated to an Integer.
+ *  - #to_s (aliased as #inspect):: Returns a string containing the place-value
+ *                                  representation of +self+ in the given radix.
+ *  - #truncate:: Returns +self+ truncated to a given precision.
+ *
  */
 
 VALUE
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]