Repository navigation
Releases: davidesantangelo/nmri
Releases · davidesantangelo/nmri
Release list
v0.2.0
Added
- New math functions:
log10(x),log2(x)for logarithms - Factorial function:
fact(n)with overflow protection - Hyperbolic functions:
sinh(x),cosh(x),tanh(x) - Angle conversion:
deg(x)(radians→degrees),rad(x)(degrees→radians) - CLI flags:
--version/-vand--help/-h NMRI_VERSIONmacro for centralized version management
Changed
- Function map now uses
static constfor better optimization - Complete reserved word checking (all functions + constants)
- Improved help screen with compact function listing
- Code refactoring for better maintainability
Fixed
- Incomplete reserved word check that allowed overwriting some constants
v0.1.3
Fixed
- Renamed
MAX_INPUTmacro toNMRI_MAX_INPUTto prevent macro name conflicts with system headers. - Replaced all occurrences of
MAX_INPUTthroughout the codebase. - Prevented compiler warnings about macro redefinition.
v0.1.2
Added
- Command-line expression evaluation: You can now pass an expression directly as command-line arguments (e.g.,
nmri 1 + 2 * 3ornmri "5 * (2 + 3)") for quick calculations without entering the interactive mode. The program evaluates the expression and exits. If no expression arguments are provided, it enters the standard interactive mode.
Fixed
- Restored full implementations for core parsing and evaluation functions (
tokenize,shunting_yard,evaluate_postfix,evaluate_expression,handle_assignment,process_command,readCommand, etc.), fixing numerous-Wunused-parameterwarnings caused by previous dummy implementations used for brevity. - Removed unused
optvariable declaration inmain, fixing a-Wunused-variablewarning.
v0.1.1
[0.1.1] - 2025-03-31
Fixed
- Corrected division (
/) and modulo (%) operations to properly handle division by exactly zero. This prevents potential errors and inaccurate results that could occur due to floating-point representation issues near zero. - Ensured that the special
ansvariable and the internal memory of the last result are updated only after a variable assignment (e.g.,x = 1 + 2) is fully and successfully completed.
Changed
- Improved the internal parsing logic for unary plus (
+) and minus (-) operators for better consistency and potentially simpler evaluation flow.
Code Quality
- Minor internal code formatting adjustments and comment updates for clarity.
- Added the definition for an internal helper function (
clean_near_zero) that was previously missing.