Skip to main content

Module fx

Module fx 

Source

Functionsยง

ceil_i
cvt
cvtss2si: round to nearest, ties to even (the default MXCSR mode)
cvtd
cvtsd2si (32-bit): round to nearest even (0x80000000 for NaN / out of range)
cvtd64
cvtsd2si (64-bit): round to nearest even (i64::MIN for NaN / out of range)
cvtt
cvttss2si: truncate towards zero (0x80000000 for NaN / out of range)
cvttd
cvttsd2si (32-bit): truncate towards zero (0x80000000 for NaN / out of range)
cvttd64
cvttsd2si (64-bit): truncate (i64::MIN for NaN / out of range)
div255
round(x / 255) for x in 0..=65025: ((x + 128) * 257) >> 16 (pmulhuw), equal to (x + 128 + ((x + 128) >> 8)) >> 8
floor_i
floor / ceil the way f_floor / f_ceil do it: truncate, then step if needed
maxsd
maxsd a, b: a > b ? a : b (b when unordered)
maxss
maxss a, b: a > b ? a : b (b when unordered)
minsd
minsd a, b: a < b ? a : b (b when unordered)
minss
minss a, b: a < b ? a : b (b when unordered)
sqrt
sqrtd
sqrtsd