dlang / phobos

The standard library of the D programming language
https://dlang.org
Boost Software License 1.0
1.18k stars 705 forks source link

std.math log* functions only have real versions #10356

Open dlangBugzillaToGithub opened 6 years ago

dlangBugzillaToGithub commented 6 years ago

ldti reported this on 2018-10-31T04:00:59Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=19346

CC List

Description

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.
dlangBugzillaToGithub commented 1 year ago

john.michael.hall commented on 2023-02-06T17:02:30Z

I believe this can be closed with version 2.102.0.
dlangBugzillaToGithub commented 1 year ago

john.michael.hall commented on 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
jmafc commented 3 days ago

FWIW, since I'm the one who opened the issue originally and I'm no longer using D, I don't mind if it's closed.