Comparing two numbers by tails

s/ / > /
h
s/$/#/
:
s/[1-9]/&-/g
y/123456789/012345678/
s/\(0-*\)\( .*\)\(0-*\)#/\2#_\1\3/
t
s/-0-/0/
t
/^0\| #\w*_0-/b>
/-/b<
g;s/>/=/;h
:<
g;s/>/</;h
:>
g

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page