Space  StDev

Chapter 2: DataWindow Expression Functions

Sqrt

Description

Calculates the square root of a number.

Syntax

Sqrt ( n )

Argument

Description

n

The number for which you want the square root

Returns

Double. Returns the square root of n.

Usage

Sqrt(n) is the same as n ^.5.

Taking the square root of a negative number causes an execution error.

Examples

Example 1

This expression returns 1.414213562373095:

Sqrt(2)

Example 2

This expression results in an error at execution time:

Sqrt(-2)

See also





Copyright © 2004. Sybase Inc. All rights reserved. StDev

View this book as PDF