Skip to content

tuple_negTupleNegTupleNegtuple_negtuple_neg🔗

Short description🔗

tuple_negTupleNegTupleNegtuple_negtuple_neg — Negate a tuple.

Signature🔗

tuple_neg( number T, out number Neg )void TupleNeg( const HTuple& T, HTuple* Neg )static void HOperatorSet.TupleNeg( HTuple t, out HTuple neg )def tuple_neg( t: MaybeSequence[Union[float, int]] ) -> Sequence[Union[float, int]]

def tuple_neg_s( t: MaybeSequence[Union[float, int]] ) -> Union[float, int]Herror tuple_neg( double T, double* Neg )

Herror T_tuple_neg( const Htuple T, Htuple* Neg )

HTuple HTuple::TupleNeg( ) const

HTuple HTuple.TupleNeg( )

Description🔗

tuple_negTupleNeg computes the negation of the input tuple Ttt, i.e., \(\textrm{Neg} = -\textrm{T}\). The negation of an integer number is again an integer number. The negation of a floating point number is a floating point number. The negation of a string is not allowed.

Exception: Empty input tuple🔗

If the input tuple is empty, the operator returns an empty tuple.

HDevelop In-line Operation🔗

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

Neg := -T

Execution information🔗

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

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

  • Processed without parallelization.

Parameters🔗

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

Input tuple.

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

Negation of the input tuple.

Module🔗

Foundation