question: public double evaluate ( final double x , final double a , final double b ) { checkMaxIterations ( maxIterations_ ) ; QL . require ( a > 0.0 , "a must be greater than zero" ) ; QL . require ( b > 0.0 , "b must be greater than zero" ) ; if ( x == 0.0 ) return 0.0 ; if ( x == 1.0 ) return 1.0 ; QL . require ( x > 0.0 && x < 1.0 , "x must be in [0,1]" ) ; final double result = Math . exp ( _gammaFunction . logValue ( a + b ) - _gammaFunction . logValue ( a ) - _gammaFunction . logValue ( b ) + a * Math . log ( x ) + b * Math . log ( 1.0 - x ) ) ; if ( x < ( a + 1.0 ) / ( a + b + 2.0 ) ) return result * betaContinuedFraction ( a , b , x , tolerance_ , maxIterations_ ) / a ; return 1.0 - result * betaContinuedFraction ( b , a , 1.0 - x , tolerance_ , maxIterations_ ) / b ; }
target:  Regularised incomplete beta function