TR1 Special Math
Ed Smith-Rowland
3dw4rd@verizon.net
Sat Nov 14 20:41:00 GMT 2015
On 11/14/2015 03:28 PM, Ed Smith-Rowland wrote:
> On 11/13/2015 11:20 AM, Ed Smith-Rowland wrote:
>> On 11/13/2015 10:32 AM, Jonathan Wakely wrote:
>>> On 25 October 2015 at 20:48, Jonathan Wakely <jwakely.gcc@gmail.com>
>>> wrote:
>>>> On 25 October 2015 at 17:46, Ed Smith-Rowland <3dw4rd@verizon.net>
>>>> wrote:
>>>>> On 10/24/2015 11:38 PM, Jonathan Wakely wrote:
>>>>>> On 8 May 2015 at 15:05, Ed Smith-Rowland <3dw4rd@verizon.net> wrote:
>>>>>>> On 05/07/2015 12:06 PM, Jonathan Wakely wrote:
>>>>>>>> Hi Ed,
>>>>>>>>
>>>>>>>> The C++ committee is considering the
>>>>>>>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4437.pdf
>>>>>>>> proposal to make C++17 include the contents of ISO 29124:2010 (the
>>>>>>>> special math functions from TR1 that went into a separate
>>>>>>>> standard,
>>>>>>>> not into C++11).
>>>>>>>>
>>>>>>>> What is the status of our TR1 implementation? Is it complete? Good
>>>>>>>> enough quality to move out of the tr1 sub-dir?
>>>>>>>>
>>>>>>>> Even if N4437 isn't accepted for C++17 we could move things
>>>>>>>> around to
>>>>>>>> turn the TR1 code into an iso29124 implementation, do you think
>>>>>>>> that
>>>>>>>> would make sense?
>>>>>>>>
>>>>>>> That would make absolute sense.
>>>>>>> I actually have a tree where I've done that.
>>>>>>> All the functions are in there (29124 removed the hypergeometric
>>>>>>> functions.
>>>>>>> I'd like to keep those as extensions.
>>>>>>> I have some bugfixes also.
>>>>>>>
>>>>>>> I have a better version of the Carlson elliptic functions (which
>>>>>>> are used
>>>>>>> in
>>>>>>> the 29124 elliptic functions).
>>>>>>>
>>>>>>> Ed
>>>>>>>
>>>>>> Hi Ed, Florian,
>>>>>>
>>>>>> Here's a patch to re-use the TR1 math functions to implement IS
>>>>>> 29124,
>>>>>> what do you think of this approach? Ed, were you just going to copy
>>>>>> the files and have duplicated code?
>>>>>>
>>>>>> We should probably uglify the names of the hypergeometric
>>>>>> functions if
>>>>>> they are not in the final standard.
>>>>>>
>>>>>> This doesn't include Florian's patch, which should be applied.
>>>>>>
>>>>>> (I want to get this done before stage 1 ends in a couple of
>>>>>> weeks, so
>>>>>> am posting this for review now, but I'll be unavailable for the next
>>>>>> week or two and might not be able to actually commit anything until
>>>>>> stage 3).
>>>>> Hi all!
>>>>>
>>>>> I am actually very aware of the stage 1 deadline and am working
>>>>> furiously!
>>>>>
>>>>> This patch adds the hypergeometric and confluent hypergeometric
>>>>> functions
>>>>> that were actually stricken fromTR29124.
>>>>> I actually had a mind to add those back especially since the
>>>>> confluent one
>>>>> is actually pretty stable in it's realm and is used in some
>>>>> statistics
>>>>> tests.
>>>>> I expect that some people have ventures to use both and so TR29129
>>>>> would not
>>>>> be a full replacement for TR1 without them.
>>>>>
>>>>> I intend to post within the next few days. I have to realize that
>>>>> some of
>>>>> my hopes and dreams would be better done with these in tree! ;-)
>>>>>
>>>>> Thank you for lighting a fire Jonathan!
>>>> Excellent, glad to hear you're on this, as you know the code and the
>>>> specs, whereas I'm poking around blindly :-)
>>> Hi Ed,
>>>
>>> Have you been able to find enough time to work on this?
>>>
>>> Will you be able to make the stage 1 deadline tomorrow, and if not, do
>>> you think I should apply my patch to re-use the TR1 stuff? (We can
>>> apply Florian's bug fix to that as well).
>>>
>> I'm going to post something in a few hours.
>>
>>
> OK,
>
> this is still testing but I wanted to get it in under the deadline.
> It is basically a combination of Jonathan's approach using TR1 (which
> I do for C++03)
> Plus the start of a new impl in bits.
> Plus patches from Florian.
>
> Ed
>
>
The last patchwas missing some tests.
I'm also going to bzip it - I realized it was huge.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_specfun_6.bz2
Type: application/x-bzip
Size: 182274 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20151114/f956b423/attachment.bin>
-------------- next part --------------
2015-11-14 Edward Smith-Rowland <3dw4rd@verizon.net>
Jonathan Wakely <jwakely@redhat.com>
Florian Goth <CaptainSifff@gmx.de>
Implement TR29124 Special Math Functions
* include/Makefile.am: Add new TR29124 headers.
* include/Makefile.in: Regenerated.
* include/bits/specfun.h: New.
* include/bits/specfun_util.h: New.
* include/bits/sf_beta.tcc: New.
* include/bits/sf_bessel.tcc: New.
* include/bits/sf_chebyshev.tcc: New.
* include/bits/sf_dawson.tcc: New.
* include/bits/sf_laguerre.tcc: New.
* include/bits/sf_ellint.tcc: New.
* include/bits/sf_expint.tcc: New.
* include/bits/sf_fresnel.tcc: New.
* include/bits/sf_gamma.tcc: New.
* include/bits/sf_gegenbauer.tcc: New.
* include/bits/sf_hyperg.tcc: New.
* include/bits/sf_hermite.tcc: New.
* include/bits/sf_hypint.tcc: New.
* include/bits/sf_jacobi.tcc: New.
* include/bits/sf_legendre.tcc: New.
* include/bits/sf_mod_bessel.tcc: New.
* include/bits/sf_theta.tcc: New.
* include/bits/sf_trigint.tcc: New.
* include/bits/sf_zeta.tcc: New.
* include/tr1/special_function_util.h: Place functions in std
if __STDCPP_WANT_MATH_SPEC_FUNCS__ defined as 1.
* include/tr1/bessel_function.tcc: Ditto.
* include/tr1/beta_function.tcc: Ditto.
* include/tr1/cmath: Ditto.
* include/tr1/ell_integral.tcc: Ditto.
* include/tr1/exp_integral.tcc: Ditto.
* include/tr1/gamma.tcc: Ditto.
* include/tr1/hypergeometric.tcc: Ditto.
* include/tr1/legendre_function.tcc: Ditto.
* include/tr1/modified_bessel_func.tcc: Ditto.
* include/tr1/poly_hermite.tcc: Ditto.
* include/tr1/poly_laguerre.tcc: Ditto.
* include/tr1/riemann_zeta.tcc: Ditto.
* testsuite/libstdc++-dg/conformance.exp: Run tests from
testsuite/special_function sub-directory.
* testsuite/special_functions/01_assoc_laguerre/check_nan.cc: New.
* testsuite/special_functions/01_assoc_laguerre/check_value.cc: New.
* testsuite/special_functions/01_assoc_laguerre/compile.cc: New.
* testsuite/special_functions/01_assoc_laguerre/compile_2.cc: New.
* testsuite/special_functions/02_assoc_legendre/check_nan.cc: New.
* testsuite/special_functions/02_assoc_legendre/check_value.cc: New.
* testsuite/special_functions/02_assoc_legendre/compile.cc: New.
* testsuite/special_functions/02_assoc_legendre/compile_2.cc: New.
* testsuite/special_functions/03_beta/check_nan.cc: New.
* testsuite/special_functions/03_beta/check_value.cc: New.
* testsuite/special_functions/03_beta/compile.cc: New.
* testsuite/special_functions/03_beta/compile_2.cc: New.
* testsuite/special_functions/04_comp_ellint_1/check_nan.cc: New.
* testsuite/special_functions/04_comp_ellint_1/check_value.cc: New.
* testsuite/special_functions/04_comp_ellint_1/compile.cc: New.
* testsuite/special_functions/04_comp_ellint_1/compile_2.cc: New.
* testsuite/special_functions/05_comp_ellint_2/check_nan.cc: New.
* testsuite/special_functions/05_comp_ellint_2/check_value.cc: New.
* testsuite/special_functions/05_comp_ellint_2/compile.cc: New.
* testsuite/special_functions/05_comp_ellint_2/compile_2.cc: New.
* testsuite/special_functions/06_comp_ellint_3/check_nan.cc: New.
* testsuite/special_functions/06_comp_ellint_3/check_value.cc: New.
* testsuite/special_functions/06_comp_ellint_3/compile.cc: New.
* testsuite/special_functions/06_comp_ellint_3/compile_2.cc: New.
* testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: New.
* testsuite/special_functions/07_cyl_bessel_i/check_value.cc: New.
* testsuite/special_functions/07_cyl_bessel_i/compile.cc: New.
* testsuite/special_functions/07_cyl_bessel_i/compile_2.cc: New.
* testsuite/special_functions/07_cyl_bessel_i/pr56216.cc: New.
* testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: New.
* testsuite/special_functions/08_cyl_bessel_j/check_value.cc: New.
* testsuite/special_functions/08_cyl_bessel_j/compile.cc: New.
* testsuite/special_functions/08_cyl_bessel_j/compile_2.cc: New.
* testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: New.
* testsuite/special_functions/09_cyl_bessel_k/check_value.cc: New.
* testsuite/special_functions/09_cyl_bessel_k/compile.cc: New.
* testsuite/special_functions/09_cyl_bessel_k/compile_2.cc: New.
* testsuite/special_functions/10_cyl_neumann/check_nan.cc: New.
* testsuite/special_functions/10_cyl_neumann/check_value.cc: New.
* testsuite/special_functions/10_cyl_neumann/compile.cc: New.
* testsuite/special_functions/10_cyl_neumann/compile_2.cc: New.
* testsuite/special_functions/11_ellint_1/check_nan.cc: New.
* testsuite/special_functions/11_ellint_1/check_value.cc: New.
* testsuite/special_functions/11_ellint_1/compile.cc: New.
* testsuite/special_functions/11_ellint_1/compile_2.cc: New.
* testsuite/special_functions/12_ellint_2/check_nan.cc: New.
* testsuite/special_functions/12_ellint_2/check_value.cc: New.
* testsuite/special_functions/12_ellint_2/compile.cc: New.
* testsuite/special_functions/12_ellint_2/compile_2.cc: New.
* testsuite/special_functions/13_ellint_3/check_nan.cc: New.
* testsuite/special_functions/13_ellint_3/check_value.cc: New.
* testsuite/special_functions/13_ellint_3/compile.cc: New.
* testsuite/special_functions/13_ellint_3/compile_2.cc: New.
* testsuite/special_functions/14_expint/check_nan.cc: New.
* testsuite/special_functions/14_expint/check_value_neg.cc: New.
* testsuite/special_functions/14_expint/check_value_pos.cc: New.
* testsuite/special_functions/14_expint/compile.cc: New.
* testsuite/special_functions/14_expint/compile_2.cc: New.
* testsuite/special_functions/15_hermite/check_nan.cc: New.
* testsuite/special_functions/15_hermite/compile.cc: New.
* testsuite/special_functions/15_hermite/compile_2.cc: New.
* testsuite/special_functions/16_laguerre/check_nan.cc: New.
* testsuite/special_functions/16_laguerre/check_value.cc: New.
* testsuite/special_functions/16_laguerre/compile.cc: New.
* testsuite/special_functions/16_laguerre/compile_2.cc: New.
* testsuite/special_functions/17_legendre/check_nan.cc: New.
* testsuite/special_functions/17_legendre/check_value.cc: New.
* testsuite/special_functions/17_legendre/compile.cc: New.
* testsuite/special_functions/17_legendre/compile_2.cc: New.
* testsuite/special_functions/18_riemann_zeta/check_nan.cc: New.
* testsuite/special_functions/18_riemann_zeta/check_value_neg.cc: New.
* testsuite/special_functions/18_riemann_zeta/check_value_pos.cc: New.
* testsuite/special_functions/18_riemann_zeta/compile.cc: New.
* testsuite/special_functions/18_riemann_zeta/compile_2.cc: New.
* testsuite/special_functions/19_sph_bessel/check_nan.cc: New.
* testsuite/special_functions/19_sph_bessel/check_value.cc: New.
* testsuite/special_functions/19_sph_bessel/compile.cc: New.
* testsuite/special_functions/19_sph_bessel/compile_2.cc: New.
* testsuite/special_functions/20_sph_legendre/check_nan.cc: New.
* testsuite/special_functions/20_sph_legendre/check_value.cc: New.
* testsuite/special_functions/20_sph_legendre/compile.cc: New.
* testsuite/special_functions/20_sph_legendre/compile_2.cc: New.
* testsuite/special_functions/21_sph_neumann/check_nan.cc: New.
* testsuite/special_functions/21_sph_neumann/check_value.cc: New.
* testsuite/special_functions/21_sph_neumann/compile.cc: New.
* testsuite/special_functions/21_sph_neumann/compile_2.cc: New.
* testsuite/ext/special_functions/airy/airy.cc: New.
* testsuite/ext/special_functions/conf_hyperg/check_nan.cc: New.
* testsuite/ext/special_functions/conf_hyperg/check_value.cc: New.
* testsuite/ext/special_functions/conf_hyperg/compile.cc: New.
* testsuite/ext/special_functions/conf_hyperg/compile_2.cc: New.
* testsuite/ext/special_functions/hyperg/check_nan.cc: New.
* testsuite/ext/special_functions/hyperg/check_value.cc: New.
* testsuite/ext/special_functions/hyperg/compile.cc: New.
* testsuite/ext/special_functions/hyperg/compile_2.cc: New.
* testsuite/special_functions/testcase.h: New.
More information about the Libstdc++
mailing list