
(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 14 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 (/ (- (+ x -1.0) (/ (+ x -1.0) y)) y)))
(if (<= y -12000.0)
(+ x (/ (- (- t_0 -1.0) x) y))
(if (<= y 340000.0) (- 1.0 (/ (* y (- 1.0 x)) (+ y 1.0))) (- x t_0)))))
double code(double x, double y) {
double t_0 = ((x + -1.0) - ((x + -1.0) / y)) / y;
double tmp;
if (y <= -12000.0) {
tmp = x + (((t_0 - -1.0) - x) / y);
} else if (y <= 340000.0) {
tmp = 1.0 - ((y * (1.0 - x)) / (y + 1.0));
} else {
tmp = x - 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 + (-1.0d0)) - ((x + (-1.0d0)) / y)) / y
if (y <= (-12000.0d0)) then
tmp = x + (((t_0 - (-1.0d0)) - x) / y)
else if (y <= 340000.0d0) then
tmp = 1.0d0 - ((y * (1.0d0 - x)) / (y + 1.0d0))
else
tmp = x - t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = ((x + -1.0) - ((x + -1.0) / y)) / y;
double tmp;
if (y <= -12000.0) {
tmp = x + (((t_0 - -1.0) - x) / y);
} else if (y <= 340000.0) {
tmp = 1.0 - ((y * (1.0 - x)) / (y + 1.0));
} else {
tmp = x - t_0;
}
return tmp;
}
def code(x, y): t_0 = ((x + -1.0) - ((x + -1.0) / y)) / y tmp = 0 if y <= -12000.0: tmp = x + (((t_0 - -1.0) - x) / y) elif y <= 340000.0: tmp = 1.0 - ((y * (1.0 - x)) / (y + 1.0)) else: tmp = x - t_0 return tmp
function code(x, y) t_0 = Float64(Float64(Float64(x + -1.0) - Float64(Float64(x + -1.0) / y)) / y) tmp = 0.0 if (y <= -12000.0) tmp = Float64(x + Float64(Float64(Float64(t_0 - -1.0) - x) / y)); elseif (y <= 340000.0) tmp = Float64(1.0 - Float64(Float64(y * Float64(1.0 - x)) / Float64(y + 1.0))); else tmp = Float64(x - t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = ((x + -1.0) - ((x + -1.0) / y)) / y; tmp = 0.0; if (y <= -12000.0) tmp = x + (((t_0 - -1.0) - x) / y); elseif (y <= 340000.0) tmp = 1.0 - ((y * (1.0 - x)) / (y + 1.0)); else tmp = x - t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[(x + -1.0), $MachinePrecision] - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -12000.0], N[(x + N[(N[(N[(t$95$0 - -1.0), $MachinePrecision] - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 340000.0], N[(1.0 - N[(N[(y * N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x + -1\right) - \frac{x + -1}{y}}{y}\\
\mathbf{if}\;y \leq -12000:\\
\;\;\;\;x + \frac{\left(t\_0 - -1\right) - x}{y}\\
\mathbf{elif}\;y \leq 340000:\\
\;\;\;\;1 - \frac{y \cdot \left(1 - x\right)}{y + 1}\\
\mathbf{else}:\\
\;\;\;\;x - t\_0\\
\end{array}
\end{array}
if y < -12000Initial program 36.8%
associate-/l*57.9%
+-commutative57.9%
Simplified57.9%
Taylor expanded in y around -inf 99.9%
Simplified99.9%
if -12000 < y < 3.4e5Initial program 99.9%
if 3.4e5 < y Initial program 32.0%
associate-/l*56.7%
+-commutative56.7%
Simplified56.7%
Taylor expanded in y around inf 100.0%
Simplified100.0%
Final simplification99.9%
(FPCore (x y) :precision binary64 (if (or (<= y -200000.0) (not (<= y 320000.0))) (- x (/ (- (+ x -1.0) (/ (+ x -1.0) y)) y)) (- 1.0 (/ (* y (- 1.0 x)) (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -200000.0) || !(y <= 320000.0)) {
tmp = x - (((x + -1.0) - ((x + -1.0) / y)) / y);
} else {
tmp = 1.0 - ((y * (1.0 - x)) / (y + 1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-200000.0d0)) .or. (.not. (y <= 320000.0d0))) then
tmp = x - (((x + (-1.0d0)) - ((x + (-1.0d0)) / y)) / y)
else
tmp = 1.0d0 - ((y * (1.0d0 - x)) / (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -200000.0) || !(y <= 320000.0)) {
tmp = x - (((x + -1.0) - ((x + -1.0) / y)) / y);
} else {
tmp = 1.0 - ((y * (1.0 - x)) / (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -200000.0) or not (y <= 320000.0): tmp = x - (((x + -1.0) - ((x + -1.0) / y)) / y) else: tmp = 1.0 - ((y * (1.0 - x)) / (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -200000.0) || !(y <= 320000.0)) tmp = Float64(x - Float64(Float64(Float64(x + -1.0) - Float64(Float64(x + -1.0) / y)) / y)); else tmp = Float64(1.0 - Float64(Float64(y * Float64(1.0 - x)) / Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -200000.0) || ~((y <= 320000.0))) tmp = x - (((x + -1.0) - ((x + -1.0) / y)) / y); else tmp = 1.0 - ((y * (1.0 - x)) / (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -200000.0], N[Not[LessEqual[y, 320000.0]], $MachinePrecision]], N[(x - N[(N[(N[(x + -1.0), $MachinePrecision] - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(y * N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -200000 \lor \neg \left(y \leq 320000\right):\\
\;\;\;\;x - \frac{\left(x + -1\right) - \frac{x + -1}{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y \cdot \left(1 - x\right)}{y + 1}\\
\end{array}
\end{array}
if y < -2e5 or 3.2e5 < y Initial program 34.2%
associate-/l*57.1%
+-commutative57.1%
Simplified57.1%
Taylor expanded in y around inf 99.8%
Simplified99.8%
if -2e5 < y < 3.2e5Initial program 99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(if (<= y -700000000.0)
(- x (/ (+ x -1.0) y))
(if (<= y 320000000.0)
(- 1.0 (/ (* y (- 1.0 x)) (+ y 1.0)))
(* x (+ 1.0 (/ (- -1.0 (/ -1.0 x)) y))))))
double code(double x, double y) {
double tmp;
if (y <= -700000000.0) {
tmp = x - ((x + -1.0) / y);
} else if (y <= 320000000.0) {
tmp = 1.0 - ((y * (1.0 - x)) / (y + 1.0));
} else {
tmp = x * (1.0 + ((-1.0 - (-1.0 / x)) / y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-700000000.0d0)) then
tmp = x - ((x + (-1.0d0)) / y)
else if (y <= 320000000.0d0) then
tmp = 1.0d0 - ((y * (1.0d0 - x)) / (y + 1.0d0))
else
tmp = x * (1.0d0 + (((-1.0d0) - ((-1.0d0) / x)) / y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -700000000.0) {
tmp = x - ((x + -1.0) / y);
} else if (y <= 320000000.0) {
tmp = 1.0 - ((y * (1.0 - x)) / (y + 1.0));
} else {
tmp = x * (1.0 + ((-1.0 - (-1.0 / x)) / y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -700000000.0: tmp = x - ((x + -1.0) / y) elif y <= 320000000.0: tmp = 1.0 - ((y * (1.0 - x)) / (y + 1.0)) else: tmp = x * (1.0 + ((-1.0 - (-1.0 / x)) / y)) return tmp
function code(x, y) tmp = 0.0 if (y <= -700000000.0) tmp = Float64(x - Float64(Float64(x + -1.0) / y)); elseif (y <= 320000000.0) tmp = Float64(1.0 - Float64(Float64(y * Float64(1.0 - x)) / Float64(y + 1.0))); else tmp = Float64(x * Float64(1.0 + Float64(Float64(-1.0 - Float64(-1.0 / x)) / y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -700000000.0) tmp = x - ((x + -1.0) / y); elseif (y <= 320000000.0) tmp = 1.0 - ((y * (1.0 - x)) / (y + 1.0)); else tmp = x * (1.0 + ((-1.0 - (-1.0 / x)) / y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -700000000.0], N[(x - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 320000000.0], N[(1.0 - N[(N[(y * N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(N[(-1.0 - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -700000000:\\
\;\;\;\;x - \frac{x + -1}{y}\\
\mathbf{elif}\;y \leq 320000000:\\
\;\;\;\;1 - \frac{y \cdot \left(1 - x\right)}{y + 1}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + \frac{-1 - \frac{-1}{x}}{y}\right)\\
\end{array}
\end{array}
if y < -7e8Initial program 34.5%
associate-/l*56.7%
+-commutative56.7%
Simplified56.7%
Taylor expanded in y around inf 100.0%
associate--l+100.0%
div-sub100.0%
Simplified100.0%
if -7e8 < y < 3.2e8Initial program 99.6%
if 3.2e8 < y Initial program 30.8%
associate-/l*55.9%
+-commutative55.9%
Simplified55.9%
Taylor expanded in x around inf 56.3%
Taylor expanded in y around -inf 99.9%
mul-1-neg99.9%
unsub-neg99.9%
sub-neg99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(if (<= y -13500000000.0)
(- x (/ (+ x -1.0) y))
(if (<= y 130000000.0)
(- 1.0 (* y (/ (- 1.0 x) (+ y 1.0))))
(* x (+ 1.0 (/ (- -1.0 (/ -1.0 x)) y))))))
double code(double x, double y) {
double tmp;
if (y <= -13500000000.0) {
tmp = x - ((x + -1.0) / y);
} else if (y <= 130000000.0) {
tmp = 1.0 - (y * ((1.0 - x) / (y + 1.0)));
} else {
tmp = x * (1.0 + ((-1.0 - (-1.0 / x)) / y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-13500000000.0d0)) then
tmp = x - ((x + (-1.0d0)) / y)
else if (y <= 130000000.0d0) then
tmp = 1.0d0 - (y * ((1.0d0 - x) / (y + 1.0d0)))
else
tmp = x * (1.0d0 + (((-1.0d0) - ((-1.0d0) / x)) / y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -13500000000.0) {
tmp = x - ((x + -1.0) / y);
} else if (y <= 130000000.0) {
tmp = 1.0 - (y * ((1.0 - x) / (y + 1.0)));
} else {
tmp = x * (1.0 + ((-1.0 - (-1.0 / x)) / y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -13500000000.0: tmp = x - ((x + -1.0) / y) elif y <= 130000000.0: tmp = 1.0 - (y * ((1.0 - x) / (y + 1.0))) else: tmp = x * (1.0 + ((-1.0 - (-1.0 / x)) / y)) return tmp
function code(x, y) tmp = 0.0 if (y <= -13500000000.0) tmp = Float64(x - Float64(Float64(x + -1.0) / y)); elseif (y <= 130000000.0) tmp = Float64(1.0 - Float64(y * Float64(Float64(1.0 - x) / Float64(y + 1.0)))); else tmp = Float64(x * Float64(1.0 + Float64(Float64(-1.0 - Float64(-1.0 / x)) / y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -13500000000.0) tmp = x - ((x + -1.0) / y); elseif (y <= 130000000.0) tmp = 1.0 - (y * ((1.0 - x) / (y + 1.0))); else tmp = x * (1.0 + ((-1.0 - (-1.0 / x)) / y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -13500000000.0], N[(x - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 130000000.0], N[(1.0 - N[(y * N[(N[(1.0 - x), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(N[(-1.0 - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -13500000000:\\
\;\;\;\;x - \frac{x + -1}{y}\\
\mathbf{elif}\;y \leq 130000000:\\
\;\;\;\;1 - y \cdot \frac{1 - x}{y + 1}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + \frac{-1 - \frac{-1}{x}}{y}\right)\\
\end{array}
\end{array}
if y < -1.35e10Initial program 33.5%
associate-/l*56.0%
+-commutative56.0%
Simplified56.0%
Taylor expanded in y around inf 100.0%
associate--l+100.0%
div-sub100.0%
Simplified100.0%
if -1.35e10 < y < 1.3e8Initial program 99.6%
associate-/l*99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-/l*99.6%
associate-*r*99.6%
neg-mul-199.6%
distribute-lft1-in99.6%
+-commutative99.6%
sub-neg99.6%
associate-*r/99.6%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
if 1.3e8 < y Initial program 30.8%
associate-/l*55.9%
+-commutative55.9%
Simplified55.9%
Taylor expanded in x around inf 56.3%
Taylor expanded in y around -inf 99.9%
mul-1-neg99.9%
unsub-neg99.9%
sub-neg99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x y) :precision binary64 (if (or (<= y -5500.0) (not (<= y 400.0))) (- x (/ (+ x -1.0) y)) (+ 1.0 (/ (* y x) (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -5500.0) || !(y <= 400.0)) {
tmp = x - ((x + -1.0) / y);
} else {
tmp = 1.0 + ((y * x) / (y + 1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-5500.0d0)) .or. (.not. (y <= 400.0d0))) then
tmp = x - ((x + (-1.0d0)) / y)
else
tmp = 1.0d0 + ((y * x) / (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -5500.0) || !(y <= 400.0)) {
tmp = x - ((x + -1.0) / y);
} else {
tmp = 1.0 + ((y * x) / (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -5500.0) or not (y <= 400.0): tmp = x - ((x + -1.0) / y) else: tmp = 1.0 + ((y * x) / (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -5500.0) || !(y <= 400.0)) tmp = Float64(x - Float64(Float64(x + -1.0) / y)); else tmp = Float64(1.0 + Float64(Float64(y * x) / Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -5500.0) || ~((y <= 400.0))) tmp = x - ((x + -1.0) / y); else tmp = 1.0 + ((y * x) / (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -5500.0], N[Not[LessEqual[y, 400.0]], $MachinePrecision]], N[(x - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y * x), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5500 \lor \neg \left(y \leq 400\right):\\
\;\;\;\;x - \frac{x + -1}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{y \cdot x}{y + 1}\\
\end{array}
\end{array}
if y < -5500 or 400 < y Initial program 35.0%
associate-/l*57.6%
+-commutative57.6%
Simplified57.6%
Taylor expanded in y around inf 98.5%
associate--l+98.5%
div-sub98.5%
Simplified98.5%
if -5500 < y < 400Initial program 100.0%
associate-/l*100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
associate-/l*100.0%
associate-*r*100.0%
neg-mul-1100.0%
distribute-lft1-in100.0%
+-commutative100.0%
sub-neg100.0%
associate-*r/100.0%
associate-*l/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 98.0%
mul-1-neg98.0%
distribute-neg-frac298.0%
distribute-neg-in98.0%
metadata-eval98.0%
*-commutative98.0%
unsub-neg98.0%
Simplified98.0%
Final simplification98.2%
(FPCore (x y) :precision binary64 (if (or (<= y -1400.0) (not (<= y 400.0))) (- x (/ (+ x -1.0) y)) (- 1.0 (* x (/ y (- -1.0 y))))))
double code(double x, double y) {
double tmp;
if ((y <= -1400.0) || !(y <= 400.0)) {
tmp = x - ((x + -1.0) / y);
} else {
tmp = 1.0 - (x * (y / (-1.0 - y)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1400.0d0)) .or. (.not. (y <= 400.0d0))) then
tmp = x - ((x + (-1.0d0)) / y)
else
tmp = 1.0d0 - (x * (y / ((-1.0d0) - y)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1400.0) || !(y <= 400.0)) {
tmp = x - ((x + -1.0) / y);
} else {
tmp = 1.0 - (x * (y / (-1.0 - y)));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1400.0) or not (y <= 400.0): tmp = x - ((x + -1.0) / y) else: tmp = 1.0 - (x * (y / (-1.0 - y))) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1400.0) || !(y <= 400.0)) tmp = Float64(x - Float64(Float64(x + -1.0) / y)); else tmp = Float64(1.0 - Float64(x * Float64(y / Float64(-1.0 - y)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1400.0) || ~((y <= 400.0))) tmp = x - ((x + -1.0) / y); else tmp = 1.0 - (x * (y / (-1.0 - y))); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1400.0], N[Not[LessEqual[y, 400.0]], $MachinePrecision]], N[(x - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x * N[(y / N[(-1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1400 \lor \neg \left(y \leq 400\right):\\
\;\;\;\;x - \frac{x + -1}{y}\\
\mathbf{else}:\\
\;\;\;\;1 - x \cdot \frac{y}{-1 - y}\\
\end{array}
\end{array}
if y < -1400 or 400 < y Initial program 35.0%
associate-/l*57.6%
+-commutative57.6%
Simplified57.6%
Taylor expanded in y around inf 98.5%
associate--l+98.5%
div-sub98.5%
Simplified98.5%
if -1400 < y < 400Initial program 100.0%
associate-/l*100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 98.0%
mul-1-neg98.0%
associate-/l*98.0%
distribute-rgt-neg-in98.0%
distribute-neg-frac298.0%
distribute-neg-in98.0%
metadata-eval98.0%
sub-neg98.0%
Simplified98.0%
Final simplification98.2%
(FPCore (x y) :precision binary64 (if (or (<= y -1.0) (not (<= y 1.0))) (- x (/ (+ x -1.0) y)) (+ 1.0 (- (* y x) y))))
double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.0)) {
tmp = x - ((x + -1.0) / y);
} else {
tmp = 1.0 + ((y * x) - y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.0d0)) .or. (.not. (y <= 1.0d0))) then
tmp = x - ((x + (-1.0d0)) / y)
else
tmp = 1.0d0 + ((y * x) - y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.0)) {
tmp = x - ((x + -1.0) / y);
} else {
tmp = 1.0 + ((y * x) - y);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.0) or not (y <= 1.0): tmp = x - ((x + -1.0) / y) else: tmp = 1.0 + ((y * x) - y) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.0) || !(y <= 1.0)) tmp = Float64(x - Float64(Float64(x + -1.0) / y)); else tmp = Float64(1.0 + Float64(Float64(y * x) - y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.0) || ~((y <= 1.0))) tmp = x - ((x + -1.0) / y); else tmp = 1.0 + ((y * x) - y); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 1.0]], $MachinePrecision]], N[(x - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y * x), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 1\right):\\
\;\;\;\;x - \frac{x + -1}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(y \cdot x - y\right)\\
\end{array}
\end{array}
if y < -1 or 1 < y Initial program 36.6%
associate-/l*58.6%
+-commutative58.6%
Simplified58.6%
Taylor expanded in y around inf 96.8%
associate--l+96.8%
div-sub96.8%
Simplified96.8%
if -1 < y < 1Initial program 100.0%
associate-/l*100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 98.2%
*-commutative98.2%
sub-neg98.2%
distribute-rgt-in98.2%
*-un-lft-identity98.2%
Applied egg-rr98.2%
Final simplification97.5%
(FPCore (x y) :precision binary64 (if (or (<= y -1.0) (not (<= y 1.0))) (- x (/ (+ x -1.0) y)) (+ 1.0 (* y (+ x -1.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.0)) {
tmp = x - ((x + -1.0) / y);
} else {
tmp = 1.0 + (y * (x + -1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.0d0)) .or. (.not. (y <= 1.0d0))) then
tmp = x - ((x + (-1.0d0)) / y)
else
tmp = 1.0d0 + (y * (x + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.0)) {
tmp = x - ((x + -1.0) / y);
} else {
tmp = 1.0 + (y * (x + -1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.0) or not (y <= 1.0): tmp = x - ((x + -1.0) / y) else: tmp = 1.0 + (y * (x + -1.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.0) || !(y <= 1.0)) tmp = Float64(x - Float64(Float64(x + -1.0) / y)); else tmp = Float64(1.0 + Float64(y * Float64(x + -1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.0) || ~((y <= 1.0))) tmp = x - ((x + -1.0) / y); else tmp = 1.0 + (y * (x + -1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 1.0]], $MachinePrecision]], N[(x - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 1\right):\\
\;\;\;\;x - \frac{x + -1}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \left(x + -1\right)\\
\end{array}
\end{array}
if y < -1 or 1 < y Initial program 36.6%
associate-/l*58.6%
+-commutative58.6%
Simplified58.6%
Taylor expanded in y around inf 96.8%
associate--l+96.8%
div-sub96.8%
Simplified96.8%
if -1 < y < 1Initial program 100.0%
associate-/l*100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 98.2%
Final simplification97.5%
(FPCore (x y) :precision binary64 (if (or (<= y -1.0) (not (<= y 1.15))) (- x (/ (+ x -1.0) y)) (+ 1.0 (* y x))))
double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.15)) {
tmp = x - ((x + -1.0) / y);
} else {
tmp = 1.0 + (y * x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.0d0)) .or. (.not. (y <= 1.15d0))) then
tmp = x - ((x + (-1.0d0)) / y)
else
tmp = 1.0d0 + (y * x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.15)) {
tmp = x - ((x + -1.0) / y);
} else {
tmp = 1.0 + (y * x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.0) or not (y <= 1.15): tmp = x - ((x + -1.0) / y) else: tmp = 1.0 + (y * x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.0) || !(y <= 1.15)) tmp = Float64(x - Float64(Float64(x + -1.0) / y)); else tmp = Float64(1.0 + Float64(y * x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.0) || ~((y <= 1.15))) tmp = x - ((x + -1.0) / y); else tmp = 1.0 + (y * x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 1.15]], $MachinePrecision]], N[(x - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 1.15\right):\\
\;\;\;\;x - \frac{x + -1}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot x\\
\end{array}
\end{array}
if y < -1 or 1.1499999999999999 < y Initial program 36.6%
associate-/l*58.6%
+-commutative58.6%
Simplified58.6%
Taylor expanded in y around inf 96.8%
associate--l+96.8%
div-sub96.8%
Simplified96.8%
if -1 < y < 1.1499999999999999Initial program 100.0%
associate-/l*100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
associate-/l*100.0%
associate-*r*100.0%
neg-mul-1100.0%
distribute-lft1-in100.0%
+-commutative100.0%
sub-neg100.0%
associate-*r/100.0%
associate-*l/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 98.6%
mul-1-neg98.6%
distribute-neg-frac298.6%
distribute-neg-in98.6%
metadata-eval98.6%
*-commutative98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in y around 0 97.4%
mul-1-neg97.4%
distribute-rgt-neg-out97.4%
Simplified97.4%
Final simplification97.1%
(FPCore (x y) :precision binary64 (if (or (<= y -1.0) (not (<= y 1.9))) (- x (/ x y)) (+ 1.0 (* y x))))
double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.9)) {
tmp = x - (x / y);
} else {
tmp = 1.0 + (y * x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.0d0)) .or. (.not. (y <= 1.9d0))) then
tmp = x - (x / y)
else
tmp = 1.0d0 + (y * x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.9)) {
tmp = x - (x / y);
} else {
tmp = 1.0 + (y * x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.0) or not (y <= 1.9): tmp = x - (x / y) else: tmp = 1.0 + (y * x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.0) || !(y <= 1.9)) tmp = Float64(x - Float64(x / y)); else tmp = Float64(1.0 + Float64(y * x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.0) || ~((y <= 1.9))) tmp = x - (x / y); else tmp = 1.0 + (y * x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 1.9]], $MachinePrecision]], N[(x - N[(x / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 1.9\right):\\
\;\;\;\;x - \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot x\\
\end{array}
\end{array}
if y < -1 or 1.8999999999999999 < y Initial program 36.1%
associate-/l*58.3%
+-commutative58.3%
Simplified58.3%
Taylor expanded in x around inf 58.4%
*-commutative58.4%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in y around inf 79.5%
mul-1-neg79.5%
unsub-neg79.5%
Simplified79.5%
if -1 < y < 1.8999999999999999Initial program 100.0%
associate-/l*100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
associate-/l*100.0%
associate-*r*100.0%
neg-mul-1100.0%
distribute-lft1-in100.0%
+-commutative100.0%
sub-neg100.0%
associate-*r/100.0%
associate-*l/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 97.9%
mul-1-neg97.9%
distribute-neg-frac297.9%
distribute-neg-in97.9%
metadata-eval97.9%
*-commutative97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in y around 0 96.8%
mul-1-neg96.8%
distribute-rgt-neg-out96.8%
Simplified96.8%
Final simplification88.2%
(FPCore (x y) :precision binary64 (if (or (<= y -1.0) (not (<= y 1.0))) (- x (/ x y)) (- 1.0 y)))
double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.0)) {
tmp = x - (x / y);
} else {
tmp = 1.0 - y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.0d0)) .or. (.not. (y <= 1.0d0))) then
tmp = x - (x / y)
else
tmp = 1.0d0 - y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.0)) {
tmp = x - (x / y);
} else {
tmp = 1.0 - y;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.0) or not (y <= 1.0): tmp = x - (x / y) else: tmp = 1.0 - y return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.0) || !(y <= 1.0)) tmp = Float64(x - Float64(x / y)); else tmp = Float64(1.0 - y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.0) || ~((y <= 1.0))) tmp = x - (x / y); else tmp = 1.0 - y; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 1.0]], $MachinePrecision]], N[(x - N[(x / y), $MachinePrecision]), $MachinePrecision], N[(1.0 - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 1\right):\\
\;\;\;\;x - \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;1 - y\\
\end{array}
\end{array}
if y < -1 or 1 < y Initial program 36.6%
associate-/l*58.6%
+-commutative58.6%
Simplified58.6%
Taylor expanded in x around inf 57.9%
*-commutative57.9%
associate-/l*65.4%
Simplified65.4%
Taylor expanded in y around inf 78.9%
mul-1-neg78.9%
unsub-neg78.9%
Simplified78.9%
if -1 < y < 1Initial program 100.0%
associate-/l*100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 75.7%
Taylor expanded in y around 0 75.3%
neg-mul-175.3%
sub-neg75.3%
Simplified75.3%
Final simplification77.1%
(FPCore (x y) :precision binary64 (if (<= y -1.0) x (if (<= y 0.0045) (- 1.0 y) x)))
double code(double x, double y) {
double tmp;
if (y <= -1.0) {
tmp = x;
} else if (y <= 0.0045) {
tmp = 1.0 - y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.0d0)) then
tmp = x
else if (y <= 0.0045d0) then
tmp = 1.0d0 - y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.0) {
tmp = x;
} else if (y <= 0.0045) {
tmp = 1.0 - y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.0: tmp = x elif y <= 0.0045: tmp = 1.0 - y else: tmp = x return tmp
function code(x, y) tmp = 0.0 if (y <= -1.0) tmp = x; elseif (y <= 0.0045) tmp = Float64(1.0 - y); else tmp = x; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.0) tmp = x; elseif (y <= 0.0045) tmp = 1.0 - y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.0], x, If[LessEqual[y, 0.0045], N[(1.0 - y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 0.0045:\\
\;\;\;\;1 - y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1 or 0.00449999999999999966 < y Initial program 37.0%
associate-/l*58.9%
+-commutative58.9%
Simplified58.9%
Taylor expanded in y around inf 77.5%
if -1 < y < 0.00449999999999999966Initial program 100.0%
associate-/l*100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 76.2%
Taylor expanded in y around 0 75.9%
neg-mul-175.9%
sub-neg75.9%
Simplified75.9%
(FPCore (x y) :precision binary64 (if (<= y -1.0) x (if (<= y 1.25) 1.0 x)))
double code(double x, double y) {
double tmp;
if (y <= -1.0) {
tmp = x;
} else if (y <= 1.25) {
tmp = 1.0;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.0d0)) then
tmp = x
else if (y <= 1.25d0) then
tmp = 1.0d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.0) {
tmp = x;
} else if (y <= 1.25) {
tmp = 1.0;
} else {
tmp = x;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.0: tmp = x elif y <= 1.25: tmp = 1.0 else: tmp = x return tmp
function code(x, y) tmp = 0.0 if (y <= -1.0) tmp = x; elseif (y <= 1.25) tmp = 1.0; else tmp = x; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.0) tmp = x; elseif (y <= 1.25) tmp = 1.0; else tmp = x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.0], x, If[LessEqual[y, 1.25], 1.0, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.25:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1 or 1.25 < y Initial program 36.1%
associate-/l*58.3%
+-commutative58.3%
Simplified58.3%
Taylor expanded in y around inf 78.6%
if -1 < y < 1.25Initial program 100.0%
associate-/l*100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 74.0%
(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 68.3%
associate-/l*79.3%
+-commutative79.3%
Simplified79.3%
Taylor expanded in y around 0 39.2%
(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 2024098
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, D"
:precision binary64
:alt
(if (< y -3693.8482788297247) (- (/ 1.0 y) (- (/ x y) x)) (if (< y 6799310503.41891) (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))) (- (/ 1.0 y) (- (/ x y) x))))
(- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))