(A+B+C ) ^ (X + Y + Z ) of arbitrary complexity

  • Context: Graduate 
  • Thread starter Thread starter jebusv20
  • Start date Start date
  • Tags Tags
    Complexity
Click For Summary

Discussion Overview

The discussion focuses on methods for breaking down large floating-point numbers into integers for storage and performing power operations on them. It explores both theoretical and practical aspects of multiprecision arithmetic, particularly in the context of computer science.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant seeks a method to express large floating-point numbers as a series of integers for easier storage and computation, specifically for power operations.
  • Another participant suggests breaking down the expression (a+b)^(c+d) into (a+b)^{c}(a+b)^{d} and applying the binomial theorem to each part.
  • A later reply notes that while the binomial theorem approach is valid, it does not address multiprecision arithmetic for numbers with more than two digits.
  • It is proposed that for computing (a+b+c)^n, repeated squaring and multiplication may be effective, with specific formulas provided for even and odd powers.
  • Participants mention various algorithms for fast multiplication of multiprecision numbers, such as Karatsuba multiplication and fast Fourier transform multiplication, highlighting their complexity and potential benefits.
  • There is an acknowledgment that using a multiprecision library could be a practical solution for handling large numbers.

Areas of Agreement / Disagreement

Participants express differing views on the best methods for handling multiprecision arithmetic, with no consensus reached on a single approach. The discussion remains unresolved regarding the optimal strategy for implementing these calculations.

Contextual Notes

Limitations include the complexity of implementing certain algorithms and the need for clarity on how to handle multiprecision arithmetic beyond basic cases. The discussion does not resolve the mathematical steps required for specific implementations.

jebusv20
Messages
3
Reaction score
0
This question relates mostly to computer sciences (my personal field of expertise),
I am trying to find the method for breaking down large floating point (non integer) numbers into a series of integers (so that they can be stored easily), and completing a power operation over them.

for example

1.23 ^ 4.56 = ((1E0)+(2E-1)+(2E-2))^((4E0)+(5E-1)+(6E-2))

I am aware that a program would be able to store quite large floating point numbers (generally up to 16 places of complexity) but, if I were to try and calculate something to 1 million places of accuracy, I will need the above break down)

Im sure it has something to do with pascals triangle which I am fairly sure is good for (a+b)^c, but I don't know how to do (a+b)^(c+d). I know this formula exists because I'm sure calculators use it every day... just not sure how to do it myself. To be clear, this formula does not need to be 'easy' to use, a computer can do billions of integer calculations a second, just need to write the code.
 
Mathematics news on Phys.org
No replies? If its a matter of me not explaining myself please just ask what I mean and what confuses you and I'll try to further explain. If its something that would be really hard to explain, just give it a shot... and if you don't know... well ... feel free to tell your friends who might.

Should we just start with the simple stuff? Purely algebraically how could the following be expressed without the power operation, preferably with a serious of multiplication and addition operations:

(a+b)^(c+d)
 
If you're starting with something like [itex](a+b)^{c+d}[/itex] just break it into [itex](a+b)^{c}(a+b)^{d}[/itex] and use the usual http://en.wikipedia.org/wiki/Binomial_theorem for each part of the product, then multiply them together.
 
drag12 said:
If you're starting with something like [itex](a+b)^{c+d}[/itex] just break it into [itex](a+b)^{c}(a+b)^{d}[/itex] and use the usual http://en.wikipedia.org/wiki/Binomial_theorem for each part of the product, then multiply them together.

This doesn't help for multiprecision arithmetic with more than 2 digits.
If you want to compute (a+b+c)^n, with n an integer repeated squaring and multiplication
is the best way.

a^(2n) = (a^n)^2
a^(2n+1) = a (a^(2n))

A number of algorithms exist to do fast multiplication of multiprecision numbers. (karatsuba multiplication, fast Fourier transfrom multiplication)

The latter will be much faster for large numbers, but also quite hard to implement. Using a multiprecision library is always an option.
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 32 ·
2
Replies
32
Views
2K
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 0 ·
Replies
0
Views
1K
Replies
31
Views
4K
  • · Replies 33 ·
2
Replies
33
Views
9K