Refactor: Implement SmartCube renderer, improve UI styling, and fix gaps

This commit is contained in:
2026-02-22 04:35:59 +00:00
parent 57abfd6b80
commit b5ddc21662
4168 changed files with 763782 additions and 1008 deletions

View File

@@ -0,0 +1,22 @@
import {
squareRoot,
squareRootBI,
} from '../src/square-root.mjs';
describe('square-root', () => {
it('squareRootBI small', () => {
expect(squareRootBI(0n)).toEqual(0n);
expect(squareRootBI(1n)).toEqual(1n);
expect(squareRootBI(2n)).toEqual(1n);
expect(squareRootBI(3n)).toEqual(1n);
expect(squareRootBI(4n)).toEqual(2n);
});
it('squareRootBI 0-1e3', () => {
for (let i = 0; i < 1e3; ++i) {
const sqf = BigInt(Math.floor(i ** 0.5));
expect(squareRootBI(BigInt(i))).toEqual(sqf);
}
});
});