comparing float values in C program gets stuck <p>I am working on an assignment for an embedded software course, but I'm having the strangest problem.</p> <p>Using the code below:</p> <pre><code>void decidePotato(float held) { printf("Deciding Potato, held for %f seconds \n", held); if (held &gt;= 1.99) { printf("Held for more than 1.99s \n", held); returnPotato(); } printf("I evaluated the if statement above \n"); } </code></pre> <p>I get the following output:</p> <pre><code>Deciding Potato, held for 0.010000 seconds </code></pre> <p>I dont even see the "I evaluated the if statement above" message, so the program somehow got stuck evaluating that if statement. And it remains stuck until I reprogram the board How is that even possible?</p>