Bug 20288 – std.format double with NaN fails with range violation on comma

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-10-10T14:09:06Z
Last change time
2019-10-23T09:50:35Z
Keywords
pull
Assigned to
Robert Schadek
Creator
Robert Schadek

Comments

Comment #0 by rschadek — 2019-10-10T14:09:06Z
``` void main(){ import std.format; format("%,.2f", double.nan); } ``` core.exception.RangeError@/dlang/dmd/linux/bin64/../../src/phobos/std/format.d(2659): Range violation
Comment #1 by dlang-bot — 2019-10-10T14:28:06Z
@burner created dlang/phobos pull request #7222 "Fix Issue 20288" fixing this issue: - Fix Issue 20288 std.format with separator and double causes RangeError https://github.com/dlang/phobos/pull/7222
Comment #2 by dlang-bot — 2019-10-23T09:50:35Z
dlang/phobos pull request #7222 "Fix Issue 20288 - std.format with separator and double causes RangeError" was merged into master: - 2b2ed40f611231d7f5b92747b619bbe067fd827b by Robert Schadek: Fix Issue 20288 std.format with separator and double causes RangeError trying to find the win32 bug windows nan -nan fix harder workaround name clash fix moving some stuff around making it shorter oh win32_64 what are you doing to me and another try some windows special case and another and again removed some duplicated code make it compile again some debug output I need a win32_64 box and again better infos finding the failing test something strange is going on getting closer I got it maybe less output I think I understand now tighter code making the commit nicer removed an import undoing some debug changes removed an unneeded test https://github.com/dlang/phobos/pull/7222