Opened 10 years ago

Closed 10 years ago

#8399 closed Bugs (invalid)

owens_t_T6 misplaced parenthesis

Reported by: mwelinder@… Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost 1.53.0 Severity: Problem
Keywords: Cc:

Description

In http://www.boost.org/doc/libs/1_53_0/boost/math/special_functions/owens_t.hpp in function owens_t_T6 you will see the line...

const RealType r = atan2(y, static_cast<RealType>(1 + a) );

which should have been

const RealType r = atan2(y, static_cast<RealType>(1) + a );

It probably doesn't matter much, though.

Change History (1)

comment:1 by John Maddock, 10 years ago

Resolution: invalid
Status: newclosed

Ah no, the original code is correct:

We require mixed arithmetic between the floating point type and all builtin arithmetic types as part of our conceptual requirements, so 1 + a is always supported.

The cast is there in case the type of "a" uses expression templates (ie 1 + a returns a type other than the type of "a").

Note: See TracTickets for help on using tickets.