Loading

SUBTRACTEXACT

math

The SUBTRACTEXACT function consumes two LONGs from the top of the stack and puts back the difference between them. If the difference overflows a LONG, this function fails.

Since 2.6.0, this function can be applied to a LIST of numerical values and a numerical value. The order of the parameter is very important in that case: considering this fonction as F, the result of [ $a $b $c ] F is $a $b F $c F ] but the result of [ $a $b ] $c F is [ $a $c F $b $c F ].

Since 2.7.1, this function can be applied to a GTS of numerical values. This is very similar to how this function works on LISTs, considering the values of the GTS. In that case, the order of the parameters also matters and the result is either a GTS or a single numerical value.

SUBTRACTEXACT is available since version 1.2.23.

See also

Signatures

Examples

-9 -51 SUBTRACTEXACT <% MAXLONG -42 SUBTRACTEXACT %> <% ERROR 0 GET 'message' GET %> <% %> TRY <% MAXLONG -1 * 42 SUBTRACTEXACT %> <% ERROR 0 GET 'message' GET %> <% %> TRY