1
## ss.bc calculate the value of sum[n=1..oo] x^(2^(-n))-1 with GNU bc
2
## i.e. sum of repeated square roots, less one.
6
if(x<=0){print "Negative Infinity\n";-1/0}
18
define ss_n(n,x) { # Generalisation of ss; ss(x) == ss_n(2,x)
20
if(x<=0){print "Negative Infinity\n";-1/0}
22
if(n<=1){print "Infinity\n";1/0}