?

Average Error: 32.2 → 12.4
Time: 9.1s
Precision: binary64
Cost: 2128

?

\[\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y} \]
\[\begin{array}{l} t_0 := y \cdot \left(y \cdot 4\right)\\ t_1 := x + \left(y + y\right)\\ \mathbf{if}\;x \leq -1.4 \cdot 10^{+102}:\\ \;\;\;\;\frac{t_1}{x}\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{-162}:\\ \;\;\;\;2 \cdot \frac{x \cdot x - t_0}{y \cdot \left(y \cdot 8\right) + x \cdot \left(x \cdot 2\right)}\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-100}:\\ \;\;\;\;-1\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+111}:\\ \;\;\;\;\left(1 - \frac{y + \left(y - x\right)}{\frac{x \cdot x + t_0}{t_1}}\right) + -1\\ \mathbf{elif}\;x \leq 10^{+129}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
(FPCore (x y)
 :precision binary64
 (/ (- (* x x) (* (* y 4.0) y)) (+ (* x x) (* (* y 4.0) y))))
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* y (* y 4.0))) (t_1 (+ x (+ y y))))
   (if (<= x -1.4e+102)
     (/ t_1 x)
     (if (<= x -4.8e-162)
       (* 2.0 (/ (- (* x x) t_0) (+ (* y (* y 8.0)) (* x (* x 2.0)))))
       (if (<= x 1.3e-100)
         -1.0
         (if (<= x 5.2e+111)
           (+ (- 1.0 (/ (+ y (- y x)) (/ (+ (* x x) t_0) t_1))) -1.0)
           (if (<= x 1e+129) -1.0 1.0)))))))
