This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Math functions and rounding mode


On Mon, 1 Jan 2018, Wilco Dijkstra wrote:

> I think we're using the wrong approach here. Assuming exp has acceptable ULP
> errors in all rounding modes (we allow a larger ULP in non-nearest modes),
> we never need to change rounding mode in exp itself. If functions like tgamma
> or cexp end up with errors or unacceptable ULP in non-nearest rounding modes,
> we should simply wrap *those* functions with SET_RESTORE_ROUND.

tgamma already does use SET_RESTORE_ROUND to reduce error accumulation 
(and then has code to correct overflowing / underflowing results to be 
appropriate for the actual rounding mode).

-- 
Joseph S. Myers
joseph@codesourcery.com


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