Expand description
§gananayantra
gananayantra is a professional-grade, multi-industry calculation engine written in Rust. It provides reusable, library-first calculators across diverse domains including:
- Finance: ROI, time value of money, compound interest, loans, taxes, retirement
- Health: BMI, BMR, body fat percentage, pregnancy, fitness
- Energy: Power consumption, electricity cost
- Geo: Earth distance (Haversine), horizon distance
- Water: Pressure at depth, river flow rate
- Space: Orbital velocity, escape velocity, orbital period
- Math: Statistics, geometry, advanced math
- Logistics: Freight weights, inventory (EOQ)
- Physics: Fluid dynamics, kinematics
- Climate: Carbon footprint
- Utilities: Percentage calculations, lifestyle tools
- Specialized: Building, electronics, networking, science
§Design Principles
This crate is library-first and does not impose any CLI or I/O model. All public functions:
- Accept typed parameters
- Return
Result<T, String>for safe error handling (usuallyResult<f64, String>) - Perform input validation
- Are pure functions with no side effects
§Quick Start
use gananayantra::finance::tvm::future_value;
let fv = future_value(10_000.0, 0.08, 5).unwrap();
assert!(fv > 14_000.0);Modules§
- climate
- Climate and environmental calculators.
- energy
- Energy-related calculators including power consumption and electricity cost.
- finance
- Finance-related calculators including ROI, time value of money, and compound interest.
- finance_
investment - geo
- Geospatial calculators including Earth distance and horizon distance.
- health
- Health and fitness calculators including BMI, BMR, body fat percentage, and calorie requirements.
- logistics
- Logistics and Supply Chain calculators.
- math
- Mathematical and statistical calculators.
- physics
- Physics calculators for engineering and science.
- space
- Space and orbital mechanics calculators including orbital velocity, escape velocity, and orbital period.
- specialized
- Specialized industry calculators.
- utilities
- General-purpose utility calculators.
- utility_
lifestyle - Lifestyle and utility calculators.
- water
- Water-related calculators including pressure at depth and river flow rate.