This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Single-precision float version of matherr


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]