Python, 8584 bytes
def f(x):
g=i=999;s=1g=i=999;s=1|-2*(x>1);x=x**s-1
while i:g=i+x*(i*i/g-(i:=i-1))
return x*s/g
Attempt This Online!Attempt This Online!
Thanks @xnor for -1.
How?
Evaluates a continued fraction https://en.wikipedia.org/wiki/Euler%27s_continued_fraction_formula