[PATCH][risc-v] libstdc++: Preserve signbit of nan when converting float to double [PR113578]
Jonathan Wakely
jwakely@redhat.com
Tue May 7 14:06:10 GMT 2024
On Tue, 7 May 2024 at 14:57, Jeff Law wrote:
>
>
>
> On 5/7/24 7:49 AM, Jonathan Wakely wrote:
> > Do we want this change for RISC-V, to fix PR113578?
> >
> > I haven't tested it on RISC-V, only on x86_64-linux (where it doesn't do
> > anything).
> >
> > -- >8 --
> >
> > libstdc++-v3/ChangeLog:
> >
> > PR libstdc++/113578
> > * include/std/ostream (operator<<(basic_ostream&, float)):
> > Restore signbit after converting to double.
> No strong opinion. One could argue that the existence of a
> conditional like that inherently implies the generic code is dependent
> on specific processor behavior which probably is unwise. But again, no
> strong opinion.
Yes, but I'm not aware of any other processors that lose the signbit
like this, so in practice it's always worked fine to cast the float to
double.
More information about the Libstdc++
mailing list