BASIC "sgn" function equivalent

pascal111 judas.the.messiah.111 at gmail.com
Thu Jul 28 15:10:19 UTC 2022


On Thursday, 28 July 2022 at 15:03:34 UTC, H. S. Teoh wrote:
> On Thu, Jul 28, 2022 at 02:30:38PM +0000, pascal111 via 
> Digitalmars-d-learn wrote: [...]
>> Of-course D has a built in "sgn" function, but I like to do it 
>> with my hands to be sure of code, I'm some doubtful and don't 
>> trust alien works.
>
> Just use the source, Luke!  Phobos is open source for a reason.
>
> 	https://github.com/dlang/phobos/blob/8280b1e7de6cca4dc9a593431591054a5b3aa288/std/math/traits.d#L694
>
>
> T

I think Phobos is the big library of D, is it the same one with 
gdc compiler too? I'm using gdc compiler.


More information about the Digitalmars-d-learn mailing list