.\" Copyright 2004 Andries Brouwer . .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk .\" .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2005 Yuichi SATO all rights reserved. .\" and Copyright (c) 2008 Akihiro MOTOKI .\" Translated Tue Feb 1 07:25:51 JST 2005 .\" by Yuichi SATO .\" Updated 2008-09-16, Akihiro MOTOKI .\" .TH SCALB 3 2013\-03\-23 "" "Linux Programmer's Manual" .SH 名前 scalb, scalbf, scalbl \- 浮動小数点数に整数である基数の累乗を掛ける (廃止予定) .SH 書式 \fB#include \fP .sp \fBdouble scalb(double \fP\fIx\fP\fB, double \fP\fIexp\fP\fB);\fP .br \fBfloat scalbf(float \fP\fIx\fP\fB, float \fP\fIexp\fP\fB);\fP .br \fBlong double scalbl(long double \fP\fIx\fP\fB, long double \fP\fIexp\fP\fB);\fP .sp \fI\-lm\fP でリンクする。 .sp .in -4n glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp .ad l \fBscalb\fP(): .RS 4 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED .RE .br \fBscalbf\fP(), \fBscalbl\fP(): .RS 4 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 .RE .ad b .SH 説明 これらの関数は最初の引き数 \fIx\fP に \fBFLT_RADIX\fP の \fIexp\fP 乗を掛ける (\fBFLT_RADIX\fP はおそらく 2 である)。つまり、以下の式の値を返す。 .nf x * FLT_RADIX ** exp .fi .\" not in /usr/include but in a gcc lib \fBFLT_RADIX\fP の定義は \fI\fP をインクルードすることで得られる。 .SH 返り値 成功すると、これらの関数は \fIx\fP * \fBFLT_RADIX\fP ** \fIexp\fP を返す。 \fIx\fP か \fIexp\fP が NaN の場合、NaN が返される。 \fIx\fP が正の無限大 (負の無限大) で \fIexp\fP が負の無限大でない場合、正の無限大 (負の無限大) が返される。 \fIx\fP が +0 (\-0) で \fIexp\fP が正の無限大でない場合、+0 (\-0) が返される。 \fIx\fP がゼロで \fIexp\fP が正の無限大の場合、領域エラー (domain error) が発生し、 NaN が返される。 \fIx\fP が無限大で \fIexp\fP が負の無限大の場合、領域エラー (domain error) が発生し、 NaN が返される。 結果がオーバーフローする場合、 範囲エラー (range error) が発生し、 各関数はそれぞれ \fBHUGE_VAL\fP, \fBHUGE_VALF\fP, \fBHUGE_VALL\fP を返す。符号は \fIx\fP と同じになる。 結果がアンダーフローする場合、範囲エラーが発生し、 各関数は 0 を返す。符号は \fIx\fP と同じになる。 .SH エラー これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は \fBmath_error\fP(7) を参照のこと。 .PP 以下のエラーが発生する可能性がある。 .TP 領域エラー (domain error): \fIx\fP が 0 で \fIexp\fP が正の無限大、または \fIx\fP が正の無限大で \fIexp\fP が負の無限大 .\" .I errno .\" is set to .\" .BR EDOM . 不正 (invalid) 浮動小数点例外 (\fBFE_INVALID\fP) が上がる。 .TP 範囲エラー (range error)、オーバーフローの場合 .\" .I errno .\" is set to .\" .BR ERANGE . オーバーフロー浮動小数点例外 (\fBFE_OVERFLOW\fP) が上がる。 .TP 範囲エラー (range error)、アンダーフローの場合 .\" .I errno .\" is set to .\" .BR ERANGE . アンダーフロー浮動小数点例外 (\fBFE_UNDERFLOW\fP) が上がる。 .PP .\" FIXME . Is it intentional that these functions do not set errno? .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6803 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6804 これらの関数は \fIerrno\fP を設定しない。 .SH 準拠 \fBscalb\fP() は POSIX.1\-2001 で規定されているが、廃止予定とされている。 POSIX.1\-2008 では \fBscalb\fP() の仕様は削除されており、代わりに \fBscalbln\fP(3), \fBscalblnf\fP(3), \fBscalblnl\fP(3) の使用が推奨されている。 \fBscalb\fP() 関数は 4.3BSD に由来する。 .\" Looking at header files: scalbf() is present on the .\" BSDs, Tru64, HP-UX 11, Irix 6.5; scalbl() is on HP-UX 11 and Tru64. \fBscalbf\fP() と \fBscalbl\fP() は標準化されていない。 それにも関わらず、 \fBscalbf\fP() はいくつかの他のシステムに存在する。 .SH 関連項目 \fBldexp\fP(3), \fBscalbln\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。