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

Get Learning WML, and WMLScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.