lrint

Returns the value of x rounded using the specified rounding _mode. If no rounding _mode is specified the default context rounding _mode is used instead.

  1. long lrint(D x, RoundingMode mode)
  2. long lrint(D x)
    long
    lrint
    (
    D
    )
    (
    auto const ref D x
    )

Throws

InvalidOperationExceptionx is NaN or ±∞
OverflowExceptionresult is too big to be represented
InexactExceptionthe result is inexact

Special values

xlrint(x)
NaN0
-∞long.min
+∞long.max

Meta