Bug 5418 – std.math.lround not implemented on win32 and not documented

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-01-06T02:54:35Z
Last change time
2018-01-05T13:30:21Z
Assigned to
No Owner
Creator
Stephan Dilly

Comments

Comment #0 by spam — 2011-01-06T02:54:35Z
lround and possibly other functions are implemented as assert(false) which is simply a HLT instruction in release under win32: version (Posix) return core.stdc.math.llroundl(x); else assert (0, "lround not implemented"); This is frustrating since it is not documented and if someone comes across this he just gets it if he looks into the phobos source. (tested with dmd 2.051)
Comment #1 by bugzilla — 2011-01-06T03:16:39Z
It seems the DMC standard library doesn't contain llroundl, nor is it specified by ANSI C. Therefore, it should probably be removed from core.stdc.math as well, or moved to core.sys.posix.math if it isn't defined there already. Sean, I'm adding you to the CC list of this bug since it is partly a druntime thing. Hope you don't mind.
Comment #2 by bus_dbugzilla — 2013-06-08T15:19:10Z
Ping. I just spent half an hour tracking down a seemingly-bizarre bug that turned out to be this. :(
Comment #3 by github-bugzilla — 2017-07-12T15:47:31Z
Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/4ea051f17a1308a92ce93d0cb7e5ea38c2de1e18 Issue 5418 - std.math.lround not implemented on win32 and not documented https://github.com/dlang/phobos/commit/42c3b6b75159daa9d976933d42a3a4fdd1fa9868 Merge pull request #5599 from RazvanN7/Issue_5418 Issue 5418 - std.math.lround not implemented on win32 and not documented merged-on-behalf-of: Sebastian Wilzbach <[email protected]>
Comment #4 by github-bugzilla — 2017-07-16T11:58:11Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/4ea051f17a1308a92ce93d0cb7e5ea38c2de1e18 Issue 5418 - std.math.lround not implemented on win32 and not documented https://github.com/dlang/phobos/commit/42c3b6b75159daa9d976933d42a3a4fdd1fa9868 Merge pull request #5599 from RazvanN7/Issue_5418
Comment #5 by github-bugzilla — 2018-01-05T13:30:21Z
Commits pushed to dmd-cxx at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/4ea051f17a1308a92ce93d0cb7e5ea38c2de1e18 Issue 5418 - std.math.lround not implemented on win32 and not documented https://github.com/dlang/phobos/commit/42c3b6b75159daa9d976933d42a3a4fdd1fa9868 Merge pull request #5599 from RazvanN7/Issue_5418