Date: Wed, 22 Mar 2023 05:18:57 +0000 (UTC) Message-ID: <1472105618.79919.1679462337928@1323b43bed1d> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_79918_506613886.1679462337928" ------=_Part_79918_506613886.1679462337928 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html EXAMPLE - POW and SQRT Functions

# EXAMPLE - POW and SQRT Functions

The following example demonstrates how the `POW`=  and `SQRT` functions work together to compute the hyp= otenuse of a right triangle using the Pythagorean theorem.

• `POW` - X Y . In this case, 1= 0 to the power of the previous one. See POW Function
• `SQRT` - computes the square root of the input value. See SQRT Function.

The Pythagorean theorem states that in a right triangle the length of ea= ch side (x,y) and of the hypotenuse (z) can be represented as the following= :

z2 =3D x 2 + y 2

Therefore, the length of z can be expressed as the following:

z =3D sqrt(x 2  + y 2 <= /em>)

Source:

The dataset below contains values for x and y:

X Y
3 4
4 9
8 10
30 40

Transformation:

You can use the following transformation to generate values for z2<= /sup>.

=20
=20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20
Transformation Name <= code>New formula `Single row formula` `(POW(x,2) + POW(y,2))` `'Z'`
=20

You can see how column Z is generated as the sum of squares of the other= two columns, which yields z2.

Now, edit the transformation to wrap the value computation in a SQRT function. This step is done to compute the value for z, which is the distance between the two points based on the Pythagorean = theorem.

=20
=20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20
Transformation Name <= code>New formula `Single row formula` `SQRT((POW(x,2) + POW(y,2)))` `'Z'`
=20

Results:

X Y Z
3 4 5
4 9 9.848857801796104
8 10 12.806248474865697
30 40 50
------=_Part_79918_506613886.1679462337928--