Fastmath-Routinen verwenden

Aus RAD Studio
Wechseln zu: Navigation, Suche

Nach oben zu fastmath.h - Index

Header-Datei

fastmath.h

Kategorie

Mathematische Routinen

Beschreibung

Bei den FastMath-Routinen handelt es sich um leistungsstarke mathematische Routinen, die die meisten Fehlerbedingungen nicht überprüfen und matherr nie aufrufen. Sie sind auf optimale Geschwindigkeit ausgelegt. Diese Funktionen werden nie aus der RTLDLL exportiert, und das bedeutet, dass sie immer direkt mit der PE-Datei verknüpft werden, die gerade erstellt wird.

Wenn fastmath.h eingebunden wird, werden die folgenden mathematischen Routinen diesen Fastmath-Funktionen zugeordnet.



Math-Routine

Fastmath-Routine

Math-Routine

Fastmath-Routine

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



Wenn die Standard-C-Funktionsnamen den FastMath-Versionen nicht zugeordnet werden sollen, definieren Sie _FM_NO_REMAP. Die FastMath-Routinen können anschließend noch über ihre _fm_xxx-Namen aufgerufen werden.

Die folgenden zusätzlichen Funktionen sind in FastMath verfügbar. Sie werden durch die normale RTL nicht unterstützt:

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 ist eine spezielle Inline-Funktion, die eine intrinsische FWAIT-Instruktion ausführt.

_Fm_init ist eine Funktion, die aufgerufen werden kann, um alle fpu-Exceptions vor der Verwendung von FathMath-Routinen zu maskieren.