Hi, > I think the general principle is: > > * The caller decides whether folding is desirable (whether it would lose > exceptions, for example). > > * The real.c code is called only when the caller has decided that folding is > desirable, and should always produce the correct output (which for a > conversion means producing a quiet NaN from a signaling NaN). > > So both places need changes, but real_convert is where the code that makes > it a quiet NaN should go. > > Another place in the patch that looks incorrect: the changes to fold-const- > call.c calling real_powi and checking if the result is a signaling NaN. The > result > of real_powi should never be a signaling NaN. > Rather, real_powi should produce a quiet NaN if its input is a signaling NaN, > and the callers should check if the argument is a signaling NaN when deciding > whether to fold, not if the result is.
I made the changes accordingly and will post the patches now. Regards, Sujoy > -- > Joseph S. Myers > jos...@codesourcery.com