$answer_reputation = $s_agree_value - $s_against_value + ($s_publisher_agree $publisher_reputation_factor) - ($s_publisher_against $publisher_reputation_factor) + ($s_best_answer * $best_answer_reput);//(1)暂不考虑提问赞反系数和最佳,没有赞同只有反对,此处是否为负值?
if ($answer_reputation < 0)
{
$answer_reputation = (0 - $answer_reputation) - 0.5;
//(2)此处是否改为 0 - ($answer_reputation - 0.5)更恰当?
if ($reputation_log_factor > 1)
{
$answer_reputation = (0 - log($answer_reputation, $reputation_log_factor));//代表负的威望值
}
}
如果只有一个反对,上面的这段代码是否正确?
可能这种情况有考虑到吗?
y=log(x,3),3为底数;当0<x<1时,y为负;当x>1时,y为正;
阅读全文
收起全文