Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 string arithmetic
Index -> Programming, C++ -> C++ Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
md




PostPosted: Mon Dec 05, 2005 5:00 pm   Post subject: (No subject)

it's only easier if you already know Java Wink This is actually a fairly simple thing to do once you realize how. Did it in class once because I was bored...
Sponsor
Sponsor
Sponsor
sponsor
bugzpodder




PostPosted: Fri Dec 09, 2005 9:42 pm   Post subject: (No subject)

Cornflake wrote:
Why use Java when you can use something good?

Besides this is actually a good exercise for figuring out the algorythms behind something, instead of just using a peice of lirabry code. Understanding how something works is a good thing, much better then just taking for granted then it does.


first of all, java's implementation of BigInteger is much more efficient than possible anyone here can come up with (including myself).
for example, one optimization is to use base 2^32. So a large number is represented with a few digits (as opposed to 1000). while you are doing 1000 operations, I am doing 10. hola! i dont care how fast C++ is, its not 100 times faster than java.

and secondly if you know it well enough, you can code it up in 2 minutes, instead of writing ur own addition routine, which takes at least 5 minutes to get it correct (atually its not THAT bad, but when it comes to multiplication, division, its get worse).
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 17 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: