Use mxParser library instead of SamigoExpressionParser for calculated questions

Description

The Calculated Question parser has problems.

Here is a complex formula that should come up with 866.2 but custom SamigoExpressionParser comes up with 894: 

(185.9*1000*3.8/1200)/(1-1/(1+3.8/1200)^360)

 

Here are some simple examples from the current tests that also seem to be incorrect:

sin(PI) previously calculated as 1.23E-16

tan(PI) previously calculated as -1.23E-16

Github repo:
https://github.com/redbito/MathParser.org-mXparser

License is BSD 2

Activity

Show:

Matthew Jones January 9, 2018 at 12:58 PM

Merged this to 12.x. Will need a little manual code resolution to get this into 11.

Neal Caidin January 9, 2018 at 8:35 AM

Verified on Sakai - 4149f3ce1 - Sakai 13-SNAPSHOT - Server ip-172-31-6-159 

nightly master mysql QA server

Setting to critical priority since it can affect grades. 

 

Fixed

Details

Priority

Affects versions

Components

Assignee

Reporter

Labels

Created December 18, 2017 at 4:49 PM
Updated September 21, 2020 at 12:33 AM
Resolved January 2, 2018 at 12:48 PM