Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 21 results for
karatsuba
- Page 1
Karatsuba Wrong Answer After 6 Decimal digits
Programming
Software Development
15 Years Ago
by Peter_APIIT
…lt; second << " : " <<
Karatsuba
(first, second); } return 0; } // ============================================= void userInput(ulong&… ) { ++lengthPower; } return lengthPower; } // ============================================= ulong
Karatsuba
(const ulong& first, const ulong& second) { if…
Re: Karatsuba Wrong Answer After 6 Decimal digits
Programming
Software Development
15 Years Ago
by ArkM
It seems you don't understand that no need in
Karatsuba
algorithm while you are trying to get unsigned long results:…you can't return unsigned long value from
Karatsuba
function! No need in
Karatsuba
algorithm if you have bigint library: there is… representation is a simple text string. Try to implement
Karatsuba
algorithm for this representation.
[C++]Karatsuba's multiplication using stl vectors
Programming
Software Development
14 Years Ago
by mazix2
….insert(i,0); return a+b; } vector<int>
karatsuba
(vector<int> v1,vector<int> v2…,v,w,uPLUSv,wMINUSuv,res2; u =
karatsuba
(x1,y1,m); v =
karatsuba
(x2,y2,m); w =
karatsuba
(X,Y,m); uPLUSv = u+v…
Getting Error In Karatsuba's Multiplication Program
Programming
Software Development
9 Years Ago
by SK1994
…return (n1 < n2) ? n1 : n2; } int
karatsuba
(BigInteger a1, BigInteger b1) { int n1, n2 = 0; for…mask1; d = n2 % mask1; res1 =
karatsuba
(a, c); res2 =
karatsuba
(b, d); res3 =
karatsuba
(a + b, c + d); if (l…
Error on Karatsuba multiplication algorithm's implementation
Programming
Computer Science
8 Years Ago
by Gà_1
…of this function, everything work fine except
Karatsuba
function (I call it *kmulrun*). … result. Here is my implementation of
Karatsuba
algorithm plus all related function: typedef…< r ? 1 : 0; } } del0(res); } //
Karatsuba
multiplication functions void kmulrun(bigint &res, const bigint &…
Re: Recursive multiplication and Karatsuba
Programming
Software Development
13 Years Ago
by Darryl.Burke
…-forums.org/new-java/40500-recursive-multiplication-
karatsuba
.html[/url] [url]http://javaprogrammingforums.com…/algorithms-recursion/7920-recursive-multiplication-
karatsuba
.html[/url] [url]http://www.programmersheaven.…/mb/java/422411/422411/recursive-multiplication-and-
karatsuba
/[/url] [url]http://www.coderanch.com…
Recursive multiplication and Karatsuba
Programming
Software Development
13 Years Ago
by jsp01
…) Also then how would you use this and implement a
Karatsuba
multiplication if say n>3.
Re: Karatsuba Wrong Answer After 6 Decimal digits
Programming
Software Development
15 Years Ago
by ArkM
Take into account that [code] 123456 * 654321 * 80779853 == 6525384681074833728 [/code] but [icode]std::numeric_limits<long>::max()[/icode] is equal to 2147483647 on 32-bit processors (integer overflow is not detected). Try [icode]long long[/icode] type (it's supported by modern compilers now), its max value is 9223372036854775807. …
Re: Karatsuba Wrong Answer After 6 Decimal digits
Programming
Software Development
15 Years Ago
by Peter_APIIT
Why will causing this value although it can fit that value ? Do you have any good big integer library ? I need those supports up to 512 bits ? Thanks
Re: Karatsuba Wrong Answer After 6 Decimal digits
Programming
Software Development
15 Years Ago
by ArkM
No, I have not bigint libraries. I have no need in these libraries. Have you ever seen the phrase "Search Google"? Try this (for [i]bigint library[/i]) and you will get lots of links, for example (from the 1st page): [url]http://mattmccutchen.net/bigint/[/url] [url]http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic[/url] […
Re: Karatsuba Wrong Answer After 6 Decimal digits
Programming
Software Development
15 Years Ago
by Peter_APIIT
I do searching in google but i not sure which one is easy, popular. How about GNU MP ? Thanks.
Re: Karatsuba Wrong Answer After 6 Decimal digits
Programming
Software Development
15 Years Ago
by Peter_APIIT
Thanks for your help. In cases, iI don't want to create my own big int class since there are many outside. I just want some big int library which is template based, easy to use. For instance, bigInt<150> aBigInt; 150 is the number of bits.
Re: [C++]Karatsuba's multiplication using stl vectors
Programming
Software Development
14 Years Ago
by mazix2
And, as you can see it in my code, the base is 256, not as usually 10.
Re: Getting Error In Karatsuba's Multiplication Program
Programming
Software Development
9 Years Ago
by tinstaafl
One thing I noticed is that your algorithm is using the literal value of `char` instead of offsetting it by 48 to get the integer value represented by the char.
source(.s) give different output with respect to .c file
Programming
Software Development
11 Years Ago
by nchy13
hi all. i have implemented
Karatsuba
algorithm for multiplication of large numbers . when i compile .c … below the c program. Here is **ulti.c(program for
karatsuba
algorithm)** #include<stdio.h> #include<string.h…
Re: bitwise multiplication with an array of ints
Programming
Software Development
12 Years Ago
by vijayan121
Karatsuba
, perhaps? [url]http://en.wikipedia.org/wiki/Karatsuba_algorithm[/url] [url]http://mathforum.org/library/drmath/view/71637.html[/url] C: [url]http://ozark.hendrix.edu/~burch/proj/karat/karat.txt[/url] (read the copyright notice.)
Re: Very large integer
Programming
Software Development
16 Years Ago
by vijayan121
…are very large. the other popular multiplication algorithms are
Karatsuba
and Toom-3. [url]http://gmplib.org/manual/…Multiplication-Algorithms.html#Multiplication-Algorithms[/url] in general
Karatsuba
is suitable for smaller numbers, Toom-3 for … limbs: 32-bits per limb on this processor)
Karatsuba
18 limbs Toom-3 139 limbs FFT MODF 456…
Re: multiplication large number using mpi
Programming
Software Development
13 Years Ago
by tyrantbrian
You can use the
Karatsuba
Fast Multiplication algorithm for this purpose. We normally employ this … googling. It shows how MPI can be used to perform
Karatsuba
Multiplication Algorithm in parallel. The code appears in GnuPG as…
Re: Factorial of any length
Programming
Software Development
19 Years Ago
by Asif_NSU
… multiplication can be implemented with even faster algorithms namely 1.
Karatsuba
's divide-and-conquer algorithm 2. Fourier transforms 3. Chinese…
Re: Newmember with big problem!!!
Programming
Software Development
18 Years Ago
by iamthwee
… rather than multiplying. multiplying can lend itself to varying speeds -
Karatsuba
etc.I'd imagine addition to be constant. But I…
Re: mulitplication of two huge integers
Programming
Software Development
17 Years Ago
by iamthwee
@faiz read the following, take out what you need. [url]http://ozark.hendrix.edu/~burch/proj/karat/index.html[/url] All he seems to be doing, if you ignore the complexity of the
karatsuba
implementation, is returning the string reversed, putting some zeros on the end, and doing grade school multiplication. Simple stuff.
Search
Search
Forum Categories
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Forums
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC