Have a look at the number formats section of https://webwork.maa.org/wiki/Modifying_Contexts_(advanced) which should probably help. However, you may be better off just defining $c as a string like "0.00001".
$c = list_random(".001", ".0001", ".00001", ".01");
Also of potential interest is using Perl's sprintf: