AnsweredAssumed Answered

FX_CONTRACT behavior

Question asked by dubd on Feb 10, 2014
Latest reply on Feb 13, 2014 by MikeP

sample code:

 

tempAccum = 0;

tempAccum = 0.9r / 0.1r;                    // SATURATES to fract +1

tempAccum = (accum) 0.9r / 0.1r        // gives correct answer, approx 9

 

I thought with FX_CONTRACT the compiler would make the intermediate result an accum before assigning to tempAccum...

Outcomes