Decimal.toLong

long toLong( ref DecimalContext ctx) const @safe pure nothrow @nogc

Integer conversion with context rounding: fractional parts round per the mode (ROUNDED/INEXACT); NaN, infinity and magnitudes beyond long set INVALID_OPERATION and return 0 (the IEEE default-result discipline).