Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Mon Nov 23, 2009 4:05 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ]  Bookmark and Share
Author Message
 Post subject: VB Calcuation Returns "Infinity" as Value
PostPosted: Thu Oct 22, 2009 4:17 am 
Offline

Joined: Thu Oct 22, 2009 4:10 am
Posts: 1
Let me start by thanking you all in advance for your assistance and patience with me. I've spent the past several hours combing through many forum posts trying to find an answer to this question but have, so far, been unsuccessful.

I am writing an app using Visual Basic 2008 Express Edition and stumbling into a problem. I need to able to define two different variable (see the example below) and then calculate setting the second variable as the exponent of the first variable.

A few examples of what I've tried...
Code:
Dim value1 as Integer = 445
Dim value2 as Integer = 1980
Dim value3 as Integer = Math.Pow(445, 1980)

and
Code:
Dim value1 as Integer = 445
Dim value2 as Integer = 1980
Dim value3 as Integer = value1 ^ value2

etc.

However, no matter what I seem to do, I keep getting infinity returned as the value. I've tried using Integer, int64, double, etc. for the various dims, but still no luck.

I'm new to VB and could really use/would really appreciate any assistance that could be provided.

Cheers!
Andrew


Top
 Profile  
 
 Post subject: Re: VB Calcuation Returns "Infinity" as Value
PostPosted: Thu Oct 22, 2009 6:21 am 
Offline

Joined: Tue Oct 06, 2009 8:24 pm
Posts: 7
Dim value1 as Integer = 445
Dim value2 as Integer = 1980
Dim value3 as Integer = value1 ^ value2

The result is too big to store in a variable. Use the Variant data type for result if available. Surprisingly the same values are valid in the Windows Calculator using the x ^ y function.

Let me know the requirement of such big values.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley