old:
Code: Select all
case LogicalAndOperator:
{
gamma=FxEvaluateSubexpression(fx_info,channel,x,y,++p,beta,exception);
*beta=(alpha > 0.0) && (gamma > 0.0) ? 1.0 : 0.0;
return(*beta);
}
case LogicalOrOperator:
{
gamma=FxEvaluateSubexpression(fx_info,channel,x,y,++p,beta,exception);
*beta=(alpha > 0.0) || (gamma > 0.0) ? 1.0 : 0.0;
return(*beta);
}
Code: Select all
case LogicalAndOperator:
{
if (alpha <= 0.0)
return (*beta=0.0); // alpha is false: the AND is false
gamma=FxEvaluateSubexpression(fx_info,channel,x,y,++p,beta,exception);
*beta= (gamma > 0.0) ? 1.0 : 0.0;
return(*beta);
}
case LogicalOrOperator:
{
if (alpha > 0.0)
return (*beta=1.0); // alpha is true: the OR is true
gamma=FxEvaluateSubexpression(fx_info,channel,x,y,++p,beta,exception);
*beta=(gamma > 0.0) ? 1.0 : 0.0;
return(*beta);
}
If the only hindrance to accepting the change is testing, and if I can be assured that the change will be made after the test is done, I will be happy to do the test.