Skip to content
On this page

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

module · Ruby 3.1

Math

26 class methods

The Math module contains module functions for basic trigonometric and transcendental functions. See class Float for a list of constants that define Ruby’s floating point accuracy.

Domains and codomains are given only for real (not complex) numbers.

Class methods 26

Constants

E

Definition of the mathematical constant E for Euler’s number (e) as a Float number.

PI

Definition of the mathematical constant PI as a Float number.