nextafter

Autres langues

Langue: ja

Version: 2002-08-10 (openSuse - 09/10/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 ¤Ç¥ê¥ó¥¯¤¹¤ë¡£

ÀâÌÀ

nextafter() ´Ø¿ô·²¤Ï¡¢y ¤Ë¸þ¤«¤Ã¤Æ x ¤Î¤¹¤°ÎÙ¤ÎÉâÆ°¾®¿ôÅÀ¿ôɽ¸½¤òÊÖ¤¹¡£ x ¤ÈÊÖ¤êÃͤκ¹Ê¬¤Ï¡¢ÊÖ¤êÃͤη¿¤Ë°Í¸¤¹¤ë¡£ x = y ¤Î¾ì¹ç¡¢y ¤ò¤½¤Î¤Þ¤ÞÊÖ¤¹¡£ °ú¿ô¤Î¤É¤Á¤é¤«¤ÎÃͤ¬ NaN(̵¸úÃÍ) ¤Î¾ì¹ç¡¢ NaN ¤òÊÖ¤¹¡£¤½¤ì°Ê³°¤Î¾ì¹ç¡¢²¾¿ôÉô¤ÎºÇ²¼°Ì¥Ó¥Ã¥È¤ËÂбþ¤¹¤ëÃͤÎʬ¤À¤±¡¢ Êý¸þ¤Ë±þ¤¸¤Æ²Ã¸º»»¤·¤¿ÃͤòÊÖ¤¹¡£

nexttoward() ´Ø¿ô·²¤Ï¡¢2 ÈÖÌܤΰú¤­¿ô¤¬ long double ·¿¤Ç¤¢¤ëÅÀ°Ê³°¡¢ nextafter() ´Ø¿ô·²¤ÈƱ¤¸¤Ï¤¿¤é¤­¤ò¤¹¤ë¡£

¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢·ë²Ì¤¬ÉâÆ°¾®¿ôÅÀ¤ÎÀµµ¬²½¤ÎÈϰϳ°¤Ë¤Ê¤Ã¤¿¾ì¹ç¡¢ ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤Þ¤¿¤Ï¥¢¥ó¥À¡¼¥Õ¥í¡¼¤ò¥·¥°¥Ê¥ë¤ÇÄÌÃΤ¹¤ë¡£

½àµò

C99¡£¤³¤Î´Ø¿ô¤Ï IEC 559 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£ (¤Þ¤¿ IEEE 754/IEEE 854 ¤Ç¤ÏÉÕÏ¿¤Ç¿ä¾©´Ø¿ô¤È¤·¤ÆÄêµÁ¤µ¤ì¤Æ¤¤¤ë)

´ØÏ¢¹àÌÜ

nearbyint(3)