Fix Bug 83566 - cyl_bessel_j returns wrong result for x>1000 for high orders

Paolo Carlini paolo.carlini@oracle.com
Sat Jan 6 09:24:00 GMT 2018


Hi,

On 05/01/2018 23:46, Michele Pezzutti wrote:
> + __term *= (__k == 0) ? _Tp(1) : -(__mu - (2 * __k - 1) * (2 * __k - 1))
> +                        / (__k * __8x);
In such cases, per the Coding Standards, you want an outer level of 
parentheses wrapping the whole right side expression. See toward the end 
of 
https://www.gnu.org/prep/standards/html_node/Formatting.html#Formatting. 
I see that many other places will need fixing, at some point - this 
rather straightforward rule is often overlooked leading to brittle 
formatting of many expressions, probably because it's really obvious in 
practice only together with Emacs, I'm not sure.

Also - this kind of stylistic nitpicking is partially personal taste - 
the parentheses around (__k == 0) seem definitely redundant to me, and I 
don't think you would find many examples of that in our code.

About the Assignement, please be patient. For example, used to be the 
case that when RMS was traveling couldn't process Assignments, for 
example. It can be slow for many reasons, it's 100% normal.

Paolo..




More information about the Libstdc++ mailing list