mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-29 05:21:37 +03:00
Update toolchain to support std::remainder (#7849)
Update newlib to enable the __ieee754_remainder(f) calls required by std::remainder and others. Add device test for std::remainder variants. Fixes #7845
This commit is contained in:
committed by
GitHub
parent
39d14530ff
commit
20413f817b
@ -1,4 +1,5 @@
|
||||
#include <BSTest.h>
|
||||
#include <cmath>
|
||||
BS_ENV_DECLARE();
|
||||
|
||||
|
||||
@ -30,6 +31,13 @@ TEST_CASE("#612 fmod and sqrt work", "[newlib]")
|
||||
CHECK(fabs(fmod(-10, -3) - (-1.0)) < 1e-5);
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE("#7845 std::remainder works", "[newlib]")
|
||||
{
|
||||
CHECK(fabs(std::remainder((double)10.123456, (double)5.0) - (double)0.123456) < 1e-5);
|
||||
CHECK(fabs(std::remainder((float)15.123456, (float)5.0) - (float)0.123456) < 1e-5);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user