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
197 stars 118 forks source link

Logarithm of negative numbers isn't implemented for decimals #1059

Closed christianp closed 7 months ago

christianp commented 7 months ago

e.g. ln(dec(-2)) returns dec("infinity").

It should do the same thing as the number data type: when x is negative, return ln(-x) + pi*i.