View comments | RSS feed

Sqr

Description

Calculates the square root of a number.

Returns

Number; square root of number.

Category

Mathematical functions

Function syntax

Sqr(number)

See also

Abs

Parameters

Parameter Description

number

A positive integer or a variable that contains one. Number whose square root to get.

Usage

The value in number must be greater than or equal to 0.

Example

<h3>Sqr Example</h3>

<p>Returns the square root of a positive number.

<p>Sqr(2): <cfoutput>#Sqr(2)#</cfoutput>
<p>Sqr(Abs(-144)): <cfoutput>#Sqr(Abs(-144))#</cfoutput>
<p>Sqr(25^2): <cfoutput>#Sqr(25^2)#</cfoutput>

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | KnowledgeBase | Bug Reporting

Version 7

Comments


No screen name said on May 30, 2006 at 4:38 AM :
number CAN be of course a real-number..., would be very sad if SQR would
only work with integers !
sqr(50.55555555) gives different result than sqr(50.55555554)

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/7/htmldocs/00000631.htm