big numbers question

1. Junior Member
Join Date
Dec 1969
Posts
5

## big numbers question

NOTE: I put this article is Beginning ASP, but without a positive answer...<BR><BR>I&#039;m programming in ASP and i need to multiply, divide, add and subtract two large numbers (100 digit each). <BR>ASP doen&#039;t support this large numbers. Do you know any functions or classes that do this operators between two large numbers? <BR>Eg: num1=1987351753409580476046874030403975... <BR> num2=9087967538730753087538573857308573... <BR> num3=divide(num1,num2). <BR><BR>Thanks a lot <BR>Pleite <BR>

2. Senior Member
Join Date
Dec 1969
Posts
1,431

## RE: big numbers question

Do you get an error??<BR><BR>the double data type which is a subset of the variant data type (all variables in asp) can hold positive values up to<BR>1.79769313486232E308<BR><BR>more than 100 digits ie 308+ digits

3. Junior Member
Join Date
Dec 1969
Posts
5

## RE: big numbers question

My problem is when i&#039;m using operator.<BR>num1+num2 or num1*num2<BR>i&#039;ll get a third number with exponent <BR>for eg: (1.323234E23)<BR>and i need exact value...

4. Senior Member
Join Date
Dec 1969
Posts
667

## RE: big numbers question

try using the FormatNumber function<BR><BR><BR>Returns an expression formatted as a number. <BR><BR>FormatNumber(Expression [,NumDigitsAfterDecimal [,IncludeLeadingDigit [,UseParensForNegativeNumbers [,GroupDigits]]]])<BR><BR>Arguments<BR>Expression<BR><BR>Required. Expression to be formatted.<BR><BR>NumDigitsAfterDecimal<BR><BR>Opt ional. Numeric value indicating how many places to the right of the decimal are displayed. Default value is -1, which indicates that the computer&#039;s regional settings are used.<BR><BR>IncludeLeadingDigit<BR><BR>Optional. Tristate constant that indicates whether or not a leading zero is displayed for fractional values. See Settings section for values.<BR><BR>UseParensForNegativeNumbers<BR><BR> Optional. Tristate constant that indicates whether or not to place negative values within parentheses. See Settings section for values. <BR><BR>GroupDigits<BR><BR>Optional. Tristate constant that indicates whether or not numbers are grouped using the group delimiter specified in the control panel. See Settings section for values. <BR><BR>Settings<BR>The IncludeLeadingDigit, UseParensForNegativeNumbers, and GroupDigits arguments have the following settings:<BR><BR>Constant Value Description <BR>TristateTrue -1 True <BR>TristateFalse 0 False <BR>TristateUseDefault -2 Use the setting from the computer&#039;s regional settings. <BR><BR><BR>Remarks<BR>When one or more of the optional arguments are omitted, the values for omitted arguments are provided by the computer&#039;s regional settings. <BR><BR>Note All settings information comes from the Regional Settings Number tab.<BR><BR>The following example uses the FormatNumber function to format a number to have four decimal places: <BR><BR>Function FormatNumberDemo<BR> Dim MyAngle, MySecant, MyNumber<BR> MyAngle = 1.3 &#039; Define angle in radians.<BR> MySecant = 1 / Cos(MyAngle) &#039; Calculate secant.<BR> FormatNumberDemo = FormatNumber(MySecant,4) &#039; Format MySecant to four decimal places.<BR>End Function<BR>

5. Senior Member
Join Date
Dec 1969
Posts
1,431

## RE: big numbers question

Did you try using formatNumber function. Why in the world do you need to use such large numbers, encription of some sort??

#### Posting Permissions

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