Revision: 7431
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at July 24, 2008 01:03 by octech
Initial Code
# ä»»æ„ã®åº• a ã‚’æŒã¤ x ã®å¯¾æ•°ã‚’計算. def logA( x, a ) return (Math.log(x)/Math.log(a)) end p logA( 2, 2 ) # => 1.0 p logA( 4, 2 ) # => 2.0
Initial URL
http://d.hatena.ne.jp/octech/20080724#1216874092
Initial Description
英語ã®ã‚¿ã‚¤ãƒˆãƒ«ãŒé©å½“ãªè‹±è¨³ãªã®ã§ã€èª°ã‹OK/NGã‚’æ•™ãˆã¦ãã ã•ã„。
Initial Title
Logarithm with any base (任æ„ã®åº•ã‚’æŒã¤å¯¾æ•°ï¼‰
Initial Tags
math, log
Initial Language
Ruby