user39329: I just displayed the value for floor( 1.0f ) and surprisingly, it's 0.
Anyone knows about that? Is there a fix in libc expected any time soon?
I've been looking at libc::floor.s but it's a bit dodgy and 1) I don't want to break my other existing code and 2) don't have time for that so I'll add an epsilon at the moment (but that defeats the purpose of floor)...
Thanks for posting any fix or idea on how to bypass the issue.

user-1: I ran this sketch:
void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println(floor(1.0f));
}

It outputs "1.0"

39329: <p>I just displayed the value for floor( 1.0f ) and surprisingly, it's 0.</p>

<p>Anyone knows about that? Is there a fix in libc expected any time soon?</p>

<p>I've been looking at libc::floor.s but it's a bit dodgy and 1) I don't want to break my other existing code and 2) don't have time for that so I'll add an epsilon at the moment (but that defeats the purpose of floor)...</p>

<p>Thanks for posting any fix or idea on how to bypass the issue.</p>
 -1: <p>I ran this sketch:</p>

<pre><code>void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println(floor(1.0f));
}
</code></pre>

<p>It outputs "1.0"</p>
