Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -1,12 +1,12 @@
import std.stdio, std.conv;
struct Number(T) {
T x; // Base.
T x; // base
alias x this;
string toString() const { return text(x); }
Number opBinary(string op)(in int exponent)
const pure nothrow if (op == "^^") in {
const pure nothrow @nogc if (op == "^^") in {
if (exponent < 0)
assert (x != 0, "Division by zero");
} body {
@ -16,7 +16,7 @@ struct Number(T) {
T factor;
if (exponent < 0) {
zerodir = +1;
factor = (cast(T)1) / x;
factor = T(1) / x;
} else {
zerodir = -1;
factor = x;