diff --git a/std/internal/math/biguintcore.d b/std/internal/math/biguintcore.d index 44e937f266e..3dc4cea3c0d 100644 --- a/std/internal/math/biguintcore.d +++ b/std/internal/math/biguintcore.d @@ -1567,7 +1567,7 @@ char [] biguintToHex(char [] buff, const BigDigit [] data, char separator=0, LetterCase letterCase = LetterCase.upper) pure nothrow @safe { int x=0; - for (ptrdiff_t i=data.length - 1; i>=0; --i) + for (ptrdiff_t i=data.length - 1; i >= 0; --i) { toHexZeroPadded(buff[x .. x+8], data[i], letterCase); x+=8; @@ -1772,10 +1772,10 @@ body } } // Now set y = all remaining digits. - if (lo>=18) + if (lo >= 18) { } - else if (lo>=9) + else if (lo >= 9) { for (int k=9; k= y.length); auto k = x.length-1; - while (x[k]==0 && k>=y.length) + while (x[k]==0 && k >= y.length) --k; - if (k>=y.length) + if (k >= y.length) return false; while (k>0 && x[k]==y[k]) --k; @@ -2286,7 +2286,7 @@ void toHexZeroPadded(char[] output, uint value, ptrdiff_t x = output.length - 1; static immutable string upperHexDigits = "0123456789ABCDEF"; static immutable string lowerHexDigits = "0123456789abcdef"; - for ( ; x>=0; --x) + for ( ; x >= 0; --x) { if (letterCase == LetterCase.upper) { @@ -2440,7 +2440,7 @@ body } // rem -= quot * v[0 .. k]. -// If would make rem negative, decrease quot until rem is >=0. +// If would make rem negative, decrease quot until rem is >= 0. // Needs (quot.length * k) scratch space to store the result of the multiply. void adjustRemainder(BigDigit[] quot, BigDigit[] rem, const(BigDigit)[] v, ptrdiff_t k, diff --git a/std/internal/math/biguintnoasm.d b/std/internal/math/biguintnoasm.d index e1c57c627c4..ff06808d8f6 100644 --- a/std/internal/math/biguintnoasm.d +++ b/std/internal/math/biguintnoasm.d @@ -286,7 +286,7 @@ uint multibyteDivAssign(uint [] dest, uint divisor, uint overflow) pure @nogc @safe { ulong c = cast(ulong) overflow; - for (ptrdiff_t i = dest.length-1; i>= 0; --i) + for (ptrdiff_t i = dest.length-1; i >= 0; --i) { c = (c << 32) + cast(ulong)(dest[i]); uint q = cast(uint)(c/divisor); diff --git a/std/internal/math/errorfunction.d b/std/internal/math/errorfunction.d index 4ecc27b89b3..f2e60d96e32 100644 --- a/std/internal/math/errorfunction.d +++ b/std/internal/math/errorfunction.d @@ -365,7 +365,7 @@ assert(isIdentical(normalDistributionImpl(NaN(0x325)), NaN(0x325))); */ real normalDistributionInvImpl(real p) in { - assert(p>=0.0L && p <= 1.0L, "Domain error"); + assert(p >= 0.0L && p <= 1.0L, "Domain error"); } body { @@ -419,7 +419,7 @@ static immutable real[8] Q3 = 0x1.e05268dd3c07989ep-3, 0x1.239c6aff14afbf82p+1, 1.0 ]; - if (p <= 0.0L || p>=1.0L) + if (p <= 0.0L || p >= 1.0L) { if (p == 0.0L) return -real.infinity; diff --git a/std/internal/math/gammafunction.d b/std/internal/math/gammafunction.d index 66516662e6d..557f14ad10d 100644 --- a/std/internal/math/gammafunction.d +++ b/std/internal/math/gammafunction.d @@ -1427,7 +1427,7 @@ body { */ real gammaIncompleteComplInv(real a, real p) in { - assert(p>=0 && p <= 1); + assert(p >= 0 && p <= 1); assert(a>0); } body { @@ -1688,7 +1688,7 @@ done: for (int k=1; k<40; ++k) { real y=0; - for (int u=k; u>=1; --u) + for (int u=k; u >= 1; --u) { y += 1.0L/u; } diff --git a/std/math.d b/std/math.d index 2d286537a31..db8071632ff 100644 --- a/std/math.d +++ b/std/math.d @@ -514,7 +514,7 @@ if (is(typeof(Num.init >= 0)) && is(typeof(-Num.init)) && static if (isFloatingPoint!(Num)) return fabs(x); else - return x>=0 ? x : -x; + return x >= 0 ? x : -x; } /// ditto @@ -2827,7 +2827,7 @@ if (isIntegral!T && isSigned!T) import std.traits : Unsigned; // Note: abs(x) can not be used because the return type is not Unsigned and // the return value would be wrong for x == int.min - Unsigned!T absx = x>=0 ? x : -x; + Unsigned!T absx = x >= 0 ? x : -x; return ilogb(absx); } @@ -6647,7 +6647,7 @@ body { // Runtime behaviour for contract violation: // If signs are opposite, or one is a NaN, return 0. - if (!((x>=0 && y>=0) || (x <= 0 && y <= 0))) return 0.0; + if (!((x >= 0 && y >= 0) || (x <= 0 && y <= 0))) return 0.0; // The implementation is simple: cast x and y to integers, // average them (avoiding overflow), and cast the result back to a floating-point number. diff --git a/std/mathspecial.d b/std/mathspecial.d index 0e6fd6aeb8f..896b035c12b 100644 --- a/std/mathspecial.d +++ b/std/mathspecial.d @@ -351,7 +351,7 @@ real normalDistribution(real x) */ real normalDistributionInverse(real p) in { - assert(p>=0.0L && p <= 1.0L, "Domain error"); + assert(p >= 0.0L && p <= 1.0L, "Domain error"); } body { diff --git a/std/numeric.d b/std/numeric.d index 7306006ab29..4b9fc271688 100644 --- a/std/numeric.d +++ b/std/numeric.d @@ -588,7 +588,7 @@ public: { auto x = get!real; auto y = cast(real) b; - return (x>=y)-(x <= y); + return (x >= y)-(x <= y); } /// ditto @@ -2602,7 +2602,7 @@ T gcd(T)(T a, T b) { static if (T.min < 0) { - assert(a >= 0 && b >=0); + assert(a >= 0 && b >= 0); } while (b) { diff --git a/std/typecons.d b/std/typecons.d index 5aeda09bfb8..66c27aa6c78 100644 --- a/std/typecons.d +++ b/std/typecons.d @@ -2115,7 +2115,7 @@ string alignForSize(E...)(const char[][] names...) foreach (i, T; E) { auto a = T.alignof; - auto k = a>=64? 0 : a>=32? 1 : a>=16? 2 : a>=8? 3 : a>=4? 4 : a>=2? 5 : 6; + auto k = a >= 64? 0 : a >= 32? 1 : a >= 16? 2 : a >= 8? 3 : a >= 4? 4 : a >= 2? 5 : 6; declaration[k] ~= T.stringof ~ " " ~ names[i] ~ ";\n"; } @@ -6183,7 +6183,7 @@ mixin template Proxy(alias a) assert(!(ab)); - assert(!(a>=b)); + assert(!(a >= b)); } foreach (T1; AliasSeq!(MyFloatImpl, Typedef!float, Typedef!double, float, real, Typedef!int, int)) @@ -6203,14 +6203,14 @@ mixin template Proxy(alias a) assert(ab)); - assert(!(a>=b)); + assert(!(a >= b)); a = 4; assert(a == b); assert(!(ab)); - assert(a>=b); + assert(a >= b); } } }