Quick solution to make it at least somewhat useful.
return $func;
}
elsif ($func =~ /\A\/($float)\z/) {
- my @range = $1;
- #TODO log
- for (my $next = $1; $next < $maxval; $next += $range[0]) {
- push @range, $next;
+ my @range = my $multiple = my $next = $1;
+ while ($next < $maxval) {
+ $multiple *= 10 if $opt{log};
+ push @range, $next += $multiple;
}
return @range;
}
6 ---:---:---:---:----:---:
7 ---:---:---:---:----:---:---:-
8 ---:---:---:---:----:---:---:---:-
-9 ---:---:---:---:----:---:---:---:-----
+9 ---:---:---:---:----:---:---:---:----:
--- /dev/null
+t1260-powers_of_ten.in
\ No newline at end of file
--- /dev/null
+ 1
+ 10 ----+-
+ 100 ----+-----+
+ 1000 ----+-----+----+-
+ 1e4 ----+-----+----+-----+
+100000 ----+-----+----+-----+----+-
+ 1e6 ----+-----+----+-----+----+-----+