Log in

View Full Version : MaskTools: RP notation for sqrt ?


WorBry
4th June 2010, 14:26
Sorry for my ignorance, but in MaskTools (reverse polish) what is the notation for square root, as, for example, translation of the equation:

sqrt( (x^2) + (y^2) )

Obviously tried sqrt (and ROOT)

Cheers.

Didée
4th June 2010, 14:41
I'm not sure ATM if a notation for square root exists.

What works in any case is building the x-root manually, e.g. ( (x^2) + (y^2) ) ^ (1/2)

expr = "x 2 ^ y 2 ^ + 1 2 / ^"

Motenai Yoda
4th June 2010, 14:44
according to masktools documentation sqrt operator is still missing.

WorBry
4th June 2010, 14:55
Thanks both :)