My solution when I had the same problem that Gavin saw was to do the following:
$dx = non_zero_random(-3,3)/10;
If the random or non_zero_random function can give an integer, I have never seen issues with dividing by 10 at that point. list_random is certainly a reasonable alternative in this case, but I have had problems where I've wanted $dx to be a non-zero integer multiple of 0.001 between -1 and 1. In this case
$dx = non_zero_random(-999,999)/1000;
works perfectly.
WeBWorK Problems
Generate distinct random values
This forum has a limit to the number of forum postings you can make in a given time period - this is currently set at 10 posting(s) in 1 day