Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Apr 2026 19:31:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        standards@FreeBSD.org
Subject:   [Bug 294719] lib/msun: Added fmaximum_mag_num
Message-ID:  <bug-294719-99-msutxD2h5i@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-294719-99@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294719

--- Comment #7 from Steve Kargl <kargl@FreeBSD.org> ---
(In reply to Robert Clausecker from comment #4)
I don't know the internals for libm's signbit().  Naively,
I would have thought that both gcc and clang provide 
__builtin_signbit() with optimal implementations if
one uses signbit().  I would follow the 'make it
work, make it correct, and then make it fast' maxim.

I haven't figured out what Jesus is trying to do
with the force_except.  Reading the description of
fmaximum_num etc, I would try something like

if (nan_x) {
   if (nan_y)
      return (x + y);

   if (issignaling(x))
      feraiseexcept(FE_INVALID);

   return (y);
}

if (nan_y) {

   if (issignaling(y))
      feraiseexcept(FE_INVALID);

   return (x);
}

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-294719-99-msutxD2h5i>