@@ -152,7 +152,7 @@ static double regularizedGammaPrefix( const double a, const double z ) {
152152* @param x function parameter
153153* @param m pointer to iteration counter (mutated)
154154* @param y probability equal to `1-x`
155- * @param out destination array for storing the numerator and denominator
155+ * @param out destination pointer for storing the numerator and denominator
156156*/
157157static void ibetaFraction2t ( const double a , const double b , const double x , double * m , const double y , double * out ) {
158158 double denom ;
@@ -240,12 +240,12 @@ static double ibetaFraction2CF( const double a, const double b, const double x,
240240*
241241* The tricky bit is deciding which term to move inside. By preference, we move the larger term inside, so that the size of the largest exponent is reduced. However, that can only be done as long as l3 (see above) is also small.
242242*
243- * @param a function parameter
244- * @param b function parameter
245- * @param x function parameter
246- * @param y probability equal to `1-x`
247- * @param normalized boolean indicating whether to evaluate the power terms of the regularized or non-regularized incomplete beta function
248- * @return power terms
243+ * @param a function parameter
244+ * @param b function parameter
245+ * @param x function parameter
246+ * @param y probability equal to `1-x`
247+ * @param normalized boolean indicating whether to evaluate the power terms of the regularized or non-regularized incomplete beta function
248+ * @return power terms
249249*/
250250static double ibetaPowerTerms ( const double a , const double b , const double x , const double y , const bool normalized ) {
251251 double result ;
@@ -375,13 +375,13 @@ static double ibetaPowerTerms( const double a, const double b, const double x, c
375375/**
376376* Evaluates the incomplete beta via the continued fraction representation.
377377*
378- * @param a function parameter
379- * @param b function parameter
380- * @param x function parameter
381- * @param y probability equal to `1-x`
382- * @param normalized boolean indicating whether to evaluate the power terms of the regularized or non-regularized incomplete beta function
383- * @param out destination pointer for storing the derivative term
384- * @return incomplete beta value
378+ * @param a function parameter
379+ * @param b function parameter
380+ * @param x function parameter
381+ * @param y probability equal to `1-x`
382+ * @param normalized boolean indicating whether to evaluate the power terms of the regularized or non-regularized incomplete beta function
383+ * @param out destination pointer for storing the derivative term
384+ * @return incomplete beta value
385385*/
386386static double ibetaFraction2 ( const double a , const double b , const double x , const double y , const bool normalized , double * out ) {
387387 double result ;
@@ -400,14 +400,14 @@ static double ibetaFraction2( const double a, const double b, const double x, co
400400/**
401401* This is DiDonato and Morris's BGRAT routine, see Eq's 9 through 9.6.
402402*
403- * @param a function parameter
404- * @param b function parameter
405- * @param x function parameter
406- * @param y probability equal to `1-x`
407- * @param s0 initial value
408- * @param mult initial value
409- * @param normalized boolean indicating whether to evaluate the regularized or non-regularized incomplete beta function
410- * @return function value
403+ * @param a function parameter
404+ * @param b function parameter
405+ * @param x function parameter
406+ * @param y probability equal to `1-x`
407+ * @param s0 initial value
408+ * @param mult initial value
409+ * @param normalized boolean indicating whether to evaluate the regularized or non-regularized incomplete beta function
410+ * @return function value
411411*/
412412static double betaSmallBLargeASeries ( const double a , const double b , const double x , const double y , const double s0 , const double mult , const bool normalized ) {
413413 double prefix ;
@@ -497,14 +497,14 @@ static double betaSmallBLargeASeries( const double a, const double b, const doub
497497/**
498498* Computes the difference between `ibeta(a,b,x)` and `ibeta(a+k,b,x)`.
499499*
500- * @param a function parameter
501- * @param b function parameter
502- * @param x function parameter
503- * @param y probability equal to `1-x`
504- * @param k function input
505- * @param normalized boolean indicating whether to evaluate the power terms of the regularized or non-regularized incomplete beta function
506- * @param out destination pointer for storing the derivative term
507- * @return difference between ibeta(a,b,x) and ibeta(a+k,b,x)
500+ * @param a function parameter
501+ * @param b function parameter
502+ * @param x function parameter
503+ * @param y probability equal to `1-x`
504+ * @param k function input
505+ * @param normalized boolean indicating whether to evaluate the power terms of the regularized or non-regularized incomplete beta function
506+ * @param out destination pointer for storing the derivative term
507+ * @return difference between ibeta(a,b,x) and ibeta(a+k,b,x)
508508*/
509509static double ibetaAStep ( const double a , const double b , const double x , const double y , const double k , const bool normalized , double * out ) {
510510 double prefix ;
@@ -564,11 +564,11 @@ static double risingFactorialRatio( const double a, const double b, const double
564564/**
565565* Series approximation to the incomplete beta.
566566*
567- * @param a function parameter
568- * @param b function parameter
569- * @param x function parameter
570- * @param result initial result value
571- * @return series function
567+ * @param a function parameter
568+ * @param b function parameter
569+ * @param x function parameter
570+ * @param result initial result value
571+ * @return series function
572572*/
573573static double ibetaSeriesT ( double * a , const double b , const double x , double * poch , int32_t * n , double * result ) {
574574 double r ;
@@ -636,14 +636,14 @@ static double binomialCCDF( const double n, const double k, const double x, cons
636636/**
637637* Incomplete beta series.
638638*
639- * @param a function parameter
640- * @param b function parameter
641- * @param x function parameter
642- * @param s0 initial value
643- * @param normalized boolean indicating whether to evaluate the power terms of the regularized or non-regularized incomplete beta function
644- * @param out destination pointer for storing the derivative term
645- * @param y probability equal to `1-x`
646- * @return function value
639+ * @param a function parameter
640+ * @param b function parameter
641+ * @param x function parameter
642+ * @param s0 initial value
643+ * @param normalized boolean indicating whether to evaluate the power terms of the regularized or non-regularized incomplete beta function
644+ * @param out destination for storing the derivative term
645+ * @param y probability equal to `1-x`
646+ * @return function value
647647*/
648648static double ibetaSeries ( const double a , const double b , const double x , const double s0 , const bool normalized , double * out , const double y ) {
649649 double result ;
@@ -715,12 +715,13 @@ static double ibetaSeries( const double a, const double b, const double x, const
715715* @param b function parameter
716716* @param regularized boolean indicating if the function should evaluate the regularized incomplete beta function
717717* @param upper boolean indicating if the function should return the upper tail of the incomplete beta function
718- * @param out pointer to store the function value
719- * @param derivative pointer to store the first derivative
718+ * @param out destination pointer to store the function value
719+ * @param derivative destination pointer to store the first derivative
720720*
721721* @example
722- * kernelBetainc( 0.2, 1.0, 2.0, true, false );
723- * // returns [ 0.36, 1.6 ]
722+ * double out;
723+ * double derivative;
724+ * stdlib_base_kernel_betainc( 0.2, 1.0, 2.0, true, false, &out, &derivative );
724725*/
725726void stdlib_base_kernel_betainc ( double x , double a , double b , const bool regularized , bool upper , double * out , double * derivative ) {
726727 double lambda ;
0 commit comments