How big is the polynomial that sym2poly can hold?
Mostra commenti meno recenti
How big is the polynomial that sym2poly can hold?
For example, I have this y=sym2poly(sym('x^1000'))
and it's ok. But if I increase the number to x^10000000000, Matlab crashes. How can I avoid this?
Risposta accettata
Più risposte (1)
Sean de Wolski
il 28 Giu 2011
1 voto
2.8823e+17
6 Commenti
sadel
il 28 Giu 2011
Walter Roberson
il 28 Giu 2011
Hmmm... not 3.5184e+13 or 2.8147e+14? There is evidence for 48 total in (e.g.) the documentation for sparse(), but I don't recall seeing any evidence for 58 or 61 ?
Sean de Wolski
il 28 Giu 2011
I was thinking (2^64)/64?
Walter Roberson
il 28 Giu 2011
"64 bit" systems could theoretically address up to 64 bytes; each double occupies 8 bytes. In practice, http://en.wikipedia.org/wiki/X86-64 says that only the lower 48 bits are used in current implementations. That would imply a limit of (2^48)/8 = 2^45 double precision values in a single array, if there was nothing else in the address space.
Sean de Wolski
il 28 Giu 2011
Per usual, you win.
Walter Roberson
il 28 Giu 2011
Did I say "up to 64 bytes" ? I meant "up to 2^64 bytes".
Maybe some day we'll get to edit comments...
Categorie
Scopri di più su Polynomials in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!