Commit Graph

10 Commits

Author SHA1 Message Date
Glen Whitney d95e5ad930 feat: Allow reconfiguration of an existing picomath instance
Keeps track of which operations depend on the configuration and
  invalidates them for lazy reconfiguration when the config changes.
2022-03-25 14:40:57 -07:00
Glen Whitney 4213ade4ba feat: Add a configuration for an instance that can be set at creation time
And use it to control whether the result of a complex operation where the
   imaginary part comes out to 0 will be coerced back to a number.
2022-03-25 13:43:37 -07:00
Glen Whitney 1c1ba91e48 feat: Invalidation and lazy reloading of implementations
The interface is a bit clunky, the "author" and the callback "data"
  have to be specified when adding (an) implementation(s) in order
  for this to work. But it does, and this is just a PoC, the interface
  could be cleaned up.
2022-03-25 13:09:50 -07:00
Glen Whitney 00a7f79552 feat(poortf): add concept of 'author' to an imp of a TF
And make it so that if the same author adds imps again, they replace
  the previous imps from that author.

  Use this feature to avoid the explicit check for double-inclusion in
  subtract, and test it worked.
2022-03-25 11:31:06 -07:00
Glen Whitney 2c1b6c3364 docs: Update README to reflect status 2022-03-25 03:11:37 -07:00
Glen Whitney e5ec1083e3 feat: Selective loader that extends all/only existing number methods to complex
Plus a test example where an instance is initialized to have only addition,
  and then that instance is extended to complex numbers, at which point it
  has number and complex addition but not negation or subtraction (at all).
2022-03-25 02:46:49 -07:00
Glen Whitney 29653f25c4 test: Make sure you can assemble in any order 2022-03-25 02:03:20 -07:00
Glen Whitney 32bc9ca515 feat: Add complex numbers
With just the operations we have for numbers, and overall tests.
2022-03-25 01:54:20 -07:00
Glen Whitney 536656bfe8 feat: Initial core of picomath
Implements a totally simplistic "poortf" mutable typed function and
  a picomath instance generator, as well as the very beginnings of a
  number type and one generic function and a default full picomath instance.

  Also provides some tests which serve as usage examples.
2022-03-25 00:49:03 -07:00
Glen Whitney 36cc91ca95 doc: Initial commit 2022-03-24 20:44:46 -07:00