1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
|
.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
.\" <mtk.manpages@gmail.com>
.\" Distributed under GPL
.\" Based on glibc infopages
.\"
.\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI all rights reserved.
.\" Translated Mon Jan 27 2003 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\"
.\"WORD: mantissa
.\"WORD: normalized 줿
.\"WORD: subnormal
.\"
.TH NEXTAFTER 3 2008-10-06 "GNU" "Linux Programmer's Manual"
.SH ̾
nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl \-
ư
.SH
.B #include <math.h>
.sp
.BI "double nextafter(double " x ", double " y );
.br
.BI "float nextafterf(float " x ", float " y );
.br
.BI "long double nextafterl(long double " x ", long double " y );
.sp
.BI "double nexttoward(double " x ", long double " y );
.br
.BI "float nexttowardf(float " x ", long double " y );
.br
.BI "long double nexttowardl(long double " x ", long double " y );
.sp
\fI\-lm\fP ǥ롣
.sp
.in -4n
glibc εǽޥ
.RB ( feature_test_macros (7)
):
.in
.sp
.ad l
.BR nextafter ():
_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _ISOC99_SOURCE; or
.I cc\ -std=c99
.br
.BR nextafterf (),
.BR nextafterl ():
_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
.I cc\ -std=c99
.br
.BR nexttoward (),
.BR nexttowardf (),
.BR nexttowardl ():
_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE;
.I cc\ -std=c99
.ad b
.SH
.BR nextafter ()
ؿϡ\fIy\fP ˸ \fIx\fP Τưɽ֤
.I y
.I x
꾮硢
.I y
꾮ưɽ֤ͤ
\fIx\fP \fIy\fP 硢\fIy\fP ֤롣
.BR nexttoward ()
ؿϡ2 ܤΰ
.I long double
Ǥʳ
.BR nextafter ()
ؿƱϤ餭롣
.SH ֤
ȡδؿ \fIy\fP ˸ \fIx\fP
ưɽ֤
.I x
.I y
硢
.RI ( x
Ʊ˥㥹Ȥ줿)
.I y
֤롣
.I x
.I y
NaN ξ硢NaN ֤롣
.I x
ͭͤ
.\" e.g., DBL_MAX
̤Сե硢
ϰϥ顼 (range error) ȯ
ƴؿϤ줾
.BR HUGE_VAL ,
.BR HUGE_VALF ,
.B HUGE_VALL
֤֤ͤˤϿŪ椬Ϳ롣
.I x
.I y
ƱǤϤʤؿη̤եξ硢
ϰϥ顼ȯ
(ɽǽʾˤ) ͤ(Ǥʤˤ) 0.0 ֤롣
.SH 顼
δؿƤӽФݤ˥顼ȯȽˡˤĤƤξ
.BR math_error (7)
ȤΤȡ
.PP
ʲΥ顼ȯǽ롣
.TP
ϰϥ顼: ̤ΥСե
.\" e.g., nextafter(DBL_MAX, HUGE_VAL);
.\" .I errno
.\" is set to
.\" .BR ERANGE .
Сեư㳰
.RB ( FE_OVERFLOW )
夬롣
.TP
ϰϥ顼: ̤ե
.\" e.g., nextafter(DBL_MIN, 0.0);
.\" .I errno
.\" is set to
.\" .BR ERANGE .
եư㳰
.RB ( FE_UNDERFLOW )
夬롣
.PP
δؿ
.I errno
ꤷʤ
.\" FIXME . Is it intentional that these functions do not set errno?
.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6799
.SH
C99, POSIX.1-2001.
δؿ IEC 559 Ƥ롣
(ޤ IEEE 754/IEEE 854 ǤϿǿ侩ؿȤƤ)
.SH Х
glibc С 2.5 Ǥϡեȯݤˡ
δؿϥեư㳰
.RB ( FE_UNDERFLOW )
夬ʤ
.SH Ϣ
.BR nearbyint (3)
|