Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double absolute value #168

Open
truebluepl opened this issue Jun 7, 2024 · 2 comments
Open

Double absolute value #168

truebluepl opened this issue Jun 7, 2024 · 2 comments

Comments

@truebluepl
Copy link

Description

I would like to compute double absolute value. E.g: ||3-5|-4|

Actual Behavior

Typed expression is parsed as Latex value: |{|{3-5}|}-4|, which causing error when I try to evaluate.

Expected Behavior

Result should be 2.

@truebluepl
Copy link
Author

It works ok. My fault was setting latex expression for key as: |{#0}|, but should be: |#0|

@truebluepl
Copy link
Author

Ok, I still have problem.

let ce = new ComputeEngine.ComputeEngine();
console.log(ce.parse('||3-5|-4|').evaluate().latex);

Result of above is: \error{|}

Should returns 2.

@truebluepl truebluepl reopened this Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant