OSDN Git Service

cd957cfdb0c32d9e69782e3201db23353eee75e4
[linuxjm/LDP_man-pages.git] / release / man3 / logb.3
1 .\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\"     <mtk.manpages@gmail.com>
4 .\"
5 .\" %%%LICENSE_START(VERBATIM)
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" %%%LICENSE_END
26 .\"
27 .\" Inspired by a page by Walter Harms created 2002-08-10
28 .\"
29 .\"*******************************************************************
30 .\"
31 .\" This file was generated with po4a. Translate the source file.
32 .\"
33 .\"*******************************************************************
34 .TH LOGB 3 2010\-09\-20 "" "Linux Programmer's Manual"
35 .SH 名前
36 logb, logbf, logbl \- 浮動小数点数の指数を取得する
37 .SH 書式
38 \fB#include <math.h>\fP
39 .sp
40 \fBdouble logb(double \fP\fIx\fP\fB);\fP
41 .br
42 \fBfloat logbf(float \fP\fIx\fP\fB);\fP
43 .br
44 \fBlong double logbl(long double \fP\fIx\fP\fB);\fP
45 .sp
46 \fI\-lm\fP でリンクする。
47 .sp
48 .in -4n
49 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
50 .in
51 .sp
52 .ad l
53 \fBlogb\fP():
54 .RS 4
55 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
56 .br
57 or \fIcc\ \-std=c99\fP
58 .RE
59 .br
60 \fBlogbf\fP(), \fBlogbl\fP():
61 .RS 4
62 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE
63 || _POSIX_C_SOURCE\ >=\ 200112L;
64 .br
65 or \fIcc\ \-std=c99\fP
66 .RE
67 .ad b
68 .SH 説明
69 これらの関数は、 \fIx\fP の浮動小数点の内部表現から指数部を抽出し、浮動小数点数値として返す。 \fI<float.h>\fP
70 で定義されている整数定数 \fBFLT_RADIX\fP は、システムの浮動小数点表現で使用されている基数を表す。 \fBFLT_RADIX\fP が 2 の場合、
71 \fBlogb(\fP\fIx\fP\fB)\fP は \fBfloor(log2(\fP\fIx\fP\fB))\fP と等しいが、後者の方がたぶん高速である。
72 .LP
73 \fIx\fP が非正規化数の場合、 \fBlogb\fP()  は \fIx\fP が正規化された場合の指数を返す。
74 .SH 返り値
75 成功すると、これらの関数は \fIx\fP の指数部を返す。
76
77 \fIx\fP が NaN の場合、NaN が返される。
78
79 \fIx\fP が 0 の場合、極エラー (pole error) が発生し、 各関数はそれぞれ \-\fBHUGE_VAL\fP, \-\fBHUGE_VALF\fP,
80 \-\fBHUGE_VALL\fP を返す。
81
82 \fIx\fP が負の無限大か正の無限大の場合、正の無限大が返される。
83 .SH エラー
84 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7)  を参照のこと。
85 .PP
86 以下のエラーが発生する可能性がある。
87 .TP 
88 極エラー (pole error): \fIx\fP が 0 である
89 .\" .I errno
90 .\" is set to
91 .\" .BR ERANGE .
92 0 による除算 (divide\-by\-zero) 浮動小数点例外 (\fBFE_DIVBYZERO\fP)  が上がる。
93 .PP
94 .\" FIXME . Is it intentional that these functions do not set errno?
95 .\" log(), log2(), log10() do set errno
96 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6793
97 .\"
98 .\" .SH HISTORY
99 .\" The
100 .\" .BR logb ()
101 .\" function occurs in 4.3BSD.
102 .\" see IEEE.3 in the 4.3BSD manual
103 これらの関数は \fIerrno\fP を設定しない。
104 .SH 準拠
105 C99, POSIX.1\-2001.
106 .SH 関連項目
107 \fBilogb\fP(3), \fBlog\fP(3)
108 .SH この文書について
109 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
110 である。プロジェクトの説明とバグ報告に関する情報は
111 http://www.kernel.org/doc/man\-pages/ に書かれている。