Giter Club home page Giter Club logo

citrus-cas's Introduction

Citrus CAS

A CAS (Computer Algebra System) written in Rust for no_std environments.

citrus-cas's People

Contributors

jarnachao09 avatar mixedmatched avatar willemml avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

citrus-cas's Issues

create adaptable Modifier

add a fast-matching Modifier that can have dynamically added patterns. this is useful for easily customizing functionality while maintaining speed.

add memoization to rule application

because rules are applied bottom-up and are frequently repeated on the same inputs, doing memoization on modify could create massive speed improvements

Move example code

Example code should either be moved to an examples directory or be expanded on to create a more full featured application.
Not urgent, can be left as is for beta/pre-release purposes, but should be done before an actual release.

name change tracker

this is a tracking issue for the potential name changes for this project

  • fruit themed:
    • lemonlime
    • limecas
    • lemoncas (this is the one I'm leaning towards)
    • citrus-cas

fix fmt output for Expression

the output of fmt::Display for Expression is broken (Expression won't print in a way that can be reinterpreted by the parser). the associated test is test_fmt_parse.

Merging of the evaluator and approximator modifiers

Reasoning

Having separate steps that specifically handle only symbolic and numerical computation is very limiting. The current plan wouldn't allow for partial evaluation of functions

>>> y = 2
>>> f(x, y) = x ^ 2 + y ^ 2

would return undefined with the current plan for the evaluator and approximator stages.

Proposed solution

Change the behavior of the evaluator to act like both the current evaluator and the approximator, removing the need for an approximator in the first place. The modify function would now return a (Expression, Option<Expression>) where the left value would be the simplest form while the right value would be an approximated form. If both are equal, then the right value would be a None, otherwise, it will hold the approximated value.

This would make the below examples of partial evaluation to become possible

>>> y = 1
>>> z = 1
>>> <x, y, z> dot <2, 2, 2>
(2 * x + 2 * y + 2 * z, Some(2 * x + 4))

>>> y = 2
>>> x ^ 2 + diff(y ^ 2, y)
(x ^ 2 + 2 * y, Some(x ^ 2 + 4))

while also in the long term, allowing for the functionality seen here where the exact form is returned but an approximate form is also given

This method could also allow for multiple fallbacks, such as if an integral is unable to be found symbolically, then the evaluator could fall back onto the approximated form of the integral (through various numeric integration methods such trapezoid, midpoint, simpsons, gauss legendre, gauss konrod, clenshaw curtis) to continue the evaluation.

more extensive and uniform tests

tests in different modules overlap in some areas, which should be separated or integrative. additionally, many test cases are not covered by the existing tests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.