Linear.Projection:perspective from linear-1.19.1.3, B

Percentage Accurate: 77.7% → 99.9%
Time: 5.8s
Alternatives: 8
Speedup: 0.7×

Specification

?
\[\begin{array}{l} \\ \frac{\left(x \cdot 2\right) \cdot y}{x - y} \end{array} \]
(FPCore (x y) :precision binary64 (/ (* (* x 2.0) y) (- x y)))
double code(double x, double y) {
	return ((x * 2.0) * y) / (x - y);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((x * 2.0d0) * y) / (x - y)
end function
public static double code(double x, double y) {
	return ((x * 2.0) * y) / (x - y);
}
def code(x, y):
	return ((x * 2.0) * y) / (x - y)
function code(x, y)
	return Float64(Float64(Float64(x * 2.0) * y) / Float64(x - y))
end
function tmp = code(x, y)
	tmp = ((x * 2.0) * y) / (x - y);
end
code[x_, y_] := N[(N[(N[(x * 2.0), $MachinePrecision] * y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(x \cdot 2\right) \cdot y}{x - y}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 8 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 77.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(x \cdot 2\right) \cdot y}{x - y} \end{array} \]
(FPCore (x y) :precision binary64 (/ (* (* x 2.0) y) (- x y)))
double code(double x, double y) {
	return ((x * 2.0) * y) / (x - y);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((x * 2.0d0) * y) / (x - y)
end function
public static double code(double x, double y) {
	return ((x * 2.0) * y) / (x - y);
}
def code(x, y):
	return ((x * 2.0) * y) / (x - y)
function code(x, y)
	return Float64(Float64(Float64(x * 2.0) * y) / Float64(x - y))
end
function tmp = code(x, y)
	tmp = ((x * 2.0) * y) / (x - y);
end
code[x_, y_] := N[(N[(N[(x * 2.0), $MachinePrecision] * y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(x \cdot 2\right) \cdot y}{x - y}
\end{array}

Alternative 1: 99.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{y - x} \cdot \left(y \cdot -2\right)\\ \mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 0.0001:\\ \;\;\;\;\frac{y}{y - x} \cdot \left(-2 \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* (/ x (- y x)) (* y -2.0))))
   (if (<= x -1e-18) t_0 (if (<= x 0.0001) (* (/ y (- y x)) (* -2.0 x)) t_0))))
double code(double x, double y) {
	double t_0 = (x / (y - x)) * (y * -2.0);
	double tmp;
	if (x <= -1e-18) {
		tmp = t_0;
	} else if (x <= 0.0001) {
		tmp = (y / (y - x)) * (-2.0 * x);
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (x / (y - x)) * (y * (-2.0d0))
    if (x <= (-1d-18)) then
        tmp = t_0
    else if (x <= 0.0001d0) then
        tmp = (y / (y - x)) * ((-2.0d0) * x)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = (x / (y - x)) * (y * -2.0);
	double tmp;
	if (x <= -1e-18) {
		tmp = t_0;
	} else if (x <= 0.0001) {
		tmp = (y / (y - x)) * (-2.0 * x);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y):
	t_0 = (x / (y - x)) * (y * -2.0)
	tmp = 0
	if x <= -1e-18:
		tmp = t_0
	elif x <= 0.0001:
		tmp = (y / (y - x)) * (-2.0 * x)
	else:
		tmp = t_0
	return tmp
function code(x, y)
	t_0 = Float64(Float64(x / Float64(y - x)) * Float64(y * -2.0))
	tmp = 0.0
	if (x <= -1e-18)
		tmp = t_0;
	elseif (x <= 0.0001)
		tmp = Float64(Float64(y / Float64(y - x)) * Float64(-2.0 * x));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = (x / (y - x)) * (y * -2.0);
	tmp = 0.0;
	if (x <= -1e-18)
		tmp = t_0;
	elseif (x <= 0.0001)
		tmp = (y / (y - x)) * (-2.0 * x);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[(x / N[(y - x), $MachinePrecision]), $MachinePrecision] * N[(y * -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1e-18], t$95$0, If[LessEqual[x, 0.0001], N[(N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision] * N[(-2.0 * x), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{y - x} \cdot \left(y \cdot -2\right)\\
\mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 0.0001:\\
\;\;\;\;\frac{y}{y - x} \cdot \left(-2 \cdot x\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.0000000000000001e-18 or 1.00000000000000005e-4 < x

    1. Initial program 80.7%

      \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
    2. Add Preprocessing
    3. Applied rewrites100.0%

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

    if -1.0000000000000001e-18 < x < 1.00000000000000005e-4

    1. Initial program 80.2%

      \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
    2. Add Preprocessing
    3. Applied rewrites99.9%

      \[\leadsto \color{blue}{\left(-2 \cdot x\right) \cdot \frac{y}{y - x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification100.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\ \;\;\;\;\frac{x}{y - x} \cdot \left(y \cdot -2\right)\\ \mathbf{elif}\;x \leq 0.0001:\\ \;\;\;\;\frac{y}{y - x} \cdot \left(-2 \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y - x} \cdot \left(y \cdot -2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 98.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{y - x} \cdot \left(-2 \cdot x\right)\\ t_1 := \frac{\left(2 \cdot x\right) \cdot y}{x - y}\\ t_2 := \frac{\left(x + x\right) \cdot y}{x - y}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-41}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-299}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-46}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* (/ y (- y x)) (* -2.0 x)))
        (t_1 (/ (* (* 2.0 x) y) (- x y)))
        (t_2 (/ (* (+ x x) y) (- x y))))
   (if (<= t_1 -1e-41)
     t_0
     (if (<= t_1 -5e-299)
       t_2
       (if (<= t_1 0.0) t_0 (if (<= t_1 5e-46) t_2 t_0))))))
double code(double x, double y) {
	double t_0 = (y / (y - x)) * (-2.0 * x);
	double t_1 = ((2.0 * x) * y) / (x - y);
	double t_2 = ((x + x) * y) / (x - y);
	double tmp;
	if (t_1 <= -1e-41) {
		tmp = t_0;
	} else if (t_1 <= -5e-299) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = t_0;
	} else if (t_1 <= 5e-46) {
		tmp = t_2;
	} else {
		tmp = t_0;
	}
	return tmp;
}
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) :: t_2
    real(8) :: tmp
    t_0 = (y / (y - x)) * ((-2.0d0) * x)
    t_1 = ((2.0d0 * x) * y) / (x - y)
    t_2 = ((x + x) * y) / (x - y)
    if (t_1 <= (-1d-41)) then
        tmp = t_0
    else if (t_1 <= (-5d-299)) then
        tmp = t_2
    else if (t_1 <= 0.0d0) then
        tmp = t_0
    else if (t_1 <= 5d-46) then
        tmp = t_2
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = (y / (y - x)) * (-2.0 * x);
	double t_1 = ((2.0 * x) * y) / (x - y);
	double t_2 = ((x + x) * y) / (x - y);
	double tmp;
	if (t_1 <= -1e-41) {
		tmp = t_0;
	} else if (t_1 <= -5e-299) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = t_0;
	} else if (t_1 <= 5e-46) {
		tmp = t_2;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y):
	t_0 = (y / (y - x)) * (-2.0 * x)
	t_1 = ((2.0 * x) * y) / (x - y)
	t_2 = ((x + x) * y) / (x - y)
	tmp = 0
	if t_1 <= -1e-41:
		tmp = t_0
	elif t_1 <= -5e-299:
		tmp = t_2
	elif t_1 <= 0.0:
		tmp = t_0
	elif t_1 <= 5e-46:
		tmp = t_2
	else:
		tmp = t_0
	return tmp
function code(x, y)
	t_0 = Float64(Float64(y / Float64(y - x)) * Float64(-2.0 * x))
	t_1 = Float64(Float64(Float64(2.0 * x) * y) / Float64(x - y))
	t_2 = Float64(Float64(Float64(x + x) * y) / Float64(x - y))
	tmp = 0.0
	if (t_1 <= -1e-41)
		tmp = t_0;
	elseif (t_1 <= -5e-299)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = t_0;
	elseif (t_1 <= 5e-46)
		tmp = t_2;
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = (y / (y - x)) * (-2.0 * x);
	t_1 = ((2.0 * x) * y) / (x - y);
	t_2 = ((x + x) * y) / (x - y);
	tmp = 0.0;
	if (t_1 <= -1e-41)
		tmp = t_0;
	elseif (t_1 <= -5e-299)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = t_0;
	elseif (t_1 <= 5e-46)
		tmp = t_2;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision] * N[(-2.0 * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(2.0 * x), $MachinePrecision] * y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x + x), $MachinePrecision] * y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-41], t$95$0, If[LessEqual[t$95$1, -5e-299], t$95$2, If[LessEqual[t$95$1, 0.0], t$95$0, If[LessEqual[t$95$1, 5e-46], t$95$2, t$95$0]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y}{y - x} \cdot \left(-2 \cdot x\right)\\
t_1 := \frac{\left(2 \cdot x\right) \cdot y}{x - y}\\
t_2 := \frac{\left(x + x\right) \cdot y}{x - y}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-41}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-299}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-46}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (*.f64 x #s(literal 2 binary64)) y) (-.f64 x y)) < -1.00000000000000001e-41 or -4.99999999999999956e-299 < (/.f64 (*.f64 (*.f64 x #s(literal 2 binary64)) y) (-.f64 x y)) < -0.0 or 4.99999999999999992e-46 < (/.f64 (*.f64 (*.f64 x #s(literal 2 binary64)) y) (-.f64 x y))

    1. Initial program 55.7%

      \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
    2. Add Preprocessing
    3. Applied rewrites99.9%

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

    if -1.00000000000000001e-41 < (/.f64 (*.f64 (*.f64 x #s(literal 2 binary64)) y) (-.f64 x y)) < -4.99999999999999956e-299 or -0.0 < (/.f64 (*.f64 (*.f64 x #s(literal 2 binary64)) y) (-.f64 x y)) < 4.99999999999999992e-46

    1. Initial program 99.7%

      \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 2\right)} \cdot y}{x - y} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\left(2 \cdot x\right)} \cdot y}{x - y} \]
      3. count-2-revN/A

        \[\leadsto \frac{\color{blue}{\left(x + x\right)} \cdot y}{x - y} \]
      4. lower-+.f6499.7

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

      \[\leadsto \frac{\color{blue}{\left(x + x\right)} \cdot y}{x - y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(2 \cdot x\right) \cdot y}{x - y} \leq -1 \cdot 10^{-41}:\\ \;\;\;\;\frac{y}{y - x} \cdot \left(-2 \cdot x\right)\\ \mathbf{elif}\;\frac{\left(2 \cdot x\right) \cdot y}{x - y} \leq -5 \cdot 10^{-299}:\\ \;\;\;\;\frac{\left(x + x\right) \cdot y}{x - y}\\ \mathbf{elif}\;\frac{\left(2 \cdot x\right) \cdot y}{x - y} \leq 0:\\ \;\;\;\;\frac{y}{y - x} \cdot \left(-2 \cdot x\right)\\ \mathbf{elif}\;\frac{\left(2 \cdot x\right) \cdot y}{x - y} \leq 5 \cdot 10^{-46}:\\ \;\;\;\;\frac{\left(x + x\right) \cdot y}{x - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{y - x} \cdot \left(-2 \cdot x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 87.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\left(x + x\right) \cdot y}{x - y}\\ t_1 := \frac{\left(2 \cdot x\right) \cdot y}{x - y}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;-2 \cdot x\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-299}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{y}, x, x\right) \cdot -2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+129}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot x\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (/ (* (+ x x) y) (- x y))) (t_1 (/ (* (* 2.0 x) y) (- x y))))
   (if (<= t_1 (- INFINITY))
     (* -2.0 x)
     (if (<= t_1 -5e-299)
       t_0
       (if (<= t_1 0.0)
         (* (fma (/ x y) x x) -2.0)
         (if (<= t_1 2e+129) t_0 (* -2.0 x)))))))
