[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: what calculator do you use?



On Mon, Jul 13, 2020 at 06:47:51AM -0400, The Wanderer wrote:
> In some contexts it could even need fewer; for example, calc (as shipped
> in Debian) provides the built-in function 'pi()', which takes a
> precision - expressed as a value between zero and one - and returns pi
> to that level of precision.

I do not understand this description.  How many decimal places do you
get for a precision of, say, 0.5?

> The list of built-in functions in the bc man
> page is very short, and doesn't include any such thing, so unless
> something has added one without the man page getting updated anything
> that needs to use pi is going to take more typing than with calc.

True.  But it's not a *huge* amount of typing.

unicorn:~$ bc -l
bc 1.07.1
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'. 
4*a(1)
3.14159265358979323844
scale=50
4*a(1)
3.14159265358979323846264338327950288419716939937508


Reply to: