[TUHS] Lorinda Cherry
meillo at marmaro.de
Wed Feb 16 18:13:33 AEST 2022
[2022-02-16 00:54] arnold at skeeve.com
> Dave Horsfall <dave at horsfall.org> wrote:
> > On Wed, 16 Feb 2022, George Michaelson wrote:
> > > I use BC as a daily driver like most people. I never quite got DC, and
> > > wondered at the duality of them. Very interesting to have the background
> > > explained.
> > You know you're a greybeard if you can remember why the DC sequence
> > "99k2vp8opq" was so popular...
> > -- Dave
> I guess I'm not enough of a greybeard:
> $ dc
> I recognize the first value as the square root of two. What is
> the second value?
Decoding the program with the manpage:
99k set scaling factor to 99 (i.e. 99 digits on output)
2v square root of 2
p print it (but leave it on the stack)
8o switch to octal output
p print the same value (now in octal)
More interesting is the question why you need sqrt(2) in octal?
More information about the TUHS