OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / release / man3 / frexp.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
30 .\" Modified 2002-07-27 by Walter Harms
31 .\"     (walter.harms@informatik.uni-oldenburg.de)
32 .\"
33 .\"*******************************************************************
34 .\"
35 .\" This file was generated with po4a. Translate the source file.
36 .\"
37 .\"*******************************************************************
38 .TH FREXP 3 2010\-09\-20 "" "Linux Programmer's Manual"
39 .SH 名前
40 frexp, frexpf, frexpl \- 浮動小数点実数を小数成分と整数成分に変換する
41 .SH 書式
42 .nf
43 \fB#include <math.h>\fP
44 .sp
45 \fBdouble frexp(double \fP\fIx\fP\fB, int *\fP\fIexp\fP\fB);\fP
46 .br
47 \fBfloat frexpf(float \fP\fIx\fP\fB, int *\fP\fIexp\fP\fB);\fP
48 .br
49 \fBlong double frexpl(long double \fP\fIx\fP\fB, int *\fP\fIexp\fP\fB);\fP
50 .fi
51 .sp
52 \fI\-lm\fP でリンクする。
53 .sp
54 .in -4n
55 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
56 .in
57 .sp
58 .ad l
59 \fBfrexpf\fP(), \fBfrexpl\fP():
60 .RS 4
61 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE
62 || _POSIX_C_SOURCE\ >=\ 200112L;
63 .br
64 or \fIcc\ \-std=c99\fP
65 .RE
66 .ad
67 .SH 説明
68 \fBfrexp\fP()  関数は浮動小数点実数 \fIx\fP を正規化小数と指数に分解し、 指数を *\fIexp\fP に格納する。
69 .SH 返り値
70 \fBfrexp\fP()  関数は正規化小数を返す。 引数 \fIx\fP がゼロでない場合、この正規化小数は \fIx\fP に 2
71 の累乗を乗じたものであり、その絶対値は 常に 1/2 以上 1 未満、つまり [0.5,1) となる。
72
73 \fIx\fP がゼロの場合、正規化小数はゼロになり *\fIexp\fP にはゼロが格納される。
74
75 \fIx\fP が NaN の場合、NaN が返される。 \fI*exp\fP の値は不定である。
76
77 \fIx\fP が正の無限大 (負の無限大) の場合、 正の無限大 (負の無限大) が返される。 \fI*exp\fP の値は不定である。
78 .SH エラー
79 エラーは発生しない。
80 .SH 準拠
81 C99, POSIX.1\-2001.  \fIdouble\fP 版の関数は SVr4, 4.3BSD, C89 にも準拠している。
82 .SH 例
83 このプログラムを実行すると以下のような結果となる:
84 .sp
85 .nf
86 .in +4n
87 $\fB ./a.out 2560\fP
88 frexp(2560, &e) = 0.625: 0.625 * 2^12 = 2560
89 $\fB ./a.out \-4\fP
90 frexp(\-4, &e) = \-0.5: \-0.5 * 2^3 = \-4
91 .in
92 .fi
93 .SS プログラムのソース
94 \&
95 .nf
96 #include <math.h>
97 #include <float.h>
98 #include <stdio.h>
99 #include <stdlib.h>
100
101 int
102 main(int argc, char *argv[])
103 {
104     double x, r;
105     int exp;
106
107     x = strtod(argv[1], NULL);
108     r = frexp(x, &exp);
109
110     printf("frexp(%g, &e) = %g: %g * %d^%d = %g\en",
111            x, r, r, FLT_RADIX, exp, x);
112     exit(EXIT_SUCCESS);
113 }
114 .fi
115 .SH 関連項目
116 \fBldexp\fP(3), \fBmodf\fP(3)
117 .SH この文書について
118 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
119 である。プロジェクトの説明とバグ報告に関する情報は
120 http://www.kernel.org/doc/man\-pages/ に書かれている。