git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sc: omit some optional zero values in bw data
[sheet.git]
/
base.plp
diff --git
a/base.plp
b/base.plp
index 7d31a4dbaf79094b29f44c94aa7f82856ba1fdf8..3a89a53de6979de2a05417ab84620f5698ad353d 100644
(file)
--- a/
base.plp
+++ b/
base.plp
@@
-13,7
+13,7
@@
Html({
});
my @cols = (2, 6, 8, 9, 10, 12, 16, 18, 20);
});
my @cols = (2, 6, 8, 9, 10, 12, 16, 18, 20);
-my @morecols = (2
, 3, 4,
6, 8, 9, 10, 12, 16, 18, 20, 24, 32, 36, 64);
+my @morecols = (2
..
6, 8, 9, 10, 12, 16, 18, 20, 24, 32, 36, 64);
my @char = (0..9, 'A'..'Z', 'a'..'z');
:>
<h1>Number bases</h1>
my @char = (0..9, 'A'..'Z', 'a'..'z');
:>
<h1>Number bases</h1>
@@
-30,7
+30,7
@@
use List::Util 'sum';
print '<tr><th>';
print '<th>', $_ for @morecols;
for my $max (100, 255, 1024) {
print '<tr><th>';
print '<th>', $_ for @morecols;
for my $max (100, 255, 1024) {
- print '<tr><th>', $max;
+ print '<tr><th>
⍳
', $max;
for my $radix (@morecols) {
printf '<td style="text-align:right">%.1f',
sum(map { radix_economy($_, $radix) } 1 .. $max) / $max;
for my $radix (@morecols) {
printf '<td style="text-align:right">%.1f',
sum(map { radix_economy($_, $radix) } 1 .. $max) / $max;
@@
-38,7
+38,7
@@
for my $max (100, 255, 1024) {
}
:></table>
}
:></table>
-<h2>
Fractions
</h2>
+<h2>
Reciprocal fractions (n⁻¹)
</h2>
<table>
<:
print '<tr><th>';
<table>
<:
print '<tr><th>';
@@
-94,7
+94,7
@@
for my $n (2 .. $count) {
<hr>
<hr>
-<h2>Duplication</h2>
+<h2>Duplication
(2ⁿ)
</h2>
<table>
<:
use 5.010;
<table>
<:
use 5.010;