On 13 July 2010 23:25, David Simcha <[email protected]> wrote: > What's wrong w/ adding sqrt(long) and sqrt(ulong) overloads that just > forward to sqrt(real)?
Doesn't work -- it's ambiguous for ints. You need an explicit specialisation for every type: byte, ubyte, short, ushort, int, uint, long, ulong. Yuck. Of course that assumes sqrt(float), which is causing > the problem in the first place, exists for a good reason. > > On Tue, Jul 13, 2010 at 5:18 PM, Don Clugston <[email protected]> > wrote: >> >> On 13 July 2010 23:00, David Simcha <[email protected]> wrote: >> > A related question: Why do we even have both an sqrt(float) and an >> > sqrt(real) in the first place? >> >> Don't know. Originally there was only sqrt(real). >> As long as both exist, I don't know how sqrt(int) can be fixed cleanly. >> _______________________________________________ >> phobos mailing list >> [email protected] >> http://lists.puremagic.com/mailman/listinfo/phobos > > > _______________________________________________ > phobos mailing list > [email protected] > http://lists.puremagic.com/mailman/listinfo/phobos > _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
