32-bit floating point math in 64-bit Python
<p>I program embedded software that runs 32-bit math in 32-bit hardware. I routinely investigate floating point imprecision issues.</p>

<p>In-target debugging is routine, but for convenience I'd like to be able to do quick calculations in my desktop Python environment, having it behave like the target, i.e, do the math in 32 bits.</p>

<p>The desktop hardware, the OS and the Python installation are 64-bit.</p>

<p>We're talking <a href="https://en.wikipedia.org/wiki/IEEE_floating_point">IEEE floats</a> all around.</p>

<p>Ideally, after configuration, I'd like to be able to type, say, <code>0.1+0.2</code> at the Python interpreter and have it already know to process and store everything using 32-bit math.</p>

<p><strong>What are my options?</strong></p>