Einzelnen Beitrag anzeigen

gammatester

Registriert seit: 6. Dez 2005
999 Beiträge
 
#4

AW: Re: Small piece from JavaScript to Delphi won't work

  Alt 16. Jul 2018, 21:31
Nice, is working, thank you!
And how about types, are they correct?
They should work for x in the Longint range. You should check also if frac(x) is zero and output int(x) and 1. The code crashes e.g. for x=1.0+MaxLongint because k1 will become zero and h1/k1 throws a divide-by-zero exception.

Geändert von gammatester (16. Jul 2018 um 21:46 Uhr)
  Mit Zitat antworten Zitat