Arbitrary Precision Rational Calculator
  Expression Result
p
0.000s
q
0.000s
r
0.000s
s
0.000s
t
0.000s
v
0.000s
w
0.000s
x
0.000s
y
0.000s
z
0.000s
Display as:
This page performs arithmetic on rational numbers, “i / j” where “i” and “j” are arbitrarily large integers. All the arith­metic is exact. Literal integers are decimal unless obviously hex or prefixed by “0x”; fractional decimals work too. The oper­ators are +, -, *, /, %, mod, and ^. The functions are sign, abs, floor, round, log10, gcd, inverse, random, and prime (hover for a description). Expressions can refer to other expressions by name. When you change an expr­ession and press “tab”, all results that depend on the expression’s value are updated. Examples: Zp, RSA, SOSP.