T intsqrt(T)(T i) { T bitMask = 1; T result = 0;
bitMask <<= T.sizeof * 4 - 1; while (bitMask) { result |= bitMask; if ((result * result) > i) { result &= ~bitMask; } bitMask >>= 1; } return result; }-=mike=-
T intsqrt(T)(T i) { T bitMask = 1; T result = 0;
bitMask <<= T.sizeof * 4 - 1; while (bitMask) { result |= bitMask; if ((result * result) > i) { result &= ~bitMask; } bitMask >>= 1; } return result; }-=mike=-