crazy semantics in The Wolfram Language

42 views
Skip to first unread message

Dan Drake

unread,
Dec 19, 2014, 10:17:41 AM12/19/14
to alias sage-marketing
See the screenshot at
https://plus.google.com/+DanPiponi/posts/fF9xHcxo9Ze .

Quite a violation of the principle of least surprise...


Dan

--
--- Dan Drake
----- www.math.wisc.edu/~ddrake/
-------
signature.asc

maldun.fin...@gmail.com

unread,
Dec 25, 2014, 3:15:22 PM12/25/14
to sage-ma...@googlegroups.com
Actually from what is shown, it's not a problem with the principle of least suprise, it's simply wrong:

the sequence f is defined by f[0] = 1, f[n] = n for n > 0, thus summation over n =0,…,m gives
Σ f[n] =  ½ m(m+1) + 1
It appears that the symbolic summation ignores the special definition of f[0] = 1,
and only cares about the definition f[n_] = n, and thus it gives a wron result, in the symbolic case,
and gives the right one for the numeric value, where (at I suppose) f[n] is evaluated explicitely.

Nevertheless Mathematica does it wrong.

maldun.fin...@gmail.com

unread,
Dec 25, 2014, 3:20:37 PM12/25/14
to sage-ma...@googlegroups.com
Sorry for replying agein, but I saw that in one of the comments from your link it seems
that Maxima makes the same mistake.

- Stefan


On Friday, December 19, 2014 4:17:41 PM UTC+1, Dan Drake wrote:
Reply all
Reply to author
Forward
0 new messages