This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Single-precision float version of matherr
- From: Jozef Lawrynowicz <jozef dot l at mittosystems dot com>
- To: newlib at sourceware dot org
- Date: Fri, 30 Nov 2018 12:42:18 +0000
- Subject: Re: Single-precision float version of matherr
- References: <20181129151355.7a3ab7c8@jozef-Aspire-VN7-793G>
On Thu, 29 Nov 2018 15:13:55 +0000
Jozef Lawrynowicz <jozef.l@mittosystems.com> wrote:
> I implemented <<sf_matherr>> (i.e. a single-precision float matherr), and
> <<sf_exception>> (i.e. single-precision float exception), and patched
> sqrtf in wf_sqrt.c to use the new constructs.
Actually, I think it would be better for the user if there weren't these new
"sf_*" constructs, and instead the exception structure was modified to have
both a double and float version of arg1, arg2 and retval, each within a union
inside the struct.
This way <<matherr>> can still be used to handle errors for both float and
double math functions.
The union with the float and double version of these fields would only be used
when this behaviour is explicitly selected, so the default
behaviour would remain unchanged.
Jozef