From: "Keith Packard" <keithp@keithp.com>
To: Kito Cheng <kito.cheng@sifive.com>, newlib@sourceware.org
Cc: Kito Cheng <kito.cheng@sifive.com>
Subject: Re: [PATCH 2/2] RISC-V: Implment finite and fpclassify
Date: Tue, 27 Oct 2020 11:22:05 -0700 [thread overview]
Message-ID: <87361zfs1e.fsf@keithp.com> (raw)
In-Reply-To: <20201027061958.83712-2-kito.cheng@sifive.com>
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2020-10-27 18:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 6:19 [PATCH 1/2] RISC-V: Add fabs[f], fmax[f] and fmin[f] Kito Cheng
2020-10-27 6:19 ` [PATCH 2/2] RISC-V: Implment finite and fpclassify Kito Cheng
2020-10-27 18:11 ` Keith Packard
2020-10-27 18:22 ` Keith Packard [this message]
2020-10-28 15:42 ` Kito Cheng
2020-10-28 20:45 ` Jim Wilson
2020-10-29 3:02 ` Kito Cheng
2020-10-27 7:59 ` [PATCH 1/2] RISC-V: Add fabs[f], fmax[f] and fmin[f] Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87361zfs1e.fsf@keithp.com \
--to=keithp@keithp.com \
--cc=kito.cheng@sifive.com \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).