by ancarda · 6y ago · 0 comments
1/3
0
Whereas ghci, or your language's REPL, will likely do better: > 1/3
0.3333333333333333 scale=INTEGER
for some reasonable INTEGER, say, 6, to your ~/.bc file (you need to also export BC_ENV_ARGS=~/.bc), or alias bc to bc -l). After having gp-pari fail after a brew upgrade I started using bc instead and have been relatively happy so far (although I miss isprime and factors which I used sparingly) % bc
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'.
scale=10
1/3
.3333333333