Square Root, etc ...

# Thread: Square Root, etc ...

1. Junior Member
Join Date
Dec 1969
Posts
24

## Square Root, etc ...

Currently, I need to take the square root of a number using VBScript. How is this accomplished?<BR><BR>In general, where is a good list of all VBScript&#039;s inherent functions?<BR><BR>Thanks in advance,<BR>JC2K

2. Senior Member
Join Date
Dec 1969
Posts
231

## RE: Square Root, etc ...

Use the sqr function :<BR><BR>dim iValue : iValue = 23<BR><BR>sqr(iValue)<BR><BR>Returns 4.79583152331272.<BR><BR><BR>Download the VBScript dcumentation from microsoft, all the built in functions are listed.<BR><BR><BR>MikeD

3. Senior Member
Join Date
Dec 1969
Posts
898

## RE: Square Root, etc ...

Or how about a little more generic<BR><BR>dim myNum<BR>myNum = 4^.5<BR><BR>&#039;myNum = 2

4. Senior Member
Join Date
Dec 1969
Posts
636

## RE: Square Root, etc ...

I&#039;m not sure what you&#039;re trying to do but here is the square root function for VBscript.<BR><BR>Sqr(number)<BR><BR>Dim MySqr<BR>MySqr = Sqr(4) &#039; Returns 2.<BR>MySqr = Sqr(23) &#039; Returns 4.79583152331272.<BR>MySqr = Sqr(0) &#039; Returns 0.<BR>MySqr = Sqr(-4) &#039; Generates a run-time error.<BR><BR>

5. Senior Member
Join Date
Dec 1969
Posts
614

## Resources ( <----left)

Try ... http://msdn.microsoft.com/scripting/default.htm?/scripting/vbscript/doc/vbstoc.htm<BR><BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•