------- Comment #2 from  2009-01-30 12:57 -------
(In reply to comment #1)
> I had the following in my tree for a while, just committed it now so you can
> look at it:
> F pow(F)(F x, uint n) if (isFloatingPoint!(F))
> F pow(F)(F x, int n) if (isFloatingPoint!(F))
> F pow(F)(F x, F y) if (isFloatingPoint!(F))
> Would this be enough?

Is returning F a legitimate concern?  Generally when one is working with one
type, one tends to stick with that type, but you would lose precision, as the
actual implementation does return a real.  I'd say it's ok to return F instead
of real, but others might disagree.

But in general, your implementation is probably viable for D2, but not for D1. 
D1 Tango can at least be fixed, if Walter nixes fixing D1 phobos (even though
this is a fix that does not change the API).


Reply via email to