Code:
float lzahn2_ber ( float x1, float y1) {

  static float lzahn2_alt = 0; // oder anderer Vorbelegungswert
  float lzahn2 = ...
  ...
  lzahn2_alt = lzahn2;
  ...                                                                             
}