cortex-js / compute-engine

An engine for symbolic manipulation and numeric evaluation of math formulas expressed with MathJSON
https://cortexjs.io
MIT License
356 stars 42 forks source link

Double absolute value #168

Closed truebluepl closed 2 months ago

truebluepl commented 3 months ago

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 commented 2 months ago

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