double code(double x, double y) {
	double t_0 = ((x + x) * y) / (x - y);
	double t_1 = ((2.0 * x) * y) / (x - y);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = -2.0 * x;
	} else if (t_1 <= -5e-299) {
		tmp = t_0;
	} else if (t_1 <= 0.0) {
		tmp = fma((x / y), x, x) * -2.0;
	} else if (t_1 <= 2e+129) {
		tmp = t_0;
	} else {
		tmp = -2.0 * x;
	}
	return tmp;
}
function code(x, y)
	t_0 = Float64(Float64(Float64(x + x) * y) / Float64(x - y))
	t_1 = Float64(Float64(Float64(2.0 * x) * y) / Float64(x - y))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(-2.0 * x);
	elseif (t_1 <= -5e-299)
		tmp = t_0;
	elseif (t_1 <= 0.0)
		tmp = Float64(fma(Float64(x / y), x, x) * -2.0);
	elseif (t_1 <= 2e+129)
		tmp = t_0;
	else
		tmp = Float64(-2.0 * x);
	end
	return tmp
end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[(x + x), $MachinePrecision] * y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(2.0 * x), $MachinePrecision] * y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(-2.0 * x), $MachinePrecision], If[LessEqual[t$95$1, -5e-299], t$95$0, If[LessEqual[t$95$1, 0.0], N[(N[(N[(x / y), $MachinePrecision] * x + x), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[t$95$1, 2e+129], t$95$0, N[(-2.0 * x), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\left(x + x\right) \cdot y}{x - y}\\
t_1 := \frac{\left(2 \cdot x\right) \cdot y}{x - y}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;-2 \cdot x\\

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-299}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{y}, x, x\right) \cdot -2\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+129}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;-2 \cdot x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (*.f64 x #s(literal 2 binary64)) y) (-.f64 x y)) < -inf.0 or 2e129 < (/.f64 (*.f64 (*.f64 x #s(literal 2 binary64)) y) (-.f64 x y))

    1. Initial program 4.8%

      \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{-2 \cdot x} \]
    4. Step-by-step derivation
      1. lower-*.f6467.5

        \[\leadsto \color{blue}{-2 \cdot x} \]
    5. Applied rewrites67.5%

      \[\leadsto \color{blue}{-2 \cdot x} \]

    if -inf.0 < (/.f64 (*.f64 (*.f64 x #s(literal 2 binary64)) y) (-.f64 x y)) < -4.99999999999999956e-299 or -0.0 < (/.f64 (*.f64 (*.f64 x #s(literal 2 binary64)) y) (-.f64 x y)) < 2e129

    1. Initial program 99.7%

      \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 2\right)} \cdot y}{x - y} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\left(2 \cdot x\right)} \cdot y}{x - y} \]
      3. count-2-revN/A

        \[\leadsto \frac{\color{blue}{\left(x + x\right)} \cdot y}{x - y} \]
      4. lower-+.f6499.7

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

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

    if -4.99999999999999956e-299 < (/.f64 (*.f64 (*.f64 x #s(literal 2 binary64)) y) (-.f64 x y)) < -0.0

    1. Initial program 11.9%

      \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{x \cdot \left(-2 \cdot \frac{x}{y} - 2\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(-2 \cdot \frac{x}{y} - 2\right) \cdot x} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(-2 \cdot \frac{x}{y} - 2\right) \cdot x} \]
      3. sub-negN/A

        \[\leadsto \color{blue}{\left(-2 \cdot \frac{x}{y} + \left(\mathsf{neg}\left(2\right)\right)\right)} \cdot x \]
      4. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\frac{x}{y} \cdot -2} + \left(\mathsf{neg}\left(2\right)\right)\right) \cdot x \]
      5. metadata-evalN/A

        \[\leadsto \left(\frac{x}{y} \cdot -2 + \color{blue}{-2}\right) \cdot x \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x}{y}, -2, -2\right)} \cdot x \]
      7. lower-/.f6456.9

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{x}{y}}, -2, -2\right) \cdot x \]
    5. Applied rewrites56.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x}{y}, -2, -2\right) \cdot x} \]
    6. Step-by-step derivation
      1. Applied rewrites56.9%

        \[\leadsto \mathsf{fma}\left(\frac{x}{y}, x, x\right) \cdot \color{blue}{-2} \]
    7. Recombined 3 regimes into one program.
    8. Final simplification91.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(2 \cdot x\right) \cdot y}{x - y} \leq -\infty:\\ \;\;\;\;-2 \cdot x\\ \mathbf{elif}\;\frac{\left(2 \cdot x\right) \cdot y}{x - y} \leq -5 \cdot 10^{-299}:\\ \;\;\;\;\frac{\left(x + x\right) \cdot y}{x - y}\\ \mathbf{elif}\;\frac{\left(2 \cdot x\right) \cdot y}{x - y} \leq 0:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{y}, x, x\right) \cdot -2\\ \mathbf{elif}\;\frac{\left(2 \cdot x\right) \cdot y}{x - y} \leq 2 \cdot 10^{+129}:\\ \;\;\;\;\frac{\left(x + x\right) \cdot y}{x - y}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot x\\ \end{array} \]
    9. Add Preprocessing

    Alternative 4: 74.5% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.43 \cdot 10^{+45}:\\ \;\;\;\;y + y\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-46}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{y}, x, x\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;y + y\\ \end{array} \end{array} \]
    (FPCore (x y)
     :precision binary64
     (if (<= x -3.43e+45)
       (+ y y)
       (if (<= x 2.2e-46) (* (fma (/ x y) x x) -2.0) (+ y y))))
    double code(double x, double y) {
    	double tmp;
    	if (x <= -3.43e+45) {
    		tmp = y + y;
    	} else if (x <= 2.2e-46) {
    		tmp = fma((x / y), x, x) * -2.0;
    	} else {
    		tmp = y + y;
    	}
    	return tmp;
    }
    
    function code(x, y)
    	tmp = 0.0
    	if (x <= -3.43e+45)
    		tmp = Float64(y + y);
    	elseif (x <= 2.2e-46)
    		tmp = Float64(fma(Float64(x / y), x, x) * -2.0);
    	else
    		tmp = Float64(y + y);
    	end
    	return tmp
    end
    
    code[x_, y_] := If[LessEqual[x, -3.43e+45], N[(y + y), $MachinePrecision], If[LessEqual[x, 2.2e-46], N[(N[(N[(x / y), $MachinePrecision] * x + x), $MachinePrecision] * -2.0), $MachinePrecision], N[(y + y), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq -3.43 \cdot 10^{+45}:\\
    \;\;\;\;y + y\\
    
    \mathbf{elif}\;x \leq 2.2 \cdot 10^{-46}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{x}{y}, x, x\right) \cdot -2\\
    
    \mathbf{else}:\\
    \;\;\;\;y + y\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -3.43000000000000001e45 or 2.2000000000000001e-46 < x

      1. Initial program 80.8%

        \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
      2. Add Preprocessing
      3. Taylor expanded in x around inf

        \[\leadsto \color{blue}{2 \cdot y} \]
      4. Step-by-step derivation
        1. lower-*.f6475.2

          \[\leadsto \color{blue}{2 \cdot y} \]
      5. Applied rewrites75.2%

        \[\leadsto \color{blue}{2 \cdot y} \]
      6. Step-by-step derivation
        1. Applied rewrites75.2%

          \[\leadsto y + \color{blue}{y} \]

        if -3.43000000000000001e45 < x < 2.2000000000000001e-46

        1. Initial program 80.1%

          \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \cdot \left(-2 \cdot \frac{x}{y} - 2\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\left(-2 \cdot \frac{x}{y} - 2\right) \cdot x} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(-2 \cdot \frac{x}{y} - 2\right) \cdot x} \]
          3. sub-negN/A

            \[\leadsto \color{blue}{\left(-2 \cdot \frac{x}{y} + \left(\mathsf{neg}\left(2\right)\right)\right)} \cdot x \]
          4. *-commutativeN/A

            \[\leadsto \left(\color{blue}{\frac{x}{y} \cdot -2} + \left(\mathsf{neg}\left(2\right)\right)\right) \cdot x \]
          5. metadata-evalN/A

            \[\leadsto \left(\frac{x}{y} \cdot -2 + \color{blue}{-2}\right) \cdot x \]
          6. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x}{y}, -2, -2\right)} \cdot x \]
          7. lower-/.f6481.9

            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{x}{y}}, -2, -2\right) \cdot x \]
        5. Applied rewrites81.9%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x}{y}, -2, -2\right) \cdot x} \]
        6. Step-by-step derivation
          1. Applied rewrites81.9%

            \[\leadsto \mathsf{fma}\left(\frac{x}{y}, x, x\right) \cdot \color{blue}{-2} \]
        7. Recombined 2 regimes into one program.
        8. Add Preprocessing

        Alternative 5: 74.5% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.43 \cdot 10^{+45}:\\ \;\;\;\;y + y\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-46}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{y}, -2, -2\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;y + y\\ \end{array} \end{array} \]
        (FPCore (x y)
         :precision binary64
         (if (<= x -3.43e+45)
           (+ y y)
           (if (<= x 2.2e-46) (* (fma (/ x y) -2.0 -2.0) x) (+ y y))))
        double code(double x, double y) {
        	double tmp;
        	if (x <= -3.43e+45) {
        		tmp = y + y;
        	} else if (x <= 2.2e-46) {
        		tmp = fma((x / y), -2.0, -2.0) * x;
        	} else {
        		tmp = y + y;
        	}
        	return tmp;
        }
        
        function code(x, y)
        	tmp = 0.0
        	if (x <= -3.43e+45)
        		tmp = Float64(y + y);
        	elseif (x <= 2.2e-46)
        		tmp = Float64(fma(Float64(x / y), -2.0, -2.0) * x);
        	else
        		tmp = Float64(y + y);
        	end
        	return tmp
        end
        
        code[x_, y_] := If[LessEqual[x, -3.43e+45], N[(y + y), $MachinePrecision], If[LessEqual[x, 2.2e-46], N[(N[(N[(x / y), $MachinePrecision] * -2.0 + -2.0), $MachinePrecision] * x), $MachinePrecision], N[(y + y), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq -3.43 \cdot 10^{+45}:\\
        \;\;\;\;y + y\\
        
        \mathbf{elif}\;x \leq 2.2 \cdot 10^{-46}:\\
        \;\;\;\;\mathsf{fma}\left(\frac{x}{y}, -2, -2\right) \cdot x\\
        
        \mathbf{else}:\\
        \;\;\;\;y + y\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < -3.43000000000000001e45 or 2.2000000000000001e-46 < x

          1. Initial program 80.8%

            \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
          2. Add Preprocessing
          3. Taylor expanded in x around inf

            \[\leadsto \color{blue}{2 \cdot y} \]
          4. Step-by-step derivation
            1. lower-*.f6475.2

              \[\leadsto \color{blue}{2 \cdot y} \]
          5. Applied rewrites75.2%

            \[\leadsto \color{blue}{2 \cdot y} \]
          6. Step-by-step derivation
            1. Applied rewrites75.2%

              \[\leadsto y + \color{blue}{y} \]

            if -3.43000000000000001e45 < x < 2.2000000000000001e-46

            1. Initial program 80.1%

              \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
            2. Add Preprocessing
            3. Taylor expanded in x around 0

              \[\leadsto \color{blue}{x \cdot \left(-2 \cdot \frac{x}{y} - 2\right)} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\left(-2 \cdot \frac{x}{y} - 2\right) \cdot x} \]
              2. lower-*.f64N/A

                \[\leadsto \color{blue}{\left(-2 \cdot \frac{x}{y} - 2\right) \cdot x} \]
              3. sub-negN/A

                \[\leadsto \color{blue}{\left(-2 \cdot \frac{x}{y} + \left(\mathsf{neg}\left(2\right)\right)\right)} \cdot x \]
              4. *-commutativeN/A

                \[\leadsto \left(\color{blue}{\frac{x}{y} \cdot -2} + \left(\mathsf{neg}\left(2\right)\right)\right) \cdot x \]
              5. metadata-evalN/A

                \[\leadsto \left(\frac{x}{y} \cdot -2 + \color{blue}{-2}\right) \cdot x \]
              6. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x}{y}, -2, -2\right)} \cdot x \]
              7. lower-/.f6481.9

                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{x}{y}}, -2, -2\right) \cdot x \]
            5. Applied rewrites81.9%

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x}{y}, -2, -2\right) \cdot x} \]
          7. Recombined 2 regimes into one program.
          8. Add Preprocessing

          Alternative 6: 74.5% accurate, 1.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.43 \cdot 10^{+45}:\\ \;\;\;\;y + y\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{-46}:\\ \;\;\;\;-2 \cdot x\\ \mathbf{else}:\\ \;\;\;\;y + y\\ \end{array} \end{array} \]
          (FPCore (x y)
           :precision binary64
           (if (<= x -3.43e+45) (+ y y) (if (<= x 2.5e-46) (* -2.0 x) (+ y y))))
          double code(double x, double y) {
          	double tmp;
          	if (x <= -3.43e+45) {
          		tmp = y + y;
          	} else if (x <= 2.5e-46) {
          		tmp = -2.0 * x;
          	} else {
          		tmp = y + y;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8) :: tmp
              if (x <= (-3.43d+45)) then
                  tmp = y + y
              else if (x <= 2.5d-46) then
                  tmp = (-2.0d0) * x
              else
                  tmp = y + y
              end if
              code = tmp
          end function
          
          public static double code(double x, double y) {
          	double tmp;
          	if (x <= -3.43e+45) {
          		tmp = y + y;
          	} else if (x <= 2.5e-46) {
          		tmp = -2.0 * x;
          	} else {
          		tmp = y + y;
          	}
          	return tmp;
          }
          
          def code(x, y):
          	tmp = 0
          	if x <= -3.43e+45:
          		tmp = y + y
          	elif x <= 2.5e-46:
          		tmp = -2.0 * x
          	else:
          		tmp = y + y
          	return tmp
          
          function code(x, y)
          	tmp = 0.0
          	if (x <= -3.43e+45)
          		tmp = Float64(y + y);
          	elseif (x <= 2.5e-46)
          		tmp = Float64(-2.0 * x);
          	else
          		tmp = Float64(y + y);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y)
          	tmp = 0.0;
          	if (x <= -3.43e+45)
          		tmp = y + y;
          	elseif (x <= 2.5e-46)
          		tmp = -2.0 * x;
          	else
          		tmp = y + y;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_] := If[LessEqual[x, -3.43e+45], N[(y + y), $MachinePrecision], If[LessEqual[x, 2.5e-46], N[(-2.0 * x), $MachinePrecision], N[(y + y), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq -3.43 \cdot 10^{+45}:\\
          \;\;\;\;y + y\\
          
          \mathbf{elif}\;x \leq 2.5 \cdot 10^{-46}:\\
          \;\;\;\;-2 \cdot x\\
          
          \mathbf{else}:\\
          \;\;\;\;y + y\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < -3.43000000000000001e45 or 2.49999999999999996e-46 < x

            1. Initial program 80.8%

              \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
            2. Add Preprocessing
            3. Taylor expanded in x around inf

              \[\leadsto \color{blue}{2 \cdot y} \]
            4. Step-by-step derivation
              1. lower-*.f6475.2

                \[\leadsto \color{blue}{2 \cdot y} \]
            5. Applied rewrites75.2%

              \[\leadsto \color{blue}{2 \cdot y} \]
            6. Step-by-step derivation
              1. Applied rewrites75.2%

                \[\leadsto y + \color{blue}{y} \]

              if -3.43000000000000001e45 < x < 2.49999999999999996e-46

              1. Initial program 80.1%

                \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
              2. Add Preprocessing
              3. Taylor expanded in x around 0

                \[\leadsto \color{blue}{-2 \cdot x} \]
              4. Step-by-step derivation
                1. lower-*.f6481.0

                  \[\leadsto \color{blue}{-2 \cdot x} \]
              5. Applied rewrites81.0%

                \[\leadsto \color{blue}{-2 \cdot x} \]
            7. Recombined 2 regimes into one program.
            8. Add Preprocessing

            Alternative 7: 50.4% accurate, 6.3× speedup?

            \[\begin{array}{l} \\ y + y \end{array} \]
            (FPCore (x y) :precision binary64 (+ y y))
            double code(double x, double y) {
            	return y + y;
            }
            
            real(8) function code(x, y)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                code = y + y
            end function
            
            public static double code(double x, double y) {
            	return y + y;
            }
            
            def code(x, y):
            	return y + y
            
            function code(x, y)
            	return Float64(y + y)
            end
            
            function tmp = code(x, y)
            	tmp = y + y;
            end
            
            code[x_, y_] := N[(y + y), $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            y + y
            \end{array}
            
            Derivation
            1. Initial program 80.5%

              \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
            2. Add Preprocessing
            3. Taylor expanded in x around inf

              \[\leadsto \color{blue}{2 \cdot y} \]
            4. Step-by-step derivation
              1. lower-*.f6448.5

                \[\leadsto \color{blue}{2 \cdot y} \]
            5. Applied rewrites48.5%

              \[\leadsto \color{blue}{2 \cdot y} \]
            6. Step-by-step derivation
              1. Applied rewrites48.5%

                \[\leadsto y + \color{blue}{y} \]
              2. Add Preprocessing

              Alternative 8: 3.3% accurate, 6.3× speedup?

              \[\begin{array}{l} \\ x + x \end{array} \]
              (FPCore (x y) :precision binary64 (+ x x))
              double code(double x, double y) {
              	return x + x;
              }
              
              real(8) function code(x, y)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  code = x + x
              end function
              
              public static double code(double x, double y) {
              	return x + x;
              }
              
              def code(x, y):
              	return x + x
              
              function code(x, y)
              	return Float64(x + x)
              end
              
              function tmp = code(x, y)
              	tmp = x + x;
              end
              
              code[x_, y_] := N[(x + x), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              x + x
              \end{array}
              
              Derivation
              1. Initial program 80.5%

                \[\frac{\left(x \cdot 2\right) \cdot y}{x - y} \]
              2. Add Preprocessing
              3. Taylor expanded in x around inf

                \[\leadsto \color{blue}{2 \cdot y} \]
              4. Step-by-step derivation
                1. lower-*.f6448.5

                  \[\leadsto \color{blue}{2 \cdot y} \]
              5. Applied rewrites48.5%

                \[\leadsto \color{blue}{2 \cdot y} \]
              6. Step-by-step derivation
                1. Applied rewrites48.5%

                  \[\leadsto y + \color{blue}{y} \]
                2. Step-by-step derivation
                  1. Applied rewrites3.3%

                    \[\leadsto x + \color{blue}{x} \]
                  2. Add Preprocessing

                  Developer Target 1: 99.6% accurate, 0.6× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{2 \cdot x}{x - y} \cdot y\\ \mathbf{if}\;x < -1.7210442634149447 \cdot 10^{+81}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x < 83645045635564430:\\ \;\;\;\;\frac{x \cdot 2}{\frac{x - y}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                  (FPCore (x y)
                   :precision binary64
                   (let* ((t_0 (* (/ (* 2.0 x) (- x y)) y)))
                     (if (< x -1.7210442634149447e+81)
                       t_0
                       (if (< x 83645045635564430.0) (/ (* x 2.0) (/ (- x y) y)) t_0))))
                  double code(double x, double y) {
                  	double t_0 = ((2.0 * x) / (x - y)) * y;
                  	double tmp;
                  	if (x < -1.7210442634149447e+81) {
                  		tmp = t_0;
                  	} else if (x < 83645045635564430.0) {
                  		tmp = (x * 2.0) / ((x - y) / y);
                  	} else {
                  		tmp = t_0;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8) :: t_0
                      real(8) :: tmp
                      t_0 = ((2.0d0 * x) / (x - y)) * y
                      if (x < (-1.7210442634149447d+81)) then
                          tmp = t_0
                      else if (x < 83645045635564430.0d0) then
                          tmp = (x * 2.0d0) / ((x - y) / y)
                      else
                          tmp = t_0
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y) {
                  	double t_0 = ((2.0 * x) / (x - y)) * y;
                  	double tmp;
                  	if (x < -1.7210442634149447e+81) {
                  		tmp = t_0;
                  	} else if (x < 83645045635564430.0) {
                  		tmp = (x * 2.0) / ((x - y) / y);
                  	} else {
                  		tmp = t_0;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y):
                  	t_0 = ((2.0 * x) / (x - y)) * y
                  	tmp = 0
                  	if x < -1.7210442634149447e+81:
                  		tmp = t_0
                  	elif x < 83645045635564430.0:
                  		tmp = (x * 2.0) / ((x - y) / y)
                  	else:
                  		tmp = t_0
                  	return tmp
                  
                  function code(x, y)
                  	t_0 = Float64(Float64(Float64(2.0 * x) / Float64(x - y)) * y)
                  	tmp = 0.0
                  	if (x < -1.7210442634149447e+81)
                  		tmp = t_0;
                  	elseif (x < 83645045635564430.0)
                  		tmp = Float64(Float64(x * 2.0) / Float64(Float64(x - y) / y));
                  	else
                  		tmp = t_0;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y)
                  	t_0 = ((2.0 * x) / (x - y)) * y;
                  	tmp = 0.0;
                  	if (x < -1.7210442634149447e+81)
                  		tmp = t_0;
                  	elseif (x < 83645045635564430.0)
                  		tmp = (x * 2.0) / ((x - y) / y);
                  	else
                  		tmp = t_0;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_] := Block[{t$95$0 = N[(N[(N[(2.0 * x), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[Less[x, -1.7210442634149447e+81], t$95$0, If[Less[x, 83645045635564430.0], N[(N[(x * 2.0), $MachinePrecision] / N[(N[(x - y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := \frac{2 \cdot x}{x - y} \cdot y\\
                  \mathbf{if}\;x < -1.7210442634149447 \cdot 10^{+81}:\\
                  \;\;\;\;t\_0\\
                  
                  \mathbf{elif}\;x < 83645045635564430:\\
                  \;\;\;\;\frac{x \cdot 2}{\frac{x - y}{y}}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_0\\
                  
                  
                  \end{array}
                  \end{array}
                  

                  Reproduce

                  ?
                  herbie shell --seed 2024298 
                  (FPCore (x y)
                    :name "Linear.Projection:perspective from linear-1.19.1.3, B"
                    :precision binary64
                  
                    :alt
                    (! :herbie-platform default (if (< x -1721044263414944700000000000000000000000000000000000000000000000000000000000000000) (* (/ (* 2 x) (- x y)) y) (if (< x 83645045635564430) (/ (* x 2) (/ (- x y) y)) (* (/ (* 2 x) (- x y)) y))))
                  
                    (/ (* (* x 2.0) y) (- x y)))