fastmath 演算ルーチンの使い方

提供: RAD Studio
移動先: 案内検索

fastmath.h:インデックス への移動


ヘッダーファイル

fastmath.h

カテゴリ

演算ルーチン

説明

FastMath ルーチンは,ほとんどのエラー条件をチェックせず,matherr も呼び出さない,高速の演算ルーチンです。これは最高の速度を実現するように作成されています。これらの関数は RTLDLL からエクスポートされません。つまり,作成される PE ファイルに常に直接リンクされます。

fastmath.h をインクルードすると,次の算術関数が fastmath 関数に再マップされます。



演算ルーチン

Fastmath ルーチン

演算ルーチン

Fastmath ルーチン

acos

_fm_acos

asin

_fm_asin

atan

_fm_atan

atan2

_fm_atan2

cos

_fm_cos

cosh

_fm_cosh

exp

_fm_exp

fabs

_fm_fabs

asin

_fm_asin

atan

_fm_atan

atan2

_fm_atan2

cos

_fm_cos

cosh

_fm_cosh

exp

_fm_exp

fabs

_fm_fabs

frexp

_fm_frexp

hypot

_fm_hypot

ldexp

_fm_ldexp

log

_fm_log

log10

_fm_log10

sin

_fm_sin

sinh

_fm_sinh

sqrt

_fm_sqr

tan

_fm_tan

tanh

_fm_tanh

sincos

_fm_sincos

acosl

_fm_acosl

asinl

_fm_asinl

atan2l

_fm_atan2l

atanl

_fm_atanl

coshl

_fm_coshl

cosl

_fm_cosl

expl

_fm_expl

fabsl

_fm_fabsl

frexpl

_fm_frexpl

hypotl

_fm_hypotl

ldexpl

_fm_ldexpl

log10l

_fm_log10l

logl

_fm_logl

sinhl

_fm_sinhl

sinl

_fm_sinl

sqrtl

_fm_sqrtl

tanhl

_fm_tanhl

tanl

_fm_tanl

sincosl

_fm_sincosl

atanhl

_fm_atanhl

acoshl

_fm_acoshl

asinhl

_fm_asinhl



標準 C 関数名を FastMath バージョンに再マップしない場合は,_FM_NO_REMAP を定義します。その場合でも,_fm_xxx の名前で FastMath ルーチンを呼び出すことができます。

FastMath には次の関数が追加されています。これは,通常の RTL では直接サポートされません。

void _FMAPI _fm_sincos(double __a, double *__x, double *__y);

void _FMAPI _fm_sincosl(long double __a, long double *__x, long double *__y);

long double _FMAPI _fm_atanhl (long double __x);

long double _FMAPI _fm_acoshl (long double __x);

long double _FMAPI _fm_asinhl (long double __x);

__inline void _fm_fwait(void)

unsigned int _FMAPI _fm_init(void);

_fm_fwait は,組み込み FWAIT 命令を実行する特殊なインライン関数です。

_Fm_init は,FastMath ルーチンを使用する前に,すべての FPU 例外をマスクするために呼び出すことができる関数です。