No description
- Add FormulaEvaluator class with d4rt integration - Support single output variable formulas with variable injection - Include comprehensive error handling and validation - Add 15 test cases covering evaluation scenarios - Create working example with Newton's law, quadratic discriminant, etc. - Export evaluator in main library file Implements formula evaluation by injecting variable declarations into d4rt source code, enabling execution of mathematical formulas with input parameters. |
||
|---|---|---|
| .pub-cache | ||
| bin | ||
| example | ||
| lib | ||
| test | ||
| .gitignore | ||
| analysis_options.yaml | ||
| CLAUDE.md | ||
| firejail-warp-terminal.profile | ||
| pubspec.lock | ||
| pubspec.yaml | ||
| README.md | ||
| warp-terminal.sh | ||
Math Formulae Manager
A comprehensive command-line application for managing and computing mathematical formulas across various disciplines including mathematics, physics, medicine, and engineering.
This project uses dart language, and flutter framework. It leverages d4rt library to execute formulas.
Development guidelines
If you are a contributor or an agent, please follow CLAUDE.md for development guidelines.
Formula file description
The file is a json array of formulas.
[
{
"name": "Newton's second law (scalar)",
"input": {
"m" : {
"magnitude": "mass"
},
"a" : {
"magnitude": "acceleration"
}
},
"output": {
"F" : {
"magnitude" : "Force"
}
},
"d4rt_code":{
"return m*a;"
}
}
]
Features
Formula Search and Computation
- Search through a vast collection of formulas from multiple domains:
- Mathematics
- Physics
- Medical sciences
- Engineering
- And more!
- Input values for formula variables
- Get computed results with proper units
Unit Management
- Each data value includes its magnitude and unit
- Convert between different units seamlessly
- Automatic unit validation and conversion
Formula Editor
- Built-in formula editor using the d4rt interpreter
- Create and modify formulas with ease
- Syntax highlighting and validation
Formula Sharing
- Share formulas with other users
- Import formulas from the community
- Collaborative formula database
Rich Formula Documentation
Each formula includes:
- The formula itself - Mathematical expression
- Explanation - Detailed description in Markdown format
- Images - Visual diagrams, graphs, or illustrations
- Examples - Sample calculations and use cases
Project Structure
bin/- Main executable and entry pointlib/- Core library code and formula enginetest/- Unit tests and formula validation tests
Getting Started
[Installation and usage instructions to be added]
Contributing
[Contribution guidelines to be added]