dlangBugzillaToGithub / migration_test

0 stars 0 forks source link

Make std.complex work with -betterC #1261

Open dlangBugzillaToGithub opened 4 years ago

dlangBugzillaToGithub commented 4 years ago

n8sh.secondary reported this on 2020-09-22T01:48:59Z

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

CC List

Description

Make std.complex work with -betterC by using math functions from the C standard library when std.math will not be unavailable. This means some operations will become impure when compiling with -betterC.
dlangBugzillaToGithub commented 4 years ago

n8sh.secondary commented on 2020-09-22T04:37:34Z

WIP: https://github.com/dlang/phobos/pull/7643

>on some platforms may be calculated in double precision
>even when T is an extended-precision real.

This might be a showstopper. The two culprits here are version (CRuntime_Microsoft) and version (CRuntime_UClibc) whose atan2, coshl, expl, hypotl, logl, powl, and sinhl are effectively just aliases of the double-precision versions of those functions.
dlangBugzillaToGithub commented 3 years ago

alphaglosined commented on 2021-10-28T00:38:46Z

Right now it is erroring with TypeInfo not being available.

/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(3583): Error: `TypeInfo` cannot be used with -betterC

This may be related to toString not being templated and using stuff that depends on druntime.