Thread overview
[Issue 10448] min and max are not NaN aware
May 15, 2016
David Nadlinger
Jul 05, 2017
Vladimir Panteleev
Sep 11
Dlang Bot
Sep 11
Berni
June 09, 2015
https://issues.dlang.org/show_bug.cgi?id=10448

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unspecified                 |D2

--
May 15, 2016
https://issues.dlang.org/show_bug.cgi?id=10448

David Nadlinger <code@klickverbot.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code@klickverbot.at

--- Comment #9 from David Nadlinger <code@klickverbot.at> ---
There is no clearly "correct" way here, see the PR discussion on GitHub: https://github.com/dlang/phobos/pull/4316#issuecomment-219301946

--
August 02, 2016
https://issues.dlang.org/show_bug.cgi?id=10448

Илья Ярошенко <ilyayaroshenko@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ilyayaroshenko@gmail.com

--- Comment #10 from Илья Ярошенко <ilyayaroshenko@gmail.com> ---
Default behavior should be that min/max be translated to the single assembler instruction, which can be vectorized. Compiler may have intrinsics for min/max and we should just use them. See also https://llvm.org/bugs/show_bug.cgi?id=24314

--
July 05, 2017
https://issues.dlang.org/show_bug.cgi?id=10448

--- Comment #11 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
FWIW, after https://github.com/dlang/phobos/pull/2198, the output changes to:

nanF
0.00000F
0.00000F
nanF

Still looks broken, but in a different way.

--
September 11
https://issues.dlang.org/show_bug.cgi?id=10448

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #12 from Dlang Bot <dlang-bot@dlang.rocks> ---
@crocopaw created dlang/phobos pull request #7181 "Fix Issue 10448 - min and max are not NaN aware" fixing this issue:

- Fix Issue 10448 - min and max are not NaN aware

https://github.com/dlang/phobos/pull/7181

--
September 11
https://issues.dlang.org/show_bug.cgi?id=10448

--- Comment #13 from Berni <dlang@croco-puzzle.com> ---
As experts do not agree on the prefered result I think it's best to document, that NaNs will result in undefined behaviour.

See https://github.com/dlang/phobos/pull/7181 for more details.

--