Efficient Computation of Large Hermitian Polynomials in C++?

Click For Summary
SUMMARY

The discussion focuses on the challenges of computing large Hermitian polynomials in C++. Users suggest avoiding deep recursion due to stack space limitations and recommend using tail recursion to optimize memory usage. Additionally, it is emphasized that any recursive computation can be transformed into an iterative loop, which can alleviate stack overflow issues. This approach is crucial for efficient computation in C++ programming.

PREREQUISITES
  • Understanding of C++ programming language
  • Knowledge of recursion and tail recursion concepts
  • Familiarity with Hermitian polynomials
  • Experience with iterative programming techniques
NEXT STEPS
  • Research C++ tail recursion optimization techniques
  • Learn about converting recursive algorithms to iterative loops in C++
  • Study Hermitian polynomial properties and their applications
  • Explore stack memory management in C++ programming
USEFUL FOR

C++ developers, mathematicians working with polynomials, and anyone interested in optimizing recursive algorithms for performance and memory efficiency.

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 the 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.
 

Similar threads

  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 17 ·
Replies
17
Views
5K
Replies
16
Views
3K
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 6 ·
Replies
6
Views
13K
  • · Replies 4 ·
Replies
4
Views
2K