chiark / gitweb /
nimber.git
2 months agoBREAKING CHANGE structural-eq-experiment
Ian Jackson [Sat, 19 Apr 2025 12:22:39 +0000 (13:22 +0100)]
BREAKING CHANGE

2 months agoADD MAIN WITH MATCH
Ian Jackson [Sat, 19 Apr 2025 12:20:30 +0000 (13:20 +0100)]
ADD MAIN WITH MATCH

2 months agoADD CONST
Ian Jackson [Sat, 19 Apr 2025 12:20:26 +0000 (13:20 +0100)]
ADD CONST

2 months agoLOCKFILE
Ian Jackson [Sat, 19 Apr 2025 12:20:16 +0000 (13:20 +0100)]
LOCKFILE

2 months agoVersion bump to publish the README.
Simon Tatham [Thu, 17 Apr 2025 07:32:33 +0000 (08:32 +0100)]
Version bump to publish the README.

2 months agoAdd a README.md.
Simon Tatham [Thu, 17 Apr 2025 07:27:01 +0000 (08:27 +0100)]
Add a README.md.

2 months agoAdd licence and metadata.
Simon Tatham [Thu, 17 Apr 2025 07:21:58 +0000 (08:21 +0100)]
Add licence and metadata.

I think this might be ready for 0.1.0.

2 months agoComment the examples.
Simon Tatham [Thu, 17 Apr 2025 07:16:30 +0000 (08:16 +0100)]
Comment the examples.

2 months agoSome better examples.
Simon Tatham [Wed, 16 Apr 2025 18:29:45 +0000 (19:29 +0100)]
Some better examples.

Computes more minimal polynomials than just the sequence I thought was
interesting, and also, an example to print some obvious tables.

2 months agoActually, better if quadratic3 also returns an Option
Simon Tatham [Wed, 16 Apr 2025 06:33:49 +0000 (07:33 +0100)]
Actually, better if quadratic3 also returns an Option

2 months agoExpose inverse() and use it in quadratic3().
Simon Tatham [Wed, 16 Apr 2025 06:27:33 +0000 (07:27 +0100)]
Expose inverse() and use it in quadratic3().

Silly to compute the same multiplicative inverse twice when we want to
divide both b and c by a. And end users might have the same concern.

2 months agoAnother optimisation for multiplication.
Simon Tatham [Wed, 16 Apr 2025 06:18:01 +0000 (07:18 +0100)]
Another optimisation for multiplication.

Had this idea in the middle of the night, and it works well!

2 months agoTop-level intro documentation.
Simon Tatham [Wed, 16 Apr 2025 06:14:25 +0000 (07:14 +0100)]
Top-level intro documentation.

2 months agoRename the module!
Simon Tatham [Tue, 15 Apr 2025 05:36:13 +0000 (06:36 +0100)]
Rename the module!

Why didn't I think of leaving the redundant word 'nimber' off that
module name ages ago?

2 months agoQuadratic-solving.
Simon Tatham [Mon, 14 Apr 2025 20:01:22 +0000 (21:01 +0100)]
Quadratic-solving.

2 months agoDocumentation, including internal methods.
Simon Tatham [Sun, 13 Apr 2025 13:18:12 +0000 (14:18 +0100)]
Documentation, including internal methods.

2 months agoRemove rogue diagnostics
Simon Tatham [Sun, 13 Apr 2025 07:11:05 +0000 (08:11 +0100)]
Remove rogue diagnostics

2 months agoAdd From<array of u64> and use it everywhere.
Simon Tatham [Sun, 13 Apr 2025 07:04:21 +0000 (08:04 +0100)]
Add From<array of u64> and use it everywhere.

Much less verbose than either of the previous syntaxes for entering a
large nimber literal.

2 months agoFormatting
Simon Tatham [Sun, 13 Apr 2025 07:03:51 +0000 (08:03 +0100)]
Formatting

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.