Skip to content

Check formula for errors #42

Answered by AntonovAnton
Bykiev asked this question in Q&A
Aug 27, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Hi! I’ve added error checking in version 1.1.8 for cases such as:

"12 + 3 * (120 + 5" (missing closing parenthesis)
"12 + sin()" (empty function call)
"12 + sin / 1" (incomplete function usage)
However, expressions like "12 + sin + 1" are still evaluated, as they can be interpreted as valid mathematical expressions, such as "12 + sin(+1)" by some evaluators. I’m avoiding strict restrictions to maintain flexibility in cases like "cos -1" and other similar scenarios.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Bykiev
Comment options

@AntonovAnton
Comment options

Answer selected by Bykiev
@AntonovAnton
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants