Conditional if statement in scripting

Conditional if statement in scripting

What's wrong whit this script?  Or what else can be wrong?  I always get back the FALSE value, 200.0, regardless the input. 

input.Painting = if((input.BWS  <  40.0),2.0,200.0);

I have the sensation that the input.BWS < 40.0 has not be considered at all. 
Do you have some experience like this?

(the input.BWS in the <boolean-expression> is Look-up field, with an applied filter, so it is dynamic) can it be a problem?