Math function enhancements

We upgraded/added some MATH functions. Here they are:

Min(x1, x2 [,…,x20]): Returns the smallest value in list. Up to 20 parameters are allowed and NAs are discarded

Max(x1, x2 [,…,x20]): Returns the largest value in list. Up to 20 parameters are allowed and NAs are discarded

Average(x1, x2 [,…,x20]): Returns the average value in list. Up to 20 parameters are allowed and NAs are discarded

Between(a, b, c): Returns TRUE (1) if a is between b and c (inclusive), FALSE(0) otherwise

Sorry, the function should read:

Avg(x1, x2 [,…,x20]): Returns the average value in list. Up to 20 parameters are allowed and NAs are discarded

Nice. Would yuou consider changing the syntax of Between?

It seems more intuitive to display the paramters in ascending order, ie

Between(a,b,c) = true iff a<=b<=c

Still waiting for a Log function. Stock price movements are lognormal, would be nice to have a log function in a lognormal world. Surely you don’t have to code all the math functions from scratch??

Since the change I get an error (Error near ‘)’: Min - Missing operands) for the following function: PctFromHi < Min(-13,(-24 + GainPct/10))

Can’t figure out what is wrong with it. Used to work before the upgrade. Can someone help me?

Your function syntax should work but there are problems in the parser. We’ll revisit the parsing logic. In the meantime try this alternative:

PctFromHi < Min(-13,GainPct/10 -24)

Thanks for reporting this

any plans for a log function?

LN() or Log10(). LN is the natural log.

It works. Or did yesterday when I tried LN() of a value in a ranking system.

Ln() is available. That’s the natural log, which I am assuming is what you mean.