Answer the question
In order to leave comments, you need to log in
What is the best algorithm for mathematical operations of "huge" numbers?
I'm playing with swift algorithms, I need to work with huge numbers (for example, you need to sum 10e-400 + 124e-40) What is the best method to implement string summation? For myself, I singled out summation in the binary system, but you can do it the way you were taught at school (as on a "leaflet" (an ordinary column)). So I'm wondering which one would be better. Tell?
Answer the question
In order to leave comments, you need to log in
Read about BigInt implementation
https://github.com/ibiwan/swift-bigint/blob/master... - here's an example.
Don't reinvent the wheel. Or at least look at how they are implemented. The same OpenSSL contains an implementation of long arithmetic.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question