
(FPCore (x y z) :precision binary64 (+ 1.0 (/ (* 4.0 (- (+ x (* y 0.25)) z)) y)))
double code(double x, double y, double z) {
return 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0 + ((4.0d0 * ((x + (y * 0.25d0)) - z)) / y)
end function
public static double code(double x, double y, double z) {
return 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y);
}
def code(x, y, z): return 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y)
function code(x, y, z) return Float64(1.0 + Float64(Float64(4.0 * Float64(Float64(x + Float64(y * 0.25)) - z)) / y)) end
function tmp = code(x, y, z) tmp = 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y); end
code[x_, y_, z_] := N[(1.0 + N[(N[(4.0 * N[(N[(x + N[(y * 0.25), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{4 \cdot \left(\left(x + y \cdot 0.25\right) - z\right)}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ 1.0 (/ (* 4.0 (- (+ x (* y 0.25)) z)) y)))
double code(double x, double y, double z) {
return 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0 + ((4.0d0 * ((x + (y * 0.25d0)) - z)) / y)
end function
public static double code(double x, double y, double z) {
return 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y);
}
def code(x, y, z): return 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y)
function code(x, y, z) return Float64(1.0 + Float64(Float64(4.0 * Float64(Float64(x + Float64(y * 0.25)) - z)) / y)) end
function tmp = code(x, y, z) tmp = 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y); end
code[x_, y_, z_] := N[(1.0 + N[(N[(4.0 * N[(N[(x + N[(y * 0.25), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{4 \cdot \left(\left(x + y \cdot 0.25\right) - z\right)}{y}
\end{array}
(FPCore (x y z) :precision binary64 (+ (* 4.0 (/ (- x z) y)) 2.0))
double code(double x, double y, double z) {
return (4.0 * ((x - z) / y)) + 2.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (4.0d0 * ((x - z) / y)) + 2.0d0
end function
public static double code(double x, double y, double z) {
return (4.0 * ((x - z) / y)) + 2.0;
}
def code(x, y, z): return (4.0 * ((x - z) / y)) + 2.0
function code(x, y, z) return Float64(Float64(4.0 * Float64(Float64(x - z) / y)) + 2.0) end
function tmp = code(x, y, z) tmp = (4.0 * ((x - z) / y)) + 2.0; end
code[x_, y_, z_] := N[(N[(4.0 * N[(N[(x - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]
\begin{array}{l}
\\
4 \cdot \frac{x - z}{y} + 2
\end{array}
Initial program 99.6%
associate-/l*99.8%
associate--l+99.8%
Simplified99.8%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 1.0 (* -4.0 (/ z y)))))
(if (<= z -2.9e+140)
t_0
(if (<= z -8.5e+56)
2.0
(if (<= z -11000000000000.0)
t_0
(if (<= z 1.25e-222)
(+ 1.0 (/ (* 4.0 x) y))
(if (<= z 5e+68) 2.0 t_0)))))))
double code(double x, double y, double z) {
double t_0 = 1.0 + (-4.0 * (z / y));
double tmp;
if (z <= -2.9e+140) {
tmp = t_0;
} else if (z <= -8.5e+56) {
tmp = 2.0;
} else if (z <= -11000000000000.0) {
tmp = t_0;
} else if (z <= 1.25e-222) {
tmp = 1.0 + ((4.0 * x) / y);
} else if (z <= 5e+68) {
tmp = 2.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 + ((-4.0d0) * (z / y))
if (z <= (-2.9d+140)) then
tmp = t_0
else if (z <= (-8.5d+56)) then
tmp = 2.0d0
else if (z <= (-11000000000000.0d0)) then
tmp = t_0
else if (z <= 1.25d-222) then
tmp = 1.0d0 + ((4.0d0 * x) / y)
else if (z <= 5d+68) then
tmp = 2.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 1.0 + (-4.0 * (z / y));
double tmp;
if (z <= -2.9e+140) {
tmp = t_0;
} else if (z <= -8.5e+56) {
tmp = 2.0;
} else if (z <= -11000000000000.0) {
tmp = t_0;
} else if (z <= 1.25e-222) {
tmp = 1.0 + ((4.0 * x) / y);
} else if (z <= 5e+68) {
tmp = 2.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 1.0 + (-4.0 * (z / y)) tmp = 0 if z <= -2.9e+140: tmp = t_0 elif z <= -8.5e+56: tmp = 2.0 elif z <= -11000000000000.0: tmp = t_0 elif z <= 1.25e-222: tmp = 1.0 + ((4.0 * x) / y) elif z <= 5e+68: tmp = 2.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(1.0 + Float64(-4.0 * Float64(z / y))) tmp = 0.0 if (z <= -2.9e+140) tmp = t_0; elseif (z <= -8.5e+56) tmp = 2.0; elseif (z <= -11000000000000.0) tmp = t_0; elseif (z <= 1.25e-222) tmp = Float64(1.0 + Float64(Float64(4.0 * x) / y)); elseif (z <= 5e+68) tmp = 2.0; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 1.0 + (-4.0 * (z / y)); tmp = 0.0; if (z <= -2.9e+140) tmp = t_0; elseif (z <= -8.5e+56) tmp = 2.0; elseif (z <= -11000000000000.0) tmp = t_0; elseif (z <= 1.25e-222) tmp = 1.0 + ((4.0 * x) / y); elseif (z <= 5e+68) tmp = 2.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 + N[(-4.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+140], t$95$0, If[LessEqual[z, -8.5e+56], 2.0, If[LessEqual[z, -11000000000000.0], t$95$0, If[LessEqual[z, 1.25e-222], N[(1.0 + N[(N[(4.0 * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+68], 2.0, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + -4 \cdot \frac{z}{y}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+140}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{+56}:\\
\;\;\;\;2\\
\mathbf{elif}\;z \leq -11000000000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-222}:\\
\;\;\;\;1 + \frac{4 \cdot x}{y}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+68}:\\
\;\;\;\;2\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -2.8999999999999999e140 or -8.4999999999999998e56 < z < -1.1e13 or 5.0000000000000004e68 < z Initial program 99.0%
associate-/l*99.7%
associate--l+99.7%
Simplified99.7%
Taylor expanded in z around inf 72.7%
*-commutative72.7%
Simplified72.7%
if -2.8999999999999999e140 < z < -8.4999999999999998e56 or 1.25000000000000002e-222 < z < 5.0000000000000004e68Initial program 100.0%
associate-/l*99.8%
associate--l+99.8%
Simplified99.8%
Taylor expanded in y around inf 58.8%
if -1.1e13 < z < 1.25000000000000002e-222Initial program 100.0%
associate-/l*99.9%
associate--l+99.9%
Simplified99.9%
Taylor expanded in x around inf 61.6%
associate-*r/61.6%
*-commutative61.6%
Simplified61.6%
Final simplification65.2%
(FPCore (x y z)
:precision binary64
(if (or (<= z -2.5e+140)
(and (not (<= z -9.5e+56))
(or (<= z -3.8e+30) (not (<= z 1.36e+69)))))
(+ 1.0 (* -4.0 (/ z y)))
2.0))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.5e+140) || (!(z <= -9.5e+56) && ((z <= -3.8e+30) || !(z <= 1.36e+69)))) {
tmp = 1.0 + (-4.0 * (z / y));
} else {
tmp = 2.0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-2.5d+140)) .or. (.not. (z <= (-9.5d+56))) .and. (z <= (-3.8d+30)) .or. (.not. (z <= 1.36d+69))) then
tmp = 1.0d0 + ((-4.0d0) * (z / y))
else
tmp = 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2.5e+140) || (!(z <= -9.5e+56) && ((z <= -3.8e+30) || !(z <= 1.36e+69)))) {
tmp = 1.0 + (-4.0 * (z / y));
} else {
tmp = 2.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2.5e+140) or (not (z <= -9.5e+56) and ((z <= -3.8e+30) or not (z <= 1.36e+69))): tmp = 1.0 + (-4.0 * (z / y)) else: tmp = 2.0 return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2.5e+140) || (!(z <= -9.5e+56) && ((z <= -3.8e+30) || !(z <= 1.36e+69)))) tmp = Float64(1.0 + Float64(-4.0 * Float64(z / y))); else tmp = 2.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2.5e+140) || (~((z <= -9.5e+56)) && ((z <= -3.8e+30) || ~((z <= 1.36e+69))))) tmp = 1.0 + (-4.0 * (z / y)); else tmp = 2.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.5e+140], And[N[Not[LessEqual[z, -9.5e+56]], $MachinePrecision], Or[LessEqual[z, -3.8e+30], N[Not[LessEqual[z, 1.36e+69]], $MachinePrecision]]]], N[(1.0 + N[(-4.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+140} \lor \neg \left(z \leq -9.5 \cdot 10^{+56}\right) \land \left(z \leq -3.8 \cdot 10^{+30} \lor \neg \left(z \leq 1.36 \cdot 10^{+69}\right)\right):\\
\;\;\;\;1 + -4 \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;2\\
\end{array}
\end{array}
if z < -2.50000000000000004e140 or -9.4999999999999997e56 < z < -3.8000000000000001e30 or 1.36000000000000006e69 < z Initial program 99.0%
associate-/l*99.7%
associate--l+99.7%
Simplified99.7%
Taylor expanded in z around inf 74.4%
*-commutative74.4%
Simplified74.4%
if -2.50000000000000004e140 < z < -9.4999999999999997e56 or -3.8000000000000001e30 < z < 1.36000000000000006e69Initial program 100.0%
associate-/l*99.8%
associate--l+99.8%
Simplified99.8%
Taylor expanded in y around inf 51.3%
Final simplification59.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -2.2e+145) (not (<= z 2.9e+74))) (+ 1.0 (* -4.0 (/ z y))) (+ 2.0 (* 4.0 (/ x y)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.2e+145) || !(z <= 2.9e+74)) {
tmp = 1.0 + (-4.0 * (z / y));
} else {
tmp = 2.0 + (4.0 * (x / y));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-2.2d+145)) .or. (.not. (z <= 2.9d+74))) then
tmp = 1.0d0 + ((-4.0d0) * (z / y))
else
tmp = 2.0d0 + (4.0d0 * (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2.2e+145) || !(z <= 2.9e+74)) {
tmp = 1.0 + (-4.0 * (z / y));
} else {
tmp = 2.0 + (4.0 * (x / y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2.2e+145) or not (z <= 2.9e+74): tmp = 1.0 + (-4.0 * (z / y)) else: tmp = 2.0 + (4.0 * (x / y)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2.2e+145) || !(z <= 2.9e+74)) tmp = Float64(1.0 + Float64(-4.0 * Float64(z / y))); else tmp = Float64(2.0 + Float64(4.0 * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2.2e+145) || ~((z <= 2.9e+74))) tmp = 1.0 + (-4.0 * (z / y)); else tmp = 2.0 + (4.0 * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.2e+145], N[Not[LessEqual[z, 2.9e+74]], $MachinePrecision]], N[(1.0 + N[(-4.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 + N[(4.0 * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+145} \lor \neg \left(z \leq 2.9 \cdot 10^{+74}\right):\\
\;\;\;\;1 + -4 \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;2 + 4 \cdot \frac{x}{y}\\
\end{array}
\end{array}
if z < -2.20000000000000009e145 or 2.9000000000000002e74 < z Initial program 98.9%
associate-/l*99.7%
associate--l+99.7%
Simplified99.7%
Taylor expanded in z around inf 75.1%
*-commutative75.1%
Simplified75.1%
if -2.20000000000000009e145 < z < 2.9000000000000002e74Initial program 100.0%
associate-/l*99.8%
associate--l+99.8%
Simplified99.8%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 87.4%
Final simplification83.3%
(FPCore (x y z) :precision binary64 (if (or (<= x -8e+111) (not (<= x 6.4e+50))) (+ 2.0 (* 4.0 (/ x y))) (+ 2.0 (/ (* z -4.0) y))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -8e+111) || !(x <= 6.4e+50)) {
tmp = 2.0 + (4.0 * (x / y));
} else {
tmp = 2.0 + ((z * -4.0) / y);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-8d+111)) .or. (.not. (x <= 6.4d+50))) then
tmp = 2.0d0 + (4.0d0 * (x / y))
else
tmp = 2.0d0 + ((z * (-4.0d0)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -8e+111) || !(x <= 6.4e+50)) {
tmp = 2.0 + (4.0 * (x / y));
} else {
tmp = 2.0 + ((z * -4.0) / y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -8e+111) or not (x <= 6.4e+50): tmp = 2.0 + (4.0 * (x / y)) else: tmp = 2.0 + ((z * -4.0) / y) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -8e+111) || !(x <= 6.4e+50)) tmp = Float64(2.0 + Float64(4.0 * Float64(x / y))); else tmp = Float64(2.0 + Float64(Float64(z * -4.0) / y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -8e+111) || ~((x <= 6.4e+50))) tmp = 2.0 + (4.0 * (x / y)); else tmp = 2.0 + ((z * -4.0) / y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -8e+111], N[Not[LessEqual[x, 6.4e+50]], $MachinePrecision]], N[(2.0 + N[(4.0 * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 + N[(N[(z * -4.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+111} \lor \neg \left(x \leq 6.4 \cdot 10^{+50}\right):\\
\;\;\;\;2 + 4 \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;2 + \frac{z \cdot -4}{y}\\
\end{array}
\end{array}
if x < -7.99999999999999965e111 or 6.39999999999999966e50 < x Initial program 100.0%
associate-/l*99.8%
associate--l+99.8%
Simplified99.8%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 86.7%
if -7.99999999999999965e111 < x < 6.39999999999999966e50Initial program 99.4%
associate-/l*99.8%
associate--l+99.8%
Simplified99.8%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 91.1%
neg-mul-191.1%
distribute-neg-frac91.1%
Simplified91.1%
associate-*r/90.5%
neg-mul-190.5%
associate-*r*90.5%
metadata-eval90.5%
Applied egg-rr90.5%
Final simplification89.1%
(FPCore (x y z) :precision binary64 (if (or (<= x -7e+111) (not (<= x 8.4e+51))) (+ 2.0 (* 4.0 (/ x y))) (- 2.0 (* 4.0 (/ z y)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -7e+111) || !(x <= 8.4e+51)) {
tmp = 2.0 + (4.0 * (x / y));
} else {
tmp = 2.0 - (4.0 * (z / y));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-7d+111)) .or. (.not. (x <= 8.4d+51))) then
tmp = 2.0d0 + (4.0d0 * (x / y))
else
tmp = 2.0d0 - (4.0d0 * (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -7e+111) || !(x <= 8.4e+51)) {
tmp = 2.0 + (4.0 * (x / y));
} else {
tmp = 2.0 - (4.0 * (z / y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -7e+111) or not (x <= 8.4e+51): tmp = 2.0 + (4.0 * (x / y)) else: tmp = 2.0 - (4.0 * (z / y)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -7e+111) || !(x <= 8.4e+51)) tmp = Float64(2.0 + Float64(4.0 * Float64(x / y))); else tmp = Float64(2.0 - Float64(4.0 * Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -7e+111) || ~((x <= 8.4e+51))) tmp = 2.0 + (4.0 * (x / y)); else tmp = 2.0 - (4.0 * (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -7e+111], N[Not[LessEqual[x, 8.4e+51]], $MachinePrecision]], N[(2.0 + N[(4.0 * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 - N[(4.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{+111} \lor \neg \left(x \leq 8.4 \cdot 10^{+51}\right):\\
\;\;\;\;2 + 4 \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;2 - 4 \cdot \frac{z}{y}\\
\end{array}
\end{array}
if x < -7.0000000000000004e111 or 8.4000000000000005e51 < x Initial program 100.0%
associate-/l*99.8%
associate--l+99.8%
Simplified99.8%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 86.7%
if -7.0000000000000004e111 < x < 8.4000000000000005e51Initial program 99.4%
associate-/l*99.8%
associate--l+99.8%
Simplified99.8%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 91.1%
neg-mul-191.1%
distribute-neg-frac91.1%
Simplified91.1%
Final simplification89.5%
(FPCore (x y z) :precision binary64 2.0)
double code(double x, double y, double z) {
return 2.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 2.0d0
end function
public static double code(double x, double y, double z) {
return 2.0;
}
def code(x, y, z): return 2.0
function code(x, y, z) return 2.0 end
function tmp = code(x, y, z) tmp = 2.0; end
code[x_, y_, z_] := 2.0
\begin{array}{l}
\\
2
\end{array}
Initial program 99.6%
associate-/l*99.8%
associate--l+99.8%
Simplified99.8%
Taylor expanded in y around inf 36.2%
Final simplification36.2%
herbie shell --seed 2023230
(FPCore (x y z)
:name "Data.Array.Repa.Algorithms.ColorRamp:rampColorHotToCold from repa-algorithms-3.4.0.1, C"
:precision binary64
(+ 1.0 (/ (* 4.0 (- (+ x (* y 0.25)) z)) y)))