
(FPCore (x y) :precision binary64 (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))
double code(double x, double y) {
return 1.0 - (((1.0 - x) * y) / (y + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 - (((1.0d0 - x) * y) / (y + 1.0d0))
end function
public static double code(double x, double y) {
return 1.0 - (((1.0 - x) * y) / (y + 1.0));
}
def code(x, y): return 1.0 - (((1.0 - x) * y) / (y + 1.0))
function code(x, y) return Float64(1.0 - Float64(Float64(Float64(1.0 - x) * y) / Float64(y + 1.0))) end
function tmp = code(x, y) tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0)); end
code[x_, y_] := N[(1.0 - N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{\left(1 - x\right) \cdot y}{y + 1}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))
double code(double x, double y) {
return 1.0 - (((1.0 - x) * y) / (y + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 - (((1.0d0 - x) * y) / (y + 1.0d0))
end function
public static double code(double x, double y) {
return 1.0 - (((1.0 - x) * y) / (y + 1.0));
}
def code(x, y): return 1.0 - (((1.0 - x) * y) / (y + 1.0))
function code(x, y) return Float64(1.0 - Float64(Float64(Float64(1.0 - x) * y) / Float64(y + 1.0))) end
function tmp = code(x, y) tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0)); end
code[x_, y_] := N[(1.0 - N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{\left(1 - x\right) \cdot y}{y + 1}
\end{array}
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (- 1.0 x) y) (+ 1.0 y)))
(t_1 (fma (/ y (+ 1.0 y)) (+ x -1.0) 1.0)))
(if (<= t_0 0.9995)
t_1
(if (<= t_0 2.0)
(- x (/ (+ -1.0 (fma (/ (+ x -1.0) y) (+ -1.0 (/ 1.0 y)) x)) y))
t_1))))
double code(double x, double y) {
double t_0 = ((1.0 - x) * y) / (1.0 + y);
double t_1 = fma((y / (1.0 + y)), (x + -1.0), 1.0);
double tmp;
if (t_0 <= 0.9995) {
tmp = t_1;
} else if (t_0 <= 2.0) {
tmp = x - ((-1.0 + fma(((x + -1.0) / y), (-1.0 + (1.0 / y)), x)) / y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(Float64(1.0 - x) * y) / Float64(1.0 + y)) t_1 = fma(Float64(y / Float64(1.0 + y)), Float64(x + -1.0), 1.0) tmp = 0.0 if (t_0 <= 0.9995) tmp = t_1; elseif (t_0 <= 2.0) tmp = Float64(x - Float64(Float64(-1.0 + fma(Float64(Float64(x + -1.0) / y), Float64(-1.0 + Float64(1.0 / y)), x)) / y)); else tmp = t_1; end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] * N[(x + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[t$95$0, 0.9995], t$95$1, If[LessEqual[t$95$0, 2.0], N[(x - N[(N[(-1.0 + N[(N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision] * N[(-1.0 + N[(1.0 / y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(1 - x\right) \cdot y}{1 + y}\\
t_1 := \mathsf{fma}\left(\frac{y}{1 + y}, x + -1, 1\right)\\
\mathbf{if}\;t\_0 \leq 0.9995:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 2:\\
\;\;\;\;x - \frac{-1 + \mathsf{fma}\left(\frac{x + -1}{y}, -1 + \frac{1}{y}, x\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64))) < 0.99950000000000006 or 2 < (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64))) Initial program 81.2%
Taylor expanded in x around 0
associate--l+N/A
+-commutativeN/A
sub-negN/A
associate-/l*N/A
mul-1-negN/A
distribute-rgt-outN/A
metadata-evalN/A
sub-negN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-+.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6499.9
Simplified99.9%
if 0.99950000000000006 < (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64))) < 2Initial program 8.2%
Taylor expanded in y around -inf
Simplified100.0%
Final simplification99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (/ (* (- 1.0 x) y) (- -1.0 y)))))
(if (<= t_0 -5e+175)
(+ 1.0 x)
(if (<= t_0 0.001) (* x y) (if (<= t_0 2000.0) (- 1.0 y) (+ 1.0 x))))))
double code(double x, double y) {
double t_0 = 1.0 + (((1.0 - x) * y) / (-1.0 - y));
double tmp;
if (t_0 <= -5e+175) {
tmp = 1.0 + x;
} else if (t_0 <= 0.001) {
tmp = x * y;
} else if (t_0 <= 2000.0) {
tmp = 1.0 - y;
} else {
tmp = 1.0 + x;
}
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 = 1.0d0 + (((1.0d0 - x) * y) / ((-1.0d0) - y))
if (t_0 <= (-5d+175)) then
tmp = 1.0d0 + x
else if (t_0 <= 0.001d0) then
tmp = x * y
else if (t_0 <= 2000.0d0) then
tmp = 1.0d0 - y
else
tmp = 1.0d0 + x
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (((1.0 - x) * y) / (-1.0 - y));
double tmp;
if (t_0 <= -5e+175) {
tmp = 1.0 + x;
} else if (t_0 <= 0.001) {
tmp = x * y;
} else if (t_0 <= 2000.0) {
tmp = 1.0 - y;
} else {
tmp = 1.0 + x;
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (((1.0 - x) * y) / (-1.0 - y)) tmp = 0 if t_0 <= -5e+175: tmp = 1.0 + x elif t_0 <= 0.001: tmp = x * y elif t_0 <= 2000.0: tmp = 1.0 - y else: tmp = 1.0 + x return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(Float64(Float64(1.0 - x) * y) / Float64(-1.0 - y))) tmp = 0.0 if (t_0 <= -5e+175) tmp = Float64(1.0 + x); elseif (t_0 <= 0.001) tmp = Float64(x * y); elseif (t_0 <= 2000.0) tmp = Float64(1.0 - y); else tmp = Float64(1.0 + x); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (((1.0 - x) * y) / (-1.0 - y)); tmp = 0.0; if (t_0 <= -5e+175) tmp = 1.0 + x; elseif (t_0 <= 0.001) tmp = x * y; elseif (t_0 <= 2000.0) tmp = 1.0 - y; else tmp = 1.0 + x; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(-1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e+175], N[(1.0 + x), $MachinePrecision], If[LessEqual[t$95$0, 0.001], N[(x * y), $MachinePrecision], If[LessEqual[t$95$0, 2000.0], N[(1.0 - y), $MachinePrecision], N[(1.0 + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{\left(1 - x\right) \cdot y}{-1 - y}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{+175}:\\
\;\;\;\;1 + x\\
\mathbf{elif}\;t\_0 \leq 0.001:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;t\_0 \leq 2000:\\
\;\;\;\;1 - y\\
\mathbf{else}:\\
\;\;\;\;1 + x\\
\end{array}
\end{array}
if (-.f64 #s(literal 1 binary64) (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64)))) < -5e175 or 2e3 < (-.f64 #s(literal 1 binary64) (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64)))) Initial program 43.5%
Taylor expanded in y around inf
lower--.f6483.5
Simplified83.5%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f6482.8
Simplified82.8%
if -5e175 < (-.f64 #s(literal 1 binary64) (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64)))) < 1e-3Initial program 39.2%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6419.8
Simplified19.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f6420.9
Simplified20.9%
if 1e-3 < (-.f64 #s(literal 1 binary64) (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64)))) < 2e3Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6499.8
Simplified99.8%
Taylor expanded in x around 0
mul-1-negN/A
unsub-negN/A
lower--.f6497.3
Simplified97.3%
Final simplification63.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (- 1.0 x) y) (+ 1.0 y))))
(if (<= t_0 -5e+98)
(+ 1.0 x)
(if (<= t_0 0.001)
(fma y (+ x -1.0) 1.0)
(if (<= t_0 2.0) (/ 1.0 y) (+ 1.0 (+ x -1.0)))))))
double code(double x, double y) {
double t_0 = ((1.0 - x) * y) / (1.0 + y);
double tmp;
if (t_0 <= -5e+98) {
tmp = 1.0 + x;
} else if (t_0 <= 0.001) {
tmp = fma(y, (x + -1.0), 1.0);
} else if (t_0 <= 2.0) {
tmp = 1.0 / y;
} else {
tmp = 1.0 + (x + -1.0);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(Float64(1.0 - x) * y) / Float64(1.0 + y)) tmp = 0.0 if (t_0 <= -5e+98) tmp = Float64(1.0 + x); elseif (t_0 <= 0.001) tmp = fma(y, Float64(x + -1.0), 1.0); elseif (t_0 <= 2.0) tmp = Float64(1.0 / y); else tmp = Float64(1.0 + Float64(x + -1.0)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e+98], N[(1.0 + x), $MachinePrecision], If[LessEqual[t$95$0, 0.001], N[(y * N[(x + -1.0), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[t$95$0, 2.0], N[(1.0 / y), $MachinePrecision], N[(1.0 + N[(x + -1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(1 - x\right) \cdot y}{1 + y}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{+98}:\\
\;\;\;\;1 + x\\
\mathbf{elif}\;t\_0 \leq 0.001:\\
\;\;\;\;\mathsf{fma}\left(y, x + -1, 1\right)\\
\mathbf{elif}\;t\_0 \leq 2:\\
\;\;\;\;\frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(x + -1\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64))) < -4.9999999999999998e98Initial program 31.9%
Taylor expanded in y around inf
lower--.f6490.2
Simplified90.2%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f6490.2
Simplified90.2%
if -4.9999999999999998e98 < (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64))) < 1e-3Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6493.9
Simplified93.9%
if 1e-3 < (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64))) < 2Initial program 9.3%
Taylor expanded in x around 0
lower-/.f64N/A
lower-+.f648.9
Simplified8.9%
Taylor expanded in y around inf
lower-/.f6454.6
Simplified54.6%
if 2 < (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64))) Initial program 70.6%
Taylor expanded in y around inf
lower--.f6467.2
Simplified67.2%
Final simplification77.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (- 1.0 x) y) (+ 1.0 y)))
(t_1 (fma (/ y (+ 1.0 y)) (+ x -1.0) 1.0)))
(if (<= t_0 0.9995)
t_1
(if (<= t_0 2.0) (fma (/ (+ x -1.0) y) (+ -1.0 (/ 1.0 y)) x) t_1))))
double code(double x, double y) {
double t_0 = ((1.0 - x) * y) / (1.0 + y);
double t_1 = fma((y / (1.0 + y)), (x + -1.0), 1.0);
double tmp;
if (t_0 <= 0.9995) {
tmp = t_1;
} else if (t_0 <= 2.0) {
tmp = fma(((x + -1.0) / y), (-1.0 + (1.0 / y)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(Float64(1.0 - x) * y) / Float64(1.0 + y)) t_1 = fma(Float64(y / Float64(1.0 + y)), Float64(x + -1.0), 1.0) tmp = 0.0 if (t_0 <= 0.9995) tmp = t_1; elseif (t_0 <= 2.0) tmp = fma(Float64(Float64(x + -1.0) / y), Float64(-1.0 + Float64(1.0 / y)), x); else tmp = t_1; end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] * N[(x + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[t$95$0, 0.9995], t$95$1, If[LessEqual[t$95$0, 2.0], N[(N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision] * N[(-1.0 + N[(1.0 / y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(1 - x\right) \cdot y}{1 + y}\\
t_1 := \mathsf{fma}\left(\frac{y}{1 + y}, x + -1, 1\right)\\
\mathbf{if}\;t\_0 \leq 0.9995:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 2:\\
\;\;\;\;\mathsf{fma}\left(\frac{x + -1}{y}, -1 + \frac{1}{y}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64))) < 0.99950000000000006 or 2 < (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64))) Initial program 81.2%
Taylor expanded in x around 0
associate--l+N/A
+-commutativeN/A
sub-negN/A
associate-/l*N/A
mul-1-negN/A
distribute-rgt-outN/A
metadata-evalN/A
sub-negN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-+.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6499.9
Simplified99.9%
if 0.99950000000000006 < (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64))) < 2Initial program 8.2%
Taylor expanded in y around inf
associate--l+N/A
+-commutativeN/A
Simplified99.5%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (- 1.0 x) y) (+ 1.0 y)))
(t_1 (fma (/ y (+ 1.0 y)) (+ x -1.0) 1.0)))
(if (<= t_0 0.9999999) t_1 (if (<= t_0 2.0) (+ x (/ 1.0 y)) t_1))))
double code(double x, double y) {
double t_0 = ((1.0 - x) * y) / (1.0 + y);
double t_1 = fma((y / (1.0 + y)), (x + -1.0), 1.0);
double tmp;
if (t_0 <= 0.9999999) {
tmp = t_1;
} else if (t_0 <= 2.0) {
tmp = x + (1.0 / y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(Float64(1.0 - x) * y) / Float64(1.0 + y)) t_1 = fma(Float64(y / Float64(1.0 + y)), Float64(x + -1.0), 1.0) tmp = 0.0 if (t_0 <= 0.9999999) tmp = t_1; elseif (t_0 <= 2.0) tmp = Float64(x + Float64(1.0 / y)); else tmp = t_1; end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] * N[(x + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[t$95$0, 0.9999999], t$95$1, If[LessEqual[t$95$0, 2.0], N[(x + N[(1.0 / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(1 - x\right) \cdot y}{1 + y}\\
t_1 := \mathsf{fma}\left(\frac{y}{1 + y}, x + -1, 1\right)\\
\mathbf{if}\;t\_0 \leq 0.9999999:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 2:\\
\;\;\;\;x + \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64))) < 0.999999900000000053 or 2 < (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64))) Initial program 81.1%
Taylor expanded in x around 0
associate--l+N/A
+-commutativeN/A
sub-negN/A
associate-/l*N/A
mul-1-negN/A
distribute-rgt-outN/A
metadata-evalN/A
sub-negN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-+.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6499.6
Simplified99.6%
if 0.999999900000000053 < (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64))) < 2Initial program 6.2%
Taylor expanded in y around inf
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate--r-N/A
div-subN/A
unsub-negN/A
mul-1-negN/A
lower-+.f64N/A
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
lower--.f6498.9
Simplified98.9%
Taylor expanded in x around 0
lower-/.f6498.9
Simplified98.9%
Final simplification99.4%
(FPCore (x y) :precision binary64 (let* ((t_0 (+ 1.0 (/ (* (- 1.0 x) y) (- -1.0 y)))) (t_1 (+ 1.0 (+ x -1.0)))) (if (<= t_0 1e-14) t_1 (if (<= t_0 2000.0) (fma y y (- 1.0 y)) t_1))))
double code(double x, double y) {
double t_0 = 1.0 + (((1.0 - x) * y) / (-1.0 - y));
double t_1 = 1.0 + (x + -1.0);
double tmp;
if (t_0 <= 1e-14) {
tmp = t_1;
} else if (t_0 <= 2000.0) {
tmp = fma(y, y, (1.0 - y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y) t_0 = Float64(1.0 + Float64(Float64(Float64(1.0 - x) * y) / Float64(-1.0 - y))) t_1 = Float64(1.0 + Float64(x + -1.0)) tmp = 0.0 if (t_0 <= 1e-14) tmp = t_1; elseif (t_0 <= 2000.0) tmp = fma(y, y, Float64(1.0 - y)); else tmp = t_1; end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(-1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-14], t$95$1, If[LessEqual[t$95$0, 2000.0], N[(y * y + N[(1.0 - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{\left(1 - x\right) \cdot y}{-1 - y}\\
t_1 := 1 + \left(x + -1\right)\\
\mathbf{if}\;t\_0 \leq 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 2000:\\
\;\;\;\;\mathsf{fma}\left(y, y, 1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 #s(literal 1 binary64) (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64)))) < 9.99999999999999999e-15 or 2e3 < (-.f64 #s(literal 1 binary64) (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64)))) Initial program 40.1%
Taylor expanded in y around inf
lower--.f6444.6
Simplified44.6%
if 9.99999999999999999e-15 < (-.f64 #s(literal 1 binary64) (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64)))) < 2e3Initial program 98.7%
Taylor expanded in x around 0
lower-/.f64N/A
lower-+.f6496.4
Simplified96.4%
Taylor expanded in y around 0
+-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
unpow2N/A
associate-+l+N/A
unpow2N/A
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6493.9
Simplified93.9%
Final simplification63.3%
(FPCore (x y) :precision binary64 (let* ((t_0 (+ 1.0 (/ (* (- 1.0 x) y) (- -1.0 y)))) (t_1 (+ 1.0 (+ x -1.0)))) (if (<= t_0 0.001) t_1 (if (<= t_0 2000.0) (- 1.0 y) t_1))))
double code(double x, double y) {
double t_0 = 1.0 + (((1.0 - x) * y) / (-1.0 - y));
double t_1 = 1.0 + (x + -1.0);
double tmp;
if (t_0 <= 0.001) {
tmp = t_1;
} else if (t_0 <= 2000.0) {
tmp = 1.0 - y;
} else {
tmp = t_1;
}
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) :: tmp
t_0 = 1.0d0 + (((1.0d0 - x) * y) / ((-1.0d0) - y))
t_1 = 1.0d0 + (x + (-1.0d0))
if (t_0 <= 0.001d0) then
tmp = t_1
else if (t_0 <= 2000.0d0) then
tmp = 1.0d0 - y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (((1.0 - x) * y) / (-1.0 - y));
double t_1 = 1.0 + (x + -1.0);
double tmp;
if (t_0 <= 0.001) {
tmp = t_1;
} else if (t_0 <= 2000.0) {
tmp = 1.0 - y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (((1.0 - x) * y) / (-1.0 - y)) t_1 = 1.0 + (x + -1.0) tmp = 0 if t_0 <= 0.001: tmp = t_1 elif t_0 <= 2000.0: tmp = 1.0 - y else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(Float64(Float64(1.0 - x) * y) / Float64(-1.0 - y))) t_1 = Float64(1.0 + Float64(x + -1.0)) tmp = 0.0 if (t_0 <= 0.001) tmp = t_1; elseif (t_0 <= 2000.0) tmp = Float64(1.0 - y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (((1.0 - x) * y) / (-1.0 - y)); t_1 = 1.0 + (x + -1.0); tmp = 0.0; if (t_0 <= 0.001) tmp = t_1; elseif (t_0 <= 2000.0) tmp = 1.0 - y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(-1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.001], t$95$1, If[LessEqual[t$95$0, 2000.0], N[(1.0 - y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{\left(1 - x\right) \cdot y}{-1 - y}\\
t_1 := 1 + \left(x + -1\right)\\
\mathbf{if}\;t\_0 \leq 0.001:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 2000:\\
\;\;\;\;1 - y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 #s(literal 1 binary64) (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64)))) < 1e-3 or 2e3 < (-.f64 #s(literal 1 binary64) (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64)))) Initial program 40.9%
Taylor expanded in y around inf
lower--.f6443.6
Simplified43.6%
if 1e-3 < (-.f64 #s(literal 1 binary64) (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64)))) < 2e3Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6499.8
Simplified99.8%
Taylor expanded in x around 0
mul-1-negN/A
unsub-negN/A
lower--.f6497.3
Simplified97.3%
Final simplification63.1%
(FPCore (x y) :precision binary64 (let* ((t_0 (+ 1.0 (/ (* (- 1.0 x) y) (- -1.0 y))))) (if (<= t_0 0.001) (* x y) (if (<= t_0 5e+20) (- 1.0 y) (* x y)))))
double code(double x, double y) {
double t_0 = 1.0 + (((1.0 - x) * y) / (-1.0 - y));
double tmp;
if (t_0 <= 0.001) {
tmp = x * y;
} else if (t_0 <= 5e+20) {
tmp = 1.0 - y;
} else {
tmp = x * y;
}
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 = 1.0d0 + (((1.0d0 - x) * y) / ((-1.0d0) - y))
if (t_0 <= 0.001d0) then
tmp = x * y
else if (t_0 <= 5d+20) then
tmp = 1.0d0 - y
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (((1.0 - x) * y) / (-1.0 - y));
double tmp;
if (t_0 <= 0.001) {
tmp = x * y;
} else if (t_0 <= 5e+20) {
tmp = 1.0 - y;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (((1.0 - x) * y) / (-1.0 - y)) tmp = 0 if t_0 <= 0.001: tmp = x * y elif t_0 <= 5e+20: tmp = 1.0 - y else: tmp = x * y return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(Float64(Float64(1.0 - x) * y) / Float64(-1.0 - y))) tmp = 0.0 if (t_0 <= 0.001) tmp = Float64(x * y); elseif (t_0 <= 5e+20) tmp = Float64(1.0 - y); else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (((1.0 - x) * y) / (-1.0 - y)); tmp = 0.0; if (t_0 <= 0.001) tmp = x * y; elseif (t_0 <= 5e+20) tmp = 1.0 - y; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(-1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.001], N[(x * y), $MachinePrecision], If[LessEqual[t$95$0, 5e+20], N[(1.0 - y), $MachinePrecision], N[(x * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{\left(1 - x\right) \cdot y}{-1 - y}\\
\mathbf{if}\;t\_0 \leq 0.001:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+20}:\\
\;\;\;\;1 - y\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (-.f64 #s(literal 1 binary64) (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64)))) < 1e-3 or 5e20 < (-.f64 #s(literal 1 binary64) (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64)))) Initial program 39.4%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6419.2
Simplified19.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f6419.9
Simplified19.9%
if 1e-3 < (-.f64 #s(literal 1 binary64) (/.f64 (*.f64 (-.f64 #s(literal 1 binary64) x) y) (+.f64 y #s(literal 1 binary64)))) < 5e20Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6495.8
Simplified95.8%
Taylor expanded in x around 0
mul-1-negN/A
unsub-negN/A
lower--.f6493.8
Simplified93.8%
Final simplification47.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (/ (- 1.0 x) y))))
(if (<= y -1.0)
t_0
(if (<= y 1.0) (fma (- y (* x y)) (+ y -1.0) 1.0) t_0))))
double code(double x, double y) {
double t_0 = x + ((1.0 - x) / y);
double tmp;
if (y <= -1.0) {
tmp = t_0;
} else if (y <= 1.0) {
tmp = fma((y - (x * y)), (y + -1.0), 1.0);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y) t_0 = Float64(x + Float64(Float64(1.0 - x) / y)) tmp = 0.0 if (y <= -1.0) tmp = t_0; elseif (y <= 1.0) tmp = fma(Float64(y - Float64(x * y)), Float64(y + -1.0), 1.0); else tmp = t_0; end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(N[(1.0 - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.0], t$95$0, If[LessEqual[y, 1.0], N[(N[(y - N[(x * y), $MachinePrecision]), $MachinePrecision] * N[(y + -1.0), $MachinePrecision] + 1.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \frac{1 - x}{y}\\
\mathbf{if}\;y \leq -1:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\mathsf{fma}\left(y - x \cdot y, y + -1, 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -1 or 1 < y Initial program 28.6%
Taylor expanded in y around inf
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate--r-N/A
div-subN/A
unsub-negN/A
mul-1-negN/A
lower-+.f64N/A
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
lower--.f6497.8
Simplified97.8%
if -1 < y < 1Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
+-commutativeN/A
associate--l+N/A
distribute-rgt-inN/A
*-commutativeN/A
*-rgt-identityN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-outN/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
distribute-lft-outN/A
lower-fma.f64N/A
Simplified100.0%
Final simplification98.8%
(FPCore (x y) :precision binary64 (let* ((t_0 (+ x (/ (- 1.0 x) y)))) (if (<= y -1.0) t_0 (if (<= y 1.0) (fma y (+ x -1.0) 1.0) t_0))))
double code(double x, double y) {
double t_0 = x + ((1.0 - x) / y);
double tmp;
if (y <= -1.0) {
tmp = t_0;
} else if (y <= 1.0) {
tmp = fma(y, (x + -1.0), 1.0);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y) t_0 = Float64(x + Float64(Float64(1.0 - x) / y)) tmp = 0.0 if (y <= -1.0) tmp = t_0; elseif (y <= 1.0) tmp = fma(y, Float64(x + -1.0), 1.0); else tmp = t_0; end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(N[(1.0 - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.0], t$95$0, If[LessEqual[y, 1.0], N[(y * N[(x + -1.0), $MachinePrecision] + 1.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \frac{1 - x}{y}\\
\mathbf{if}\;y \leq -1:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\mathsf{fma}\left(y, x + -1, 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -1 or 1 < y Initial program 28.6%
Taylor expanded in y around inf
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate--r-N/A
div-subN/A
unsub-negN/A
mul-1-negN/A
lower-+.f64N/A
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
lower--.f6497.8
Simplified97.8%
if -1 < y < 1Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6499.2
Simplified99.2%
(FPCore (x y) :precision binary64 (let* ((t_0 (+ x (/ 1.0 y)))) (if (<= y -1.0) t_0 (if (<= y 0.82) (fma y (+ x -1.0) 1.0) t_0))))
double code(double x, double y) {
double t_0 = x + (1.0 / y);
double tmp;
if (y <= -1.0) {
tmp = t_0;
} else if (y <= 0.82) {
tmp = fma(y, (x + -1.0), 1.0);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y) t_0 = Float64(x + Float64(1.0 / y)) tmp = 0.0 if (y <= -1.0) tmp = t_0; elseif (y <= 0.82) tmp = fma(y, Float64(x + -1.0), 1.0); else tmp = t_0; end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(1.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.0], t$95$0, If[LessEqual[y, 0.82], N[(y * N[(x + -1.0), $MachinePrecision] + 1.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \frac{1}{y}\\
\mathbf{if}\;y \leq -1:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 0.82:\\
\;\;\;\;\mathsf{fma}\left(y, x + -1, 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -1 or 0.819999999999999951 < y Initial program 28.6%
Taylor expanded in y around inf
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate--r-N/A
div-subN/A
unsub-negN/A
mul-1-negN/A
lower-+.f64N/A
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
lower--.f6497.8
Simplified97.8%
Taylor expanded in x around 0
lower-/.f6497.6
Simplified97.6%
if -1 < y < 0.819999999999999951Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6499.2
Simplified99.2%
(FPCore (x y) :precision binary64 (let* ((t_0 (+ 1.0 (+ x -1.0)))) (if (<= y -1.0) t_0 (if (<= y 1.0) (fma y (+ x -1.0) 1.0) t_0))))
double code(double x, double y) {
double t_0 = 1.0 + (x + -1.0);
double tmp;
if (y <= -1.0) {
tmp = t_0;
} else if (y <= 1.0) {
tmp = fma(y, (x + -1.0), 1.0);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y) t_0 = Float64(1.0 + Float64(x + -1.0)) tmp = 0.0 if (y <= -1.0) tmp = t_0; elseif (y <= 1.0) tmp = fma(y, Float64(x + -1.0), 1.0); else tmp = t_0; end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.0], t$95$0, If[LessEqual[y, 1.0], N[(y * N[(x + -1.0), $MachinePrecision] + 1.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \left(x + -1\right)\\
\mathbf{if}\;y \leq -1:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\mathsf{fma}\left(y, x + -1, 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -1 or 1 < y Initial program 28.6%
Taylor expanded in y around inf
lower--.f6451.9
Simplified51.9%
if -1 < y < 1Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6499.2
Simplified99.2%
Final simplification74.3%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 62.3%
Taylor expanded in y around 0
Simplified37.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- (/ 1.0 y) (- (/ x y) x))))
(if (< y -3693.8482788297247)
t_0
(if (< y 6799310503.41891) (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))) t_0))))
double code(double x, double y) {
double t_0 = (1.0 / y) - ((x / y) - x);
double tmp;
if (y < -3693.8482788297247) {
tmp = t_0;
} else if (y < 6799310503.41891) {
tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0));
} 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 = (1.0d0 / y) - ((x / y) - x)
if (y < (-3693.8482788297247d0)) then
tmp = t_0
else if (y < 6799310503.41891d0) then
tmp = 1.0d0 - (((1.0d0 - x) * y) / (y + 1.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (1.0 / y) - ((x / y) - x);
double tmp;
if (y < -3693.8482788297247) {
tmp = t_0;
} else if (y < 6799310503.41891) {
tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = (1.0 / y) - ((x / y) - x) tmp = 0 if y < -3693.8482788297247: tmp = t_0 elif y < 6799310503.41891: tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0)) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(Float64(1.0 / y) - Float64(Float64(x / y) - x)) tmp = 0.0 if (y < -3693.8482788297247) tmp = t_0; elseif (y < 6799310503.41891) tmp = Float64(1.0 - Float64(Float64(Float64(1.0 - x) * y) / Float64(y + 1.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = (1.0 / y) - ((x / y) - x); tmp = 0.0; if (y < -3693.8482788297247) tmp = t_0; elseif (y < 6799310503.41891) tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(1.0 / y), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -3693.8482788297247], t$95$0, If[Less[y, 6799310503.41891], N[(1.0 - N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{y} - \left(\frac{x}{y} - x\right)\\
\mathbf{if}\;y < -3693.8482788297247:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y < 6799310503.41891:\\
\;\;\;\;1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
herbie shell --seed 2024215
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, D"
:precision binary64
:alt
(! :herbie-platform default (if (< y -36938482788297247/10000000000000) (- (/ 1 y) (- (/ x y) x)) (if (< y 679931050341891/100000) (- 1 (/ (* (- 1 x) y) (+ y 1))) (- (/ 1 y) (- (/ x y) x)))))
(- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))