Skip to content

tuple_divTupleDivTupleDivtuple_divtuple_div🔗

Short description🔗

tuple_divTupleDivTupleDivtuple_divtuple_div — Divide two tuples.

Signature🔗

tuple_div( number Q1, number Q2, out number Quot )void TupleDiv( const HTuple& Q1, const HTuple& Q2, HTuple* Quot )static void HOperatorSet.TupleDiv( HTuple q1, HTuple q2, out HTuple quot )def tuple_div( q1: MaybeSequence[Union[float, int]], q2: MaybeSequence[Union[float, int]] ) -> Sequence[Union[float, int]]

def tuple_div_s( q1: MaybeSequence[Union[float, int]], q2: MaybeSequence[Union[float, int]] ) -> Union[float, int]Herror tuple_div( double Q1, double Q2, double* Quot )

Herror T_tuple_div( const Htuple Q1, const Htuple Q2, Htuple* Quot )

HTuple HTuple::TupleDiv( const HTuple& Q2 ) const

HTuple HTuple.TupleDiv( HTuple q2 )

Description🔗

tuple_divTupleDiv computes the quotient of the input tuples Q1q1q1 and Q2q2q2. If both tuples have the same length the corresponding elements of both tuples are divided. Otherwise, either Q1q1q1 or Q2q2q2 must have length 1. In this case, the division is performed for each element of the longer tuple with the single element of the other tuple. If two integer numbers are divided, the result is again an integer number. If one of the operands is a floating point number, the result is a floating point number. The division of strings is not allowed.

Exception: Empty input tuples🔗

If either or both of the input tuples are empty, the operator returns an empty tuple.

HDevelop In-line Operation🔗

HDevelop provides an in-line operation for tuple_divTupleDiv, which can be used in an expression in the following syntax:

Quot := Q1 / Q2

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on internal data level.

Parameters🔗

Q1q1q1 (input_control) number(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)

Input tuple 1.

Q2q2q2 (input_control) number(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)

Input tuple 2.

Restriction: Q2 != 0

Quotquotquot (output_control) number(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

Quotient of the input tuples.

Combinations with other operators🔗

Combinations

Alternatives

tuple_multTupleMult

Module🔗

Foundation