3 ms·
I am probably dating myself here, but in C the default rounding mode is round-to-nearest and the cost of switching the x86 FPU to truncate (and back) in order t
by RossBencina 1mo ago
I am probably dating myself here, but in C the default rounding mode is round-to-nearest and the cost of switching the x86 FPU to truncate (and back) in order to perform the truncation is extremely expensive. Perhaps other instruction sets have truncate-to-integer instructions that ignore the active rounding mode.