On Mon, Mar 31, 2014 at 9:14 PM, Matthew Rocklin <mrock...@gmail.com> wrote:
> http://www.evanmiller.org/mathematical-hacker.html
>
> I reference that blog post pretty often.  I fully intend to reference it
> again in my talk (if it is accepted).
>
> The interesting thing about the Factorial / Gamma / loggamma example is that
> to find the solution you need to find someone who knows both that n! =
> Gamma(n+ 1) and who knows that a loggamma routine is commonly found in lower
> level languages.  Those bits of information are usually held by different
> experts.  Ondrej said "Of course, that's obvious" when I first reposted the
> article on G+.

That's funny, I forgot that I said that and just had the same reaction.

However, we are still missing rational function approximation in SymPy
or mpmath.
That's what is used to implement things like log_gamma or erf (error
function) in
Fortran or C. So I have just created an issue for it:

https://github.com/sympy/sympy/issues/7359

and I spent time explaining exactly how it works in it and giving examples,
including for example the implementation of erf() in gfortran.

Aaron, you were asking about examples of numerical cancellation. I
worked out one in the
issue as well.

Ondrej

>
> You're right that this is similar to my last talk.  The last one though was
> mostly about an application (numerical linear algebra).  I actually want to
> talk a bit more about the philosophy and some of the more abstract tools
> that people might actually use.  Your first impression is a valuable one
> though, I should go through my last talk and make sure that I'm not
> repeating too much that shouldn't be repeated.
>
>
> On Mon, Mar 31, 2014 at 6:03 PM, Aaron Meurer <asmeu...@gmail.com> wrote:
>>
>> That's a good point. One of the nicest things about symbolics, when you
>> can get it, is that it can make things drastically more efficient by doing
>> mathematical simplifications. Evaluating integrals symbolically is a nice
>> example of this (especially for SymPy, which has some pretty nice algorithms
>> to compute definite integrals).
>>
>> I'm reminded of a popular blog post (I can't find a link right now) about
>> how know math is important for programmers. It has the example of how all
>> these programming languages show how they they compute factorial, and how
>> tail recursion can make it linear or whatever, but the actual best way to
>> compute it is to use loggamma, which gives the answer in constant time.
>>
>> Aaron Meurer
>>
>>
>> On Mon, Mar 31, 2014 at 7:51 PM, Tim Lahey <tim.la...@gmail.com> wrote:
>>>
>>>
>>>
>>> On 31 Mar 2014, at 20:29, Aaron Meurer wrote:
>>>
>>>> On Mon, Mar 31, 2014 at 11:32 AM, Matthew Rocklin
>>>> <mrock...@gmail.com>wrote:
>>>>
>>>>> I like that you emphasized the utility for numerics, I think that this
>>>>> is
>>>>> likely to be a selling point for the SciPy crowd.
>>>>>
>>>>
>>>> Yes, this was very intentional. I may need some help gathering up some
>>>> nice
>>>> motivating examples if this is accepted.
>>>
>>>
>>> One motivating example for me is the integration of products of functions
>>> over areas and volumes. For finite elements, you'll get products of pairs of
>>> trial functions (usually polynomials). It's even more useful for products of
>>> trig functions. Performing the integration of any of theses is easy enough
>>> with numerical integration, but it's much more efficient to calculate the
>>> integrals symbolically and then perform the evaluation for each element.
>>>
>>> Cheers,
>>>
>>> Tim.
>>>
>>>
>>> --
>>> 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+unsubscr...@googlegroups.com.
>>> To post to this group, send email to sympy@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/AE5C61B5-8C69-49AE-BAFF-85E5AC924F8F%40gmail.com.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To post to this group, send email to sympy@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/CAKgW%3D6K8F9weBP-7yjpzrN9hQ5FR54TK_QdCPqbzBdwo20zKdg%40mail.gmail.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@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/CAJ8oX-HZABscP43PDuoAeWhcpBYW2w39G8qPx0%2BZCbKcYbJdJg%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@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/CADDwiVCXMe1zA53fyuoNO%2BaWO2mFqjjfYUNzAtAOSTuJE5N5Jw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to