AnsweredAssumed Answered

complex fraction

Question asked by andreahmed on Sep 26, 2016
Latest reply on Oct 6, 2016 by Kader.M

 I'm trying to write an equation of a complexfraction32 which is 32bit. I would like to test for 20% of the value for less than 20% and more than 20% I have a function mult_fr1x32x32 which multiplies the complex fraction by a number. but complex fraction is from -1,1.

How would I write the equation correctly.

 

if( (GO_coil_H[0].re*0.8f) < (CoilEepromData.coilboardhspule.reFundamental) && (CoilEepromData.coilboardhspule.reFundamental) <= (GO_coil_H[0].re)*1.2)

{ // do something }

 

extern volatile complex_fract32 GO_coil_H[DSP_NUM_FREQ];

unsigned int CoilEepromData.coilboardhspule.reFundamental

Outcomes