.\" Copyright 2004 Andries Brouwer . .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk .\" .\" .\" 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. .\" .\" 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 2010-09-20 "" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O scalb, scalbf, scalbl \- multiply floating-point number .\"O by integral power of radix (OBSOLETE) scalb, scalbf, scalbl \- 浮動小数点数に整数である基数の累乗を掛ける (廃止予定) .\"O .SH SYNOPSIS .SH 書式 .B #include .sp .BI "double scalb(double " x ", double " exp ); .br .BI "float scalbf(float " x ", double " exp ); .br .BI "long double scalbl(long double " x ", double " exp ); .sp .\"O Link with \fI\-lm\fP. \fI\-lm\fP でリンクする。 .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .ad l .BR scalb (): .RS 4 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED .RE .br .BR scalbf (), .BR scalbl (): .RS 4 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 .RE .ad b .\"O .SH DESCRIPTION .SH 説明 .\"O These functions multiply their first argument .\"O .I x .\"O by .\"O .B FLT_RADIX .\"O (probably 2) .\"O to the power of .\"O .IR exp , .\"O that is: これらの関数は最初の引き数 .I x に .B FLT_RADIX の .I exp 乗を掛ける .RB ( FLT_RADIX はおそらく 2 である)。つまり、以下の式の値を返す。 .nf x * FLT_RADIX ** exp .fi .\"O The definition of .\"O .B FLT_RADIX .\"O can be obtained by including .\"O .I . .B FLT_RADIX の定義は .I をインクルードすることで得られる。 .\"O .\" not in /usr/include but in a gcc lib .\" /usr/include ではなく、gcc の lib にある。 .\"O .SH RETURN VALUE .SH 返り値 .\"O On success, these functions return \fIx\fP * \fBFLT_RADIX\fP ** \fIexp\fP. 成功すると、これらの関数は \fIx\fP * \fBFLT_RADIX\fP ** \fIexp\fP を返す。 .\"O If .\"O .I x .\"O or .\"O .I exp .\"O is a NaN, a NaN is returned. .I x か .I exp が NaN の場合、NaN が返される。 .\"O If .\"O .I x .\"O is positive infinity (negative infinity), .\"O and .\"O .I exp .\"O is not negative infinity, .\"O positive infinity (negative infinity) is returned. .I x が正の無限大 (負の無限大) で .I exp が負の無限大でない場合、正の無限大 (負の無限大) が返される。 .\"O If .\"O .I x .\"O is +0 (\-0), and .\"O .I exp .\"O is not positive infinity, +0 (\-0) is returned. .I x が +0 (\-0) で .I exp が正の無限大でない場合、+0 (\-0) が返される。 .\"O If .\"O .I x .\"O is zero, and .\"O .I exp .\"O is positive infinity, .\"O a domain error occurs, and .\"O a NaN is returned. .I x がゼロで .I exp が正の無限大の場合、領域エラー (domain error) が発生し、 NaN が返される。 .\"O If .\"O .I x .\"O is an infinity, .\"O and .\"O .I exp .\"O is negative infinity, .\"O a domain error occurs, and .\"O a NaN is returned. .I x が無限大で .I exp が負の無限大の場合、領域エラー (domain error) が発生し、 NaN が返される。 .\"O If the result overflows, .\"O a range error occurs, .\"O and the functions return .\"O .BR HUGE_VAL , .\"O .BR HUGE_VALF , .\"O or .\"O .BR HUGE_VALL , .\"O respectively, with a sign the same as .\"O .IR x . 結果がオーバーフローする場合、 範囲エラー (range error) が発生し、 各関数はそれぞれ .BR HUGE_VAL , .BR HUGE_VALF , .BR HUGE_VALL を返す。符号は .I x と同じになる。 .\"O If the result underflows, .\"O a range error occurs, .\"O and the functions return zero, with a sign the same as .\"O .IR x . 結果がアンダーフローする場合、範囲エラーが発生し、 各関数は 0 を返す。符号は .I x と同じになる。 .\"O .SH ERRORS .SH エラー .\"O See .\"O .BR math_error (7) .\"O for information on how to determine whether an error has occurred .\"O when calling these functions. これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は .BR math_error (7) を参照のこと。 .PP .\"O The following errors can occur: 以下のエラーが発生する可能性がある。 .TP .\"O Domain error: \fIx\fP is 0, and \fIexp\fP is positive infinity, \ .\"O or \fIx\fP is positive infinity and \fIexp\fP is negative infinity \ .\"O and the other argument is not a NaN .\"Omotoki: 引き数は x, exp の二つで両方とも条件に含まれているので、 .\"Omotoki: 他の引き数に関する記述は意味がないと思われる。和訳では省略する。 領域エラー (domain error): \fIx\fP が 0 で \fIexp\fP が正の無限大、\ または \fIx\fP が正の無限大で \fIexp\fP が負の無限大 .\" .I errno .\" is set to .\" .BR EDOM . .\"O An invalid floating-point exception .\"O .RB ( FE_INVALID ) .\"O is raised. 不正 (invalid) 浮動小数点例外 .RB ( FE_INVALID ) が上がる。 .TP .\"O Range error, overflow 範囲エラー (range error)、オーバーフロー .\" .I errno .\" is set to .\" .BR ERANGE . .\"O An overflow floating-point exception .\"O .RB ( FE_OVERFLOW ) .\"O is raised. オーバーフロー浮動小数点例外 .RB ( FE_OVERFLOW ) が上がる。 .TP .\"O Range error, underflow 範囲エラー (range error)、アンダーフロー .\" .I errno .\" is set to .\" .BR ERANGE . .\"O An underflow floating-point exception .\"O .RB ( FE_UNDERFLOW ) .\"O is raised. アンダーフロー浮動小数点例外 .RB ( FE_UNDERFLOW ) が上がる。 .PP .\"O These functions do not set .\"O .IR errno . これらの関数は .I errno を設定しない。 .\" 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 .\"O .SH "CONFORMING TO" .SH 準拠 .\"O .BR scalb () .\"O is specified in POSIX.1-2001, but marked obsolescent. .\"O POSIX.1-2008 removes the specification of .\"O .BR scalb (), .\"O recommending the use of .\"O .BR scalbln (3), .\"O .BR scalblnf (3), .\"O or .\"O .BR scalblnl (3) .\"O instead. .\"O The .\"O .BR scalb () .\"O function is from 4.3BSD. .BR scalb () は POSIX.1-2001 で規定されているが、廃止予定とされている。 POSIX.1-2008 では .BR scalb () の仕様は削除されており、代わりに .BR scalbln (3), .BR scalblnf (3), .BR scalblnl (3) の使用が推奨されている。 .BR scalb () 関数は 4.3BSD に由来する。 .\"O .BR scalbf () .\"O and .\"O .BR scalbl () .\"O are unstandardized; .\"O .BR scalbf () .\"O is nevertheless present on several other systems .BR scalbf () と .BR scalbl () は標準化されていない。 それにも関わらず、 .BR scalbf () はいくつかの他のシステムに存在する。 .\" 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. .\"O .SH "SEE ALSO" .SH 関連項目 .BR ldexp (3), .BR scalbln (3)