package main import . "fmt" import . "strings" import . "math/big" func Reverse(s string) string { b:=[]byte(s) for i,j:=0,len(b)-1;i0&&y>0 { Println(-1) } else if x==0&&y>0 { Println("3.5317401904617327") } else { var e,f,z *Rat e,f,z=NewRat(2,1),NewRat(1,1),NewRat(0,1) for i:=0;i<20;i++ { e.Mul(e,NewRat(1,2)) if i%2==0 &&x>0{ continue } z.Add(z,new(Rat).Mul(NewRat(int64(i+1),1), new(Rat).Mul(f,new(Rat).Sub(NewRat(1,1),e)))) f.Mul(f,e) } Println(z.FloatString(12)) } }