On 2020-07-13 at 20:56, David Wright wrote:

> On Mon 13 Jul 2020 at 19:02:38 (-0400), The Wanderer wrote:

>> ; pi(.00009)
>>         3.1416
> 
> It appears to use the argument as an integral factor of the answer
> quoted. However, the last example seems wrong. The answer ought to be
> 3.14163, which is 34907 * 0.00009. Was that a copy/paste failure?

Yes, apparently so. Sorry about that!


Based on a bit more digging, apparently calc does also have an atan()
function, which produces the arctangent of its argument; atan(1)*4 gives
3.14159265358979323848. Oddly, that last digit is not the same as what
'bc -l' gave from '4*a(1)' in Greg's demonstration; it looks like
atan(1) gives a value which is off in the very last displayed decimal
place from what Greg gave. I suspect that there is display rounding
involved on one side or the other.

atan() is of course more typing than a(), but it's also both arguably
more guessable (without already knowing function names) and definitely
more identifiable (in terms of recognizing what the function does from
the name), so there's a tradeoff.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to