Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into sha1
Browse files Browse the repository at this point in the history
  • Loading branch information
redstar committed May 30, 2012
2 parents f2ba4a8 + 73b56a1 commit 0ff5e1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
12 changes: 0 additions & 12 deletions std/math.d
Original file line number Diff line number Diff line change
Expand Up @@ -1892,18 +1892,6 @@ unittest
}
}

deprecated
{
// Deprecated: use std.mathspecial.erf instead
real erf(real x) @trusted nothrow { return core.stdc.math.erfl(x); }
// Deprecated: use std.mathspecial.erfc instead
real erfc(real x) @trusted nothrow { return core.stdc.math.erfcl(x); }
// Deprecated: use std.mathspecial.logGamma instead
real lgamma(real x) @trusted nothrow { return core.stdc.math.lgammal(x); }
// Deprecated: use std.mathspecial.gamma instead
real tgamma(real x) @trusted nothrow { return core.stdc.math.tgammal(x); }
}

/**************************************
* Returns the value of x rounded upward to the next integer
* (toward positive infinity).
Expand Down
10 changes: 5 additions & 5 deletions std/traits.d
Original file line number Diff line number Diff line change
Expand Up @@ -4262,7 +4262,7 @@ auto unsigned(T)(T x) if (isIntegral!T)
else static if (is(Unqual!T == long )) return cast(ulong ) x;
else
{
static assert(T.min == T.init, "Bug in either unsigned or isIntegral");
static assert(T.min == 0, "Bug in either unsigned or isIntegral");
return x;
}
}
Expand All @@ -4275,7 +4275,7 @@ unittest
auto unsigned(T)(T x) if (isSomeChar!T)
{
// All characters are unsigned
static assert(T.min == T.init);
static assert(T.min == 0);
return x;
}

Expand All @@ -4286,16 +4286,16 @@ template mostNegative(T)
{
static if (is(typeof(T.min_normal)))
enum mostNegative = -T.max;
else static if (T.min == T.init)
enum byte mostNegative = T.init;
else static if (T.min == 0)
enum byte mostNegative = 0;
else
enum mostNegative = T.min;
}

unittest
{
static assert(mostNegative!(float) == -float.max);
static assert(mostNegative!(uint) == uint.init);
static assert(mostNegative!(uint) == 0);
static assert(mostNegative!(long) == long.min);
}

Expand Down

0 comments on commit 0ff5e1f

Please sign in to comment.