This is the latest docs version
Quick Links
  • -Overview
  • -Language Features
  • -JS Interop
  • -Build System
Documentation
Language Manual
Reference for all language features
ReScript & React
First class bindings for ReactJS
GenType
Seamless TypeScript integration
Reanalyze
Dead Code & Termination analysis
Exploration
Packages
Explore third party libraries and bindings
Syntax Lookup
Discover all syntax constructs
APIPlaygroundBlogCommunity
  • Playground
  • Blog
  • Twitter
  • GitHub
  • Forum
Core Module
Overview
Core
submodules
  • Array
  • ArrayBuffer
  • AsyncIterator
  • BigInt
  • BigInt64Array
    • Constants
    BigUint64Array
    • Constants
  • Console
  • DataView
  • Date
    • UTC
  • Dict
  • Error
    • URIError
    • TypeError
    • SyntaxError
    • ReferenceError
    • RangeError
    • EvalError
  • Exn
  • Float
    • Constants
    Float32Array
    • Constants
    Float64Array
    • Constants
    Int
    • Constants
    Int16Array
    • Constants
    Int32Array
    • Constants
    Int8Array
    • Constants
  • Internal
  • Intl
    • Segments
    • Segmenter
    • RelativeTimeFormat
    • PluralRules
    • NumberFormat
      • Grouping
    • Locale
    • ListFormat
    • DateTimeFormat
    • Collator
    • Common
  • Iterator
  • JSON
    • Decode
    • Encode
    • Classify
  • List
  • Map
  • MapperRt
  • Math
    • Int
    • Constants
      • v
        e
      • v
        ln2
      • v
        ln10
      • v
        log2e
      • v
        log10e
      • v
        pi
      • v
        sqrt1_2
      • v
        sqrt2
  • Null
  • Nullable
  • Object
  • Option
  • Ordering
  • Promise
  • Re
    • Result
    RegExp
    • Result
  • Result
  • Set
  • String
  • Symbol
  • Type
    • Classify
  • TypedArray
  • Uint16Array
    • Constants
    Uint32Array
    • Constants
    Uint8Array
    • Constants
    Uint8ClampedArray
    • Constants
  • WeakMap
  • WeakSet
  • API / Core / Math / Constants

    Constants

    Mathematical Constants

    e

    RESCRIPT
    let e: float

    Math.Constants.e returns Euler's number, ≈ 2.718281828459045. See Math.E on MDN.

    Examples

    RESCRIPT
    Math.Constants.e

    ln2

    RESCRIPT
    let ln2: float

    Math.Constants.ln2 returns Natural logarithm of 2, ≈ 0.6931471805599453. See Math.LN2 on MDN.

    Examples

    RESCRIPT
    Math.Constants.ln2

    ln10

    RESCRIPT
    let ln10: float

    Math.Constants.ln10 returns Natural logarithm of 10, ≈ 2.302585092994046. See Math.LN10 on MDN.

    Examples

    RESCRIPT
    Math.Constants.ln10

    log2e

    RESCRIPT
    let log2e: float

    Math.Constants.log2e returns Base 2 logarithm of E, ≈ 1.4426950408889634. See Math.LOG2E on MDN.

    Examples

    RESCRIPT
    Math.Constants.log2e

    log10e

    RESCRIPT
    let log10e: float

    Math.Constants.log10e returns Base 10 logarithm of E, ≈ 0.4342944819032518. See Math.LOG10E on MDN.

    Examples

    RESCRIPT
    Math.Constants.log10e

    pi

    RESCRIPT
    let pi: float

    Math.Constants.pi returns Pi - ratio of the circumference to the diameter of a circle, ≈ 3.141592653589793. See Math.PI on MDN.

    Examples

    RESCRIPT
    Math.Constants.pi

    sqrt1_2

    RESCRIPT
    let sqrt1_2: float

    Math.Constants.sqrt1_2 returns Square root of 1/2, ≈ 0.7071067811865476. See Math.SQRT1_2 on MDN.

    Examples

    RESCRIPT
    Math.Constants.sqrt1_2

    sqrt2

    RESCRIPT
    let sqrt2: float

    Math.Constants.e returns Absolute value for integer argument. See Math.abs on MDN.

    Examples

    RESCRIPT
    Math.Constants.sqrt2
    Types and values
    • v
      e
    • v
      ln2
    • v
      ln10
    • v
      log2e
    • v
      log10e
    • v
      pi
    • v
      sqrt1_2
    • v
      sqrt2

    © 2024 The ReScript Project

    Software and assets distribution powered by KeyCDN.

    About
    • Community
    • ReScript Association
    Find us on