Issue 19346 - std.math log* functions only have real versions
Summary: std.math log* functions only have real versions
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Linux
: P4 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-31 04:00 UTC by Joe
Modified: 2024-12-01 16:34 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Joe 2018-10-31 04:00:59 UTC
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 John Hall 2023-02-06 17:02:30 UTC
I believe this can be closed with version 2.102.0.
Comment 2 John Hall 2023-02-27 23:10:23 UTC
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 dlangBugzillaToGithub 2024-12-01 16:34:25 UTC
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