[PATCH, PR] Crash of Bessel functions at x==0!
François Dumont
frs.dumont@gmail.com
Sat Feb 9 20:56:00 GMT 2013
Attached patch applied then.
2013-02-09 François Dumont <fdumont@gcc.gnu.org>
* include/tr1/bessel_function.tcc (__cyl_bessel_ij_series): Code
simplification.
On 02/08/2013 08:46 PM, Paolo Carlini wrote:
> On 02/08/2013 07:08 PM, François Dumont wrote:
>> Just a small remark, in bessel_function.tcc, the following:
>>
>> + if (__x == _Tp(0))
>> + {
>> + if (__nu == _Tp(0))
>> + return _Tp(1);
>> + else if (__nu == _Tp(1))
>> + return _Tp(0);
>> + else
>> + return _Tp(0);
>> + }
>>
>> could be simplified into
>>
>> + if (__x == _Tp(0))
>> + return (__nu == _Tp(0)) ? _Tp(1) : _Tp(0);
> Thanks Francois. Besides the tiny-winy specific issue, we can all
> learn why normally unrelated changes should not be bundled together in
> the same patch, even more so when the more substantive one is by far
> the smaller.
>
> Anyway, change pre-approved, whoever cares to commit it.
>
> Thanks,
> Paolo.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bessel_function.patch
Type: text/x-patch
Size: 651 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20130209/319a2822/attachment.bin>
More information about the Libstdc++
mailing list