Hi mhupman,

I did some digging as well and it looks like that Math Function was not included in the custom version of TCL that the LTM uses.

Math Functions

The following TCL based math functions have been included in iRules

abs(arg)

Returns the absolute value of arg. Arg may be either integer or floating-point, and the result is returned in the same form.

double(arg)

If arg is a floating-point value, returns arg, otherwise converts arg to floating-point and returns the converted value.

int(arg)

f arg is an integer value of the same width as the machine word, returns arg, otherwise converts arg to an integer by truncation and returns the converted value.

rand()

Returns a pseudo-random floating-point value in the range (0,1). The generator algorithm is a simple linear congruential generator that is not cryptographically secure. Each result from rand completely determines all future results from subsequent calls to rand, so rand should not be used to generate a sequence of secrets, such as one-time passwords. The seed of the generator is initialized from the internal clock of the machine or may be set with the srand function.

round(arg)

If arg is an integer value, returns arg, otherwise converts arg to integer by rounding and returns the converted value.

srand(arg)

The arg, which must be an integer, is used to reset the seed for the random number generator of rand. Returns the first random number (see rand()) from that seed. Each interpreter has its own seed.

wide(arg)

Converts arg to an integer value at least 64-bits wide (by sign-extension if arg is a 32-bit number) if it is not one already.

You can read the entire article here:

iRules 101 - 02 - If and Expressions