--Copyright The Numerical Algorithms Group Limited 1996.
)clear all
-- knuth volume 2 p596 tables of numerical quantities
digits(42)
outputSpacing(5)
numeric(sqrt(2))
numeric(sqrt(3))
numeric(sqrt(5))
numeric(sqrt(10))
numeric(2**(1/3))
numeric(3**(1/3))
numeric(2**(1/4))
numeric(log(2))
numeric(log(3))
numeric(log(10))
numeric(1/log(2))
numeric(1/log(10))
numeric(%pi)
numeric(%pi/180)
numeric(1/%pi)
numeric(%pi**2)
numeric(sqrt(%pi))
numeric(Gamma(1/2))
numeric(Gamma(1/3))
numeric(Gamma(2/3))
numeric(%e)
numeric(1/%e)
numeric(%e**2)
-- this we don't have. it is the difference of the harmonic series and
-- the natural log (e.g. limit 1+1/2+...1/m-log(m))
-- this converges slowly, essentially giving 1 more decimal place per
-- power of 10 in the sum.
gamma:=numeric(sum(1/x,x=1..10000)-log(10000))
numeric(log(%pi))
-- this we don't have. it is the golden ratio (1 + sqrt(5))/2
phi:=(1+sqrt(5))/2
numeric(phi)
-- gamma isn't the right to any reasonable precision above. reset it.
gamma:=0.5772156649015328606065120900824024310422
numeric(%e**gamma)
numeric(%e**(%pi/4))
numeric(sin(1))
numeric(cos(1))
-- this we don't have. it is the zeta function
-- numeric(zeta(3))
numeric(log(phi))
numeric(1/log(phi))
numeric(-log(log(2)))
