
(FPCore (x y) :precision binary64 (/ (- x y) (- 1.0 y)))
double code(double x, double y) {
return (x - y) / (1.0 - y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x - y) / (1.0d0 - y)
end function
public static double code(double x, double y) {
return (x - y) / (1.0 - y);
}
def code(x, y): return (x - y) / (1.0 - y)
function code(x, y) return Float64(Float64(x - y) / Float64(1.0 - y)) end
function tmp = code(x, y) tmp = (x - y) / (1.0 - y); end
code[x_, y_] := N[(N[(x - y), $MachinePrecision] / N[(1.0 - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{1 - y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (- x y) (- 1.0 y)))
double code(double x, double y) {
return (x - y) / (1.0 - y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x - y) / (1.0d0 - y)
end function
public static double code(double x, double y) {
return (x - y) / (1.0 - y);
}
def code(x, y): return (x - y) / (1.0 - y)
function code(x, y) return Float64(Float64(x - y) / Float64(1.0 - y)) end
function tmp = code(x, y) tmp = (x - y) / (1.0 - y); end
code[x_, y_] := N[(N[(x - y), $MachinePrecision] / N[(1.0 - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{1 - y}
\end{array}
(FPCore (x y) :precision binary64 (/ (- x y) (- 1.0 y)))
double code(double x, double y) {
return (x - y) / (1.0 - y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x - y) / (1.0d0 - y)
end function
public static double code(double x, double y) {
return (x - y) / (1.0 - y);
}
def code(x, y): return (x - y) / (1.0 - y)
function code(x, y) return Float64(Float64(x - y) / Float64(1.0 - y)) end
function tmp = code(x, y) tmp = (x - y) / (1.0 - y); end
code[x_, y_] := N[(N[(x - y), $MachinePrecision] / N[(1.0 - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{1 - y}
\end{array}
Initial program 100.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (- 1.0 y))))
(if (<= x -1.7e+58)
t_0
(if (<= x -9.8e+30)
1.0
(if (or (<= x -4.8e-5) (not (<= x 1.62e-46))) t_0 (/ y (+ y -1.0)))))))
double code(double x, double y) {
double t_0 = x / (1.0 - y);
double tmp;
if (x <= -1.7e+58) {
tmp = t_0;
} else if (x <= -9.8e+30) {
tmp = 1.0;
} else if ((x <= -4.8e-5) || !(x <= 1.62e-46)) {
tmp = t_0;
} else {
tmp = y / (y + -1.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 - y)
if (x <= (-1.7d+58)) then
tmp = t_0
else if (x <= (-9.8d+30)) then
tmp = 1.0d0
else if ((x <= (-4.8d-5)) .or. (.not. (x <= 1.62d-46))) then
tmp = t_0
else
tmp = y / (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (1.0 - y);
double tmp;
if (x <= -1.7e+58) {
tmp = t_0;
} else if (x <= -9.8e+30) {
tmp = 1.0;
} else if ((x <= -4.8e-5) || !(x <= 1.62e-46)) {
tmp = t_0;
} else {
tmp = y / (y + -1.0);
}
return tmp;
}
def code(x, y): t_0 = x / (1.0 - y) tmp = 0 if x <= -1.7e+58: tmp = t_0 elif x <= -9.8e+30: tmp = 1.0 elif (x <= -4.8e-5) or not (x <= 1.62e-46): tmp = t_0 else: tmp = y / (y + -1.0) return tmp
function code(x, y) t_0 = Float64(x / Float64(1.0 - y)) tmp = 0.0 if (x <= -1.7e+58) tmp = t_0; elseif (x <= -9.8e+30) tmp = 1.0; elseif ((x <= -4.8e-5) || !(x <= 1.62e-46)) tmp = t_0; else tmp = Float64(y / Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (1.0 - y); tmp = 0.0; if (x <= -1.7e+58) tmp = t_0; elseif (x <= -9.8e+30) tmp = 1.0; elseif ((x <= -4.8e-5) || ~((x <= 1.62e-46))) tmp = t_0; else tmp = y / (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.7e+58], t$95$0, If[LessEqual[x, -9.8e+30], 1.0, If[Or[LessEqual[x, -4.8e-5], N[Not[LessEqual[x, 1.62e-46]], $MachinePrecision]], t$95$0, N[(y / N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{1 - y}\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{+58}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -9.8 \cdot 10^{+30}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-5} \lor \neg \left(x \leq 1.62 \cdot 10^{-46}\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y + -1}\\
\end{array}
\end{array}
if x < -1.7e58 or -9.79999999999999969e30 < x < -4.8000000000000001e-5 or 1.6200000000000001e-46 < x Initial program 99.9%
Taylor expanded in x around inf 76.7%
if -1.7e58 < x < -9.79999999999999969e30Initial program 100.0%
Taylor expanded in y around inf 90.1%
if -4.8000000000000001e-5 < x < 1.6200000000000001e-46Initial program 100.0%
Taylor expanded in x around 0 82.4%
neg-mul-182.4%
distribute-neg-frac282.4%
neg-sub082.4%
associate--r-82.4%
metadata-eval82.4%
Simplified82.4%
Final simplification79.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (- 1.0 y))))
(if (<= x -2e+56)
t_0
(if (<= x -6.5e+30)
1.0
(if (<= x -3.1e-9)
(* x (/ 1.0 (- 1.0 y)))
(if (<= x 2.4e-59) (/ y (+ y -1.0)) t_0))))))
double code(double x, double y) {
double t_0 = x / (1.0 - y);
double tmp;
if (x <= -2e+56) {
tmp = t_0;
} else if (x <= -6.5e+30) {
tmp = 1.0;
} else if (x <= -3.1e-9) {
tmp = x * (1.0 / (1.0 - y));
} else if (x <= 2.4e-59) {
tmp = 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 = x / (1.0d0 - y)
if (x <= (-2d+56)) then
tmp = t_0
else if (x <= (-6.5d+30)) then
tmp = 1.0d0
else if (x <= (-3.1d-9)) then
tmp = x * (1.0d0 / (1.0d0 - y))
else if (x <= 2.4d-59) then
tmp = 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 = x / (1.0 - y);
double tmp;
if (x <= -2e+56) {
tmp = t_0;
} else if (x <= -6.5e+30) {
tmp = 1.0;
} else if (x <= -3.1e-9) {
tmp = x * (1.0 / (1.0 - y));
} else if (x <= 2.4e-59) {
tmp = y / (y + -1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = x / (1.0 - y) tmp = 0 if x <= -2e+56: tmp = t_0 elif x <= -6.5e+30: tmp = 1.0 elif x <= -3.1e-9: tmp = x * (1.0 / (1.0 - y)) elif x <= 2.4e-59: tmp = y / (y + -1.0) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(x / Float64(1.0 - y)) tmp = 0.0 if (x <= -2e+56) tmp = t_0; elseif (x <= -6.5e+30) tmp = 1.0; elseif (x <= -3.1e-9) tmp = Float64(x * Float64(1.0 / Float64(1.0 - y))); elseif (x <= 2.4e-59) tmp = Float64(y / Float64(y + -1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = x / (1.0 - y); tmp = 0.0; if (x <= -2e+56) tmp = t_0; elseif (x <= -6.5e+30) tmp = 1.0; elseif (x <= -3.1e-9) tmp = x * (1.0 / (1.0 - y)); elseif (x <= 2.4e-59) tmp = y / (y + -1.0); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2e+56], t$95$0, If[LessEqual[x, -6.5e+30], 1.0, If[LessEqual[x, -3.1e-9], N[(x * N[(1.0 / N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4e-59], N[(y / N[(y + -1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{1 - y}\\
\mathbf{if}\;x \leq -2 \cdot 10^{+56}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{+30}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq -3.1 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \frac{1}{1 - y}\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{-59}:\\
\;\;\;\;\frac{y}{y + -1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -2.00000000000000018e56 or 2.40000000000000015e-59 < x Initial program 99.9%
Taylor expanded in x around inf 76.1%
if -2.00000000000000018e56 < x < -6.5e30Initial program 100.0%
Taylor expanded in y around inf 90.1%
if -6.5e30 < x < -3.10000000000000005e-9Initial program 100.0%
Taylor expanded in x around inf 86.3%
clear-num86.0%
associate-/r/86.3%
Applied egg-rr86.3%
if -3.10000000000000005e-9 < x < 2.40000000000000015e-59Initial program 100.0%
Taylor expanded in x around 0 82.4%
neg-mul-182.4%
distribute-neg-frac282.4%
neg-sub082.4%
associate--r-82.4%
metadata-eval82.4%
Simplified82.4%
Final simplification79.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (- 1.0 y))))
(if (<= y -1.4e+20)
1.0
(if (<= y -2.1e-61)
t_0
(if (<= y -1.3e-114) (- y) (if (<= y 4.4e+45) t_0 1.0))))))
double code(double x, double y) {
double t_0 = x / (1.0 - y);
double tmp;
if (y <= -1.4e+20) {
tmp = 1.0;
} else if (y <= -2.1e-61) {
tmp = t_0;
} else if (y <= -1.3e-114) {
tmp = -y;
} else if (y <= 4.4e+45) {
tmp = t_0;
} else {
tmp = 1.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 - y)
if (y <= (-1.4d+20)) then
tmp = 1.0d0
else if (y <= (-2.1d-61)) then
tmp = t_0
else if (y <= (-1.3d-114)) then
tmp = -y
else if (y <= 4.4d+45) then
tmp = t_0
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (1.0 - y);
double tmp;
if (y <= -1.4e+20) {
tmp = 1.0;
} else if (y <= -2.1e-61) {
tmp = t_0;
} else if (y <= -1.3e-114) {
tmp = -y;
} else if (y <= 4.4e+45) {
tmp = t_0;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): t_0 = x / (1.0 - y) tmp = 0 if y <= -1.4e+20: tmp = 1.0 elif y <= -2.1e-61: tmp = t_0 elif y <= -1.3e-114: tmp = -y elif y <= 4.4e+45: tmp = t_0 else: tmp = 1.0 return tmp
function code(x, y) t_0 = Float64(x / Float64(1.0 - y)) tmp = 0.0 if (y <= -1.4e+20) tmp = 1.0; elseif (y <= -2.1e-61) tmp = t_0; elseif (y <= -1.3e-114) tmp = Float64(-y); elseif (y <= 4.4e+45) tmp = t_0; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) t_0 = x / (1.0 - y); tmp = 0.0; if (y <= -1.4e+20) tmp = 1.0; elseif (y <= -2.1e-61) tmp = t_0; elseif (y <= -1.3e-114) tmp = -y; elseif (y <= 4.4e+45) tmp = t_0; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+20], 1.0, If[LessEqual[y, -2.1e-61], t$95$0, If[LessEqual[y, -1.3e-114], (-y), If[LessEqual[y, 4.4e+45], t$95$0, 1.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{1 - y}\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+20}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-61}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-114}:\\
\;\;\;\;-y\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+45}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.4e20 or 4.4000000000000001e45 < y Initial program 100.0%
Taylor expanded in y around inf 82.0%
if -1.4e20 < y < -2.0999999999999999e-61 or -1.30000000000000007e-114 < y < 4.4000000000000001e45Initial program 100.0%
Taylor expanded in x around inf 72.6%
if -2.0999999999999999e-61 < y < -1.30000000000000007e-114Initial program 100.0%
Taylor expanded in x around 0 73.9%
neg-mul-173.9%
distribute-neg-frac273.9%
neg-sub073.9%
associate--r-73.9%
metadata-eval73.9%
Simplified73.9%
Taylor expanded in y around 0 73.9%
neg-mul-173.9%
Simplified73.9%
(FPCore (x y) :precision binary64 (if (<= y -1.45e-6) 1.0 (if (<= y -7.2e-65) x (if (<= y -1.3e-114) (- y) (if (<= y 1.0) x 1.0)))))
double code(double x, double y) {
double tmp;
if (y <= -1.45e-6) {
tmp = 1.0;
} else if (y <= -7.2e-65) {
tmp = x;
} else if (y <= -1.3e-114) {
tmp = -y;
} else if (y <= 1.0) {
tmp = x;
} else {
tmp = 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.45d-6)) then
tmp = 1.0d0
else if (y <= (-7.2d-65)) then
tmp = x
else if (y <= (-1.3d-114)) then
tmp = -y
else if (y <= 1.0d0) then
tmp = x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.45e-6) {
tmp = 1.0;
} else if (y <= -7.2e-65) {
tmp = x;
} else if (y <= -1.3e-114) {
tmp = -y;
} else if (y <= 1.0) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.45e-6: tmp = 1.0 elif y <= -7.2e-65: tmp = x elif y <= -1.3e-114: tmp = -y elif y <= 1.0: tmp = x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (y <= -1.45e-6) tmp = 1.0; elseif (y <= -7.2e-65) tmp = x; elseif (y <= -1.3e-114) tmp = Float64(-y); elseif (y <= 1.0) tmp = x; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.45e-6) tmp = 1.0; elseif (y <= -7.2e-65) tmp = x; elseif (y <= -1.3e-114) tmp = -y; elseif (y <= 1.0) tmp = x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.45e-6], 1.0, If[LessEqual[y, -7.2e-65], x, If[LessEqual[y, -1.3e-114], (-y), If[LessEqual[y, 1.0], x, 1.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{-6}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{-65}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-114}:\\
\;\;\;\;-y\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.4500000000000001e-6 or 1 < y Initial program 99.9%
Taylor expanded in y around inf 72.0%
if -1.4500000000000001e-6 < y < -7.1999999999999996e-65 or -1.30000000000000007e-114 < y < 1Initial program 100.0%
Taylor expanded in y around 0 73.4%
if -7.1999999999999996e-65 < y < -1.30000000000000007e-114Initial program 100.0%
Taylor expanded in x around 0 73.9%
neg-mul-173.9%
distribute-neg-frac273.9%
neg-sub073.9%
associate--r-73.9%
metadata-eval73.9%
Simplified73.9%
Taylor expanded in y around 0 73.9%
neg-mul-173.9%
Simplified73.9%
(FPCore (x y) :precision binary64 (if (or (<= y -750000000000.0) (not (<= y 6800.0))) (+ 1.0 (/ (- 1.0 x) y)) (/ x (- 1.0 y))))
double code(double x, double y) {
double tmp;
if ((y <= -750000000000.0) || !(y <= 6800.0)) {
tmp = 1.0 + ((1.0 - x) / y);
} else {
tmp = x / (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 <= (-750000000000.0d0)) .or. (.not. (y <= 6800.0d0))) then
tmp = 1.0d0 + ((1.0d0 - x) / y)
else
tmp = x / (1.0d0 - y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -750000000000.0) || !(y <= 6800.0)) {
tmp = 1.0 + ((1.0 - x) / y);
} else {
tmp = x / (1.0 - y);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -750000000000.0) or not (y <= 6800.0): tmp = 1.0 + ((1.0 - x) / y) else: tmp = x / (1.0 - y) return tmp
function code(x, y) tmp = 0.0 if ((y <= -750000000000.0) || !(y <= 6800.0)) tmp = Float64(1.0 + Float64(Float64(1.0 - x) / y)); else tmp = Float64(x / Float64(1.0 - y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -750000000000.0) || ~((y <= 6800.0))) tmp = 1.0 + ((1.0 - x) / y); else tmp = x / (1.0 - y); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -750000000000.0], N[Not[LessEqual[y, 6800.0]], $MachinePrecision]], N[(1.0 + N[(N[(1.0 - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -750000000000 \lor \neg \left(y \leq 6800\right):\\
\;\;\;\;1 + \frac{1 - x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - y}\\
\end{array}
\end{array}
if y < -7.5e11 or 6800 < y Initial program 99.9%
Taylor expanded in y around inf 99.6%
+-commutative99.6%
mul-1-neg99.6%
sub-neg99.6%
div-sub99.6%
Simplified99.6%
if -7.5e11 < y < 6800Initial program 100.0%
Taylor expanded in x around inf 70.0%
Final simplification84.2%
(FPCore (x y) :precision binary64 (if (<= y -1.45e-6) 1.0 (if (<= y 1.0) x 1.0)))
double code(double x, double y) {
double tmp;
if (y <= -1.45e-6) {
tmp = 1.0;
} else if (y <= 1.0) {
tmp = x;
} else {
tmp = 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.45d-6)) then
tmp = 1.0d0
else if (y <= 1.0d0) then
tmp = x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.45e-6) {
tmp = 1.0;
} else if (y <= 1.0) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.45e-6: tmp = 1.0 elif y <= 1.0: tmp = x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (y <= -1.45e-6) tmp = 1.0; elseif (y <= 1.0) tmp = x; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.45e-6) tmp = 1.0; elseif (y <= 1.0) tmp = x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.45e-6], 1.0, If[LessEqual[y, 1.0], x, 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{-6}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.4500000000000001e-6 or 1 < y Initial program 99.9%
Taylor expanded in y around inf 72.0%
if -1.4500000000000001e-6 < y < 1Initial program 100.0%
Taylor expanded in y around 0 69.5%
(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 100.0%
Taylor expanded in y around inf 39.9%
herbie shell --seed 2024108
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, C"
:precision binary64
(/ (- x y) (- 1.0 y)))