Skip to content

How is calc compared with GNU bc? #94

Closed Answered by lcn2
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

Calc is a C-like language with a rich command line as well as interactive interface.

Calc competes files internally as rational numbers a/b, or and complex rational values.

So:

; sqrt(2)
	1.4142135623730950488

will give you a few digits of the value of the square root of 2.

If you wish to see more digits, you can extend the number of digits displayed we well an the precision (called epsilon):

; display(100)
; sqrt(2,1e-100)
        1.4142135623730950488016887242096980785696718753769480731766797379907324784621070388503875343276415727

Most functions take an epsilon argument. See:

; help sqrt

You can set the global epsilon, so if you want 1000 digits of precision:

; display(1000)
; epsilo…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
1 participant