// output of ./demo/arith/shiftadd-exp-demo.cc: // Description: //% Shift-add algorithm for computing b^x arg 1: 0.5 == x [Argument for shift-add b^x computation] default=0.5 arg 2: 2 == b [Base of the logarithm] default=2 arg 3: 16 == n [Number of iterations] default=16 -1 0.00000000 0.00000000 +1.00000000 +0.00000000 1 0.58496250 0.00000000 +1.00000000 +0.58496250 2 0.32192809 0.00000000 +1.00000000 +0.32192809 2 0.64385618 0.32192809 +1.25000000 +0.32192809 3 0.49185309 0.32192809 +1.25000000 +0.16992500 3 0.66177809 0.49185309 +1.40625000 +0.16992500 4 0.57931593 0.49185309 +1.40625000 +0.08746284 5 0.53624721 0.49185309 +1.40625000 +0.04439411 6 0.51422090 0.49185309 +1.40625000 +0.02236781 7 0.50308035 0.49185309 +1.40625000 +0.01122725 8 0.49747764 0.49185309 +1.40625000 +0.00562454 8 0.50310219 0.49747764 +1.41174316 +0.00562454 9 0.50029266 0.49747764 +1.41174316 +0.00281501 10 0.49888583 0.49747764 +1.41174316 +0.00140819 10 0.50029403 0.49888583 +1.41312181 +0.00140819 11 0.49959010 0.49888583 +1.41312181 +0.00070426 11 0.50029437 0.49959010 +1.41381182 +0.00070426 12 0.49994228 0.49959010 +1.41381182 +0.00035217 12 0.50029446 0.49994228 +1.41415698 +0.00035217 13 0.50011838 0.49994228 +1.41415698 +0.00017609 14 0.50003033 0.49994228 +1.41415698 +0.00008805 15 0.49998631 0.49994228 +1.41415698 +0.00004402 15 0.50003034 0.49998631 +1.41420014 +0.00004402 99 0.50000000 0.50000000 +1.41421356 +0.00000000 dl = -1.341644065155911392e-05 2**(-n) = 1.52587890625e-05