question: public static void UF3 ( double [ ] x , double [ ] f , int nx ) { int count1 = 0 ; int count2 = 0 ; double sum1 = 0.0 ; double sum2 = 0.0 ; double prod1 = 1.0 ; double prod2 = 1.0 ; double yj ; double pj ; for ( int j = 2 ; j <= nx ; j ++ ) { yj = x [ j - 1 ] - Math . pow ( x [ 0 ] , 0.5 * ( 1.0 + 3.0 * ( j - 2.0 ) / ( nx - 2.0 ) ) ) ; pj = Math . cos ( 20.0 * yj * PI / Math . sqrt ( j + 0.0 ) ) ; if ( j % 2 == 0 ) { sum2 += yj * yj ; prod2 *= pj ; count2 ++ ; } else { sum1 += yj * yj ; prod1 *= pj ; count1 ++ ; } } f [ 0 ] = x [ 0 ] + 2.0 * ( 4.0 * sum1 - 2.0 * prod1 + 2.0 ) / ( double ) count1 ; f [ 1 ] = 1.0 - Math . sqrt ( x [ 0 ] ) + 2.0 * ( 4.0 * sum2 - 2.0 * prod2 + 2.0 ) / ( double ) count2 ; }
target:  Evaluates the UF3 problem.