Rechercher une page de manuel
nextafter
Langue: ja
Version: 2007-07-26 (fedora - 25/11/07)
Section: 3 (Bibliothèques de fonctions)
名前
nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl - 浮動小数点数の操作書式
#include <math.h>double nextafter(double x, double y);
float nextafterf(float x, float y);
long double nextafterl(long double x, long double y);
double nexttoward(double x, long double y);
float nexttowardf(float x, long double y);
long double nexttowardl(long double x, long double y);
-lm でリンクする。
glibc 向けの機能検査マクロの要件 (feature_test_macros(7) 参照):
All functions shown above: _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE; or cc -std=c99
説明
nextafter() 関数群は、y に向かって x のすぐ隣の浮動小数点数表現を返す。 x と返り値の差分は、返り値の型に依存する。 x = y の場合、y をそのまま返す。 引数のどちらかの値が NaN(無効値) の場合、 NaN を返す。それ以外の場合、仮数部の最下位ビットに対応する値の分だけ、 方向に応じて加減算した値を返す。nexttoward() 関数群は、2 番目の引き数が long double 型である点以外、 nextafter() 関数群と同じはたらきをする。
これらの関数は、結果が浮動小数点の正規化の範囲外になった場合、 オーバーフローまたはアンダーフローをシグナルで通知する。
準拠
C99。この関数は IEC 559 で定義されている。 (また IEEE 754/IEEE 854 では付録で推奨関数として定義されている)関連項目
nearbyint(3)Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre