Relative Content

Tag Archive for c++graphicsfloating-pointlimitcalculus

why does the difference quotient where h = FLT_MIN always equals 0? Is FLT_MIN getting lost in the float innacuracies?

I am trying to find the slope of a Bezier curve using the difference quotient. The difference quotient is: ( f(x + h) - f(x) ) / h
In calculus we usually use limits where we assume h is infinitely small and we evaluate the formula. Here, I wanted to do something similar and make h equal to FLT_MIN or FLT_TRUE_MIN which is supposed to be the smallest positive float value. However, when I run getApproxNormal(0.5f) I just get 0 instead of somewhere in the ballpark of what the normal should be.