mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 14:40:30 +03:00
Added static assert documenting the maximum precision for which this fix is valid.
This commit is contained in:
parent
49d4720e5c
commit
01860999a9
1 changed files with 1 additions and 0 deletions
|
@ -6277,6 +6277,7 @@ Unqual!(Largest!(F, G)) pow(F, G)(F x, G y) @nogc @trusted pure nothrow
|
||||||
double sign = 1.0;
|
double sign = 1.0;
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
{
|
{
|
||||||
|
static assert(real.mant_dig <= (8 * ulong.sizeof));
|
||||||
// Result is real only if y is an integer
|
// Result is real only if y is an integer
|
||||||
// Check for a non-zero fractional part
|
// Check for a non-zero fractional part
|
||||||
enum real maxPrecise = ulong.max;
|
enum real maxPrecise = ulong.max;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue