Skip to content

Conversation

@dcbradley
Copy link

This patch fixes a problem in symbolic evaluation of the division of a fraction by something else.

How to reproduce

const ce = new ComputeEngine(); var expr = ce.parse("(x/2)/y"); console.log(expr.json); 

Actual behavior

[ 'Divide', [ 'Multiply', 'x', 'y' ], 2 ] 

Expected behavior

[ 'Divide', 'x', [ 'Multiply', 2, 'y' ] ] 

Environment

compute-engine 0.23.1

I have not tried previous versions.

Cheers!

@arnog
Copy link
Member

arnog commented Feb 25, 2024

Oops. Good catch and good fix. Thanks!

@arnog arnog merged commit a2b45a8 into cortex-js:main Feb 25, 2024
@dcbradley dcbradley deleted the div-div-fix branch February 25, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants