1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
5 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
6 .\" Distributed under GPL
9 .\" Based on glibc infopages
11 .\"*******************************************************************
13 .\" This file was generated with po4a. Translate the source file.
15 .\"*******************************************************************
17 .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI all rights reserved.
18 .\" Translated Mon Jan 27 2003 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
19 .\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
21 .TH NEXTAFTER 3 2013\-09\-02 GNU "Linux Programmer's Manual"
23 nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl \-
26 \fB#include <math.h>\fP
28 \fBdouble nextafter(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB);\fP
30 \fBfloat nextafterf(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB);\fP
32 \fBlong double nextafterl(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
34 \fBdouble nexttoward(double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
36 \fBfloat nexttowardf(float \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
38 \fBlong double nexttowardl(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
43 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照):
49 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
51 or \fIcc\ \-std=c99\fP
54 \fBnextafterf\fP(), \fBnextafterl\fP():
56 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE
57 || _POSIX_C_SOURCE\ >=\ 200112L;
59 or \fIcc\ \-std=c99\fP
62 \fBnexttoward\fP(), \fBnexttowardf\fP(), \fBnexttowardl\fP():
64 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
66 or \fIcc\ \-std=c99\fP
70 The \fBnextafter\fP(), \fBnextafterf\fP(), and \fBnextafterl\fP() functions return
71 the next representable floating\-point value following \fIx\fP in the direction
72 of \fIy\fP. If \fIy\fP is less than \fIx\fP, these functions will return the largest
73 representable number less than \fIx\fP.
75 \fIx\fP が \fIy\fP と等しい場合、\fIy\fP が返される。
77 The \fBnexttoward\fP(), \fBnexttowardf\fP(), and \fBnexttowardl\fP() functions do
78 the same as the corresponding \fBnextafter\fP() functions, except that they
79 have a \fIlong double\fP second argument.
81 成功すると、これらの関数は \fIy\fP に向かう方向で \fIx\fP の すぐ次の浮動小数点数表現を返す。
83 \fIx\fP が \fIy\fP と等しい場合、 (\fIx\fP と同じ型にキャストされた) \fIy\fP が返される。
85 \fIx\fP か \fIy\fP が NaN の場合、NaN が返される。
88 \fIx\fP が有限値で 結果がオーバーフローする場合、 範囲エラー (range error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP,
89 \fBHUGE_VALF\fP, \fBHUGE_VALL\fP を返す。返り値には数学的に正しい符号が付与される。
91 \fIx\fP が \fIy\fP と同じではなく、正しい関数の結果が非正規化数かゼロかアンダーフローの場合、 範囲エラーが発生し、 (表現可能な場合には)
92 正しい値が、(そうでない場合には) 0.0 が返される。
94 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7) を参照のこと。
98 範囲エラー (range error): 結果のオーバーフロー
99 .\" e.g., nextafter(DBL_MAX, HUGE_VAL);
103 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP) が上がる。
105 範囲エラー: 結果が非正規化数かアンダーフロー
106 .\" e.g., nextafter(DBL_MIN, 0.0);
110 アンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP) が上がる。
112 .\" FIXME . Is it intentional that these functions do not set errno?
113 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6799
114 これらの関数は \fIerrno\fP を設定しない。
116 .SS "マルチスレッディング (pthreads(7) 参照)"
117 The \fBnextafter\fP(), \fBnextafterf\fP(), \fBnextafterl\fP(), \fBnexttoward\fP(),
118 \fBnexttowardf\fP(), and \fBnexttowardl\fP() functions are thread\-safe.
120 C99, POSIX.1\-2001. この関数は IEC 559 で定義されている (また IEEE 754/IEEE 854
121 では付録で推奨関数として定義されている)。
123 glibc バージョン 2.5 以前では、アンダーフローが発生した際に、 これらの関数はアンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP)
128 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
129 である。プロジェクトの説明とバグ報告に関する情報は
130 http://www.kernel.org/doc/man\-pages/ に書かれている。