- README

- Top Level Namespace
- Adler32
- ArgumentError
- Array
- Atomic
- Base64
  - Error
- Benchmark
  - BM
    - Job
    - Tms
  - IPS
    - Entry
    - Job
- BigFloat
- BigInt
- BigRational
- BitArray
- Bool
- Box
- Bytes
- Channel
  - Buffered
  - ClosedError
  - ReceiveAction
  - SelectAction
  - SendAction
  - Unbuffered
- Char
  - Reader
- Class
- Colorize
  - Object
  - ObjectExtensions
- Comparable
- Complex
- Concurrent
  - CanceledError
- CRC32
- Crypto
  - Bcrypt
    - Error
    - Password
  - Blowfish
  - Subtle
- CSV
  - Builder
    - Row
  - Error
  - Lexer
  - MalformedCSVError
  - Parser
  - Row
  - Token
    - Kind
- Debug
  - DWARF
    - Abbrev
      - Attribute
    - AT
    - FORM
    - Info
      - Value
    - LineNumbers
      - Register
      - Row
      - Sequence
    - LNE
    - LNS
    - Strings
    - TAG
  - ELF
    - Endianness
    - Error
    - Ident
    - Klass
    - Machine
    - OSABI
    - SectionHeader
      - Flags
      - Type
    - Type
- Deque
- Digest
  - Base
  - MD5
  - SHA1
- Dir
- DivisionByZero
- DL
- ECR
- Enum
- Enumerable
  - EmptyError
- ENV
- Errno
- Exception
- Fiber
- File
  - Stat
- FileUtils
- Flate
  - Error
  - Reader
  - Strategy
  - Writer
- Float
  - Primitive
- Float32
- Float64
- GC
  - Stats
- Gzip
  - Error
  - Header
  - Reader
  - Writer
- Hash
- HTML
- HTTP
  - Client
    - BodyType
    - Response
  - CompressHandler
  - ComputedContentTypeHeader
  - Cookie
  - Cookies
  - ErrorHandler
  - FormData
    - Builder
    - Error
    - FileMetadata
    - Parser
    - Part
  - Handler
    - Proc
  - Headers
  - LogHandler
  - Multipart
    - Builder
    - Error
    - Parser
  - Params
    - Builder
  - Request
  - Server
    - Context
    - RequestProcessor
    - Response
  - StaticFileHandler
    - DirectoryListing
  - WebSocket
  - WebSocketHandler
- Indexable
- IndexError
- INI
- Int
  - Primitive
  - Signed
  - Unsigned
- Int16
- Int32
- Int64
- Int8
- InvalidByteSequenceError
- IO
  - Buffered
  - ByteFormat
    - BigEndian
    - LittleEndian
    - NetworkEndian
    - SystemEndian
  - Delimited
  - EncodingOptions
  - EOFError
  - Error
  - FileDescriptor
  - Hexdump
  - Memory
  - MultiWriter
  - Seek
  - Sized
  - Timeout
- IPSocket
- Iterable
- Iterator
  - IteratorWrapper
  - Stop
- JSON
  - Any
  - Builder
    - ArrayState
    - DocumentEndState
    - DocumentStartState
    - ObjectState
    - StartState
    - State
  - Error
  - Lexer
  - ParseException
  - Parser
  - PullParser
  - Token
  - Type
- KeyError
- Levenshtein
  - Finder
- LLVM
  - ABI
    - AArch64
    - ArgKind
    - ArgType
    - ARM
    - FunctionType
    - X86
    - X86_64
      - RegClass
  - AtomicOrdering
  - AtomicRMWBinOp
  - Attribute
  - AttributeIndex
  - BasicBlock
  - BasicBlockCollection
  - Builder
  - CallConvention
  - CodeGenFileType
  - CodeGenOptLevel
  - CodeModel
  - Context
  - DIBuilder
  - DIFlags
  - DwarfTag
  - DwarfTypeEncoding
  - Function
  - FunctionCollection
  - FunctionPassManager
    - Runner
  - GenericValue
  - GlobalCollection
  - InstructionCollection
  - IntPredicate
  - JITCompiler
  - Linkage
  - MemoryBuffer
  - Module
  - ModuleFlag
  - ModulePassManager
  - ParameterCollection
  - PassManagerBuilder
  - PassRegistry
  - PhiTable
  - RealPredicate
  - RelocMode
  - Target
  - TargetData
  - TargetMachine
  - Type
    - Kind
  - Value
    - Kind
  - ValueMethods
  - VerifierFailureAction
