Calculating the Square Root of a Numeric Value: sqrt() Function

Preferences - Do not show ads

The sqrt() function calculates the square root of a numeric value. If any error occurs, it returns invalid. The following WMLScript example demonstrates the use of sqrt():

x = Float.sqrt(100);
y = Float.sqrt(25);
z = Float.sqrt(14);

After the execution of the above script, x has the floating-point value 10.0, y has the floating-point value 5.0 and z has the floating-point value 3.74166.

Page 54 of 71 Previous Page | Next Page
Contents at a Glance
Print this Web Page | | Back to Top

Feedback Form (Expand)

What do you think about this web page?

WMLScript Tutorial Table of Contents WMLScript Tutorial Contents at a Glance Preferences - Change Color Scheme Preferences - Do Not Show Ads Previous Page Next Page