Converting floor to rint

Jan Hubicka jh@suse.cz
Thu Nov 7 05:31:00 GMT 2002


> Andreas Schwab <schwab@suse.de> writes:
> 
> | |> But why the standard don't say that rint function will raise the
> | |> interrupt?  I would interpred may as it can behave that way or don't
> | |> have to.
> | 
> | Yes, rint is the weaker function.
> 
> Thanks.  I didn't understand Jan's question in that way.  Thanks
> for clarifying.
> 
> | The implementation of nearbyint must
> | make sure that no inexact exception is raised, whereas for rint this is
> | not necessary.  That means that if you have a round instruction that never
> | raises the exception it can be used to implement both functions.
> 
> Yes.  Or said differently, rint() may be implemented in terms of
> nearbyint() (+ raising exception where appropriate).

Question is whether I am required to raise it when standard say "may
raise"

Honza
> 
> -- Gaby



More information about the Gcc-patches mailing list