Floating-point operations like x=a/b
are usually not exactly representable so the CPU has to do rounding. Is it possible to get the two floats x_low
and x_up
that are respectively the highest floating point less or equals than the exact value of a/b
and the lowest floating point higher or equals than a/b
?
Some of the conditions are :
a
,b
,x_low
,x_up
andx
arefloat
a
andb
are positive, integers (1.0f
,2.0f
, etc)