sub quant { my $v = shift; return int($v*9); }