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

ruby-changes:11710

From: akr <ko1@a...>
Date: Wed, 6 May 2009 18:30:14 +0900 (JST)
Subject: [ruby-changes:11710] Ruby:r23352 (trunk): update rdoc.

akr	2009-05-06 18:30:04 +0900 (Wed, 06 May 2009)

  New Revision: 23352

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23352

  Log:
    update rdoc.

  Modified files:
    trunk/math.c

Index: math.c
===================================================================
--- math.c	(revision 23351)
+++ math.c	(revision 23352)
@@ -308,6 +308,11 @@
  *     Math.exp(x)    => float
  *
  *  Returns e**x.
+ *
+ *    Math.exp(0)       #=> 1.0
+ *    Math.exp(1)       #=> 2.718281828459045
+ *    Math.exp(1.5)     #=> 4.4816890703380645
+ *
  */
 
 static VALUE
@@ -334,6 +339,12 @@
  *  Returns the natural logarithm of <i>numeric</i>.
  *  If additional second argument is given, it will be the base
  *  of logarithm.
+ *
+ *    Math.log(1)          #=> 0.0
+ *    Math.log(Math::E)    #=> 1.0
+ *    Math.log(Math::E**3) #=> 3.0
+ *    Math.log(12,3)       #=> 2.2618595071429146
+ *
  */
 
 static VALUE
@@ -373,6 +384,12 @@
  *     Math.log2(numeric)    => float
  *
  *  Returns the base 2 logarithm of <i>numeric</i>.
+ *
+ *    Math.log2(1)      #=> 0.0
+ *    Math.log2(2)      #=> 1.0
+ *    Math.log2(32768)  #=> 15.0
+ *    Math.log2(65536)  #=> 16.0
+ *
  */
 
 static VALUE
@@ -394,6 +411,11 @@
  *     Math.log10(numeric)    => float
  *
  *  Returns the base 10 logarithm of <i>numeric</i>.
+ *
+ *    Math.log10(1)       #=> 0.0
+ *    Math.log10(10)      #=> 1.0
+ *    Math.log10(10**100) #=> 100.0
+ *
  */
 
 static VALUE

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

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