tuple_hypotTupleHypotTupleHypottuple_hypottuple_hypot
説明
tuple_hypotTupleHypotTupleHypottuple_hypottuple_hypot — 2つのtupleの斜辺を計算します。
書式
tuple_hypot( number T1, number T2, out number Hypot )void TupleHypot( const HTuple& T1, const HTuple& T2, HTuple* Hypot )static void HOperatorSet.TupleHypot( HTuple t1, HTuple t2, out HTuple hypot )def tuple_hypot( t1: MaybeSequence[Union[float, int]], t2: MaybeSequence[Union[float, int]] ) -> Sequence[float]
def tuple_hypot_s( t1: MaybeSequence[Union[float, int]], t2: MaybeSequence[Union[float, int]] ) -> floatHerror tuple_hypot( double T1, double T2, double* Hypot )
Herror T_tuple_hypot( const Htuple T1, const Htuple T2, Htuple* Hypot )
HTuple HTuple::TupleHypot( const HTuple& T2 ) const
HTuple HTuple.TupleHypot( HTuple t2 )
説明
tuple_hypotTupleHypot は2つの入力tupleの斜辺
\(\sqrt{\textrm{T1}^2 + \textrm{T2}^2}\)
を計算します。
計算は中間ステップ中に、不当な算術オーバーフローやアンダーフローなしで行われます。
両方のtupleの長さが同じ場合、斜辺は両方のtupleの対応する要素に適用されます。
それ以外の場合、T1t1t1 か T2t2t2 のどちらかの長さは1である必要があります。
この場合、より長いtupleの各要素に対して、もう片方のtupleの単一の要素を使用し、斜辺が計算されます。
結果は常に浮動小数点数として返されます。文字列の斜辺は計算されません。
例外: 入力tuple が 空
入力tupleが1つでも空の場合、オペレーターは空のtupleを返します。
HDevelopインライン演算
HDevelopは tuple_hypotTupleHypot の代わりとなるインライン演算を備えており、以下の構文形式で使用することができます:
Hypot := hypot(T1, T2)
実行情報
実行情報
パラメーター
T1t1t1 (input_control) number(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)
1つ目の入力tuple
T2t2t2 (input_control) number(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)
2つ目の入力tuple
Hypothypothypot (output_control) number(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)
2つの入力tupleの斜辺
他のオペレーターとの組み合わせ
組み合わせ
他の選択候補
tuple_sqrtTupleSqrt
関連項目
tuple_multTupleMult, tuple_addTupleAdd
モジュール
Foundation