Skip to content

Commit

Permalink
Merge pull request #3309 from ibuclaw/fix_pr3020
Browse files Browse the repository at this point in the history
Relax compile-time assertion in gammafunction to runtime
  • Loading branch information
ibuclaw committed Jun 30, 2015
2 parents f6ce569 + 65b103f commit c3b05ed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions std/internal/math/gammafunction.d
Expand Up @@ -1597,8 +1597,10 @@ unittest {
real logmdigammaInverse(real y)
{
import std.numeric: findRoot;
enum maxY = logmdigamma(real.min_normal);
static assert(maxY > 0 && maxY <= real.max);
// FIXME: should be returned back to enum.
// Fix requires CTFEable `log` on non-x86 targets (check both LDC and GDC).
immutable maxY = logmdigamma(real.min_normal);
assert(maxY > 0 && maxY <= real.max);

if (y >= maxY)
{
Expand Down

0 comments on commit c3b05ed

Please sign in to comment.