COMP(div);

HAL_PIN(in0) = 0.0;
HAL_PIN(in1) = 0.0;
HAL_PIN(out) = 0.0;
HAL_PIN(div_error) = 0.0;


RT(
  if(PIN(in1) == 0.0){
    PIN(div_error) = 1.0;
  }
  else{
    PIN(div_error) = 0.0;
    PIN(out) = PIN(in0) / PIN(in1);
  }
);

ENDCOMP;
