why compiler try use my sqrt not std.math?
KnightMare
black80 at bk.ru
Wed May 8 08:38:56 UTC 2019
compiler should select right sqrt by arg types. it shouldnt
prefer my sqrt( ulong ) over std.math.sqrt( real ) when I pass to
sqrt real with explicit cast
it has from std.math
float sqrt( float )
double sqrt( double )
real sqrt( real )
I added
ulong sqrt( ulong )
and try invoke sqrt( real(SomeVal))
we have real arg, so call std.math.sqrt( real ). no doubt!
WHY compiler tries be too much smart and looks stupid and buggy?
in case no misunderstanding what ceil should be called I missed
this BUG (compiler call MY sqrt(ulong)) before some tests or
debugging session
More information about the Digitalmars-d
mailing list