OSDN Git Service

(split) LDP: Update release pages based on LDP 3.54 release
[linuxjm/LDP_man-pages.git] / release / man3 / nextafter.3
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>
4 .\"
5 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
6 .\" Distributed under GPL
7 .\" %%%LICENSE_END
8 .\"
9 .\" Based on glibc infopages
10 .\"
11 .\"*******************************************************************
12 .\"
13 .\" This file was generated with po4a. Translate the source file.
14 .\"
15 .\"*******************************************************************
16 .\"
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>
20 .\"
21 .TH NEXTAFTER 3 2013\-09\-02 GNU "Linux Programmer's Manual"
22 .SH 名前
23 nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl \-
24 浮動小数点数の操作
25 .SH 書式
26 \fB#include <math.h>\fP
27 .sp
28 \fBdouble nextafter(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB);\fP
29 .br
30 \fBfloat nextafterf(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB);\fP
31 .br
32 \fBlong double nextafterl(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
33 .sp
34 \fBdouble nexttoward(double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
35 .br
36 \fBfloat nexttowardf(float \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
37 .br
38 \fBlong double nexttowardl(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
39 .sp
40 \fI\-lm\fP でリンクする。
41 .sp
42 .in -4n
43 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
44 .in
45 .sp
46 .ad l
47 \fBnextafter\fP():
48 .RS 4
49 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
50 .br
51 or \fIcc\ \-std=c99\fP
52 .RE
53 .br
54 \fBnextafterf\fP(), \fBnextafterl\fP():
55 .RS 4
56 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE
57 || _POSIX_C_SOURCE\ >=\ 200112L;
58 .br
59 or \fIcc\ \-std=c99\fP
60 .RE
61 .br
62 \fBnexttoward\fP(), \fBnexttowardf\fP(), \fBnexttowardl\fP():
63 .RS 4
64 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
65 .br
66 or \fIcc\ \-std=c99\fP
67 .RE
68 .ad b
69 .SH 説明
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.
74
75 \fIx\fP が \fIy\fP と等しい場合、\fIy\fP が返される。
76
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.
80 .SH 返り値
81 成功すると、これらの関数は \fIy\fP に向かう方向で \fIx\fP の すぐ次の浮動小数点数表現を返す。
82
83 \fIx\fP が \fIy\fP と等しい場合、 (\fIx\fP と同じ型にキャストされた)  \fIy\fP が返される。
84
85 \fIx\fP か \fIy\fP が NaN の場合、NaN が返される。
86
87 .\" e.g., DBL_MAX
88 \fIx\fP が有限値で 結果がオーバーフローする場合、 範囲エラー (range error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP,
89 \fBHUGE_VALF\fP, \fBHUGE_VALL\fP を返す。返り値には数学的に正しい符号が付与される。
90
91 \fIx\fP が \fIy\fP と同じではなく、正しい関数の結果が非正規化数かゼロかアンダーフローの場合、 範囲エラーが発生し、 (表現可能な場合には)
92 正しい値が、(そうでない場合には) 0.0 が返される。
93 .SH エラー
94 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
95 .PP
96 以下のエラーが発生する可能性がある。
97 .TP 
98 範囲エラー (range error): 結果のオーバーフロー
99 .\" e.g., nextafter(DBL_MAX, HUGE_VAL);
100 .\" .I errno
101 .\" is set to
102 .\" .BR ERANGE .
103 オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP)  が上がる。
104 .TP 
105 範囲エラー: 結果が非正規化数かアンダーフロー
106 .\" e.g., nextafter(DBL_MIN, 0.0);
107 .\" .I errno
108 .\" is set to
109 .\" .BR ERANGE .
110 アンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP)  が上がる。
111 .PP
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 を設定しない。
115 .SH 属性
116 .SS "マルチスレッディング (pthreads(7) 参照)"
117 The \fBnextafter\fP(), \fBnextafterf\fP(), \fBnextafterl\fP(), \fBnexttoward\fP(),
118 \fBnexttowardf\fP(), and \fBnexttowardl\fP()  functions are thread\-safe.
119 .SH 準拠
120 C99, POSIX.1\-2001.  この関数は IEC 559 で定義されている (また IEEE 754/IEEE 854
121 では付録で推奨関数として定義されている)。
122 .SH バグ
123 glibc バージョン 2.5 以前では、アンダーフローが発生した際に、 これらの関数はアンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP)
124 を上がない。
125 .SH 関連項目
126 \fBnearbyint\fP(3)
127 .SH この文書について
128 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
129 である。プロジェクトの説明とバグ報告に関する情報は
130 http://www.kernel.org/doc/man\-pages/ に書かれている。