O'Reilly logo

Learning WML, and WMLScript by Martin Frost

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

sqrt — Return the square root of a number

Usage

Float.sqrt(num)

num : Floating point

Description

Returns the square root of num. Some WMLScript interpreters return only an approximation. Returns invalid if num can’t be converted to floating point or if num is negative.

Examples

Float.sqrt(4.0)

returns floating-point 2.0

Float.sqrt(1.0)

returns floating-point 1.0

Float.sqrt(0.0)

returns floating-point 0.0

Float.sqrt(-1.0)

returns invalid

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required