
(FPCore (x y z) :precision binary64 (+ 1.0 (/ (* 4.0 (- (+ x (* y 0.75)) z)) y)))
double code(double x, double y, double z) {
return 1.0 + ((4.0 * ((x + (y * 0.75)) - 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.75d0)) - z)) / y)
end function
public static double code(double x, double y, double z) {
return 1.0 + ((4.0 * ((x + (y * 0.75)) - z)) / y);
}
def code(x, y, z): return 1.0 + ((4.0 * ((x + (y * 0.75)) - z)) / y)
function code(x, y, z) return Float64(1.0 + Float64(Float64(4.0 * Float64(Float64(x + Float64(y * 0.75)) - z)) / y)) end
function tmp = code(x, y, z) tmp = 1.0 + ((4.0 * ((x + (y * 0.75)) - z)) / y); end
code[x_, y_, z_] := N[(1.0 + N[(N[(4.0 * N[(N[(x + N[(y * 0.75), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{4 \cdot \left(\left(x + y \cdot 0.75\right) - z\right)}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ 1.0 (/ (* 4.0 (- (+ x (* y 0.75)) z)) y)))
double code(double x, double y, double z) {
return 1.0 + ((4.0 * ((x + (y * 0.75)) - 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.75d0)) - z)) / y)
end function
public static double code(double x, double y, double z) {
return 1.0 + ((4.0 * ((x + (y * 0.75)) - z)) / y);
}
def code(x, y, z): return 1.0 + ((4.0 * ((x + (y * 0.75)) - z)) / y)
function code(x, y, z) return Float64(1.0 + Float64(Float64(4.0 * Float64(Float64(x + Float64(y * 0.75)) - z)) / y)) end
function tmp = code(x, y, z) tmp = 1.0 + ((4.0 * ((x + (y * 0.75)) - z)) / y); end
code[x_, y_, z_] := N[(1.0 + N[(N[(4.0 * N[(N[(x + N[(y * 0.75), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{4 \cdot \left(\left(x + y \cdot 0.75\right) - z\right)}{y}
\end{array}
(FPCore (x y z) :precision binary64 (fma 4.0 (+ 0.75 (/ (- x z) y)) 1.0))
double code(double x, double y, double z) {
return fma(4.0, (0.75 + ((x - z) / y)), 1.0);
}
function code(x, y, z) return fma(4.0, Float64(0.75 + Float64(Float64(x - z) / y)), 1.0) end
code[x_, y_, z_] := N[(4.0 * N[(0.75 + N[(N[(x - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(4, 0.75 + \frac{x - z}{y}, 1\right)
\end{array}
Initial program 99.2%
+-commutative99.2%
associate-/l*100.0%
fma-define100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
sub-neg100.0%
associate--r+100.0%
div-sub100.0%
sub-neg100.0%
associate-*l/100.0%
*-inverses100.0%
metadata-eval100.0%
distribute-frac-neg2100.0%
remove-double-neg100.0%
distribute-neg-out100.0%
+-commutative100.0%
sub-neg100.0%
distribute-frac-neg100.0%
distribute-frac-neg2100.0%
remove-double-neg100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (* z -4.0) y)))
(if (<= z -5.6e+68)
t_0
(if (<= z 3.1e-247) (* 4.0 (/ x y)) (if (<= z 4.6e+112) 4.0 t_0)))))
double code(double x, double y, double z) {
double t_0 = (z * -4.0) / y;
double tmp;
if (z <= -5.6e+68) {
tmp = t_0;
} else if (z <= 3.1e-247) {
tmp = 4.0 * (x / y);
} else if (z <= 4.6e+112) {
tmp = 4.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 = (z * (-4.0d0)) / y
if (z <= (-5.6d+68)) then
tmp = t_0
else if (z <= 3.1d-247) then
tmp = 4.0d0 * (x / y)
else if (z <= 4.6d+112) then
tmp = 4.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (z * -4.0) / y;
double tmp;
if (z <= -5.6e+68) {
tmp = t_0;
} else if (z <= 3.1e-247) {
tmp = 4.0 * (x / y);
} else if (z <= 4.6e+112) {
tmp = 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (z * -4.0) / y tmp = 0 if z <= -5.6e+68: tmp = t_0 elif z <= 3.1e-247: tmp = 4.0 * (x / y) elif z <= 4.6e+112: tmp = 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(z * -4.0) / y) tmp = 0.0 if (z <= -5.6e+68) tmp = t_0; elseif (z <= 3.1e-247) tmp = Float64(4.0 * Float64(x / y)); elseif (z <= 4.6e+112) tmp = 4.0; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (z * -4.0) / y; tmp = 0.0; if (z <= -5.6e+68) tmp = t_0; elseif (z <= 3.1e-247) tmp = 4.0 * (x / y); elseif (z <= 4.6e+112) tmp = 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * -4.0), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -5.6e+68], t$95$0, If[LessEqual[z, 3.1e-247], N[(4.0 * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+112], 4.0, t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{z \cdot -4}{y}\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+68}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-247}:\\
\;\;\;\;4 \cdot \frac{x}{y}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+112}:\\
\;\;\;\;4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -5.6e68 or 4.5999999999999999e112 < z Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in z around inf 79.6%
*-commutative79.6%
associate-*l/79.6%
Simplified79.6%
if -5.6e68 < z < 3.10000000000000015e-247Initial program 98.1%
associate-/l*100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in x around inf 54.1%
*-commutative54.1%
Simplified54.1%
if 3.10000000000000015e-247 < z < 4.5999999999999999e112Initial program 99.9%
associate-/l*99.9%
associate--l+99.9%
Simplified99.9%
Taylor expanded in y around inf 51.9%
Final simplification62.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.4e+119) (not (<= z 5.6e+113))) (/ (* z -4.0) y) (* 4.0 (/ (+ x y) y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.4e+119) || !(z <= 5.6e+113)) {
tmp = (z * -4.0) / y;
} else {
tmp = 4.0 * ((x + y) / 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 <= (-5.4d+119)) .or. (.not. (z <= 5.6d+113))) then
tmp = (z * (-4.0d0)) / y
else
tmp = 4.0d0 * ((x + y) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.4e+119) || !(z <= 5.6e+113)) {
tmp = (z * -4.0) / y;
} else {
tmp = 4.0 * ((x + y) / y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.4e+119) or not (z <= 5.6e+113): tmp = (z * -4.0) / y else: tmp = 4.0 * ((x + y) / y) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.4e+119) || !(z <= 5.6e+113)) tmp = Float64(Float64(z * -4.0) / y); else tmp = Float64(4.0 * Float64(Float64(x + y) / y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.4e+119) || ~((z <= 5.6e+113))) tmp = (z * -4.0) / y; else tmp = 4.0 * ((x + y) / y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.4e+119], N[Not[LessEqual[z, 5.6e+113]], $MachinePrecision]], N[(N[(z * -4.0), $MachinePrecision] / y), $MachinePrecision], N[(4.0 * N[(N[(x + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+119} \lor \neg \left(z \leq 5.6 \cdot 10^{+113}\right):\\
\;\;\;\;\frac{z \cdot -4}{y}\\
\mathbf{else}:\\
\;\;\;\;4 \cdot \frac{x + y}{y}\\
\end{array}
\end{array}
if z < -5.3999999999999997e119 or 5.59999999999999995e113 < z Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in z around inf 82.4%
*-commutative82.4%
associate-*l/82.4%
Simplified82.4%
if -5.3999999999999997e119 < z < 5.59999999999999995e113Initial program 98.8%
associate-/l*99.9%
associate--l+99.9%
Simplified99.9%
Taylor expanded in y around 0 98.8%
distribute-lft-out98.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 87.1%
Final simplification85.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -2e+55) (not (<= z 3.3e+111))) (* 4.0 (/ (- x z) y)) (* 4.0 (/ (+ x y) y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2e+55) || !(z <= 3.3e+111)) {
tmp = 4.0 * ((x - z) / y);
} else {
tmp = 4.0 * ((x + y) / 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 <= (-2d+55)) .or. (.not. (z <= 3.3d+111))) then
tmp = 4.0d0 * ((x - z) / y)
else
tmp = 4.0d0 * ((x + y) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2e+55) || !(z <= 3.3e+111)) {
tmp = 4.0 * ((x - z) / y);
} else {
tmp = 4.0 * ((x + y) / y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2e+55) or not (z <= 3.3e+111): tmp = 4.0 * ((x - z) / y) else: tmp = 4.0 * ((x + y) / y) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2e+55) || !(z <= 3.3e+111)) tmp = Float64(4.0 * Float64(Float64(x - z) / y)); else tmp = Float64(4.0 * Float64(Float64(x + y) / y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2e+55) || ~((z <= 3.3e+111))) tmp = 4.0 * ((x - z) / y); else tmp = 4.0 * ((x + y) / y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2e+55], N[Not[LessEqual[z, 3.3e+111]], $MachinePrecision]], N[(4.0 * N[(N[(x - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(4.0 * N[(N[(x + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+55} \lor \neg \left(z \leq 3.3 \cdot 10^{+111}\right):\\
\;\;\;\;4 \cdot \frac{x - z}{y}\\
\mathbf{else}:\\
\;\;\;\;4 \cdot \frac{x + y}{y}\\
\end{array}
\end{array}
if z < -2.00000000000000002e55 or 3.3000000000000001e111 < z Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in y around 0 88.8%
*-commutative88.8%
Simplified88.8%
if -2.00000000000000002e55 < z < 3.3000000000000001e111Initial program 98.7%
associate-/l*99.9%
associate--l+99.9%
Simplified99.9%
Taylor expanded in y around 0 98.8%
distribute-lft-out98.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 88.7%
Final simplification88.7%
(FPCore (x y z) :precision binary64 (if (<= x -3.8e+19) (+ 4.0 (/ (* 4.0 x) y)) (if (<= x 8.3e+52) (+ 4.0 (/ (* z -4.0) y)) (* 4.0 (/ (- x z) y)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -3.8e+19) {
tmp = 4.0 + ((4.0 * x) / y);
} else if (x <= 8.3e+52) {
tmp = 4.0 + ((z * -4.0) / y);
} else {
tmp = 4.0 * ((x - 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 <= (-3.8d+19)) then
tmp = 4.0d0 + ((4.0d0 * x) / y)
else if (x <= 8.3d+52) then
tmp = 4.0d0 + ((z * (-4.0d0)) / y)
else
tmp = 4.0d0 * ((x - z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -3.8e+19) {
tmp = 4.0 + ((4.0 * x) / y);
} else if (x <= 8.3e+52) {
tmp = 4.0 + ((z * -4.0) / y);
} else {
tmp = 4.0 * ((x - z) / y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -3.8e+19: tmp = 4.0 + ((4.0 * x) / y) elif x <= 8.3e+52: tmp = 4.0 + ((z * -4.0) / y) else: tmp = 4.0 * ((x - z) / y) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -3.8e+19) tmp = Float64(4.0 + Float64(Float64(4.0 * x) / y)); elseif (x <= 8.3e+52) tmp = Float64(4.0 + Float64(Float64(z * -4.0) / y)); else tmp = Float64(4.0 * Float64(Float64(x - z) / y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -3.8e+19) tmp = 4.0 + ((4.0 * x) / y); elseif (x <= 8.3e+52) tmp = 4.0 + ((z * -4.0) / y); else tmp = 4.0 * ((x - z) / y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -3.8e+19], N[(4.0 + N[(N[(4.0 * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.3e+52], N[(4.0 + N[(N[(z * -4.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(4.0 * N[(N[(x - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{+19}:\\
\;\;\;\;4 + \frac{4 \cdot x}{y}\\
\mathbf{elif}\;x \leq 8.3 \cdot 10^{+52}:\\
\;\;\;\;4 + \frac{z \cdot -4}{y}\\
\mathbf{else}:\\
\;\;\;\;4 \cdot \frac{x - z}{y}\\
\end{array}
\end{array}
if x < -3.8e19Initial program 99.9%
+-commutative99.9%
associate-/l*99.9%
fma-define99.9%
associate--l+99.9%
+-commutative99.9%
remove-double-neg99.9%
sub-neg99.9%
associate--r+99.9%
div-sub99.9%
sub-neg99.9%
associate-*l/100.0%
*-inverses100.0%
metadata-eval100.0%
distribute-frac-neg2100.0%
remove-double-neg100.0%
distribute-neg-out100.0%
+-commutative100.0%
sub-neg100.0%
distribute-frac-neg100.0%
distribute-frac-neg2100.0%
remove-double-neg100.0%
Simplified100.0%
Taylor expanded in z around 0 88.4%
distribute-lft-in88.4%
metadata-eval88.4%
associate-+r+88.4%
metadata-eval88.4%
*-commutative88.4%
associate-*l/88.4%
Simplified88.4%
if -3.8e19 < x < 8.29999999999999994e52Initial program 99.2%
+-commutative99.2%
associate-/l*100.0%
fma-define100.0%
associate--l+100.0%
+-commutative100.0%
remove-double-neg100.0%
sub-neg100.0%
associate--r+100.0%
div-sub100.0%
sub-neg100.0%
associate-*l/100.0%
*-inverses100.0%
metadata-eval100.0%
distribute-frac-neg2100.0%
remove-double-neg100.0%
distribute-neg-out100.0%
+-commutative100.0%
sub-neg100.0%
distribute-frac-neg100.0%
distribute-frac-neg2100.0%
remove-double-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 93.1%
sub-neg93.1%
distribute-rgt-in93.1%
metadata-eval93.1%
associate-+r+93.1%
metadata-eval93.1%
neg-mul-193.1%
*-commutative93.1%
associate-*l*93.1%
metadata-eval93.1%
associate-*l/93.1%
Simplified93.1%
if 8.29999999999999994e52 < x Initial program 98.3%
associate-/l*100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in y around 0 83.3%
*-commutative83.3%
Simplified83.3%
Final simplification89.7%
(FPCore (x y z) :precision binary64 (if (<= y -3.8e+35) 4.0 (if (<= y 1.35e+95) (* 4.0 (/ x y)) 4.0)))
double code(double x, double y, double z) {
double tmp;
if (y <= -3.8e+35) {
tmp = 4.0;
} else if (y <= 1.35e+95) {
tmp = 4.0 * (x / y);
} else {
tmp = 4.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 (y <= (-3.8d+35)) then
tmp = 4.0d0
else if (y <= 1.35d+95) then
tmp = 4.0d0 * (x / y)
else
tmp = 4.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -3.8e+35) {
tmp = 4.0;
} else if (y <= 1.35e+95) {
tmp = 4.0 * (x / y);
} else {
tmp = 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -3.8e+35: tmp = 4.0 elif y <= 1.35e+95: tmp = 4.0 * (x / y) else: tmp = 4.0 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -3.8e+35) tmp = 4.0; elseif (y <= 1.35e+95) tmp = Float64(4.0 * Float64(x / y)); else tmp = 4.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -3.8e+35) tmp = 4.0; elseif (y <= 1.35e+95) tmp = 4.0 * (x / y); else tmp = 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -3.8e+35], 4.0, If[LessEqual[y, 1.35e+95], N[(4.0 * N[(x / y), $MachinePrecision]), $MachinePrecision], 4.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+35}:\\
\;\;\;\;4\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+95}:\\
\;\;\;\;4 \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;4\\
\end{array}
\end{array}
if y < -3.8e35 or 1.35e95 < y Initial program 98.0%
associate-/l*99.9%
associate--l+99.9%
Simplified99.9%
Taylor expanded in y around inf 66.6%
if -3.8e35 < y < 1.35e95Initial program 100.0%
associate-/l*100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in x around inf 49.4%
*-commutative49.4%
Simplified49.4%
Final simplification56.2%
(FPCore (x y z) :precision binary64 (* 4.0 (/ (+ (- x z) y) y)))
double code(double x, double y, double z) {
return 4.0 * (((x - z) + y) / y);
}
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) / y)
end function
public static double code(double x, double y, double z) {
return 4.0 * (((x - z) + y) / y);
}
def code(x, y, z): return 4.0 * (((x - z) + y) / y)
function code(x, y, z) return Float64(4.0 * Float64(Float64(Float64(x - z) + y) / y)) end
function tmp = code(x, y, z) tmp = 4.0 * (((x - z) + y) / y); end
code[x_, y_, z_] := N[(4.0 * N[(N[(N[(x - z), $MachinePrecision] + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
4 \cdot \frac{\left(x - z\right) + y}{y}
\end{array}
Initial program 99.2%
associate-/l*100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in y around 0 99.2%
distribute-lft-out99.2%
associate-/l*100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z) :precision binary64 4.0)
double code(double x, double y, double z) {
return 4.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
end function
public static double code(double x, double y, double z) {
return 4.0;
}
def code(x, y, z): return 4.0
function code(x, y, z) return 4.0 end
function tmp = code(x, y, z) tmp = 4.0; end
code[x_, y_, z_] := 4.0
\begin{array}{l}
\\
4
\end{array}
Initial program 99.2%
associate-/l*100.0%
associate--l+100.0%
Simplified100.0%
Taylor expanded in y around inf 32.6%
Final simplification32.6%
herbie shell --seed 2024074
(FPCore (x y z)
:name "Data.Array.Repa.Algorithms.ColorRamp:rampColorHotToCold from repa-algorithms-3.4.0.1, A"
:precision binary64
(+ 1.0 (/ (* 4.0 (- (+ x (* y 0.75)) z)) y)))