Please Disable Ad-Block To View This Website.

If you block ads, this site can not survive!

Ads are very minimal for registered users. If you don't have an account please register now!

DOWNLOAD
 Full Scripts
 Addons
 Snippets
 DLLs
 MTS Themes
 Tutorials
 Misc.
 File Queue
 Download mIRC
INTERACT
 Screenshots
 Challenge
 Top Downloads
 Submit Form
 Forums

SEARCH
Site Search

FRIENDS
Link to us!
PhotoShelf

Home | Comments:
Long multiplication by Sigh_
Description:
Quick long multiplication algorithm able to handle very large multiplications

Submitted Review Author's Updates

There is no review for this file yet.
There are no update notes.
Screenshot:
No
Screenshot
Available

Comments:

  Mode:    Create New Post

iynxAug 5, 2004 1:26PM
I created a similar JavaScript once. The tricky part is designing division.

Since you have implemented addition in your code, I suggest you make it a seperate function, and add subtraction and division as well. My plan was creating an extensive library that would contain the previously mentioned functions and sqr (using the newton method), e raised to n power (taylor), n digits of pi (using gauss legendre), remainder (%), highest common factor, natural logarithm (taylor), and cos/sin/tan (taylor). These shouldn't be too hard implementing after you've breached the barrier with addition/subtraction and multiplication/division. Allthough they should not be coded in mIRC if one is to perform large calculations. I can think of no other usage for this <:)

Text edited by author on Aug 5, 2004 @ 1:27PM


Sigh_Aug 5, 2004 4:15PM
Some good ideas, of course for the trigonometric functions the large values simply need to be reduced to their 0-360 equivalents but it should be interesting seeing how mIRC handles the others, not too well I would imagine. Perhaps somethings to consider in the future even though mIRC really is sub-optimal for these kind of calculations

KlopsAug 6, 2004 1:42AM
someone just needs to write a dll forit. i would recomend using GMP (GNU Multi-Precision arthmetic) library. its pretty small considering. i had written a big number system for mirc, which had addition,subtraction,multiplication and division. i just hadn't implemented modulus(%). howeva my computer died while i was away in the states, and now cannot access it. :\

KlopsAug 5, 2004 4:03AM
an optimization you can make is removing right hand 0's from numbers before multiplying then adding them all back.

Sum: 4000000000 * 20000000
Optimized: 4 * 2
Result: 8
added removed 0's: 80000000000000000

Sigh_Aug 5, 2004 4:11AM
Good idea, simple to add too

da^hypeAug 4, 2004 9:05PM
Yet another cool Snippet by my webchat buddy :D. keep up the good work.

JamesHetfieldAug 4, 2004 2:44PM
Very nice. Great coding as always!

gr33nyAug 4, 2004 2:08PM
I couldn't find a possible use for that, but your coding and commenting is very nice. :)



Create New Post

You must be logged in to post messages.