chiark / gitweb /
nimber.git
2 months agoBug in conversion from slice
Simon Tatham [Sun, 13 Apr 2025 07:02:53 +0000 (08:02 +0100)]
Bug in conversion from slice

I forgot the analogue of truncating the Vec. But here we can truncate
while it's still in cheap slice form, before making a Vec at all.

2 months agoStop allocating a Vec for a one-word nimber
Simon Tatham [Sat, 12 Apr 2025 12:34:09 +0000 (13:34 +0100)]
Stop allocating a Vec for a one-word nimber

2 months agoHandle the 'alternate' formatting flag.
Simon Tatham [Sat, 12 Apr 2025 12:19:05 +0000 (13:19 +0100)]
Handle the 'alternate' formatting flag.

Suppresses the optimisation of omitting the 0x on single-decimal-digit
nimbers.

2 months agoMinimal docs improvements.
Simon Tatham [Sat, 12 Apr 2025 12:18:10 +0000 (13:18 +0100)]
Minimal docs improvements.

2 months agoSquare roots.
Simon Tatham [Sat, 12 Apr 2025 12:08:19 +0000 (13:08 +0100)]
Square roots.

2 months agoHandle division by zero
Simon Tatham [Sat, 12 Apr 2025 12:03:09 +0000 (13:03 +0100)]
Handle division by zero

2 months agoImplement fast squaring, and use it in Div
Simon Tatham [Sat, 12 Apr 2025 11:57:55 +0000 (12:57 +0100)]
Implement fast squaring, and use it in Div

2 months agoUnfinished first draft of division
Simon Tatham [Sat, 12 Apr 2025 11:14:01 +0000 (12:14 +0100)]
Unfinished first draft of division

Still to do: checking for division by 0, and speeding it up using a
dedicated square() method.

2 months agoImplement compound assignment operators.
Simon Tatham [Sat, 12 Apr 2025 09:44:20 +0000 (10:44 +0100)]
Implement compound assignment operators.

2 months agoPrint better-explained output
Simon Tatham [Sat, 12 Apr 2025 09:30:27 +0000 (10:30 +0100)]
Print better-explained output

2 months agoCompute one more polynomial
Simon Tatham [Sat, 12 Apr 2025 09:28:27 +0000 (10:28 +0100)]
Compute one more polynomial

This is the one I computed originally, and checked was primitive, but
was not able to include in the A382121 text file because of a line
length limit.

2 months agoAha, a mistake in the simplest part, of course
Simon Tatham [Sat, 12 Apr 2025 09:21:27 +0000 (10:21 +0100)]
Aha, a mistake in the simplest part, of course

2 months agoSmall answers right, but large ones off by one level!
Simon Tatham [Sat, 12 Apr 2025 09:11:18 +0000 (10:11 +0100)]
Small answers right, but large ones off by one level!

2 months agoFirst attempt at making the example program work
Simon Tatham [Sat, 12 Apr 2025 08:54:12 +0000 (09:54 +0100)]
First attempt at making the example program work

2 months agoFix addition of different-sized vectors
Simon Tatham [Sat, 12 Apr 2025 08:54:00 +0000 (09:54 +0100)]
Fix addition of different-sized vectors

2 months agoExpose Vec-based initialisation publicly
Simon Tatham [Sat, 12 Apr 2025 07:26:11 +0000 (08:26 +0100)]
Expose Vec-based initialisation publicly

2 months agofmt
Simon Tatham [Sat, 12 Apr 2025 07:22:56 +0000 (08:22 +0100)]
fmt

2 months agoDon't keep recomputing levels during multiplication
Simon Tatham [Sat, 12 Apr 2025 07:22:30 +0000 (08:22 +0100)]
Don't keep recomputing levels during multiplication

2 months agoImplement Display
Simon Tatham [Fri, 11 Apr 2025 18:34:59 +0000 (19:34 +0100)]
Implement Display

2 months agoStart of an example
Simon Tatham [Fri, 11 Apr 2025 18:31:10 +0000 (19:31 +0100)]
Start of an example

2 months agoGet the package name right, ahem
Simon Tatham [Fri, 11 Apr 2025 18:31:04 +0000 (19:31 +0100)]
Get the package name right, ahem

2 months agoTrivially implement subtraction.
Simon Tatham [Fri, 11 Apr 2025 18:24:31 +0000 (19:24 +0100)]
Trivially implement subtraction.

2 months agoSome tests of multiplication.
Simon Tatham [Fri, 11 Apr 2025 18:24:19 +0000 (19:24 +0100)]
Some tests of multiplication.

2 months agoHide some of the boring boilerplate.
Simon Tatham [Fri, 11 Apr 2025 18:18:29 +0000 (19:18 +0100)]
Hide some of the boring boilerplate.

2 months agoMultiplication passes first test!
Simon Tatham [Fri, 11 Apr 2025 17:46:44 +0000 (18:46 +0100)]
Multiplication passes first test!

2 months agoMissing add implementation
Simon Tatham [Fri, 11 Apr 2025 17:44:33 +0000 (18:44 +0100)]
Missing add implementation

2 months agoDetermine starting level
Simon Tatham [Fri, 11 Apr 2025 17:44:21 +0000 (18:44 +0100)]
Determine starting level

2 months agomul_by_h working
Simon Tatham [Fri, 11 Apr 2025 17:17:34 +0000 (18:17 +0100)]
mul_by_h working

2 months agoI think that's refs, split and join?
Simon Tatham [Fri, 11 Apr 2025 07:58:46 +0000 (08:58 +0100)]
I think that's refs, split and join?

2 months agoRestart without the trait system
Simon Tatham [Fri, 11 Apr 2025 07:51:10 +0000 (08:51 +0100)]
Restart without the trait system

2 months agoAllow converting back into slice references.
Simon Tatham [Thu, 10 Apr 2025 11:55:25 +0000 (12:55 +0100)]
Allow converting back into slice references.

2 months agoAllow FiniteNimber based on a slice.
Simon Tatham [Thu, 10 Apr 2025 11:49:34 +0000 (12:49 +0100)]
Allow FiniteNimber based on a slice.

This should make it easier to partition things.

2 months agoAllow variable-sized FiniteNimber.
Simon Tatham [Thu, 10 Apr 2025 11:41:43 +0000 (12:41 +0100)]
Allow variable-sized FiniteNimber.

2 months agoImplement Add, via BitXor on the underlying type.
Simon Tatham [Thu, 10 Apr 2025 11:37:10 +0000 (12:37 +0100)]
Implement Add, via BitXor on the underlying type.

2 months agoStart work on a nimbers library.
Simon Tatham [Thu, 10 Apr 2025 11:25:39 +0000 (12:25 +0100)]
Start work on a nimbers library.