On Thursday, 28 July 2022 at 15:38:18 UTC, H. S. Teoh wrote:
On Thu, Jul 28, 2022 at 03:10:19PM +0000, pascal111 via Digitalmars-d-learn wrote:
> [...]
[...]
[...]

AFAIK, all D compilers ship with full Phobos source code. On my installation, it's in /usr/lib/gcc/x86_64-linux-gnu/11/include/d/*. You can probably find yours in a similar (or the same) location. Under that directory, just look into std/math/*.d for the std.math functions. For example, .sgn is in std/math/traits.d.

In general, all 3 D compilers ship with the same Phobos sources, except perhaps in a few places where some compiler-specific fixes were needed. Generally, though, I think the idea is to merge all such changes upstream under version() blocks so that we can use the same Phobos sources for all compilers.


T

I checked this path "/usr/lib/gcc/x86_64-linux-gnu/11/include/d/*" yesterday in my Ubuntu. I think you are right. Thanks!

Reply via email to