
(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 9 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%
Final simplification100.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (- 1.0 y))))
(if (<= y -6.5e+27)
1.0
(if (<= y 6.6e-39)
t_0
(if (<= y 3e-8) (- y) (if (<= y 7.4e+22) t_0 1.0))))))
double code(double x, double y) {
double t_0 = x / (1.0 - y);
double tmp;
if (y <= -6.5e+27) {
tmp = 1.0;
} else if (y <= 6.6e-39) {
tmp = t_0;
} else if (y <= 3e-8) {
tmp = -y;
} else if (y <= 7.4e+22) {
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 <= (-6.5d+27)) then
tmp = 1.0d0
else if (y <= 6.6d-39) then
tmp = t_0
else if (y <= 3d-8) then
tmp = -y
else if (y <= 7.4d+22) 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 <= -6.5e+27) {
tmp = 1.0;
} else if (y <= 6.6e-39) {
tmp = t_0;
} else if (y <= 3e-8) {
tmp = -y;
} else if (y <= 7.4e+22) {
tmp = t_0;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): t_0 = x / (1.0 - y) tmp = 0 if y <= -6.5e+27: tmp = 1.0 elif y <= 6.6e-39: tmp = t_0 elif y <= 3e-8: tmp = -y elif y <= 7.4e+22: 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 <= -6.5e+27) tmp = 1.0; elseif (y <= 6.6e-39) tmp = t_0; elseif (y <= 3e-8) tmp = Float64(-y); elseif (y <= 7.4e+22) 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 <= -6.5e+27) tmp = 1.0; elseif (y <= 6.6e-39) tmp = t_0; elseif (y <= 3e-8) tmp = -y; elseif (y <= 7.4e+22) 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, -6.5e+27], 1.0, If[LessEqual[y, 6.6e-39], t$95$0, If[LessEqual[y, 3e-8], (-y), If[LessEqual[y, 7.4e+22], t$95$0, 1.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{1 - y}\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+27}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-39}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-8}:\\
\;\;\;\;-y\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{+22}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -6.5000000000000005e27 or 7.3999999999999996e22 < y Initial program 100.0%
Taylor expanded in y around inf 79.9%
if -6.5000000000000005e27 < y < 6.5999999999999997e-39 or 2.99999999999999973e-8 < y < 7.3999999999999996e22Initial program 100.0%
Taylor expanded in x around inf 78.5%
if 6.5999999999999997e-39 < y < 2.99999999999999973e-8Initial program 99.8%
Taylor expanded in x around 0 87.6%
neg-mul-187.6%
distribute-neg-frac287.6%
neg-sub087.6%
associate--r-87.6%
metadata-eval87.6%
Simplified87.6%
Taylor expanded in y around 0 81.5%
neg-mul-181.5%
Simplified81.5%
Final simplification79.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- 1.0 (/ (+ x -1.0) y))))
(if (<= y -1050.0)
t_0
(if (<= y 1.15e-37)
(/ x (- 1.0 y))
(if (<= y 15000.0) (/ y (+ y -1.0)) t_0)))))
double code(double x, double y) {
double t_0 = 1.0 - ((x + -1.0) / y);
double tmp;
if (y <= -1050.0) {
tmp = t_0;
} else if (y <= 1.15e-37) {
tmp = x / (1.0 - y);
} else if (y <= 15000.0) {
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 = 1.0d0 - ((x + (-1.0d0)) / y)
if (y <= (-1050.0d0)) then
tmp = t_0
else if (y <= 1.15d-37) then
tmp = x / (1.0d0 - y)
else if (y <= 15000.0d0) 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 = 1.0 - ((x + -1.0) / y);
double tmp;
if (y <= -1050.0) {
tmp = t_0;
} else if (y <= 1.15e-37) {
tmp = x / (1.0 - y);
} else if (y <= 15000.0) {
tmp = y / (y + -1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = 1.0 - ((x + -1.0) / y) tmp = 0 if y <= -1050.0: tmp = t_0 elif y <= 1.15e-37: tmp = x / (1.0 - y) elif y <= 15000.0: tmp = y / (y + -1.0) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(1.0 - Float64(Float64(x + -1.0) / y)) tmp = 0.0 if (y <= -1050.0) tmp = t_0; elseif (y <= 1.15e-37) tmp = Float64(x / Float64(1.0 - y)); elseif (y <= 15000.0) tmp = Float64(y / Float64(y + -1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 - ((x + -1.0) / y); tmp = 0.0; if (y <= -1050.0) tmp = t_0; elseif (y <= 1.15e-37) tmp = x / (1.0 - y); elseif (y <= 15000.0) tmp = y / (y + -1.0); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1050.0], t$95$0, If[LessEqual[y, 1.15e-37], N[(x / N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 15000.0], N[(y / N[(y + -1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - \frac{x + -1}{y}\\
\mathbf{if}\;y \leq -1050:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-37}:\\
\;\;\;\;\frac{x}{1 - y}\\
\mathbf{elif}\;y \leq 15000:\\
\;\;\;\;\frac{y}{y + -1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -1050 or 15000 < y Initial program 100.0%
Taylor expanded in y around inf 99.6%
+-commutative99.6%
mul-1-neg99.6%
unsub-neg99.6%
div-sub99.6%
Simplified99.6%
if -1050 < y < 1.15e-37Initial program 100.0%
Taylor expanded in x around inf 79.9%
if 1.15e-37 < y < 15000Initial program 99.9%
Taylor expanded in x around 0 74.0%
neg-mul-174.0%
distribute-neg-frac274.0%
neg-sub074.0%
associate--r-74.0%
metadata-eval74.0%
Simplified74.0%
Final simplification90.0%
(FPCore (x y) :precision binary64 (if (<= y -1.3) 1.0 (if (<= y 3e-43) x (if (<= y 1.0) (- y) 1.0))))
double code(double x, double y) {
double tmp;
if (y <= -1.3) {
tmp = 1.0;
} else if (y <= 3e-43) {
tmp = x;
} else if (y <= 1.0) {
tmp = -y;
} 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.3d0)) then
tmp = 1.0d0
else if (y <= 3d-43) then
tmp = x
else if (y <= 1.0d0) then
tmp = -y
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.3) {
tmp = 1.0;
} else if (y <= 3e-43) {
tmp = x;
} else if (y <= 1.0) {
tmp = -y;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.3: tmp = 1.0 elif y <= 3e-43: tmp = x elif y <= 1.0: tmp = -y else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (y <= -1.3) tmp = 1.0; elseif (y <= 3e-43) tmp = x; elseif (y <= 1.0) tmp = Float64(-y); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.3) tmp = 1.0; elseif (y <= 3e-43) tmp = x; elseif (y <= 1.0) tmp = -y; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.3], 1.0, If[LessEqual[y, 3e-43], x, If[LessEqual[y, 1.0], (-y), 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-43}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;-y\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.30000000000000004 or 1 < y Initial program 100.0%
Taylor expanded in y around inf 78.1%
if -1.30000000000000004 < y < 3.00000000000000003e-43Initial program 100.0%
Taylor expanded in y around 0 79.4%
if 3.00000000000000003e-43 < y < 1Initial program 99.8%
Taylor expanded in x around 0 71.4%
neg-mul-171.4%
distribute-neg-frac271.4%
neg-sub071.4%
associate--r-71.4%
metadata-eval71.4%
Simplified71.4%
Taylor expanded in y around 0 66.5%
neg-mul-166.5%
Simplified66.5%
Final simplification78.2%
(FPCore (x y) :precision binary64 (if (<= y -0.25) 1.0 (if (<= y 7e-42) (+ x (* x y)) (if (<= y 1.0) (- y) 1.0))))
double code(double x, double y) {
double tmp;
if (y <= -0.25) {
tmp = 1.0;
} else if (y <= 7e-42) {
tmp = x + (x * y);
} else if (y <= 1.0) {
tmp = -y;
} 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 <= (-0.25d0)) then
tmp = 1.0d0
else if (y <= 7d-42) then
tmp = x + (x * y)
else if (y <= 1.0d0) then
tmp = -y
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -0.25) {
tmp = 1.0;
} else if (y <= 7e-42) {
tmp = x + (x * y);
} else if (y <= 1.0) {
tmp = -y;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -0.25: tmp = 1.0 elif y <= 7e-42: tmp = x + (x * y) elif y <= 1.0: tmp = -y else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (y <= -0.25) tmp = 1.0; elseif (y <= 7e-42) tmp = Float64(x + Float64(x * y)); elseif (y <= 1.0) tmp = Float64(-y); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -0.25) tmp = 1.0; elseif (y <= 7e-42) tmp = x + (x * y); elseif (y <= 1.0) tmp = -y; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -0.25], 1.0, If[LessEqual[y, 7e-42], N[(x + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.0], (-y), 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.25:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-42}:\\
\;\;\;\;x + x \cdot y\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;-y\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -0.25 or 1 < y Initial program 100.0%
Taylor expanded in y around inf 78.1%
if -0.25 < y < 7.0000000000000004e-42Initial program 100.0%
Taylor expanded in x around inf 79.9%
Taylor expanded in y around 0 79.6%
*-commutative79.6%
Simplified79.6%
if 7.0000000000000004e-42 < y < 1Initial program 99.8%
Taylor expanded in x around 0 71.4%
neg-mul-171.4%
distribute-neg-frac271.4%
neg-sub071.4%
associate--r-71.4%
metadata-eval71.4%
Simplified71.4%
Taylor expanded in y around 0 66.5%
neg-mul-166.5%
Simplified66.5%
Final simplification78.3%
(FPCore (x y) :precision binary64 (if (or (<= y -1.0) (not (<= y 1.0))) (- 1.0 (/ (+ x -1.0) y)) (+ x (* y (+ x -1.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -1.0) || !(y <= 1.0)) {
tmp = 1.0 - ((x + -1.0) / y);
} else {
tmp = x + (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 = 1.0d0 - ((x + (-1.0d0)) / y)
else
tmp = x + (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 = 1.0 - ((x + -1.0) / y);
} else {
tmp = x + (y * (x + -1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.0) or not (y <= 1.0): tmp = 1.0 - ((x + -1.0) / y) else: tmp = x + (y * (x + -1.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.0) || !(y <= 1.0)) tmp = Float64(1.0 - Float64(Float64(x + -1.0) / y)); else tmp = Float64(x + 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 = 1.0 - ((x + -1.0) / y); else tmp = x + (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[(1.0 - N[(N[(x + -1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + 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):\\
\;\;\;\;1 - \frac{x + -1}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(x + -1\right)\\
\end{array}
\end{array}
if y < -1 or 1 < y Initial program 100.0%
Taylor expanded in y around inf 99.3%
+-commutative99.3%
mul-1-neg99.3%
unsub-neg99.3%
div-sub99.3%
Simplified99.3%
if -1 < y < 1Initial program 100.0%
Taylor expanded in y around 0 98.4%
mul-1-neg98.4%
unsub-neg98.4%
mul-1-neg98.4%
unsub-neg98.4%
Simplified98.4%
Final simplification98.9%
(FPCore (x y) :precision binary64 (if (or (<= y -9.5e-39) (not (<= y 6.2e-38))) (/ y (+ y -1.0)) x))
double code(double x, double y) {
double tmp;
if ((y <= -9.5e-39) || !(y <= 6.2e-38)) {
tmp = y / (y + -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 <= (-9.5d-39)) .or. (.not. (y <= 6.2d-38))) then
tmp = y / (y + (-1.0d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -9.5e-39) || !(y <= 6.2e-38)) {
tmp = y / (y + -1.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -9.5e-39) or not (y <= 6.2e-38): tmp = y / (y + -1.0) else: tmp = x return tmp
function code(x, y) tmp = 0.0 if ((y <= -9.5e-39) || !(y <= 6.2e-38)) tmp = Float64(y / Float64(y + -1.0)); else tmp = x; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -9.5e-39) || ~((y <= 6.2e-38))) tmp = y / (y + -1.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -9.5e-39], N[Not[LessEqual[y, 6.2e-38]], $MachinePrecision]], N[(y / N[(y + -1.0), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{-39} \lor \neg \left(y \leq 6.2 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{y}{y + -1}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.4999999999999999e-39 or 6.19999999999999966e-38 < y Initial program 100.0%
Taylor expanded in x around 0 78.0%
neg-mul-178.0%
distribute-neg-frac278.0%
neg-sub078.0%
associate--r-78.0%
metadata-eval78.0%
Simplified78.0%
if -9.4999999999999999e-39 < y < 6.19999999999999966e-38Initial program 100.0%
Taylor expanded in y around 0 81.9%
Final simplification79.6%
(FPCore (x y) :precision binary64 (if (<= y -0.49) 1.0 (if (<= y 1.0) x 1.0)))
double code(double x, double y) {
double tmp;
if (y <= -0.49) {
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 <= (-0.49d0)) 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 <= -0.49) {
tmp = 1.0;
} else if (y <= 1.0) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -0.49: tmp = 1.0 elif y <= 1.0: tmp = x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (y <= -0.49) 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 <= -0.49) tmp = 1.0; elseif (y <= 1.0) tmp = x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -0.49], 1.0, If[LessEqual[y, 1.0], x, 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.49:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -0.48999999999999999 or 1 < y Initial program 100.0%
Taylor expanded in y around inf 78.1%
if -0.48999999999999999 < y < 1Initial program 100.0%
Taylor expanded in y around 0 74.5%
Final simplification76.4%
(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 43.1%
Final simplification43.1%
herbie shell --seed 2024041
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, C"
:precision binary64
(/ (- x y) (- 1.0 y)))