- Logger
  - Formatter
  - Severity
- Markdown
  - HTMLRenderer
  - Parser
    - PrefixHeader
    - UnorderedList
  - Renderer
- Math
- Mutex
- NamedTuple
- Nil
- Number
  - Primitive
- OAuth
  - AccessToken
  - Consumer
  - Error
  - RequestToken
- OAuth2
  - AccessToken
    - Bearer
    - Mac
  - Client
  - Error
  - Session
- Object
- OpenSSL
  - Digest
    - Error
    - UnsupportedError
  - DigestBase
  - Error
  - HMAC
  - MD5
  - SHA1
  - SSL
    - Context
      - Client
      - Server
    - Error
    - ErrorType
    - Modes
    - Options
    - Socket
      - Client
      - Server
    - VerifyMode
    - X509VerifyFlags
- OptionParser
  - Exception
  - InvalidOption
  - MissingOption
- PartialComparable
- Pointer
  - Appender
- PrettyPrint
- Proc
- Process
  - Env
  - Status
  - Stdio
  - Tms
- Random
  - MT19937
- Range
- Readline
  - CompletionProc
  - KeyBindingProc
- Reference
- Reflect
- Regex
  - MatchData
  - Options
- SecureRandom
- Set
- Signal
- Slice
- Socket
  - Address
  - Addrinfo
  - Error
  - Family
  - IPAddress
  - Protocol
  - Server
  - Type
  - UNIXAddress
- Spec
  - Expectations
  - Methods
  - ObjectExtensions
- StaticArray
- String
  - Builder
  - RawConverter
- StringPool
- StringScanner
- Struct
- Symbol
- System
- TCPServer
- TCPSocket
- Tempfile
- Termios
  - AttributeSelection
  - BaudRate
  - ControlMode
  - InputMode
  - LineControl
  - LocalMode
  - OutputMode
- Time
  - DayOfWeek
  - EpochConverter
  - EpochMillisConverter
  - Format
    - Error
  - Kind
  - MonthSpan
  - Span
- Tuple
- TypeCastError
- UDPSocket
- UInt16
- UInt32
- UInt64
- UInt8
- Unicode
  - CaseOptions
- Union
- UNIXServer
- UNIXSocket
- URI
  - Error
- Value
- WeakRef
- XML
  - Attributes
  - AttributeType
  - Builder
  - Error
  - HTMLParserOptions
  - Namespace
  - Node
  - NodeSet
  - ParserOptions
  - Reader
  - SaveOptions
  - Type
  - XPathContext
- YAML
  - Any
  - Builder
  - Error
  - EventKind
  - ParseException
  - Parser
  - PullParser
  - Type
- Zip
  - CompressionMethod
  - Error
  - File
    - Entry
  - FileInfo
  - Reader
    - Entry
  - Writer
    - Entry
- Zlib
  - Error
  - Reader
  - Writer

# module Math

## Extended Modules

- Math

## Defined in:

## Constant Summary

E = `LibM.exp_f64(1.0)`
LOG10 = `LibM.log_f64(10.0)`
LOG2 = `LibM.log_f64(2.0)`
PI = `3.14159265358979323846`

## Instance Method Summary

- #acos(value : Float32)

  Calculates the acos of value.

- #acos(value : Float64)

  Calculates the acos of value.

- #acos(value)

  Calculates the acos of value.

- #acosh(value : Float32)

  Calculates the acosh of value.

- #acosh(value : Float64)

  Calculates the acosh of value.

- #acosh(value)

  Calculates the acosh of value.

- #asin(value : Float32)

  Calculates the asin of value.

- #asin(value : Float64)

  Calculates the asin of value.

- #asin(value)

  Calculates the asin of value.

- #asinh(value)

  Calculates the asinh of value.

- #asinh(value : Float64)

  Calculates the asinh of value.

- #asinh(value : Float32)

  Calculates the asinh of value.

