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 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top