名前空間
変種
操作

Floating-point environment

提供: cppreference.com
< cpp‎ | numeric

 
 
ニューメリックスライブラリ
一般的な数学関数
浮動小数点環境
複素数
数値配列
擬似乱数生成
コンパイル時有理数演算 (C++11)
汎用の数値演算
Original:
Generic numeric operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iota(C++11)
accumulate
inner_product
adjacent_difference
partial_sum
 
浮動小数点環境
機能します
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
feclearexcept(C++11)
fetestexcept(C++11)
feraiseexcept(C++11)
fegetexceptflag
fesetexceptflag
(C++11)
(C++11)
fegetround
fesetround
(C++11)
(C++11)
fegetenv
fesetenv
(C++11)
feholdexcept(C++11)
feupdateenv(C++11)
マクロ定数
Original:
Macro constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
FE_ALL_EXCEPT
FE_DIVBYZERO
FE_INEXACT
FE_INVALID
FE_OVERFLOW
FE_UNDERFLOW
(C++11)
FE_DOWNWARD
FE_TONEAREST
FE_TOWARDZERO
FE_UPWARD
(C++11)
FE_DFL_ENV(C++11)
 
浮動小数点環境では、浮動小数点ステータスフラグと実装によってサポートされる制御モードのセットです。それはスレッドローカルで、各スレッドは親スレッドから浮動小数点環境の初期状態を継承します。浮動小数点演算では、異常な結果や補助的な情報を示すために、浮動小数点ステータスフラグを変更します。浮動小数点の制御モードの状態はいくつかの浮動小数点演算の結果に影響を及ぼし.
Original:
The floating-point environment is the set of floating-point status flags and control modes supported by the implementation. It is thread-local, each thread inherits the initial state of its floating-point environment from the parent thread. Floating-point operations modify the floating-point status flags to indicate abnormal results or auxiliary information. The state of floating-point control modes affects the outcomes of some floating-point operations.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
浮動小数点環境へのアクセスと変更は #pragma STDC FENV_ACCESSONに設定されている場合にのみ意味があります。そうしないと実装は、浮動小数点制御モードは、常にデフォルトのものであり、その浮動小数点ステータスフラグがテストされたり変更されたことはないと仮定することは自由である。実際には、いくつかの現在のコンパイラでは、明示的#pragmaをサポートしていますが、ほとんどのコンパイラはとにかく浮動小数点環境への意味のあるアクセスを可能にする.
Original:
The floating-point environment access and modification is only meaningful when #pragma STDC FENV_ACCESS is set to ON. Otherwise the implementation is free to assume that floating-point control modes are always the default ones and that floating-point status flags are never tested or modified. In practice, few current compilers support the #pragma explicitly, but most compilers allow meaningful access to the floating-point environment anyway.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

[編集] タイプ

Defined in header <cfenv>
fenv_t
浮動小数点環境全体を​​表す型
Original:
The type representing the entire floating-point environment
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
fexcept_t
総称して、すべての浮動小数点状態フラグを表す型
Original:
The type representing all floating-point status flags collectively
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 機能します

指定された浮動小数点ステータスフラグをクリアします
Original:
clears the specified floating-point status flags
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数) [edit]
設定されている指定された浮動小数点状態フラグのかを決定します
Original:
determines which of the specified floating-point status flags are set
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数) [edit]
指定された浮動小数点例外を発生させます
Original:
raises the specified floating-point exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数) [edit]
から、または浮動小数点環境への指定された浮動小数点ステータスフラグの状態をコピーします
Original:
copies the state of the specified floating-point status flags from or to the floating-point environment
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数) [edit]
(C++11)
(C++11)
丸め方向を取得または設定します
Original:
gets or sets rounding direction
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数) [edit]
現在の浮動小数点環境を保存したり復元します
Original:
saves or restores the current floating point environment
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数) [edit]
環境を保存し、すべてのステータスフラグをクリアし、今後のすべてのエラーを無視します
Original:
saves the environment, clears all status flags and ignores all future errors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数) [edit]
浮動小数点環境を復元し、以前に例外を発生させることが発生します
Original:
restores the floating-point environment and raises the previously raise exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数) [edit]

[編集] マクロ

浮動小数点例外
Original:
floating-point exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(マクロ定数) [edit]
浮動小数点の丸め方向
Original:
floating-point rounding direction
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(マクロ定数) [edit]
デフォルトの浮動小数点環境
Original:
default floating-point environment
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(マクロ定数) [edit]

[編集] ノート

浮動小数点例外はC + +の例外とは関係ありません。浮動小数点演算は、浮動小数点例外、std::fetestexceptでテストしたが、ほとんどの実装上のC + +プログラムの実行が中断されずに継続できる浮動小数点環境の変化の状況が発生したときに.
Original:
The floating-point exceptions are not related to the C++ exceptions. When a floating-point operation raises a floating-point exception, the status of the floating-point environment changes, which can be tested with std::fetestexcept, but the execution of a C++ program on most implementations continues uninterrupted.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
浮動小数点例外が発生するたびにC + +の例外を自動的に生成するために用いることができるコンパイラの拡張機能があります
Original:
There are compiler extensions that may be used to generate C++ exceptions automatically whenever a floating-point exception is raised:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • GNU libcの関数feenableexcept()は信号SIGFPEを生成する浮動小数点例外のトラップを有効にします。コンパイラオプション-fnon-call-exceptionsが使用された場合は、そのシグナルのハンドラは、ユーザ定義のC + +の例外をスローすることがあります.
    Original:
    GNU libc function feenableexcept() enables trapping of the floating-point exceptions, which generates the signal SIGFPE. If the compiler option -fnon-call-exceptions was used, the handler for that signal may throw a user-defined C++ exception.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • マイクロソフトWinAPIの関数_control87()_set_se_translatorとC + +例外に変換することができ、ハードウェア例外を生成し、浮動小数点例外のトラップを有効にします.
    Original:
    Microsoft WinAPI function _control87() enables trapping of the floating-point exceptions, which generates a hardware exception, which can be converted to C++ exceptions with _set_se_translator.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.