Moin Moin !
Aus Numerik I:
Zwei Floats sind gleich, wenn der Absolutbetrag ihrer Differenz kleiner als eine sehr kleine, aber noch als Float darstellbaren Zahl Epsilon ist.
const epsilon = 1.0e-10;
function float_equal(float a, float b)
{
if (abs(a-b)<epsilon) {
return 'equal'
} else {
return 'not equal'
}
}
Alexander
--
Nein, ich beantworte keine Fragen per eMail. Dafür ist das Forum da.
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so!"
Nein, ich beantworte keine Fragen per eMail. Dafür ist das Forum da.
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so!"