Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP/VB 'Power of' Error

Status
Not open for further replies.

FateFirst

Programmer
Apr 15, 2002
212
GB
Im not great at maths anyways and I'm just looking to do a quick calculation on an ASP page.

I'm guessing its producing an error because im not using a whole number as when I test with one it works fine.

Error: Invalid procedure call or argument

Any help would be appreciated.

Here is what I have:

numResults = 100*(((9.00/10.00)^(1/5))-1)

So in order of process it should be:

Result1 = 9.00/10.00
Result2 = 1/5
Result3 = Result1^Result2
Result4 = Result3-1
Result5 = 100*Result4

- FateFirst
 
Is there any more code than this? Your quoted code works fine in VBS, and produces (correctly) -2.0851376390232

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
This is your error:

Error: Invalid procedure call or argument

Assuming you are doing these calculations in a function,
we need to see the code that calls the function and the function itself (the actual code), cause from what you've written I can't tell anything.

<.

 
There is more to it but I worked it out.

The variable being assigned the value was orinally formatted as FormatNumber(,2) so I simply made it a Cdbl() and it worked fine.

Sorry for not initially supplying the full info.



- FateFirst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top