From: Stavros M. <mac...@us...> - 2025-07-31 16:45:43
|
Ah! The documentation is actually at a different place (not devine): /share/contrib/guess/guess.info That clarifies that "product" here means not multiplication, but an indexed product(...). Which also explains how it handles 2^n = product(2,i,1,n) and n! = product(i,i,1,n). --- **[bugs:#4589] guess fails on trivial cases** **Status:** open **Group:** None **Created:** Wed Jul 30, 2025 04:39 PM UTC by Stavros Macrakis **Last Updated:** Wed Jul 30, 2025 08:49 PM UTC **Owner:** nobody ~~~~ load(devine)$ guess([0,0,0]) => expt: undefined: 0 to a negative exponent. guess([0,1,0,1]) => same error guess(makelist(1+2^i,i,1,10)) => fails ~~~~ The only documentation for this function is in the source, and it says cryptically > it tries to find a closed form for a sequence within the hierarchy of expressions of the form <rational function\>, <product of rational functions>, <product of product of rational functions>, etc. It may give several answers Ah, so those sequences (not even 0,0,0?) aren't in its domain. Also, it appears that the required length of the sequence grows with the exponents -- this should be documented: ~~~~ guess(makelist(i^9,i,1,10)) => [] guess(makelist(i^9,i,1,11)) => [i0^9] <<< OK! guess(makelist(i^9,i,1,20)) => Extremely slow guess(makelist(i^5/(i^5+1),i,1,10)) => [] guess(makelist(i^5/(i^5+1),i,1,14)) => OK ~~~~ At the same time, it looks like time is super-exponential in the length of the sequence. And surely ''guess'' is an awfully broad name for such a special-purpose function! 5.48.0 SBCL 2.5.7 MacOS --- Sent from sourceforge.net because max...@li... is subscribed to https://sourceforge.net/p/maxima/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/maxima/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |