#9130: Access to beta function
---------------------------+------------------------------------------------
Reporter: kcrisman | Owner: burcin
Type: enhancement | Status: new
Priority: major | Milestone: sage-5.0
Component: symbolics | Keywords: special function, pynac
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Comment(by burcin):
Replying to [comment:4 kcrisman]:
> Replying to [comment:3 burcin]:
> > GiNaC has a beta function, so this can probably be solved simply by
wrapping that. See #8864 for an example.
> >
> > Though I don't know why the `beta()` function in
`sage/symbolic/expression.pyx` is commented. Maybe there is something I'm
missing.
> >
>
> I think the same reason the psi and psi2 ones are commented - when those
were implemented, they didn't notice that they had been commented earlier.
This was probably pretty early in the conversion, maybe when William was
dealing with CLN (whatever that is)?
`psi()` and `psi2()` were commented because at the time there was no
method defined to numerically evaluate those. This is not the case for
`beta()` however. Here is the `evalf` method (from line 227 of
`ginac/inifcns_gamma.cpp`):
{{{
if (is_exactly_a<numeric>(x) && is_exactly_a<numeric>(y)) {
try {
return
exp(lgamma(ex_to<numeric>(x))+lgamma(ex_to<numeric>(y))-lgamma(ex_to<numeric>(x+y)));
} catch (const dunno &e) { }
}
}}}
We'll find out when someone tries this out I suppose.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9130#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.