numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
198 stars 118 forks source link

infer_variable_types takes too many steps on a long expression #963

Closed christianp closed 1 year ago

christianp commented 1 year ago

The expression that caused this was 16*sin(u)*vector(sin(u)*cos(v),sin(u)*sin(v),cos(u)).

The infer_variable_types is supposed to find an assignment of types to the free variables in the expression so that it can be evaluated. There are only two free variables in the above expression, so it shouldn't take long to find a good assignment. In fact, any number type will do.