Autor Thema: SCALE_R: division by zero  (Gelesen 4965 mal)

0 Mitglieder und 1 Gast betrachten dieses Thema.

Pessimister

  • Gast
SCALE_R: division by zero
« am: 03. Oktober 2010, 05:16:38 »
If I_LO = I_HI, a division by zero takes place:

SCALE_R := (O_HI - O_LO) / (I_HI - I_LO) * (LIMIT(I_LO, X, I_HI) - I_LO) + O_LO;

I propose to return O_LO in this case.

Offline hugo

  • Global Moderator
  • *****
  • Beiträge: 2 150
    • Profil anzeigen
Re:SCALE_R: division by zero
« Antwort #1 am: 18. Januar 2011, 23:34:46 »
thanks very much for your report.

we will update all scale function in the next release to avoid a possible divide by 0