What do you mean exactly? Writing it in the form of (0.5*x + 0.5) seems like it would map to a MAD instruction, while in the original form it doesn't. MAD does both Multiply and Add in a single instruction, but I the order of operation matters, so doing it in the order of Add then multiply (as in the original form) wouldn't work, at least not without breaking floating point rules.
why (x+1.0f)*0.5f has optimized way? I think (0.5*x + 0.5) and (x+1.0f)*0.5f both need ADD and MUL Command....
What do you mean exactly? Writing it in the form of (0.5*x + 0.5) seems like it would map to a MAD instruction, while in the original form it doesn't. MAD does both Multiply and Add in a single instruction, but I the order of operation matters, so doing it in the order of Add then multiply (as in the original form) wouldn't work, at least not without breaking floating point rules.