The default rounding mode of the fpu is " round toward nearest . " using Fpu的默認(rèn)舍入模式為“舍入為最接近的整數(shù)” 。使用
The rounding mode will be one of four as documented in intel reference manuals 舍入模式應(yīng)是記錄在intel參考手冊中的四種模式之一:
Results in generation of the fistp instruction , which uses whatever ambient rounding mode is to do the conversion 導(dǎo)致生成fistp指令,該指令可使用任意環(huán)境舍入模式執(zhí)行該轉(zhuǎn)換。
You should thoroughly test the portions of your code that are sensitive to rounding modes before relying upon code built with 生成的代碼前,要徹底測試對舍入模式敏感的代碼部分。
And the compiler performs a floating - point calculation , the rounding mode you specified will not be in effect unless 更改舍入模式,并且編譯器執(zhí)行浮點計算,則指定的舍入模式將無效,除非打開
Function ensures the rounding mode of the floating - point unit is toward zero truncate , by setting bits 10 and 11 of the control word 函數(shù)還通過設(shè)置控制字的第10位和第11位來確保浮點單元( fpu )的舍入模式為向零方向(截斷) 。
The floating - point status and control register fpscr captures status and exceptions resulting from floating - point operations , and the fpscr also provides control bits for enabling specific exception types , as well as for selecting one of the four rounding modes 浮點狀態(tài)和控制寄存器( fpscr )捕獲浮點操作的狀態(tài)和異常結(jié)果, fpscr還具有控制位,以支持特定的異常類型和對四種舍入模式之一的選擇。