- #atan(value : Float32)

  Calculates the atan of value.

- #atan(value : Float64)

  Calculates the atan of value.

- #atan(value)

  Calculates the atan of value.

- #atan2(value1, value2)

  Calculates atan2 with parameters value1 and value2.

- #atan2(value1 : Float64, value2 : Float64)

  Calculates atan2 with parameters value1 and value2.

- #atan2(value1 : Float32, value2 : Float32)

  Calculates atan2 with parameters value1 and value2.

- #atanh(value)

  Calculates the atanh of value.

- #atanh(value : Float64)

  Calculates the atanh of value.

- #atanh(value : Float32)

  Calculates the atanh of value.

- #besselj(value1 : Int32, value2 : Float32)

  Calculates besselj with parameters value1 and value2.

- #besselj(value1 : Int32, value2 : Float64)

  Calculates besselj with parameters value1 and value2.

- #besselj(value1, value2)

  Calculates besselj with parameters value1 and value2.

- #besselj0(value)

  Calculates the besselj0 function of value.

- #besselj0(value : Float64)

  Calculates the besselj0 function of value.

- #besselj0(value : Float32)

  Calculates the besselj0 function of value.

- #besselj1(value : Float64)

  Calculates the besselj1 function of value.

- #besselj1(value)

  Calculates the besselj1 function of value.

- #besselj1(value : Float32)

  Calculates the besselj1 function of value.

- #bessely(value1, value2)

  Calculates bessely with parameters value1 and value2.

- #bessely(value1 : Int32, value2 : Float64)

  Calculates bessely with parameters value1 and value2.

- #bessely(value1 : Int32, value2 : Float32)

  Calculates bessely with parameters value1 and value2.

- #bessely0(value : Float32)

  Calculates the bessely0 function of value.

- #bessely0(value)

  Calculates the bessely0 function of value.

- #bessely0(value : Float64)

  Calculates the bessely0 function of value.

- #bessely1(value : Float32)

  Calculates the bessely1 function of value.

- #bessely1(value : Float64)

  Calculates the bessely1 function of value.

- #bessely1(value)

  Calculates the bessely1 function of value.

- #cbrt(value)

  Calculates the cbrt of value.

- #cbrt(value : Float32)

  Calculates the cbrt of value.

- #cbrt(value : Float64)

  Calculates the cbrt of value.

- #copysign(value1 : Float32, value2 : Float32)

  Calculates copysign with parameters value1 and value2.

- #copysign(value1 : Float64, value2 : Float64)

  Calculates copysign with parameters value1 and value2.

- #copysign(value1, value2)

  Calculates copysign with parameters value1 and value2.

- #cos(value)

  Calculates the cos of value.

- #cos(value : Float32)

  Calculates the cos of value.

- #cos(value : Float64)

  Calculates the cos of value.

- #cosh(value)

  Calculates the cosh of value.

- #cosh(value : Float32)

  Calculates the cosh of value.

- #cosh(value : Float64)

  Calculates the cosh of value.

- #erf(value : Float32)

  Calculates the erf of value.

- #erf(value : Float64)

  Calculates the erf of value.

- #erf(value)

  Calculates the erf of value.

- #erfc(value : Float32)

  Calculates the erfc of value.

- #erfc(value : Float64)

  Calculates the erfc of value.

- #erfc(value)

  Calculates the erfc of value.

- #exp(value : Float32)

  Calculates the exp of value.

- #exp(value : Float64)

  Calculates the exp of value.

- #exp(value)

  Calculates the exp of value.

- #exp2(value : Float32)

  Calculates the exp2 of value.

- #exp2(value : Float64)

  Calculates the exp2 of value.

- #exp2(value)

  Calculates the exp2 of value.

- #expm1(value : Float64)

  Calculates the expm1 of value.

- #expm1(value : Float32)

  Calculates the expm1 of value.

- #expm1(value)

  Calculates the expm1 of value.

- #gamma(value : Float32)

  Calculates the gamma function of value.

- #gamma(value)

  Calculates the gamma function of value.

- #gamma(value : Float64)

  Calculates the gamma function of value.

- #hypot(value1 : Float64, value2 : Float64)

  Calculates hypot with parameters value1 and value2.

