Closed thrimbor closed 5 years ago
I've written a (very ugly) test program for this and checked all the new math functions.
It ran the functions, taking M_PI
and/or M_PI_2
as arguments, casted the results to int
and wrote the values using debugPrint("%i")
.
They all work as expected. :+1:
(I tried all the "usual" ways of printing float/double values using printf (%f, %F, %e, %E, %g, %G), none seems to be working. Thus commenced the casting.)
Merged; thanks to @thrimbor for the code, @dracc for testing.
We can test this again in the future, when we have a proper printf
(either %f
, or 0x%08X
as workarounds if floats take too long). We can just follow-up quickfixes if there are any issues.
This contains all of my work to get math.h libc++-compatible, plus a few extras:
ceil
, added commentsfloor
fmax
fmin
fpclassify
nearbyint
rint
round
trunc
isfinite
isinf
,isnan
,isnormal
andsignbit
isgreater
,isgreaterequal
,isless
,islessequal
,islessgreater
andisunordered
fenv.h
and implemented all of its functions