Function |to_i128

conv/f64::|to_i128


Usage

|to_i128(value, pos_infinity, neg_infinity, nan)

Parameters

↳ value: f64
↳ pos_infinity: i128
↳ neg_infinity: i128
↳ nan: i128

Return

↴ i128


Turns f64 into i128.

f64 is truncated to fit into i128, and in case floating-point value does not describe a real number:

  • pos_infinity is used when f64 is a positive infinity,
  • neg_infinity is used when f64 is a negative infinity,
  • nan is used when f64 is not a number.