PDA

View Full Version : How Can I work with Big numbers?



Master
01-04-2006, 02:10 AM
How Can I work with Big numbers?

Example.

W0=999999
W1=14400
W2=2

W3=W0*W1*W2

where, W3=28771200

I want to do the calc. for I Print in the Debug.

Paul Baker
01-04-2006, 02:32 AM
http://www.emesystems.com/BS2math6.htm

PS you should have continued your question in this thread: http://forums.parallax.com/showthread.php?p=565039
rather than a new thread which is just rephrasing the same question.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1+1=10

Chris Savage
01-04-2006, 03:47 AM
Is this related to your other post here:

http://forums.parallax.com/showthread.php?p=565039

If so, please do not start new threads for the same topic.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

Master
01-04-2006, 10:11 PM
Only I want An artifice Math for I Calculate big Value Decimals.

Chris Savage
01-04-2006, 11:42 PM
I don't understand your reply.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

Master
01-04-2006, 11:51 PM
Example.

I want Calculate

W1=10000

w2=60000

W3=w1+W2 (W3=600000000)

where,

W1 and W2 can be a ramdon number word type.

Chris Savage
01-05-2006, 12:19 AM
Well Paul Baker offered you a link to a solution above.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

Tracy Allen
01-05-2006, 12:38 AM
Paul pointed you to this URL, more specifically,

http://www.emesys.com/BS2math6.htm#multiplication

shows how to do double precision (32 bit product) and quad precision (64 bit product) multiplication. Double precision muliplication is easy thanks to the ** operator.

Then,

http://www.emesys.com/BS2math6.htm#showdubdec

shows how to display the number as decimal digits for DEBUG or for other display. There are also routines there for double precision addition, subtraction, etc.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)