To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2BXOCC0OvsxS-LgHoJi3661m_-HSFTAcCB2PGrVXcYXaA%40mail.gmail.com.
Being open source is definitely a plus for SymPy here. The authors
could have stepped through SymPy with a debugger to help figure out
their problem, and submitted a pull request for a fix once they found
it.
It's not always possible, or obvious, but it's best to verify your
results somehow. A good way is to compute the same thing, but in a
different way (doing a random numerical check counts as this).
The
likelihood of a bug manifesting itself in exactly the same way in two
completely different algorithms is very low.
But you are right that all software has bugs. I would consider this
paper to be rather low quality, especially for the ACM.
It reads more
like a ranty comment from an idiot on Hacker News than an academic
paper. Even so, others reading it may have the same mindset that they
did, that black box software written by others always works, and it's
good to remove that illusion.
Aaron Meurer
On Tue, Oct 28, 2014 at 6:38 AM, Joachim Durchholz <j...@durchholz.org> wrote:
> http://www.ams.org/notices/201410/rnoti-p1249.pdf
>
> It's hammering Mathematica, but of course bugs like that can happen with any
> symbolic math software.
> Still, SymPy might be able to milk arguments from it. Such as: being open
> source, it's easier to find and fix the source of miscalculations like the
> one reported in that paper.
>
> (I find it also remarkable that Wolfram let a known problem lie dormant for
> so long. That paper is going to hurt their name, badly.)
If they knew anything about debugging and SymPy, which is not so probable.
On Fri, Oct 31, 2014 at 11:45:19AM -0700, Richard Fateman wrote:
> For closed-source commercial programs it is possible to report a bug and
> have an expert resolve the problem accurately and promptly.
Why this is impossible for open-source programs?
> How likely is this?? I think it depends on
> (a) how important the bug is
> (b) how important the person reporting the bug is
> (c) how much money/lives/etc depend on the bug being fixed.
Apparently, Spain universities doesn't matter for the
Wolfram Research.
Or they count "a serious mistake on the
determinant operation" as not important.
Worst news - there is an inevitable vendor lock-in. You can't give
your money someone else (but only single "group of experts", mostly
anonymous for you) to fix the issue.
> As for bugs, consider the expression (in mathematica syntax)
> Sum[x^i, {i, 0, n}]
> which is computed in closed form, but consider specific values,
> say
> x=2, n=-4.
> for which the correct answer is -7/8 even though Sum[2^i,{i.0,-4}] comes
> out 0.
> Now try it in other programs.
Well, SymPy doesn't have this inconsistency:
In [3]: k, n = symbols('k, n', integer=True)
In [4]: f = symbols('f', cls=Function)
In [5]: summation(2**k, (k, 0, -4))
Out[5]: -7/8
In [6]: summation(2**k, (k, 0, n))
Out[6]:
n + 1
2 - 1
In [7]: _.subs(n, -4)
Out[7]: -7/8
The issue here is that Mathematica count n as positive:
In[9]:= Sum[f[i], {i, 0, -2}]
Out[9]= 0
While SymPy uses the Karr convention instead:
On Thu, Oct 30, 2014 at 5:49 PM, Richard Fateman <fat...@gmail.com> wrote:
>
>
> On Tuesday, October 28, 2014 9:30:19 AM UTC-7, Aaron Meurer wrote:
>>
>> Being open source is definitely a plus for SymPy here. The authors
>> could have stepped through SymPy with a debugger to help figure out
>> their problem, and submitted a pull request for a fix once they found
>> it.
>
> If they knew anything about debugging and SymPy, which is not so probable.
Sure it is. This is an advantage of having a CAS use the same language
that it is written in. The more capable you are at SymPy the more
capable you are at understanding how it works internally.
It sounded
to me like the authors were capable Mathematica users.
If Mathematica
were written in Mathematica and the code available, I've no doubt the
authors would have found the bug directly and published that.
This doesn't just apply to CAS software. Languages that write most or
all of their standard library in the language itself also have this
property.
On Sat, Nov 01, 2014 at 09:22:06PM -0700, Richard Fateman wrote:
> Why this is impossible for open-source programs?
>
> It is not impossible, but I am unaware of (unpaid) maintainers of
> open-source programmers carrying pagers on their belts so they can be on call 24 hours
> a day for resolving problems.
Why "unpaid"?
> Of course it is possible
> to pay people to help with open source code (e.g. some unix supporters).
Yes, exactly.
> But once you are paying, and not looking at the code yourself, it kind
> of changes the equation.
Yes, but in first - you can do anything that can do a client of
closed-source vendors. And much more (look to the code yourself, pay
someone else for support, etc)
> Apparently, Spain universities doesn't matter for the
> Wolfram Research.
>
> That sounds reasonable to me.
Are you sure that any academic institution does matter for Wolfram?
> Or they count "a serious mistake on the
> determinant operation" as not important.
>
> Determinants where the entries are exact integers of extremely many digits
> may not be terribly important. What do you think?
In first - there is a regression. Second, det's of big matrix
- only a symptom of the problem. I don't know what the real problem
is and how severe it is.
> Worst news - there is an inevitable vendor lock-in. You can't give
> your money someone else (but only single "group of experts", mostly
> anonymous for you) to fix the issue.
>
> You can form a union of concerned users, e.g. IBM had SHARE.
Is this union can fix closed sources?
> While SymPy uses the Karr convention instead:
>
> Michael Karr?
Yes, see the bibliography in the docstring of Sum.
> Who named it the Karr convention?
Perhaps, we are. Not sure if it's a conventional naming in
the literative, can you suggest a better reference here?
Am 03.11.2014 um 03:56 schrieb Richard Fateman:
> There is a difference in the size of the user base and there is a difference
> in the sophistication of the code. The Cathedral and the Bazaar essay
> doesn't work if bugs do not become shallow with enough eyes.
> You can dig a ditch with many shovellers. It is implausible to do a
> heart transplant that way.
You can get around that with automatic validation. The better the
validation the better the results.
Also, I doubt that closed source is much better at this. Whether it's
open or closed source, you need some really bright people on the team,
and either way, it's not easy to attract or keep them. Closed source can
offer bundles of money, open source can choose among the whole world, so
it's not even clear which approach will give you more bright people.
> In principle. Practically, are you willing to pay someone to become an
> expert on (say) Maxima so that sympy can learn from it? Maxima is
> open source of course.
It's just the question whether you want to pay a company or a team of
people.
> i agree. It might be a problem with (say) addition of certain big
> numbers.
Or with caching, or...
> This convention was certainly in wide use before 1961.
Better source?
Consider Sum_m<=i<n f(i). If m < n, this has an obvious meaning. If m => n, this is summation over the null set, which is customarily defined to be zero.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/20141103225929.GA15940%40darkstar.order.hcn-strela.ru.
Cheers,
Matthew
Obviously, Red Hat does not exist in your reality.
Nor the people who are doing SymPy, for example.
Or... why are you here? We're not paying you after all. Still you
obviously prefer to talk here instead of making money elsewhere.
On Tue, Nov 4, 2014 at 1:48 PM, Richard Fateman <fat...@gmail.com> wrote:
> I think your citing of Karr's paper is OK; the more modern notation seems
> to be
> sum (i in the set{M} of f(i)) which avoids the order of enumeration of
> elements of M.
Except it's nice to use uniform notation for infinite and finite sums,
and the order does matter for infinite sums.
Also people expect to write it as sum from i=n to m, so we might as
well let them enter it that way and print it that way.
I think practically, if you want to be rigorous, you need to have a
separate function/object to represent indefinite summation, which may
work a little differently than most people would expect from Sum().
>
> As far as the best known algorithm, what about
>
> Bill Gosper's?
> e.g.
> http://mathworld.wolfram.com/GospersAlgorithm.html
My understanding is that the Karr algorithm is to summation as the
Risch algorithm is to integration, i.e., it is complete and can prove
that summations don't have closed-form solutions (for some definition
of closed-form).
Your advice is appreciated, but it would be helpful if you actually
took the time to look at what SymPy does, instead of just ranting
blindly.
It feels like more often than not you mention some "mistake"
that SymPy has already solved (this Karr convention is a nice
example), in many cases a very long time ago.
You yourself admitted that you've never actually used SymPy.
I
recommend giving it a try. You don't even need to install it. Just go
to http://live.sympy.org/. Every time you say "SymPy is stupid because
it doesn't consider X" when if fact we have already thought hard about
X a long time ago and implemented what we saw as the best fit for it,
you discredit yourself a little bit, because it's clear that you
didn't even do any research as to what SymPy does.
I think your citing of Karr's paper is OK; the more modern notation seems to besum (i in the set{M} of f(i)) which avoids the order of enumeration of elements of M.As far as the best known algorithm, what aboutBill Gosper's?e.g.and the umpteen related papers some of which are in the references there? (which don't mention Karr;in fact, it seems mathematica ignores him!)While I have not recently read Karr's paper (the one in J. ACM) I recall it being quite lengthy and not contributinganything new that could be programmed in Macsyma. At least not programmed by me.Not to say that anything in it is wrong. Just not helpful.Other work, Zeilberger, Wilf. .. has been put into Maxima, I think.RJF
Plus, your advice essentially amounted to "redo it in Lisp".
Which isn't
entirely unreasonable, but outside the list of available options (I
suspect those with Lisp inclination are already active in doing symbolic
math in Lisp).
(I'm also quite sceptical about Lisp, because it's all power to the
developer and no guarantees to the maintainer, and I do not think that's
a viable option in the long term unless you can guarantee that every
coder on the project is top-notch, but that's just a tangent).