URL
https://opencores.org/ocsvn/hf-risc/hf-risc/trunk
Subversion Repositories hf-risc
[/] [hf-risc/] [trunk/] [tools/] [riscv-gnu-toolchain-master/] [glibc/] [sysdeps/] [riscv/] [fpu/] [s_fdimf.c] - Rev 13
Compare with Previous | Blame | View Log
#include <errno.h> #include <math.h> #include "fpu_control.h" float __fdimf (float x, float y) { float diff = x - y; if (x <= y) return 0.0f; #ifdef __riscv_soft_float if (isinf(diff)) errno = ERANGE; #else if (__builtin_expect(_FCLASS(diff) & _FCLASS_INF, 0)) errno = ERANGE; #endif return diff; } weak_alias (__fdimf, fdimf)