That is an interesting topic, I am too, interested in such algorithms, as using calculator for some simple or not so simple calculations is a distraction for what can be a fluent flow of thoughts.
Anyway, a little contribution from me: my father showed me this little trick and I have not to...