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