| 総合手引 | セクション 3 | オプション |
#include <math.h>
expm1() 関数と expm1f() 関数は、小さい引数 x についてさえ正確に、exp(x)-1 の値を計算します。
log() 関数と logf() 関数は引数 x の自然対数の値を計算します。
log10() 関数と log10f() 関数は、基底 10 について引数 x の対数を計算します。
log1p() 関数と log1pf() 関数は、小さい引数 x についてさえ log(1+x) の値を正確に計算します。
pow() 関数と powf() 関数は、指数 y に対して x の値を計算します。
関数 pow(x) は、すべての x について x**0 = 1 を返します。 x には、x = 0、 infinity
∞ ( VAX にはありません)、 NaN ( VAX の予約オペランド) が含まれます。 pow のこれまでの実装は、これらのすべての場合またはいくつかの場合に、 x**0 を未定義としてきたことがあります。 これが必ず x**0 = 1 を返す理由です。
p(x) = a[0]*x**0 + a[1]*x**1 + a[2]*x**2 +...+ a[n]*x**n
の値を a[0] として受け入れる慣行と互換性があります。
∞**0 = 1/0**0 = 1 です。次いで、NaN**0 = 1 でもあります。 すべての有限および無限な x について、 すなわち x に独立に x**0 = 1 だからです。
| EXP (3) | July 31, 1991 |
| 総合手引 | セクション 3 | オプション |
このマニュアルページサービスについてのご意見は Ben Bullock にお知らせください。 Privacy policy.
| “ | Ken Thompson has an automobile which he helped design. Unlike most automobiles, it has neither speedometer, nor gas gauge, nor any of the other numerous idiot lights which plague the modern driver. Rather, if the driver makes a mistake, a giant “?” lights up in the center of the dashboard. “The experienced driver,” says Thompson, “will usually know what's wrong.” | ” |