Sam Ritchie

Results 355 issues of Sam Ritchie

This should be user-controllable, at the expression level and the system level. You really just want simplification the FIRST time. Then if you call "factor" or something, you want that...

This is how to do this: ```clj sicmutils.env> (freeze (with-meta (D (literal-function 'f)) {:name "cake"})) "cake" sicmutils.env> (with-meta (D (literal-function 'f)) {:name "cake"}) #function[clojure.lang.AFunction/1] ```

Currently this code just works on functions. If you memoize something else, it will get wrapped in a function. Make memoize generic, and install it for: - operators - structures,...

enhancement

This is a nice system to take some derivation and return an unapplied functional version of the result. Here is the code, and some examples from Scheme. Once we have...

enhancement

For example, derivative becomes: ```clojure (r/choice (r/rule (D ?f) r/=> ((expt D 2) ?f)) (r/rule ((expt D ?n) ?f) r/=> ((expt D (? #(inc (% '?n)))) ?f)) (r/rule ?f r/=>...

- Here's a Spire implementation: https://github.com/typelevel/spire/blob/master/core/src/main/scala/spire/math/Algebraic.scala - a nice post about how to PRINT these types: https://fredrikj.net/blog/2021/03/printing-algebraic-numbers/ Nice notes describing this and related papers: ``` /** * Algebraic provides an...

type

@hcarvalhoaves and CTW in Clojurians Slack noted that this would be great. Some tasks: - [ ] make a constructor for `=` and inequality expressions - [ ] give them...

Right now the `compile` functions use a dictionary called [compiled-fn-whitelist](https://github.com/sicmutils/sicmutils/blob/master/src/sicmutils/expression/compile.cljc#L77) to associate symbols with functions. After simplification and common subexpression elimination, the compiler swaps these functions back in for their...

enhancement

I saw a reference to ["Arb: Efficient Arbitrary-Precision Midpoint-Radius Interval Arithmetic"](https://arxiv.org/abs/1611.02831) on [hackernews](https://news.ycombinator.com/item?id=26054520); it would be awesome to get proper interval arithmetic in to sicmutils. More references: - [blog from...

type

@alexgian sent me a lovely [paper](https://perl.plover.com/classes/cftalk/INFO/gosper.txt) by the legendary [Bill Gosper](https://en.wikipedia.org/wiki/Bill_Gosper) [paper](https://perl.plover.com/classes/cftalk/INFO/gosper.txt) on the [continued fraction](https://en.wikipedia.org/wiki/Continued_fraction) representation of real numbers. This would be an AWESOME data type to add to...

type