double code(double x, double y) {
	return ((x * x) - ((y * 4.0) * y)) / ((x * x) + ((y * 4.0) * y));
}
double code(double x, double y) {
	double t_0 = y * (y * 4.0);
	double t_1 = x + (y + y);
	double tmp;
	if (x <= -1.4e+102) {
		tmp = t_1 / x;
	} else if (x <= -4.8e-162) {
		tmp = 2.0 * (((x * x) - t_0) / ((y * (y * 8.0)) + (x * (x * 2.0))));
	} else if (x <= 1.3e-100) {
		tmp = -1.0;
	} else if (x <= 5.2e+111) {
		tmp = (1.0 - ((y + (y - x)) / (((x * x) + t_0) / t_1))) + -1.0;
	} else if (x <= 1e+129) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((x * x) - ((y * 4.0d0) * y)) / ((x * x) + ((y * 4.0d0) * y))
end function
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = y * (y * 4.0d0)
    t_1 = x + (y + y)
    if (x <= (-1.4d+102)) then
        tmp = t_1 / x
    else if (x <= (-4.8d-162)) then
        tmp = 2.0d0 * (((x * x) - t_0) / ((y * (y * 8.0d0)) + (x * (x * 2.0d0))))
    else if (x <= 1.3d-100) then
        tmp = -1.0d0
    else if (x <= 5.2d+111) then
        tmp = (1.0d0 - ((y + (y - x)) / (((x * x) + t_0) / t_1))) + (-1.0d0)
    else if (x <= 1d+129) then
        tmp = -1.0d0
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
public static double code(double x, double y) {
	return ((x * x) - ((y * 4.0) * y)) / ((x * x) + ((y * 4.0) * y));
}
public static double code(double x, double y) {
	double t_0 = y * (y * 4.0);
	double t_1 = x + (y + y);
	double tmp;
	if (x <= -1.4e+102) {
		tmp = t_1 / x;
	} else if (x <= -4.8e-162) {
		tmp = 2.0 * (((x * x) - t_0) / ((y * (y * 8.0)) + (x * (x * 2.0))));
	} else if (x <= 1.3e-100) {
		tmp = -1.0;
	} else if (x <= 5.2e+111) {
		tmp = (1.0 - ((y + (y - x)) / (((x * x) + t_0) / t_1))) + -1.0;
	} else if (x <= 1e+129) {
		tmp = -1.0;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, y):
	return ((x * x) - ((y * 4.0) * y)) / ((x * x) + ((y * 4.0) * y))
def code(x, y):
	t_0 = y * (y * 4.0)
	t_1 = x + (y + y)
	tmp = 0
	if x <= -1.4e+102:
		tmp = t_1 / x
	elif x <= -4.8e-162:
		tmp = 2.0 * (((x * x) - t_0) / ((y * (y * 8.0)) + (x * (x * 2.0))))
	elif x <= 1.3e-100:
		tmp = -1.0
	elif x <= 5.2e+111:
		tmp = (1.0 - ((y + (y - x)) / (((x * x) + t_0) / t_1))) + -1.0
	elif x <= 1e+129:
		tmp = -1.0
	else:
		tmp = 1.0
	return tmp
function code(x, y)
	return Float64(Float64(Float64(x * x) - Float64(Float64(y * 4.0) * y)) / Float64(Float64(x * x) + Float64(Float64(y * 4.0) * y)))
end
function code(x, y)
	t_0 = Float64(y * Float64(y * 4.0))
	t_1 = Float64(x + Float64(y + y))
	tmp = 0.0
	if (x <= -1.4e+102)
		tmp = Float64(t_1 / x);
	elseif (x <= -4.8e-162)
		tmp = Float64(2.0 * Float64(Float64(Float64(x * x) - t_0) / Float64(Float64(y * Float64(y * 8.0)) + Float64(x * Float64(x * 2.0)))));
	elseif (x <= 1.3e-100)
		tmp = -1.0;
	elseif (x <= 5.2e+111)
		tmp = Float64(Float64(1.0 - Float64(Float64(y + Float64(y - x)) / Float64(Float64(Float64(x * x) + t_0) / t_1))) + -1.0);
	elseif (x <= 1e+129)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp = code(x, y)
	tmp = ((x * x) - ((y * 4.0) * y)) / ((x * x) + ((y * 4.0) * y));
end
function tmp_2 = code(x, y)
	t_0 = y * (y * 4.0);
	t_1 = x + (y + y);
	tmp = 0.0;
	if (x <= -1.4e+102)
		tmp = t_1 / x;
	elseif (x <= -4.8e-162)
		tmp = 2.0 * (((x * x) - t_0) / ((y * (y * 8.0)) + (x * (x * 2.0))));
	elseif (x <= 1.3e-100)
		tmp = -1.0;
	elseif (x <= 5.2e+111)
		tmp = (1.0 - ((y + (y - x)) / (((x * x) + t_0) / t_1))) + -1.0;
	elseif (x <= 1e+129)
		tmp = -1.0;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := N[(N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(N[(x * x), $MachinePrecision] + N[(N[(y * 4.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := Block[{t$95$0 = N[(y * N[(y * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x + N[(y + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.4e+102], N[(t$95$1 / x), $MachinePrecision], If[LessEqual[x, -4.8e-162], N[(2.0 * N[(N[(N[(x * x), $MachinePrecision] - t$95$0), $MachinePrecision] / N[(N[(y * N[(y * 8.0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e-100], -1.0, If[LessEqual[x, 5.2e+111], N[(N[(1.0 - N[(N[(y + N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(x * x), $MachinePrecision] + t$95$0), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[x, 1e+129], -1.0, 1.0]]]]]]]
\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y}
\begin{array}{l}
t_0 := y \cdot \left(y \cdot 4\right)\\
t_1 := x + \left(y + y\right)\\
\mathbf{if}\;x \leq -1.4 \cdot 10^{+102}:\\
\;\;\;\;\frac{t_1}{x}\\

\mathbf{elif}\;x \leq -4.8 \cdot 10^{-162}:\\
\;\;\;\;2 \cdot \frac{x \cdot x - t_0}{y \cdot \left(y \cdot 8\right) + x \cdot \left(x \cdot 2\right)}\\

\mathbf{elif}\;x \leq 1.3 \cdot 10^{-100}:\\
\;\;\;\;-1\\

\mathbf{elif}\;x \leq 5.2 \cdot 10^{+111}:\\
\;\;\;\;\left(1 - \frac{y + \left(y - x\right)}{\frac{x \cdot x + t_0}{t_1}}\right) + -1\\

\mathbf{elif}\;x \leq 10^{+129}:\\
\;\;\;\;-1\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original32.2
Target31.9
Herbie12.4
\[\begin{array}{l} \mathbf{if}\;\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y} < 0.9743233849626781:\\ \;\;\;\;\frac{x \cdot x}{x \cdot x + \left(y \cdot y\right) \cdot 4} - \frac{\left(y \cdot y\right) \cdot 4}{x \cdot x + \left(y \cdot y\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{x}{\sqrt{x \cdot x + \left(y \cdot y\right) \cdot 4}}\right)}^{2} - \frac{\left(y \cdot y\right) \cdot 4}{x \cdot x + \left(y \cdot y\right) \cdot 4}\\ \end{array} \]

Derivation?

  1. Split input into 5 regimes
  2. if x < -1.40000000000000009e102

    1. Initial program 52.5

      \[\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y} \]
    2. Applied egg-rr52.5

      \[\leadsto \frac{\color{blue}{\left(\left(y + y\right) + x\right) \cdot \left(x - \left(y + y\right)\right)}}{x \cdot x + \left(y \cdot 4\right) \cdot y} \]
    3. Applied egg-rr50.9

      \[\leadsto \color{blue}{\frac{x - \left(y + y\right)}{x \cdot x + y \cdot \left(y \cdot 4\right)} \cdot \left(y + \left(y + x\right)\right)} \]
    4. Taylor expanded in x around inf 10.5

      \[\leadsto \color{blue}{\frac{1}{x}} \cdot \left(y + \left(y + x\right)\right) \]
    5. Applied egg-rr10.4

      \[\leadsto \color{blue}{\frac{x + \left(y + y\right)}{x}} \]

    if -1.40000000000000009e102 < x < -4.8000000000000004e-162

    1. Initial program 15.6

      \[\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y} \]
    2. Applied egg-rr15.6

      \[\leadsto \color{blue}{2 \cdot \frac{x \cdot x - y \cdot \left(y \cdot 4\right)}{\left(y \cdot y\right) \cdot 8 + \left(x \cdot x\right) \cdot 2}} \]
    3. Simplified15.7

      \[\leadsto \color{blue}{2 \cdot \frac{x \cdot x - y \cdot \left(y \cdot 4\right)}{y \cdot \left(y \cdot 8\right) + x \cdot \left(x \cdot 2\right)}} \]
      Proof

      [Start]15.6

      \[ 2 \cdot \frac{x \cdot x - y \cdot \left(y \cdot 4\right)}{\left(y \cdot y\right) \cdot 8 + \left(x \cdot x\right) \cdot 2} \]

      rational.json-simplify-2 [=>]15.6

      \[ 2 \cdot \frac{x \cdot x - y \cdot \left(y \cdot 4\right)}{\color{blue}{8 \cdot \left(y \cdot y\right)} + \left(x \cdot x\right) \cdot 2} \]

      rational.json-simplify-43 [=>]15.6

      \[ 2 \cdot \frac{x \cdot x - y \cdot \left(y \cdot 4\right)}{\color{blue}{y \cdot \left(y \cdot 8\right)} + \left(x \cdot x\right) \cdot 2} \]

      rational.json-simplify-2 [=>]15.6

      \[ 2 \cdot \frac{x \cdot x - y \cdot \left(y \cdot 4\right)}{y \cdot \left(y \cdot 8\right) + \color{blue}{2 \cdot \left(x \cdot x\right)}} \]

      rational.json-simplify-43 [=>]15.7

      \[ 2 \cdot \frac{x \cdot x - y \cdot \left(y \cdot 4\right)}{y \cdot \left(y \cdot 8\right) + \color{blue}{x \cdot \left(x \cdot 2\right)}} \]

    if -4.8000000000000004e-162 < x < 1.2999999999999999e-100 or 5.1999999999999997e111 < x < 1e129

    1. Initial program 28.5

      \[\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y} \]
    2. Taylor expanded in x around 0 10.9

      \[\leadsto \color{blue}{-1} \]

    if 1.2999999999999999e-100 < x < 5.1999999999999997e111

    1. Initial program 16.2

      \[\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y} \]
    2. Applied egg-rr16.2

      \[\leadsto \frac{\color{blue}{\left(\left(y + y\right) + x\right) \cdot \left(x - \left(y + y\right)\right)}}{x \cdot x + \left(y \cdot 4\right) \cdot y} \]
    3. Applied egg-rr15.9

      \[\leadsto \color{blue}{\frac{x - \left(y + y\right)}{x \cdot x + y \cdot \left(y \cdot 4\right)} \cdot \left(y + \left(y + x\right)\right)} \]
    4. Applied egg-rr15.8

      \[\leadsto \color{blue}{\frac{y + \left(y - x\right)}{\frac{x \cdot x + y \cdot \left(y \cdot 4\right)}{-\left(x + \left(y + y\right)\right)}}} \]
    5. Applied egg-rr15.7

      \[\leadsto \color{blue}{\left(1 - \frac{y + \left(y - x\right)}{\frac{x \cdot x + y \cdot \left(y \cdot 4\right)}{x + \left(y + y\right)}}\right) + -1} \]

    if 1e129 < x

    1. Initial program 57.3

      \[\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y} \]
    2. Taylor expanded in x around inf 9.3

      \[\leadsto \color{blue}{1} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification12.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.4 \cdot 10^{+102}:\\ \;\;\;\;\frac{x + \left(y + y\right)}{x}\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{-162}:\\ \;\;\;\;2 \cdot \frac{x \cdot x - y \cdot \left(y \cdot 4\right)}{y \cdot \left(y \cdot 8\right) + x \cdot \left(x \cdot 2\right)}\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-100}:\\ \;\;\;\;-1\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+111}:\\ \;\;\;\;\left(1 - \frac{y + \left(y - x\right)}{\frac{x \cdot x + y \cdot \left(y \cdot 4\right)}{x + \left(y + y\right)}}\right) + -1\\ \mathbf{elif}\;x \leq 10^{+129}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternatives

Alternative 1
Error12.3
Cost1936
\[\begin{array}{l} t_0 := x + \left(y + y\right)\\ \mathbf{if}\;x \leq -5.2 \cdot 10^{+101}:\\ \;\;\;\;\frac{t_0}{x}\\ \mathbf{elif}\;x \leq -1.95 \cdot 10^{-162}:\\ \;\;\;\;\frac{\left(\left(y + y\right) + x\right) \cdot \left(x - \left(y + y\right)\right)}{x \cdot x + \left(y \cdot 4\right) \cdot y}\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{-102}:\\ \;\;\;\;-1\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+111}:\\ \;\;\;\;\frac{y + \left(y - x\right)}{\frac{x \cdot x + y \cdot \left(y \cdot 4\right)}{-t_0}}\\ \mathbf{elif}\;x \leq 10^{+129}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 2
Error12.4
Cost1936
\[\begin{array}{l} t_0 := y \cdot \left(y \cdot 4\right)\\ t_1 := x + \left(y + y\right)\\ \mathbf{if}\;x \leq -1.05 \cdot 10^{+103}:\\ \;\;\;\;\frac{t_1}{x}\\ \mathbf{elif}\;x \leq -5.3 \cdot 10^{-162}:\\ \;\;\;\;2 \cdot \frac{x \cdot x - t_0}{y \cdot \left(y \cdot 8\right) + x \cdot \left(x \cdot 2\right)}\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{-100}:\\ \;\;\;\;-1\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+111}:\\ \;\;\;\;\frac{y + \left(y - x\right)}{\frac{x \cdot x + t_0}{-t_1}}\\ \mathbf{elif}\;x \leq 10^{+129}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 3
Error12.4
Cost1872
\[\begin{array}{l} t_0 := \left(y \cdot 4\right) \cdot y\\ \mathbf{if}\;x \leq -1.72 \cdot 10^{+103}:\\ \;\;\;\;\frac{x + \left(y + y\right)}{x}\\ \mathbf{elif}\;x \leq -5.2 \cdot 10^{-162}:\\ \;\;\;\;\frac{x \cdot x - t_0}{x \cdot x + t_0}\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{-101}:\\ \;\;\;\;-1\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+111}:\\ \;\;\;\;\frac{y + \left(y + x\right)}{x \cdot x + y \cdot \left(y \cdot 4\right)} \cdot \left(x - \left(y + y\right)\right)\\ \mathbf{elif}\;x \leq 10^{+129}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 4
Error12.4
Cost1872
\[\begin{array}{l} t_0 := x - \left(y + y\right)\\ \mathbf{if}\;x \leq -1.7 \cdot 10^{+103}:\\ \;\;\;\;\frac{x + \left(y + y\right)}{x}\\ \mathbf{elif}\;x \leq -1.7 \cdot 10^{-162}:\\ \;\;\;\;\frac{\left(\left(y + y\right) + x\right) \cdot t_0}{x \cdot x + \left(y \cdot 4\right) \cdot y}\\ \mathbf{elif}\;x \leq 5.3 \cdot 10^{-103}:\\ \;\;\;\;-1\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+111}:\\ \;\;\;\;\frac{y + \left(y + x\right)}{x \cdot x + y \cdot \left(y \cdot 4\right)} \cdot t_0\\ \mathbf{elif}\;x \leq 10^{+129}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 5
Error12.5
Cost1744
\[\begin{array}{l} t_0 := \left(y \cdot 4\right) \cdot y\\ t_1 := \frac{x \cdot x - t_0}{x \cdot x + t_0}\\ \mathbf{if}\;x \leq -7.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{x + \left(y + y\right)}{x}\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-162}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-90}:\\ \;\;\;\;-1\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+111}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 10^{+129}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 6
Error18.5
Cost1372
\[\begin{array}{l} t_0 := \frac{x + \left(y + y\right)}{x}\\ \mathbf{if}\;x \leq -1.05 \cdot 10^{+65}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -1.42 \cdot 10^{-52}:\\ \;\;\;\;-1\\ \mathbf{elif}\;x \leq -5.9 \cdot 10^{-161}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-53}:\\ \;\;\;\;-1\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-29}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 4.1 \cdot 10^{-9}:\\ \;\;\;\;-1\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+111}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 10^{+129}:\\ \;\;\;\;-1\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
Alternative 7
Error16.2
Cost328
\[\begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{-15}:\\ \;\;\;\;-1\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+74}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;-1\\ \end{array} \]
Alternative 8
Error32.5
Cost64
\[-1 \]

Error

Reproduce?

herbie shell --seed 2023064 
(FPCore (x y)
  :name "Diagrams.TwoD.Arc:arcBetween from diagrams-lib-1.3.0.3"
  :precision binary64

  :herbie-target
  (if (< (/ (- (* x x) (* (* y 4.0) y)) (+ (* x x) (* (* y 4.0) y))) 0.9743233849626781) (- (/ (* x x) (+ (* x x) (* (* y y) 4.0))) (/ (* (* y y) 4.0) (+ (* x x) (* (* y y) 4.0)))) (- (pow (/ x (sqrt (+ (* x x) (* (* y y) 4.0)))) 2.0) (/ (* (* y y) 4.0) (+ (* x x) (* (* y y) 4.0)))))

  (/ (- (* x x) (* (* y 4.0) y)) (+ (* x x) (* (* y 4.0) y))))