@@ -146,8 +146,8 @@ namespace boost { namespace math {
146
146
{
147
147
return result;
148
148
}
149
- BOOST_MATH_STD_USING
150
- RealType power = -(location - x ) / scale;
149
+
150
+ RealType power = (x - location ) / scale;
151
151
return logistic_sigmoid (power, Policy ());
152
152
}
153
153
@@ -197,7 +197,6 @@ namespace boost { namespace math {
197
197
template <class RealType , class Policy >
198
198
BOOST_MATH_GPU_ENABLED inline RealType quantile (const logistic_distribution<RealType, Policy>& dist, const RealType& p)
199
199
{
200
- BOOST_MATH_STD_USING
201
200
RealType location = dist.location ();
202
201
RealType scale = dist.scale ();
203
202
@@ -220,13 +219,12 @@ namespace boost { namespace math {
220
219
return policies::raise_overflow_error<RealType>(function," probability argument is 1, must be >0 and <1" ,Policy ());
221
220
}
222
221
223
- return location - scale * - logit (p, Policy ());
222
+ return location + scale * logit (p, Policy ());
224
223
} // RealType quantile(const logistic_distribution<RealType, Policy>& dist, const RealType& p)
225
224
226
225
template <class RealType , class Policy >
227
226
BOOST_MATH_GPU_ENABLED inline RealType cdf (const complemented2_type<logistic_distribution<RealType, Policy>, RealType>& c)
228
227
{
229
- BOOST_MATH_STD_USING
230
228
RealType location = c.dist .location ();
231
229
RealType scale = c.dist .scale ();
232
230
RealType x = c.param ;
@@ -250,7 +248,7 @@ namespace boost { namespace math {
250
248
{
251
249
return result;
252
250
}
253
- RealType power = -(x - location ) / scale;
251
+ RealType power = (location - x ) / scale;
254
252
return logistic_sigmoid (power, Policy ());
255
253
}
256
254
@@ -293,7 +291,6 @@ namespace boost { namespace math {
293
291
template <class RealType , class Policy >
294
292
BOOST_MATH_GPU_ENABLED inline RealType quantile (const complemented2_type<logistic_distribution<RealType, Policy>, RealType>& c)
295
293
{
296
- BOOST_MATH_STD_USING
297
294
RealType scale = c.dist .scale ();
298
295
RealType location = c.dist .location ();
299
296
constexpr auto function = " boost::math::quantile(const complement(logistic_distribution<%1%>&), %1%)" ;
@@ -316,7 +313,7 @@ namespace boost { namespace math {
316
313
return policies::raise_overflow_error<RealType>(function," probability argument is 0, but must be >0 and <1" ,Policy ());
317
314
}
318
315
319
- return location + scale * - logit (q, Policy ());
316
+ return location - scale * logit (q, Policy ());
320
317
}
321
318
322
319
template <class RealType , class Policy >
0 commit comments