473,414 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Stopping number exponentiation

Jon
I want to trim a number and display the integer and decimals
separately, as such I'm trying to convert it to a string so I can
truncate it.

No matter what combination of int or CStr I try, VBScript displays
long numbers such as:

345332523545325425235255453.6789555

in its exponentiated form:

3.45332523545325E+26

How can I stop this?

Alternatively is there a function that will separate the two for me?
Jul 8 '08 #1
1 1480
Jon wrote:
I want to trim a number and display the integer and decimals
separately, as such I'm trying to convert it to a string so I can
truncate it.

No matter what combination of int or CStr I try, VBScript displays
long numbers such as:

345332523545325425235255453.6789555

in its exponentiated form:

3.45332523545325E+26

How can I stop this?

Alternatively is there a function that will separate the two for me?
Please don't multipost.
I really don't understand why you posted this here. You got a very thorough
explanation of the problem, as well as some good workarounds, in the thread
you started in .scripting.vbscript. There really is nothing any of us will
be able to add to what you received there.If what they have written makes no
sense to you, the polite thing to do would be to post a reply in that thread
explaining what you do not understand or asking how to apply what they have
explained to you. As you can tell, the participants in that thread like to
type and would be happy to help you understand what they've said.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 8 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jeff Davis | last post by:
I was doing some thinking about exponentiation algorithms along with a friend, and I happened upon some interesting results. Particularly, I was able to outperform the ** operator in at least one...
3
by: I.V. Aprameya Rao | last post by:
hi i have been wondering, how does python store its very long integers and perform aritmetic on it. i needed to implement this myself and was thinking of storing the digits of an integer in a...
13
by: Kosio | last post by:
Hello, I know of a way to extract digits from a number using the %10 and divide by 10. But I am wondering if there is an algorithm out there that does not use a divide by 10 feature. The...
2
by: David Laub | last post by:
I know there is no C# exponentiation operator. But since the double class is sealed, there seems no way to add the operator override without creating a new class which uses containment (of a...
3
by: James McGivney | last post by:
What is happening here ? long longg = 5; longg = longg + (2 ^ 8); the answer should be 5 + 256 or 261 but at the end of the above operation C# returns longg = 5 + 10 or 15
67
by: carlos | last post by:
Curious: Why wasnt a primitive exponentiation operator not added to C99? And, are there requests to do so in the next std revision? Justification for doing so: C and C++ are increasingly used...
19
by: gk245 | last post by:
Trying to write a program that will figure out if a number is perfect or not. Here is my logic: 1) Read in the number 2) Split it up (number - 1) 3) Put all the split up numbers into an...
7
by: elventear | last post by:
Hi, I am the in the need to do some numerical calculations that involve real numbers that are larger than what the native float can handle. I've tried to use Decimal, but I've found one main...
4
by: Jeff | last post by:
Hi, I'd like to write Javascript that stops animated gifs from animating. On Firefox, at least, window.stop(); does the trick, although it stops everything on the page and is kind of...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.