Thread overview
[Issue 19712] std.math.sin and cos cast float to real before evaluating.
Mar 01, 2019
Seb
Mar 01, 2019
Alex
Mar 01, 2019
Alex
March 01, 2019
https://issues.dlang.org/show_bug.cgi?id=19712

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunny12@gmail.com

--- Comment #1 from Seb <greensunny12@gmail.com> ---
> With gdc-8, this shows around a 4 times difference in speed between std.math.sin and core.stdc.math.sinf.

FYI: GDC has a separate bug tracker

https://bugzilla.gdcproject.org/describecomponents.cgi

> Apparently ldc does this better.

Not apparently, it's has the same speed as the C runtime:

https://run.dlang.io/is/4AweFj

--
March 01, 2019
https://issues.dlang.org/show_bug.cgi?id=19712

--- Comment #2 from Alex <alex@sunopti.com> ---
I put the bug here because it is caused by phobos. Ldc has added a version(ldc)
section that removes the casts to real and implements sin and cos differently
depending on precision.
if I can get around it by calling a different sin function in phobos, then I
think it is a phobos bug, but there is some interaction with the compilers

--
March 01, 2019
https://issues.dlang.org/show_bug.cgi?id=19712

Alex <alex@sunopti.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|dmd                         |phobos

--
July 13
https://issues.dlang.org/show_bug.cgi?id=19712

hsteoh@quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh@quickfur.ath.cx

--
January 09
https://issues.dlang.org/show_bug.cgi?id=19712

Mathias LANG <pro.mathias.lang@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |pro.mathias.lang@gmail.com
         Resolution|---                         |DUPLICATE

--- Comment #3 from Mathias LANG <pro.mathias.lang@gmail.com> ---
Duplicate of 18559

*** This issue has been marked as a duplicate of issue 18559 ***

--