yggdrasil/lib/runtime/libm/s_copysignf.c

14 lines
214 B
C
Raw Normal View History

2023-12-28 17:18:05 +02:00
#include <stdint.h>
#include "private.h"
float
copysignf(float x, float y)
{
uint32_t ix,iy;
GET_FLOAT_WORD(ix,x);
GET_FLOAT_WORD(iy,y);
SET_FLOAT_WORD(x,(ix&0x7fffffff)|(iy&0x80000000));
return x;
}