- #hypot(value1 : Float32, value2 : Float32)

  Calculates hypot with parameters value1 and value2.

- #hypot(value1, value2)

  Calculates hypot with parameters value1 and value2.

- #ilogb(value : Float32)

  Calculates the ilogb of value.

- #ilogb(value : Float64)

  Calculates the ilogb of value.

- #ilogb(value)

  Calculates the ilogb of value.

- #ldexp(value1 : Float32, value2 : Int32)

  Calculates ldexp with parameters value1 and value2.

- #ldexp(value1 : Float64, value2 : Int32)

  Calculates ldexp with parameters value1 and value2.

- #ldexp(value1, value2)

  Calculates ldexp with parameters value1 and value2.

- #lgamma(value : Float64)

  Calculates the logarithmic gamma of value.

- #lgamma(value : Float32)

  Calculates the logarithmic gamma of value.

- #lgamma(value)

  Calculates the logarithmic gamma of value.

- #log(value)

  Calculates the log of value.

- #log(value : Float32)

  Calculates the log of value.

- #log(numeric, base)

  Returns the logarithm of numeric to the base base.

- #log(value : Float64)

  Calculates the log of value.

- #log10(value)

  Calculates the log10 of value.

- #log10(value : Float64)

  Calculates the log10 of value.

- #log10(value : Float32)

  Calculates the log10 of value.

- #log1p(value)

  Calculates the log1p of value.

- #log1p(value : Float64)

  Calculates the log1p of value.

- #log1p(value : Float32)

  Calculates the log1p of value.

- #log2(value)

  Calculates the log2 of value.

- #log2(value : Float64)

  Calculates the log2 of value.

- #log2(value : Float32)

  Calculates the log2 of value.

- #logb(value : Float32)

  Calculates the logb of value.

- #logb(value : Float64)

  Calculates the logb of value.

- #logb(value)

  Calculates the logb of value.

- #max(value1, value2)

  Returns the greater of value1 and value2.

- #min(value1, value2)

  Returns the smaller of value1 and value2.

- #pw2ceil(v)

  Computes the next highest power of 2 of v.

- #scalbln(value, exp)

  Multiplies value by 2 raised to power exp.

- #scalbln(value : Float64, exp : Int64)

  Multiplies value by 2 raised to power exp.

- #scalbln(value : Float32, exp : Int64)

  Multiplies value by 2 raised to power exp.

- #scalbn(value1, value2)

  Calculates scalbn with parameters value1 and value2.

- #scalbn(value1 : Float64, value2 : Int32)

  Calculates scalbn with parameters value1 and value2.

- #scalbn(value1 : Float32, value2 : Int32)

  Calculates scalbn with parameters value1 and value2.

- #sin(value : Float32)

  Calculates the sin of value.

- #sin(value : Float64)

  Calculates the sin of value.

- #sin(value)

  Calculates the sin of value.

- #sinh(value : Float32)

  Calculates the sinh of value.

- #sinh(value : Float64)

  Calculates the sinh of value.

- #sinh(value)

  Calculates the sinh of value.

- #sqrt(value : Float32)

  Calculates the sqrt of value.

- #sqrt(value : Float64)

  Calculates the sqrt of value.

- #sqrt(value)

  Calculates the sqrt of value.

- #tan(value : Float32)

  Calculates the tan of value.

- #tan(value : Float64)

  Calculates the tan of value.

- #tan(value)

  Calculates the tan of value.

- #tanh(value : Float32)

  Calculates the tanh of value.

- #tanh(value : Float64)

  Calculates the tanh of value.

- #tanh(value)

  Calculates the tanh of value.

## Instance Method Detail

def acos(value : Float32) #

Calculates the acos of value.

def acos(value : Float64) #

Calculates the acos of value.

def acos(value) #

Calculates the acos of value.

def acosh(value : Float32) #

Calculates the acosh of value.

def acosh(value : Float64) #

Calculates the acosh of value.

def acosh(value) #

Calculates the acosh of value.

def asin(value : Float32) #

Calculates the asin of value.

def asin(value : Float64) #

Calculates the asin of value.

def asin(value) #

Calculates the asin of value.

def asinh(value) #

Calculates the asinh of value.

def asinh(value : Float64) #

