http://d.puremagic.com/issues/show_bug.cgi?id=3202





--- Comment #1 from ZHOU Zhenyu <rin...@gmail.com>  2009-07-21 22:54:26 PDT ---
(In reply to comment #0)
> Maybe the while loop should be put into pow(F, uint) instead of pow(F, int)
> like the following:

what about:

pure nothrow F pow(F)(F x, int n) if (isFloatingPoint!(F))
{
   if (n < 0)
      return 1 / pow(x, cast(uint)(-n));
   else
      return pow(x, cast(uint)n);
}

pure nothrow F pow(F)(F x, uint n) // allow integer if n is uint
{
  ...
}

This also solve #2973

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to