Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Square Root


Former Community Member
Anyone know how to do a square root in either Javascript or FormCalc?
4 Replies


Level 5
it is simple in JS. Here you go....

var myvalue = SOMobject.rawValue;

var my_squareroot = Math.sqrt(myvalue);


Former Community Member
I am trying to set up a Standard Deviation calculation using FormCalc. Here is what I have so far, because it does not recognise the ^ to raise to a power I just multiplied a part by itself. Any suggestions as to how to get this to do the square root?


I am searching all the hardcopy references I have at my disposal and nothing has even come close as of yet. Can someone please help????


Level 7
If you noticed in response of the square root, there are special funcitons for doing advanced math in JavaScript and FormCalc. The JavaScirpt's advance funcitons are described in the Mozilla JavaScript documentaion and FormCalc's is partially done in the included scriptig references.


Math.pow(fBaseNumber, fExponent)


Pow(fBaseNumber, fExponent)

The exponent function and square root are both undocumented functions in FormCalc. The FormCalc funciton for the square root is "Sqrt(fValue)".

There is also an average function for both JavaScript and FormCalc.