3 ms·
I don't have the time to fully analyze this but my concern would be here: exponent *= 2 ** (8 - E) In the E=8 case then this is just `* 1`. In the E=31 c
by timewizard 1y ago
I don't have the time to fully analyze this but my concern would be here:
exponent *= 2 ** (8 - E)
In the E=8 case then this is just `* 1`. In the E=31 case this is now `* 2*-23`. Python is going to do all of this for you in the float64 domain. I think it's possible that you haven't graphed what you intended.
You also don't have subnormals, infinities or propagating NaNs. You manage to only retain the signed 0.
EDIT: And the midpoint of your system is 0.5. Which is a little uncomfortable.