No refresh for multiplication in if else statement

Hello guys! I am trying to solve this issue, i have this code made to multiply/divide a frequency linked to an digital encoder and a analog input to output a function generator (sine, square) with Teensy DAC project and i can’t figure it out why the second condition if else multiplication

c_div = (frqA/Freq)*Freq; //????

is not refreshing after the analog input number change.

Here is the full code:

#include <Encoder.h>
Encoder shit (10,12);

float Freq;
bool b_state;
int16_t fLfo1;
float amp1;
float c_frq;
float c_div;
float frqA;
float f11;

void setup() {
  Serial.begin(9600);
  pinMode(A1, INPUT);
}

void loop() {
  fLfo1 = shit.read();
  if (fLfo1 <= 0) {
    shit.write(0);
    }
    else if (fLfo1 >= 100) {
      shit.write(100);
      }

Freq = analogRead(A1)*0.1; 

  if (Freq<=1.00){
    frqA = constrain(fLfo1,1,1000)*0.1;
    f11 = (frqA*4.352);  
    }

    else if (Freq>1.00){
      frqA = constrain(fLfo1,1,1000)*0.01;
      //div = (frqA/Freq);
      c_div = (frqA/Freq)*Freq; //????
      f11 = (c_div*4.352);         
      }

      Serial.print(frqA,3);Serial.print(" cdiv: "); 
      Serial.print(c_div,3);Serial.print(" ");
      Serial.print(f11);Serial.print(" ");
      Serial.println(Freq);
}

If i change the operation with / or + i have the update going on.
What do you think?

What do you mean by "not refreshing" ?

.

Isn't this

c_div = (frqA/Freq)*Freq;

the same as this

c_div = frqA;

...R

ieee488:
What do you mean by "not refreshing" ?

.

no update is taking place if i change the analog input

vincentiu:
no update is taking place if i change the analog input

In the else if frqA has not changed. Is it suppose to?

ieee488:
In the else if frqA has not changed. Is it suppose to?

there is change, only the mutiplication is not when Freq is >1.00

Robin2:
Isn’t this

c_div = (frqA/Freq)*Freq;

the same as this

c_div = frqA;

…R

oh right!, the changing is taking place but the multiplication is with 1