Bug 19346 – std.math log* functions only have real versions

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-10-31T04:00:59Z
Last change time
2024-12-01T16:34:25Z
Assigned to
No Owner
Creator
Joe
Moved to GitHub: phobos#10356 →

Comments

Comment #0 by ldti — 2018-10-31T04:00:59Z
The std.math functions 'log', 'log10', 'log1p', 'log2' and 'logb' only have versions that accept a real argument and return a real value. Many other std.math functions, e.g., 'sin', 'cos', etc., also have versions that accept and return double as well as float. It would be preferable if the former group were consistent with the rest.
Comment #1 by john.michael.hall — 2023-02-06T17:02:30Z
I believe this can be closed with version 2.102.0.
Comment #2 by john.michael.hall — 2023-02-27T23:10:23Z
Not entirely, it seems the additions of `log1p` overloads for float and double have messed with the accuracy of those functions (beyond what is to be expected as a result of not doing intermediate calculations with reals). See: https://issues.dlang.org/show_bug.cgi?id=23750
Comment #3 by robert.schadek — 2024-12-01T16:34:25Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10356 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB