Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiplication and division of strings

Status
Not open for further replies.

ayon111

Programmer
Nov 3, 2000
1
SG
hi guys,
could anyone tell me the algorithm for multiplication and division of big strings?
example:12345678901222222758975987689769(string 1)
646468685567856566575776345567657534(string 2)

thanx.
 
There's an ANSI C function strtold() in stdlib.h that converts a string to a long double. Make sure you check the return value and errno after using it to make sure it converted your string successfully. I think this function may be part of the new C99 standard, so if your compiler doesn't provide it, look at strtod().

Russ
bobbitts@hotmail.com
 
use linked lists.store the non-zero digits along with their powers in the nodes of a linked list and then perform multiplication and division operations on the lists the same way u do it for polynomials
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top