Calculates the asinh of value.

def asinh(value : Float32) #

Calculates the asinh of value.

def atan(value : Float32) #

Calculates the atan of value.

def atan(value : Float64) #

Calculates the atan of value.

def atan(value) #

Calculates the atan of value.

def atan2(value1, value2) #

Calculates atan2 with parameters value1 and value2.

def atan2(value1 : Float64, value2 : Float64) #

Calculates atan2 with parameters value1 and value2.

def atan2(value1 : Float32, value2 : Float32) #

Calculates atan2 with parameters value1 and value2.

def atanh(value) #

Calculates the atanh of value.

def atanh(value : Float64) #

Calculates the atanh of value.

def atanh(value : Float32) #

Calculates the atanh of value.

def besselj(value1 : Int32, value2 : Float32) #

Calculates besselj with parameters value1 and value2.

def besselj(value1 : Int32, value2 : Float64) #

Calculates besselj with parameters value1 and value2.

def besselj(value1, value2) #

Calculates besselj with parameters value1 and value2.

def besselj0(value) #

Calculates the besselj0 function of value.

def besselj0(value : Float64) #

Calculates the besselj0 function of value.

def besselj0(value : Float32) #

Calculates the besselj0 function of value.

def besselj1(value : Float64) #

Calculates the besselj1 function of value.

def besselj1(value) #

Calculates the besselj1 function of value.

def besselj1(value : Float32) #

Calculates the besselj1 function of value.

def bessely(value1, value2) #

Calculates bessely with parameters value1 and value2.

def bessely(value1 : Int32, value2 : Float64) #

Calculates bessely with parameters value1 and value2.

def bessely(value1 : Int32, value2 : Float32) #

Calculates bessely with parameters value1 and value2.

def bessely0(value : Float32) #

Calculates the bessely0 function of value.

def bessely0(value) #

Calculates the bessely0 function of value.

def bessely0(value : Float64) #

Calculates the bessely0 function of value.

def bessely1(value : Float32) #

Calculates the bessely1 function of value.

def bessely1(value : Float64) #

Calculates the bessely1 function of value.

def bessely1(value) #

Calculates the bessely1 function of value.

def cbrt(value) #

Calculates the cbrt of value.

def cbrt(value : Float32) #

Calculates the cbrt of value.

def cbrt(value : Float64) #

Calculates the cbrt of value.

def copysign(value1 : Float32, value2 : Float32) #

Calculates copysign with parameters value1 and value2.

def copysign(value1 : Float64, value2 : Float64) #

Calculates copysign with parameters value1 and value2.

def copysign(value1, value2) #

Calculates copysign with parameters value1 and value2.

def cos(value) #

Calculates the cos of value.

def cos(value : Float32) #

Calculates the cos of value.

def cos(value : Float64) #

Calculates the cos of value.

def cosh(value) #

Calculates the cosh of value.

def cosh(value : Float32) #

Calculates the cosh of value.

def cosh(value : Float64) #

Calculates the cosh of value.

def erf(value : Float32) #

Calculates the erf of value.

def erf(value : Float64) #

Calculates the erf of value.

def erf(value) #

Calculates the erf of value.

def erfc(value : Float32) #

Calculates the erfc of value.

def erfc(value : Float64) #

Calculates the erfc of value.

def erfc(value) #

Calculates the erfc of value.

def exp(value : Float32) #

Calculates the exp of value.

def exp(value : Float64) #

Calculates the exp of value.

def exp(value) #

Calculates the exp of value.

def exp2(value : Float32) #

Calculates the exp2 of value.

def exp2(value : Float64) #

Calculates the exp2 of value.

def exp2(value) #

Calculates the exp2 of value.

def expm1(value : Float64) #

Calculates the expm1 of value.

def expm1(value : Float32) #

Calculates the expm1 of value.

def expm1(value) #

Calculates the expm1 of value.

def gamma(value : Float32) #

Calculates the gamma function of value.

Note that `#gamma(n)` is same as `fact(n - 1)` for integer `n > 0`. However `#gamma(n)` returns float and can be an approximation.

def gamma(value) #

Calculates the gamma function of value.

Note that `#gamma(n)` is same as `fact(n - 1)` for integer `n > 0`. However `#gamma(n)` returns float and can be an approximation.

