
(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 8 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 (+ (/ (- x z) (* y 0.25)) 2.0))
double code(double x, double y, double z) {
return ((x - z) / (y * 0.25)) + 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 = ((x - z) / (y * 0.25d0)) + 2.0d0
end function
public static double code(double x, double y, double z) {
return ((x - z) / (y * 0.25)) + 2.0;
}
def code(x, y, z): return ((x - z) / (y * 0.25)) + 2.0
function code(x, y, z) return Float64(Float64(Float64(x - z) / Float64(y * 0.25)) + 2.0) end
function tmp = code(x, y, z) tmp = ((x - z) / (y * 0.25)) + 2.0; end
code[x_, y_, z_] := N[(N[(N[(x - z), $MachinePrecision] / N[(y * 0.25), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - z}{y \cdot 0.25} + 2
\end{array}
Initial program 100.0%
+-commutative100.0%
associate-*l/99.8%
+-commutative99.8%
associate--l+99.8%
+-commutative99.8%
distribute-lft-in99.8%
associate-+l+99.8%
associate-*l/99.8%
*-commutative99.8%
associate-*l*99.8%
metadata-eval99.8%
*-rgt-identity99.8%
*-inverses99.8%
metadata-eval99.8%
Simplified99.8%
clear-num99.8%
div-inv99.8%
metadata-eval99.8%
associate-*l/100.0%
*-un-lft-identity100.0%
Applied egg-rr100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(if (or (<= z -2.45e+187)
(and (not (<= z -1.55e+122))
(or (<= z -1.6e+54) (not (<= z 7e+131)))))
(+ 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.45e+187) || (!(z <= -1.55e+122) && ((z <= -1.6e+54) || !(z <= 7e+131)))) {
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.45d+187)) .or. (.not. (z <= (-1.55d+122))) .and. (z <= (-1.6d+54)) .or. (.not. (z <= 7d+131))) 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.45e+187) || (!(z <= -1.55e+122) && ((z <= -1.6e+54) || !(z <= 7e+131)))) {
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.45e+187) or (not (z <= -1.55e+122) and ((z <= -1.6e+54) or not (z <= 7e+131))): 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.45e+187) || (!(z <= -1.55e+122) && ((z <= -1.6e+54) || !(z <= 7e+131)))) 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.45e+187) || (~((z <= -1.55e+122)) && ((z <= -1.6e+54) || ~((z <= 7e+131))))) 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.45e+187], And[N[Not[LessEqual[z, -1.55e+122]], $MachinePrecision], Or[LessEqual[z, -1.6e+54], N[Not[LessEqual[z, 7e+131]], $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.45 \cdot 10^{+187} \lor \neg \left(z \leq -1.55 \cdot 10^{+122}\right) \land \left(z \leq -1.6 \cdot 10^{+54} \lor \neg \left(z \leq 7 \cdot 10^{+131}\right)\right):\\
\;\;\;\;1 + -4 \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;2 + 4 \cdot \frac{x}{y}\\
\end{array}
\end{array}
if z < -2.4500000000000001e187 or -1.54999999999999999e122 < z < -1.6e54 or 6.9999999999999998e131 < z Initial program 100.0%
Taylor expanded in z around inf 79.0%
*-commutative79.0%
Simplified79.0%
if -2.4500000000000001e187 < z < -1.54999999999999999e122 or -1.6e54 < z < 6.9999999999999998e131Initial program 100.0%
+-commutative100.0%
associate-*l/99.9%
+-commutative99.9%
associate--l+99.9%
+-commutative99.9%
distribute-lft-in99.9%
associate-+l+99.9%
associate-*l/99.9%
*-commutative99.9%
associate-*l*99.9%
metadata-eval99.9%
*-rgt-identity99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
clear-num99.9%
div-inv99.9%
metadata-eval99.9%
associate-*l/100.0%
*-un-lft-identity100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 84.8%
Final simplification82.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 1.0 (/ (* x 4.0) y))))
(if (<= x -9.5e+84)
t_0
(if (<= x -6e-203) 2.0 (if (<= x 7e+77) (+ 1.0 (* -4.0 (/ z y))) t_0)))))
double code(double x, double y, double z) {
double t_0 = 1.0 + ((x * 4.0) / y);
double tmp;
if (x <= -9.5e+84) {
tmp = t_0;
} else if (x <= -6e-203) {
tmp = 2.0;
} else if (x <= 7e+77) {
tmp = 1.0 + (-4.0 * (z / y));
} 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 + ((x * 4.0d0) / y)
if (x <= (-9.5d+84)) then
tmp = t_0
else if (x <= (-6d-203)) then
tmp = 2.0d0
else if (x <= 7d+77) then
tmp = 1.0d0 + ((-4.0d0) * (z / y))
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 + ((x * 4.0) / y);
double tmp;
if (x <= -9.5e+84) {
tmp = t_0;
} else if (x <= -6e-203) {
tmp = 2.0;
} else if (x <= 7e+77) {
tmp = 1.0 + (-4.0 * (z / y));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 1.0 + ((x * 4.0) / y) tmp = 0 if x <= -9.5e+84: tmp = t_0 elif x <= -6e-203: tmp = 2.0 elif x <= 7e+77: tmp = 1.0 + (-4.0 * (z / y)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(1.0 + Float64(Float64(x * 4.0) / y)) tmp = 0.0 if (x <= -9.5e+84) tmp = t_0; elseif (x <= -6e-203) tmp = 2.0; elseif (x <= 7e+77) tmp = Float64(1.0 + Float64(-4.0 * Float64(z / y))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 1.0 + ((x * 4.0) / y); tmp = 0.0; if (x <= -9.5e+84) tmp = t_0; elseif (x <= -6e-203) tmp = 2.0; elseif (x <= 7e+77) tmp = 1.0 + (-4.0 * (z / y)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 + N[(N[(x * 4.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.5e+84], t$95$0, If[LessEqual[x, -6e-203], 2.0, If[LessEqual[x, 7e+77], N[(1.0 + N[(-4.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{x \cdot 4}{y}\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{+84}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -6 \cdot 10^{-203}:\\
\;\;\;\;2\\
\mathbf{elif}\;x \leq 7 \cdot 10^{+77}:\\
\;\;\;\;1 + -4 \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -9.49999999999999979e84 or 7.0000000000000003e77 < x Initial program 100.0%
Taylor expanded in x around inf 74.6%
associate-*r/74.6%
Simplified74.6%
if -9.49999999999999979e84 < x < -6.0000000000000002e-203Initial program 100.0%
+-commutative100.0%
associate-*l/100.0%
+-commutative100.0%
associate--l+100.0%
+-commutative100.0%
distribute-lft-in100.0%
associate-+l+100.0%
associate-*l/100.0%
*-commutative100.0%
associate-*l*100.0%
metadata-eval100.0%
*-rgt-identity100.0%
*-inverses100.0%
metadata-eval100.0%
Simplified100.0%
clear-num100.0%
div-inv100.0%
metadata-eval100.0%
associate-*l/100.0%
*-un-lft-identity100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 90.1%
associate-*r/90.1%
Simplified90.1%
Taylor expanded in z around 0 58.7%
if -6.0000000000000002e-203 < x < 7.0000000000000003e77Initial program 100.0%
Taylor expanded in z around inf 59.5%
*-commutative59.5%
Simplified59.5%
Final simplification64.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.56e+35) (not (<= z 9.5e+72))) (+ 1.0 (* -4.0 (/ z y))) 2.0))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.56e+35) || !(z <= 9.5e+72)) {
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 <= (-1.56d+35)) .or. (.not. (z <= 9.5d+72))) 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 <= -1.56e+35) || !(z <= 9.5e+72)) {
tmp = 1.0 + (-4.0 * (z / y));
} else {
tmp = 2.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.56e+35) or not (z <= 9.5e+72): tmp = 1.0 + (-4.0 * (z / y)) else: tmp = 2.0 return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.56e+35) || !(z <= 9.5e+72)) 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 <= -1.56e+35) || ~((z <= 9.5e+72))) tmp = 1.0 + (-4.0 * (z / y)); else tmp = 2.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.56e+35], N[Not[LessEqual[z, 9.5e+72]], $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 -1.56 \cdot 10^{+35} \lor \neg \left(z \leq 9.5 \cdot 10^{+72}\right):\\
\;\;\;\;1 + -4 \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;2\\
\end{array}
\end{array}
if z < -1.56000000000000008e35 or 9.50000000000000054e72 < z Initial program 100.0%
Taylor expanded in z around inf 66.4%
*-commutative66.4%
Simplified66.4%
if -1.56000000000000008e35 < z < 9.50000000000000054e72Initial program 100.0%
+-commutative100.0%
associate-*l/99.9%
+-commutative99.9%
associate--l+99.9%
+-commutative99.9%
distribute-lft-in99.9%
associate-+l+99.9%
associate-*l/99.9%
*-commutative99.9%
associate-*l*99.9%
metadata-eval99.9%
*-rgt-identity99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
clear-num99.9%
div-inv99.9%
metadata-eval99.9%
associate-*l/100.0%
*-un-lft-identity100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 60.6%
associate-*r/60.6%
Simplified60.6%
Taylor expanded in z around 0 48.9%
Final simplification56.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -1.7e+14) (not (<= x 2.5e+77))) (+ 2.0 (* 4.0 (/ x y))) (+ 2.0 (/ (* z -4.0) y))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.7e+14) || !(x <= 2.5e+77)) {
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 <= (-1.7d+14)) .or. (.not. (x <= 2.5d+77))) 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 <= -1.7e+14) || !(x <= 2.5e+77)) {
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 <= -1.7e+14) or not (x <= 2.5e+77): 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 <= -1.7e+14) || !(x <= 2.5e+77)) 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 <= -1.7e+14) || ~((x <= 2.5e+77))) 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, -1.7e+14], N[Not[LessEqual[x, 2.5e+77]], $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 -1.7 \cdot 10^{+14} \lor \neg \left(x \leq 2.5 \cdot 10^{+77}\right):\\
\;\;\;\;2 + 4 \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;2 + \frac{z \cdot -4}{y}\\
\end{array}
\end{array}
if x < -1.7e14 or 2.50000000000000002e77 < x Initial program 100.0%
+-commutative100.0%
associate-*l/99.8%
+-commutative99.8%
associate--l+99.8%
+-commutative99.8%
distribute-lft-in99.8%
associate-+l+99.8%
associate-*l/99.8%
*-commutative99.8%
associate-*l*99.8%
metadata-eval99.8%
*-rgt-identity99.8%
*-inverses99.8%
metadata-eval99.8%
Simplified99.8%
clear-num99.8%
div-inv99.8%
metadata-eval99.8%
associate-*l/100.0%
*-un-lft-identity100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 84.8%
if -1.7e14 < x < 2.50000000000000002e77Initial program 100.0%
+-commutative100.0%
associate-*l/99.8%
+-commutative99.8%
associate--l+99.8%
+-commutative99.8%
distribute-lft-in99.8%
associate-+l+99.8%
associate-*l/99.8%
*-commutative99.8%
associate-*l*99.8%
metadata-eval99.8%
*-rgt-identity99.8%
*-inverses99.8%
metadata-eval99.8%
Simplified99.8%
clear-num99.8%
div-inv99.8%
metadata-eval99.8%
associate-*l/100.0%
*-un-lft-identity100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 91.6%
associate-*r/91.6%
Simplified91.6%
Final simplification88.9%
(FPCore (x y z) :precision binary64 (+ 2.0 (* (- x z) (/ 4.0 y))))
double code(double x, double y, double z) {
return 2.0 + ((x - z) * (4.0 / y));
}
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 + ((x - z) * (4.0d0 / y))
end function
public static double code(double x, double y, double z) {
return 2.0 + ((x - z) * (4.0 / y));
}
def code(x, y, z): return 2.0 + ((x - z) * (4.0 / y))
function code(x, y, z) return Float64(2.0 + Float64(Float64(x - z) * Float64(4.0 / y))) end
function tmp = code(x, y, z) tmp = 2.0 + ((x - z) * (4.0 / y)); end
code[x_, y_, z_] := N[(2.0 + N[(N[(x - z), $MachinePrecision] * N[(4.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 + \left(x - z\right) \cdot \frac{4}{y}
\end{array}
Initial program 100.0%
+-commutative100.0%
associate-*l/99.8%
+-commutative99.8%
associate--l+99.8%
+-commutative99.8%
distribute-lft-in99.8%
associate-+l+99.8%
associate-*l/99.8%
*-commutative99.8%
associate-*l*99.8%
metadata-eval99.8%
*-rgt-identity99.8%
*-inverses99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 1.0)
double code(double x, double y, double z) {
return 1.0;
}
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
end function
public static double code(double x, double y, double z) {
return 1.0;
}
def code(x, y, z): return 1.0
function code(x, y, z) return 1.0 end
function tmp = code(x, y, z) tmp = 1.0; end
code[x_, y_, z_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 100.0%
Taylor expanded in x around inf 39.6%
associate-*r/39.6%
Simplified39.6%
Taylor expanded in x around 0 8.3%
Final simplification8.3%
(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 100.0%
+-commutative100.0%
associate-*l/99.8%
+-commutative99.8%
associate--l+99.8%
+-commutative99.8%
distribute-lft-in99.8%
associate-+l+99.8%
associate-*l/99.8%
*-commutative99.8%
associate-*l*99.8%
metadata-eval99.8%
*-rgt-identity99.8%
*-inverses99.8%
metadata-eval99.8%
Simplified99.8%
clear-num99.8%
div-inv99.8%
metadata-eval99.8%
associate-*l/100.0%
*-un-lft-identity100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 69.4%
associate-*r/69.4%
Simplified69.4%
Taylor expanded in z around 0 34.2%
Final simplification34.2%
herbie shell --seed 2024054
(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)))