[PATCH 2/2] RISC-V: Implment finite and fpclassify
Keith Packard
keithp@keithp.com
Tue Oct 27 18:22:05 GMT 2020
Kito Cheng <kito.cheng@sifive.com> writes:
> +#if defined(__riscv_flen) && __riscv_flen >= 64
> +#include "riscv_math.h"
> +int finite(double x)
> +{
> + long fclass = _fclass_d (x);
> + return (fclass & FCLASS_INF) == 0;
> +}
This also needs to check for FCLASS_NAN:
return (class & (FCLASS_INF|FCLASS_NAN)) == 0;
Same for finitef
--
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/newlib/attachments/20201027/7337e523/attachment.sig>
More information about the Newlib
mailing list