[TUHS] Lorinda Cherry
markus schnalke
meillo at marmaro.de
Wed Feb 16 18:13:33 AEST 2022
Hoi.
[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
> 99k2vp8opq
> 1.4142135623730950488016887242096980785696718753769480731766797379907\
> 32478462107038850387534327641572
> 1.3240474631771674622042627661154672512575174353366027242235650231664\
> 2753102603147144252257620301035270505416503
>
> 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)
q quit
More interesting is the question why you need sqrt(2) in octal?
meillo
More information about the TUHS
mailing list