James Self reported, in bug 227707, that V3RAND in the
MUMPS Validation Test Suite failed, because $random()
can't handle a ten-digit number. This is because
op_fnrandom() takes an int4, rather than an mval. The
attached patch is kind of a kludge that changes the
argument to an mval.
Briefly, here is what I did:
* changed int4 to mval in expritem.c, op.h, and ttt.c
* double2mval() asks sprintf() for 15 digits of precision
* op_fnrandom() uses an mval
$random() should return an error if its input is less
than 1. I haven't figured out how to do mval
comparisons, so this is incomplete.
I assert no copyright on this patch. Besides, I'm sure
there's a better way to do it.