Runs k iterations Freivald . The value of k determines accuracy . Higher value means higher accuracy .
function isProduct ( $ a , $ b , $ c , $ k ) { for ( $ i = 0 ; $ i < $ k ; $ i ++ ) if ( freivald ( $ a , $ b , $ c ) == false ) return false ; return true ; }