File: fenv.3

package info (click to toggle)
manpages-ja 0.4.0.0.20020315-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 14,808 kB
  • ctags: 4
  • sloc: sh: 9,595; perl: 157; makefile: 62
file content (257 lines) | stat: -rw-r--r-- 7,308 bytes parent folder | download
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
.\" Copyright (c) 2000 Andries Brouwer (aeb@cwi.nl)
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
.\" USA.
.\"
.\" 2000-08-14 added GNU additions from Andreas Jaeger
.\" 2000-12-05 some changes inspired by acahalan's remarks
.\"
.\" Japanese Version Copyright (c) 2000-2001 NAKANO Takeo all rights reserved.
.\" Translated Thu Feb 8 2001 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
.\"
.\"WORD:	(floating point) exception	(ư) 㳰
.\"WORD:	rounding			ݤ
.\"WORD:	opaque				Ʃ
.\"
.TH FENV 3  "12 August 2000" "Linux Manpage" "Linux Programmer's Manual"
.SH ̾
feclearexcept, fegetexceptflag, feraiseexcept, fesetexceptflag,
fetestexcept, fegetenv, fegetround, feholdexcept, fesetround,
fesetenv, feupdateenv - C99 ưδݤ㳰μ갷
.SH 
.nf
.B #include <fenv.h>
.sp
.BI "void feclearexcept(int " excepts );
.br
.BI "void fegetexceptflag(fexcept_t *" flagp ", int " excepts );
.br
.BI "void feraiseexcept(int " excepts );
.br
.BI "void fesetexceptflag(const fexcept_t *" flagp ", int " excepts );
.br
.BI "int fetestexcept(int " excepts );
.sp
.B "int fegetround(void);"
.br
.BI "int fesetround(int " rounding_mode );
.sp
.BI "void fegetenv(fenv_t *" envp );
.br
.BI "int feholdexcept(fenv_t *" envp );
.br
.BI "void fesetenv(const fenv_t *" envp );
.br
.BI "void feupdateenv(const fenv_t *" envp );
.fi
.SH 
 11 Ĥδؿ C99 Ƥꡢ
ưδݤ㳰 (Сեˤʤ)
μ갷򵭽Ҥ롣
.SS 㳰
DivideByZero 㳰ϡͭ¤οͤФ黻
̵β褦ʾ˵롣
.LP
Overflow 㳰ϡ
̤ưͤɽʤФʤʤΤˡ
ͤɽǽ (ͭ¤) ưͤκͤ
(ä) 礭ʤäƤޤ褦ʾ˵롣
.LP
Underflow 㳰ϡ
̤ưͤɽʤФʤʤΤˡ
ͤɽǽưͤκǾͤ
ʤäƤޤ
( 10 ʿͤɽ٤򼺤äƤޤ)
褦ʾ˵롣
.LP
Inexact 㳰ϡݤα黻̤
̵٤η̤Ȱۤʤ褦ʾ˵롣
Overflow ޤ Underflow Ȥˤϡˤ㳰ⵯ롣
.LP
Invalid 㳰ϡ黻̤ޤǤʤ̤褦ʾ˵롣
㤨 0/0-硢sqrt(\-1) ʤɡ
.SS 㳰
㳰ɽˤ 2 Ĥˡ롣
ҤȤĤñΥӥå (㳰¸ߤ/ʤ) ɽǡ
ΥӥåȤϼȤˤꡢ
ӥåȰ֤б˴ϢŤ롣
⤦ĤΤϡƩŪʹ¤ΤɽΤǡ
ˤ㳰˴ؤ¿ξ󤬴ޤޤ
(㤨㳰äɤΥɥ쥹ʤ)
.LP
.BR FE_DIVBYZERO ,
.BR FE_INEXACT ,
.BR FE_INVALID ,
.BR FE_OVERFLOW ,
.B FE_UNDERFLOW
γƥޥϡ줾б㳰ν
ݡȤƤ롣
ΤȤбӥåȤ򤽤줾뤳ȤˤʤΤǡ
㳰ؿθƤӽФ㤨
.BR FE_OVERFLOW | FE_UNDERFLOW
ȤΰѤƹԤȤǤ롣
¾㳰⥵ݡȤƤ뤫⤷ʤ
.B FE_ALL_EXCEPT
ޥϡݡȤƤ㳰٤ƤФơ
ӥåȤȤ OR 黻äΤˤʤ롣
.PP
.B feclearexcept
ؿϡͿ줿ӥåȤ㳰Τ
ݡȤƤΤ򥯥ꥢ롣
.LP
.B fegetexceptflag
ؿϡ
.I excepts
㳰ե饰ξ֤ɽ
.RI * flagp
ؤƩŪʥ֥Ȥ¸롣
.LP
.B feraiseexcept
ؿϡ
.I excepts
ΥӥåȤ㳰Τ
ݡȤƤΤȯ롣
.LP
.B fesetexceptflag
ؿϡ
.RI * flagp
ؤͤ
.I excepts
ɽ롢㳰δʾ֤ꤹ롣

