Re: [PATCH 2/2] RISC-V: Implment finite and fpclassify

Kito Cheng <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CALLt3TjnEhFoMHcYOZFOO7uVZr_X7qKL_+BzegBYsSib=+P8NQ@mail.gmail.com>
Hi Keith:

Thanks for your review! I sent patches to fix those two issues :)

On Wed, Oct 28, 2020 at 2:22 AM Keith Packard <[email protected]> wrote:

> Kito Cheng <[email protected]> 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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.