(x^y) (x raised to y) Is there a function for thi

# Thread: (x^y) (x raised to y) Is there a function for thi

1. Senior Member
Join Date
Dec 1969
Posts
119

## (x^y) (x raised to y) Is there a function for thi

Hi is there a function for x raised to y<BR>in VBscript. May be I can write a function if the power<BR>is a integer but what if the power is a fraction?<BR>

2. Hugh G. Rektion Guest

## RE: (x^y) (x raised to y) Is there a function for

Im just curious - where does the fraction come from?<BR>A numeric exponential should work ok, even a floating point<BR>number.<BR><BR>can you post the code?

3. Senior Member
Join Date
Dec 1969
Posts
119

## RE: (x^y) (x raised to y) Is there a function for

I dont have any specific code right now which has a float<BR>value for power. Upto what i have reached had integer powers.<BR>But I guess some calculations can come ahead having fractional<BR>powers. I was wondering if there is a function [like<BR>eg. x = Math.pow(5,2.5) in javascript which accepts float powers] in VBscript also.<BR><BR>

4. Senior Member
Join Date
Dec 1969
Posts
915

## RE: (x^y) (x raised to y) Is there a function for

Looks like you are onto something...<BR><BR>Try This<BR><BR>Dim x, y<BR><BR>x = 5<BR>y = 3.14<BR><BR>Response.Write x^y<BR><BR>HTH<BR><BR>Jerry

5. Senior Member
Join Date
Dec 1969
Posts
119

## RE: (x^y) (x raised to y) Is there a function for

Well I think I landed with what I thought was not availbale in <BR>VBScript. The "^" operator.<BR><BR>Thanks

6. Dev. Guest

## RE: (x^y) (x raised to y) Is there a function for

Yup!!! <BR><BR>&#039 ^ &#039 this operator is very much available in Vb!!!!<BR><BR><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
•