.I excepts
ͤϡ

.B fegetexceptflag
ؿ (Ǹΰ
.I excepts
ƤΥӥåȤޤΤͿ) ƤӽФ
줿ͤˤ٤Ǥ롣
.LP
.B fetestexcept
ؿ word ֤
 word Ǥϡ
.I excepts
ǥåȤƤӥåȤΤ
б㳰ꤵƤΤΩƤ롣
.SS ݤ
.BR FE_DOWNWARD ,
.BR FE_TONEAREST ,
.BR FE_TOWARDZERO ,
.B FE_UPWARD
γƥޥϡ줾бݤ
ݡȤƤ롣
.LP
.B fegetround
ؿϸߤδݤ⡼ɤбޥ֤
.LP
.B fesetround
ؿϴݤ⡼ɤͿ줿ͤˤ
饼֤
.SS ưϢδĶ
ưϢδĶΤϡ
⡼ɤ֥ե饰ޤᡢ
.I fenv_t
ƩŪʥ֥ȰĤǼ갷ȤǤ롣
ǥեȤδĶϡ
.RI ( "const fenv_t *"
)
.B FE_DFL_ENV
ǼΤǤ롣
.LP
.B fegetenv
ؿϡߤưĶ򡢥֥
.RI * envp
¸롣
.LP
.B feholdexcept
ؿƱưԤƤ㳰ե饰򥯥ꥢ
non-stop (㳰ˤ¹Ԥ³) ⡼ɤؤ꤬ǽʤФԤ
饼֤
.LP
.B fesetenv
ؿϡưĶ򡢥֥
.RI * envp
Ф᤹ͤ
Υ֥ȤϡͭǤ뤳Ȥˤ狼äƤʤФʤʤ
㤨С
.B fegetenv

.B feholdexcept
ƤӽФ̤ǤȤ
.B FE_DFL_ENV
ȤǤʤФʤʤ
δؿθƽФ㳰ȯʤ
.LP
.B feupdateenv
ؿϡ֥
.RI * envp
ɽưĶ򥤥󥹥ȡ뤹롣
ΩäƤ㳰ϥꥢʤ
δؿƤΩäƤ㳰ϡ
ΥåȤ
.RI * envp
Ȥδ֤ǥӥåȤȤ OR äΤˤʤ롣
嵭Τ褦ˡ֥
.RI * envp
ϡͭǤ뤳Ȥ狼äƤʤФʤʤ
.SH "GNU ξܺ"
ǽʾˤϡGNU C Library ϥޥ
.B FE_NOMASK_ENV
롣Ϥ٤Ƥ㳰ǥȥåפ褦ʴĶɽǤ롣
Υޥ
.B #ifdef
ѤХƥȤǤ롣
.B _GNU_SOURCE
Ƥ˸¤ä롣
C99 ɸưޥ (㤨Υե饰ǤΥȥåפʤ)
γƥӥåȤˡˤĤƤƤʤ
glibc 2.2 
.I feenableexcept
ؿ
.I fedisableexcept
ؿ򥵥ݡȤƤꡢ
ơưȥåפǤ褦ˤʤäƤ롣
ޤ
.I fegetexcept
ˤäƾ֤碌Ǥ褦ˤʤäƤ롣
.sp
.nf
.BI "int feenableexcept (int " excepts );
.br
.BI "int fedisableexcept (int " excepts );
.br
.BI "int fegetexcept (void);"
.br
.fi
.LP
.B feenebleexcept
ؿ
.B fedisableexcept
ؿ
.I excepts
ˤäɽ㳰Υȥåפͭ (̵) ˤ롣
ľͭˤʤäƤ㳰ΥåȤ֤
Ԥ \-1 ֤
.B fegetexcept
ؿϸͭˤʤäƤ㳰Ƥʤ륻åȤ֤
.B 
.SH 
IEC 60559 (IEC 559:1989), ANSI/IEEE 854, ISO C99 (ISO/IEC 9899:1999).