def gamma(value : Float64) #

Calculates the gamma function of value.

Note that `#gamma(n)` is same as `fact(n - 1)` for integer `n > 0`. However `#gamma(n)` returns float and can be an approximation.

def hypot(value1 : Float64, value2 : Float64) #

Calculates hypot with parameters value1 and value2.

def hypot(value1 : Float32, value2 : Float32) #

Calculates hypot with parameters value1 and value2.

def hypot(value1, value2) #

Calculates hypot with parameters value1 and value2.

def ilogb(value : Float32) #

Calculates the ilogb of value.

def ilogb(value : Float64) #

Calculates the ilogb of value.

def ilogb(value) #

Calculates the ilogb of value.

def ldexp(value1 : Float32, value2 : Int32) #

Calculates ldexp with parameters value1 and value2.

def ldexp(value1 : Float64, value2 : Int32) #

Calculates ldexp with parameters value1 and value2.

def ldexp(value1, value2) #

Calculates ldexp with parameters value1 and value2.

def lgamma(value : Float64) #

Calculates the logarithmic gamma of value.

    Math.lgamma(2.96)

is the same as

    Math.log(Math.gamma(2.96).abs)

def lgamma(value : Float32) #

Calculates the logarithmic gamma of value.

    Math.lgamma(2.96)

is the same as

    Math.log(Math.gamma(2.96).abs)

def lgamma(value) #

Calculates the logarithmic gamma of value.

    Math.lgamma(2.96)

is the same as

    Math.log(Math.gamma(2.96).abs)

def log(value) #

Calculates the log of value.

def log(value : Float32) #

Calculates the log of value.

def log(numeric, base) #

Returns the logarithm of numeric to the base base.

def log(value : Float64) #

Calculates the log of value.

def log10(value) #

Calculates the log10 of value.

def log10(value : Float64) #

Calculates the log10 of value.

def log10(value : Float32) #

Calculates the log10 of value.

def log1p(value) #

Calculates the log1p of value.

def log1p(value : Float64) #

Calculates the log1p of value.

def log1p(value : Float32) #

Calculates the log1p of value.

def log2(value) #

Calculates the log2 of value.

def log2(value : Float64) #

Calculates the log2 of value.

def log2(value : Float32) #

Calculates the log2 of value.

def logb(value : Float32) #

Calculates the logb of value.

def logb(value : Float64) #

Calculates the logb of value.

def logb(value) #

Calculates the logb of value.

def max(value1, value2) #

Returns the greater of value1 and value2.

def min(value1, value2) #

Returns the smaller of value1 and value2.

def pw2ceil(v) #

Computes the next highest power of 2 of v.

    Math.pw2ceil(33) # => 64

def scalbln(value, exp) #

Multiplies value by 2 raised to power exp.

def scalbln(value : Float64, exp : Int64) #

Multiplies value by 2 raised to power exp.

def scalbln(value : Float32, exp : Int64) #

Multiplies value by 2 raised to power exp.

def scalbn(value1, value2) #

Calculates scalbn with parameters value1 and value2.

def scalbn(value1 : Float64, value2 : Int32) #

Calculates scalbn with parameters value1 and value2.

def scalbn(value1 : Float32, value2 : Int32) #

Calculates scalbn with parameters value1 and value2.

def sin(value : Float32) #

Calculates the sin of value.

def sin(value : Float64) #

Calculates the sin of value.

def sin(value) #

Calculates the sin of value.

def sinh(value : Float32) #

Calculates the sinh of value.

def sinh(value : Float64) #

Calculates the sinh of value.

def sinh(value) #

Calculates the sinh of value.

def sqrt(value : Float32) #

Calculates the sqrt of value.

def sqrt(value : Float64) #

Calculates the sqrt of value.

def sqrt(value) #

Calculates the sqrt of value.

def tan(value : Float32) #

Calculates the tan of value.

def tan(value : Float64) #

Calculates the tan of value.

def tan(value) #

Calculates the tan of value.

def tanh(value : Float32) #

Calculates the tanh of value.

def tanh(value : Float64) #

Calculates the tanh of value.

def tanh(value) #

Calculates the tanh of value.