Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asptoday_discuss thread: Math Functions


Message #1 by "euan green" <euan_green@h...> on Wed, 22 May 2002 15:26:36
Hi,
 Am running into trouble doing some basic calculations.  I think I have
tracked down the problem to something to do with trying to perform a cos or
sin  calculation on a 'double' datatype

Microsoft VBScript runtime error '800a0005'

Invalid procedure call or argument: 'Sin'

/pitchperfect/login/licenses/algorithm.asp, line 29

The number the sin/cos is being performed on  is

54354354354E+15

Is there an issue with using doubles in sin/cos
If anyone knows of any tutorials, information on this type of thing I would
greatly appreciate it.

TIA

Euan
Message #2 by "Jason Salas" <jason@k...> on Thu, 23 May 2002 04:40:47 +1000
Hi Euan,

Can you post your code so we can see exactly what's going on?  It looks like
it might be more syntactical than anything.

Jason


----- Original Message -----
From: "euan green" <euan_green@h...>
To: "ASPToday Discuss" <asptoday_discuss@p...>
Sent: Wednesday, May 22, 2002 3:26 PM
Subject: [asptoday_discuss] Math Functions


> Hi,
>  Am running into trouble doing some basic calculations.  I think I have
> tracked down the problem to something to do with trying to perform a cos
or
> sin  calculation on a 'double' datatype
>
> Microsoft VBScript runtime error '800a0005'
>
> Invalid procedure call or argument: 'Sin'
>
> /pitchperfect/login/licenses/algorithm.asp, line 29
>
> The number the sin/cos is being performed on  is
>
> 54354354354E+15
>
> Is there an issue with using doubles in sin/cos
> If anyone knows of any tutorials, information on this type of thing I
would
> greatly appreciate it.
>
> TIA
>
> Euan
>

Message #3 by "euan green" <euan_green@h...> on Wed, 22 May 2002 21:30:56
Hi,

Thanks for the reply, I have whittled it down to not being able to use an 
integer greater than 2147483647

comp1 = 2147483647
comp1 = Cos(comp1) 
Response.Write(comp1)

is fine,

but 

comp1 = 2147483648
comp1 = Cos(comp1) 
Response.Write(comp1)

produces the error message

If i change the comp1 value to a lng value it works, but from 
documentation I have read at MSDN, the highest value the lng datatype can 
take is 2147483647,  but how do I store an integer value greater than that?

I can do it using a dbl (floating point datatype) but when I do that I 
can't use it in the Sin/Cos function.

I realise this may be a problem with the server set up, but am at a loss 
at the moment as to how to get around it.  From what I know at the moment 
I can't get a cos/sin of a value greater than 2147483647.

If you try Cos(2147483647) it works, but anything larger than that like
Cos(99999999999999) won't

Thanks for any help, greatly appreciated.

Euan


> Hi Euan,

Can you post your code so we can see exactly what's going on?  It looks 
like
it might be more syntactical than anything.

Jason


----- Original Message -----
From: "euan green" <euan_green@h...>
To: "ASPToday Discuss" <asptoday_discuss@p...>
Sent: Wednesday, May 22, 2002 3:26 PM
Subject: [asptoday_discuss] Math Functions


> Hi,
>  Am running into trouble doing some basic calculations.  I think I have
> tracked down the problem to something to do with trying to perform a cos
or
> sin  calculation on a 'double' datatype
>
> Microsoft VBScript runtime error '800a0005'
>
> Invalid procedure call or argument: 'Sin'
>
> /pitchperfect/login/licenses/algorithm.asp, line 29
>
> The number the sin/cos is being performed on  is
>
> 54354354354E+15
>
> Is there an issue with using doubles in sin/cos
> If anyone knows of any tutorials, information on this type of thing I
would
> greatly appreciate it.
>
> TIA
>
> Euan
>


  Return to Index