Add copysignf

* Fix #692
This commit is contained in:
mux 2014-06-30 16:30:48 +02:00
parent 4039a26679
commit 5d44e6a92c

View File

@ -72,6 +72,7 @@ float __attribute__((pcs("aapcs"))) __aeabi_d2f(double x) {
fx.m = (dx.m>>(52-23)); // right justify fx.m = (dx.m>>(52-23)); // right justify
return fx.f; return fx.f;
} }
double __aeabi_dmul(double x , double y) { double __aeabi_dmul(double x , double y) {
return 0.0; return 0.0;
@ -85,6 +86,18 @@ float sqrtf(float x) {
return x; return x;
} }
#ifndef NDEBUG
float copysignf(float x, float y) {
float_s_t fx={.f = x};
float_s_t fy={.f = y};
// copy sign bit;
fx.s = fy.s;
return fx.f;
}
#endif
// some compilers define log2f in terms of logf // some compilers define log2f in terms of logf
#ifdef log2f #ifdef log2f
#undef log2f #undef log2f