PaddiM8 / kalker

Scientific calculator with math syntax that supports user-defined variables and functions, complex numbers, and estimation of derivatives and integrals
https://kalker.xyz
MIT License
1.59k stars 70 forks source link

request for input file format #17

Closed muralikodali closed 3 years ago

muralikodali commented 3 years ago

I have tried some formats, which gave error as shown below :

hread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseFloatError { kind: Invalid }', kalk/src/parser.rs:477:43
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fish: “./kalk -i  maths.txt” terminated by signal SIGABRT (Abort)

input file format for calculations and variables requested. i have not found any related information in README.

PaddiM8 commented 3 years ago

What is inside the file?

muralikodali commented 3 years ago

i have no good knowledge of maths and physics formulas.

i simply tested with the input as shown below.

a = 23 b = 56 sum (a,b)

PaddiM8 commented 3 years ago

Ah, that explains it. To add numbers you simply do a + b, the sum function is like sigma, and can't be used like that. It should, however, do better error reporting with this, so thank you for finding this.