C/C++ Efficient Computation of Large Hermitian Polynomials in C++?

AI Thread Summary
The discussion centers on challenges in computing large Hermitian polynomials in C++. The primary concern is the potential stack overflow due to recursion. One participant suggests that using tail recursion could mitigate stack issues, as it allows the recursive call to be the final operation in the function. Another participant emphasizes that any recursive function can be converted into a loop, which can help avoid stack space limitations, although this may complicate the code. The conversation highlights the need for efficient computation methods to handle large polynomial calculations without running into stack problems.
sor2char
Messages
5
Reaction score
0
Im having difficulty computing large Hermitian polynomials in C++. I fear I may have to steer away from a recursive formula. Any help would be greatly appreciated.

John
 
Technology news on Phys.org
Recursion would OK as long as you make your programs tail recursive, meaning the recursive call is the last statement in teh function.
 
Sor2char, you mean you are running out of stack space.

Anything that can be done recursively can be done in a loop. This should take care of stack problems. It can be pain to write some recursive function as a loop however.

Hope this helps.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...
Back
Top