Topic: Gamma and error functions overloaded for
Author: Lawrence Crowl <crowl@googlers.com>
Date: Wed, 13 Feb 2013 13:39:47 -0800
Raw View
On 2/10/13, Marc <marc.glisse@gmail.com> wrote:
> On February 9, 2013 9:52:47 AM UTC+1, VinceRev wrote:
> > Looking to the C++11 standard, the vast majority of trigonometic,
> > exp, log and power math functions have been oveloaded for
> > complex types. But the gamma and error functions remain not
> > overloaded. Is there a specific reason for this ? As the gamma
> > complex function is used in a lot of approximation/expansion
> > formulas and it would be very convenient to have it for complex
> > types. If the underlying implementation is currently based on
> > the Lanczos approximation, it would cost nothing to overload it
> > for complex types as the same formula with the same coefficients
> > can be used.
> >
> > So we could have:
> >
> > erf(std::complex)
> > erfc(std::complex)
> > lgamma(std::complex)
> > tgamma(std::complex)
>
> The C standard doesn't have complex versions of these functions,
> although it reserves the names (and cexp2, cexpm1, clog10, clog1p,
> clog2). This would make it harder for C++ standard libraries that
> usually just forward math calls to the right libc function. Your
> "would cost nothing" comment seems wrong. Otherwise, why not.
It seems like the best approach would be to present the proposal
to the C committee. C++ would then pick it up automatically.
--
Lawrence Crowl
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
.