(スタンダード:: valarrayは)<div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">Original:</div><div class="t-tr-dropdown-orig">(std::valarray)</div><div class="t-tr-dropdown-notes">The text has been machine-translated via [http://translate.google.com Google Translate].<br/> You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.</div></div></div></div></div> - cppreference.com" /> std::tanh<div class="t-tr-text">(スタンダード:: valarrayは)<div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">Original:</div><div class="t-tr-dropdown-orig">(std::valarray)</div><div class="t-tr-dropdown-notes">The text has been machine-translated via [http://translate.google.com Google Translate].<br/> You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.</div></div></div></div></div> - cppreference.com
名前空間
変種
操作

std::tanh<div class="t-tr-text">(スタンダード:: valarrayは)<div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">Original:</div><div class="t-tr-dropdown-orig">(std::valarray)</div><div class="t-tr-dropdown-notes">The text has been machine-translated via [http://translate.google.com Google Translate].<br/> You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.</div></div></div></div></div>

提供: cppreference.com
< cpp‎ | numeric‎ | valarray
2015年11月30日 (月) 06:47時点におけるP12bot (トーク | 投稿記録)による版

 
 
 
 
ヘッダ <valarray> で定義
template< class T >
valarray<T> tanh( const valarray<T>& va );
vaの各要素に対して、要素の値の双曲線正接を計算します.
Original:
For each element in va computes hyperbolic tangent of the value of the element.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

パラメータ

va -
に操作を適用する値の配列
Original:
value array to apply the operation to
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

値を返します

va内の値の双曲線正接を含む値の配列.
Original:
Value array containing hyperbolic tangent of the values in va.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

ノート

計算を行うために非修飾名の関数 (tanh) が使用されます。 そのような関数が利用可能でない場合は、実引数依存の名前探索により std::tanh が使用されます。

関数は std::valarray と異なる戻り値の型を使用して実装することができます。 この場合、その置換型は以下の性質を持ちます。

可能な実装

template<class T>
valarray<T> tanh(const valarray<T>& va)
{
    valarray<T> other = va;
    for (T &i : other) {
        i = tanh(i);
    }
}

参照

(C++11)(C++11)
双曲線正接 (tanh(x)) を計算します
(関数) [edit]