Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
Menu
Call to the class method sqrt from the Math module : Math « Development « Ruby
Ruby
Development
Math
Call to the class method sqrt from the Math module
puts Math.sqrt(16)
Related examples in the same category
1.
Math functions from the Math module
2.
The Math Object
3.
The Math.exp function returns Euler to the power of x.
4.
do natural logarithms (base E or Euler) and base-10 logarithms.
5.
Taking Logarithms
6.
Random number
7.
Random seeds
8.
Convert the Cartesian point (x,y) to polar (magnitude, angle) coordinates
9.
Convert polar coordinates to Cartesian coordinates