yggdrasil/lib/runtime/libm/s_copysignf.c
Mark Poliakov 7a0d528cda Add 'lib/runtime/' from commit 'db5cddbec10c4b7c086eda716d48d4711632901f'
git-subtree-dir: lib/runtime
git-subtree-mainline: 566a2341f5b726d86f5d42a72beb9c70b83f31b6
git-subtree-split: db5cddbec10c4b7c086eda716d48d4711632901f
2024-03-12 15:54:48 +02:00

14 lines
214 B
C

#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;
}