Loading

op.div

op

To apply an op.div operation, N parameters are on top of the stack: N-1 Geo Time Series™ lists and one labels List. According to those labels, it produces multiple equivalence classes from the GTS inside those N-1 lists (if they match the same labels as the equivalence class). Then op.div is applyied to the GTS in those classes, building only one result GTS for each class.

The op.div operation can only operate on equivalence classes which have two GTS (if the equivalence class has more than two GTS, there is no result guaranted). It will divide at each tick the value of the first GTS by the value of the second GTS. To produce a result, both GTS of a same class must have a value at a same tick.

The type of the resulting GTS will be determined by the first non null value. It only operates on LONG and DOUBLE.

The name of the resulting GTS is the one of the last GTS of the equivalence class. The labels kept are the one of the equivalence class.

op.div is available since version 1.0.11.

See also

Signatures

Examples

[ [ NEWGTS "GTS1" RENAME { 'label0' '42' } RELABEL 10 NaN NaN NaN 126 ADDVALUE 20 NaN NaN NaN 84 ADDVALUE NEWGTS "GTS2" RENAME { 'label0' '53' } RELABEL 10 NaN NaN NaN 14.0 ADDVALUE 20 NaN NaN NaN 21.0 ADDVALUE 30 NaN NaN NaN 42 ADDVALUE ] [ NEWGTS "GTS3" RENAME { 'label0' '42' } RELABEL 10 NaN NaN NaN 3 ADDVALUE 20 NaN NaN NaN 2 ADDVALUE NEWGTS "GTS4" RENAME { 'label0' '53' } RELABEL 10 NaN NaN NaN 0.33 ADDVALUE 15 NaN NaN NaN 0.4 ADDVALUE 20 NaN NaN NaN 0.5 ADDVALUE ] [ 'label0' ] op.div ] APPLY