Closed BillFoster closed 11 years ago
Yep, this is a pretty major bug in the way I do type analysis (i.e., I don't really). When it can't decide the type of a function's output, it matches it as "any", so the the first definition of the outer function is used. In this case, it's the version of random() that works on ranges instead of lists, so we get NaN.
I need to do some proper thinking about what to change to fix this.
get NaN if , for example evaluate random(random([1,2],[2,3])). However if we set variable a=random([1,2],[2,3]) then random(a) is OK See https://numbas-editor.mas.ncl.ac.uk/question/603/testran/