
(FPCore (x y z) :precision binary64 (/ (* 4.0 (- (- x y) (* z 0.5))) z))
double code(double x, double y, double z) {
return (4.0 * ((x - y) - (z * 0.5))) / z;
}
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 - y) - (z * 0.5d0))) / z
end function
public static double code(double x, double y, double z) {
return (4.0 * ((x - y) - (z * 0.5))) / z;
}
def code(x, y, z): return (4.0 * ((x - y) - (z * 0.5))) / z
function code(x, y, z) return Float64(Float64(4.0 * Float64(Float64(x - y) - Float64(z * 0.5))) / z) end
function tmp = code(x, y, z) tmp = (4.0 * ((x - y) - (z * 0.5))) / z; end
code[x_, y_, z_] := N[(N[(4.0 * N[(N[(x - y), $MachinePrecision] - N[(z * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{4 \cdot \left(\left(x - y\right) - z \cdot 0.5\right)}{z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (* 4.0 (- (- x y) (* z 0.5))) z))
double code(double x, double y, double z) {
return (4.0 * ((x - y) - (z * 0.5))) / z;
}
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 - y) - (z * 0.5d0))) / z
end function
public static double code(double x, double y, double z) {
return (4.0 * ((x - y) - (z * 0.5))) / z;
}
def code(x, y, z): return (4.0 * ((x - y) - (z * 0.5))) / z
function code(x, y, z) return Float64(Float64(4.0 * Float64(Float64(x - y) - Float64(z * 0.5))) / z) end
function tmp = code(x, y, z) tmp = (4.0 * ((x - y) - (z * 0.5))) / z; end
code[x_, y_, z_] := N[(N[(4.0 * N[(N[(x - y), $MachinePrecision] - N[(z * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{4 \cdot \left(\left(x - y\right) - z \cdot 0.5\right)}{z}
\end{array}
(FPCore (x y z) :precision binary64 (- (* 4.0 (/ (- x y) z)) 2.0))
double code(double x, double y, double z) {
return (4.0 * ((x - y) / z)) - 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 - y) / z)) - 2.0d0
end function
public static double code(double x, double y, double z) {
return (4.0 * ((x - y) / z)) - 2.0;
}
def code(x, y, z): return (4.0 * ((x - y) / z)) - 2.0
function code(x, y, z) return Float64(Float64(4.0 * Float64(Float64(x - y) / z)) - 2.0) end
function tmp = code(x, y, z) tmp = (4.0 * ((x - y) / z)) - 2.0; end
code[x_, y_, z_] := N[(N[(4.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]
\begin{array}{l}
\\
4 \cdot \frac{x - y}{z} - 2
\end{array}
Initial program 100.0%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
associate-+l-99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(if (<= z -4e+78)
-2.0
(if (<= z 4.1e+49)
(* 4.0 (/ x z))
(if (<= z 9.5e+125) (/ (* -4.0 y) z) -2.0))))
double code(double x, double y, double z) {
double tmp;
if (z <= -4e+78) {
tmp = -2.0;
} else if (z <= 4.1e+49) {
tmp = 4.0 * (x / z);
} else if (z <= 9.5e+125) {
tmp = (-4.0 * y) / z;
} 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 <= (-4d+78)) then
tmp = -2.0d0
else if (z <= 4.1d+49) then
tmp = 4.0d0 * (x / z)
else if (z <= 9.5d+125) then
tmp = ((-4.0d0) * y) / z
else
tmp = -2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -4e+78) {
tmp = -2.0;
} else if (z <= 4.1e+49) {
tmp = 4.0 * (x / z);
} else if (z <= 9.5e+125) {
tmp = (-4.0 * y) / z;
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4e+78: tmp = -2.0 elif z <= 4.1e+49: tmp = 4.0 * (x / z) elif z <= 9.5e+125: tmp = (-4.0 * y) / z else: tmp = -2.0 return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4e+78) tmp = -2.0; elseif (z <= 4.1e+49) tmp = Float64(4.0 * Float64(x / z)); elseif (z <= 9.5e+125) tmp = Float64(Float64(-4.0 * y) / z); else tmp = -2.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4e+78) tmp = -2.0; elseif (z <= 4.1e+49) tmp = 4.0 * (x / z); elseif (z <= 9.5e+125) tmp = (-4.0 * y) / z; else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4e+78], -2.0, If[LessEqual[z, 4.1e+49], N[(4.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+125], N[(N[(-4.0 * y), $MachinePrecision] / z), $MachinePrecision], -2.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+78}:\\
\;\;\;\;-2\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+49}:\\
\;\;\;\;4 \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+125}:\\
\;\;\;\;\frac{-4 \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
if z < -4.00000000000000003e78 or 9.50000000000000041e125 < z Initial program 100.0%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
associate-+l-99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 68.6%
if -4.00000000000000003e78 < z < 4.1e49Initial program 100.0%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
associate-+l-99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 57.1%
if 4.1e49 < z < 9.50000000000000041e125Initial program 100.0%
associate-*l/99.4%
cancel-sign-sub-inv99.4%
associate-+l-99.4%
distribute-lft-neg-out99.4%
distribute-rgt-neg-in99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 59.7%
*-commutative59.7%
associate-*l/59.7%
Simplified59.7%
Final simplification61.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -8.5e+69) (not (<= z 1.1e+127))) (- (* 4.0 (/ x z)) 2.0) (* 4.0 (/ (- x y) z))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -8.5e+69) || !(z <= 1.1e+127)) {
tmp = (4.0 * (x / z)) - 2.0;
} else {
tmp = 4.0 * ((x - y) / z);
}
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 <= (-8.5d+69)) .or. (.not. (z <= 1.1d+127))) then
tmp = (4.0d0 * (x / z)) - 2.0d0
else
tmp = 4.0d0 * ((x - y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -8.5e+69) || !(z <= 1.1e+127)) {
tmp = (4.0 * (x / z)) - 2.0;
} else {
tmp = 4.0 * ((x - y) / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -8.5e+69) or not (z <= 1.1e+127): tmp = (4.0 * (x / z)) - 2.0 else: tmp = 4.0 * ((x - y) / z) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -8.5e+69) || !(z <= 1.1e+127)) tmp = Float64(Float64(4.0 * Float64(x / z)) - 2.0); else tmp = Float64(4.0 * Float64(Float64(x - y) / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -8.5e+69) || ~((z <= 1.1e+127))) tmp = (4.0 * (x / z)) - 2.0; else tmp = 4.0 * ((x - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -8.5e+69], N[Not[LessEqual[z, 1.1e+127]], $MachinePrecision]], N[(N[(4.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision], N[(4.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+69} \lor \neg \left(z \leq 1.1 \cdot 10^{+127}\right):\\
\;\;\;\;4 \cdot \frac{x}{z} - 2\\
\mathbf{else}:\\
\;\;\;\;4 \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if z < -8.5000000000000002e69 or 1.1000000000000001e127 < z Initial program 100.0%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
associate-+l-99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around inf 83.9%
*-commutative83.9%
Simplified83.9%
if -8.5000000000000002e69 < z < 1.1000000000000001e127Initial program 100.0%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
associate-+l-99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 90.0%
Final simplification87.8%
(FPCore (x y z) :precision binary64 (if (<= z -3.35e+158) -2.0 (if (<= z 3.1e+151) (* 4.0 (/ (- x y) z)) -2.0)))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.35e+158) {
tmp = -2.0;
} else if (z <= 3.1e+151) {
tmp = 4.0 * ((x - y) / z);
} 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 <= (-3.35d+158)) then
tmp = -2.0d0
else if (z <= 3.1d+151) then
tmp = 4.0d0 * ((x - y) / z)
else
tmp = -2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3.35e+158) {
tmp = -2.0;
} else if (z <= 3.1e+151) {
tmp = 4.0 * ((x - y) / z);
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.35e+158: tmp = -2.0 elif z <= 3.1e+151: tmp = 4.0 * ((x - y) / z) else: tmp = -2.0 return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.35e+158) tmp = -2.0; elseif (z <= 3.1e+151) tmp = Float64(4.0 * Float64(Float64(x - y) / z)); else tmp = -2.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3.35e+158) tmp = -2.0; elseif (z <= 3.1e+151) tmp = 4.0 * ((x - y) / z); else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.35e+158], -2.0, If[LessEqual[z, 3.1e+151], N[(4.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], -2.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.35 \cdot 10^{+158}:\\
\;\;\;\;-2\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+151}:\\
\;\;\;\;4 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
if z < -3.3499999999999998e158 or 3.1000000000000002e151 < z Initial program 100.0%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
associate-+l-99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 82.9%
if -3.3499999999999998e158 < z < 3.1000000000000002e151Initial program 100.0%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
associate-+l-99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 84.9%
Final simplification84.5%
(FPCore (x y z) :precision binary64 (if (<= x -2.25e+54) (- (* 4.0 (/ x z)) 2.0) (if (<= x 2.05e-22) (- (/ (* -4.0 y) z) 2.0) (* 4.0 (/ (- x y) z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.25e+54) {
tmp = (4.0 * (x / z)) - 2.0;
} else if (x <= 2.05e-22) {
tmp = ((-4.0 * y) / z) - 2.0;
} else {
tmp = 4.0 * ((x - y) / z);
}
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 <= (-2.25d+54)) then
tmp = (4.0d0 * (x / z)) - 2.0d0
else if (x <= 2.05d-22) then
tmp = (((-4.0d0) * y) / z) - 2.0d0
else
tmp = 4.0d0 * ((x - y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.25e+54) {
tmp = (4.0 * (x / z)) - 2.0;
} else if (x <= 2.05e-22) {
tmp = ((-4.0 * y) / z) - 2.0;
} else {
tmp = 4.0 * ((x - y) / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.25e+54: tmp = (4.0 * (x / z)) - 2.0 elif x <= 2.05e-22: tmp = ((-4.0 * y) / z) - 2.0 else: tmp = 4.0 * ((x - y) / z) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.25e+54) tmp = Float64(Float64(4.0 * Float64(x / z)) - 2.0); elseif (x <= 2.05e-22) tmp = Float64(Float64(Float64(-4.0 * y) / z) - 2.0); else tmp = Float64(4.0 * Float64(Float64(x - y) / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.25e+54) tmp = (4.0 * (x / z)) - 2.0; elseif (x <= 2.05e-22) tmp = ((-4.0 * y) / z) - 2.0; else tmp = 4.0 * ((x - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.25e+54], N[(N[(4.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision], If[LessEqual[x, 2.05e-22], N[(N[(N[(-4.0 * y), $MachinePrecision] / z), $MachinePrecision] - 2.0), $MachinePrecision], N[(4.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.25 \cdot 10^{+54}:\\
\;\;\;\;4 \cdot \frac{x}{z} - 2\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{-22}:\\
\;\;\;\;\frac{-4 \cdot y}{z} - 2\\
\mathbf{else}:\\
\;\;\;\;4 \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if x < -2.24999999999999992e54Initial program 100.0%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
associate-+l-99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around inf 89.6%
*-commutative89.6%
Simplified89.6%
if -2.24999999999999992e54 < x < 2.05e-22Initial program 100.0%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
associate-+l-99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around 0 92.5%
associate-*r/92.5%
Simplified92.5%
if 2.05e-22 < x Initial program 99.9%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
associate-+l-99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 88.1%
Final simplification90.6%
(FPCore (x y z) :precision binary64 (if (<= z -1.7e+78) -2.0 (if (<= z 2.9e+150) (* 4.0 (/ x z)) -2.0)))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.7e+78) {
tmp = -2.0;
} else if (z <= 2.9e+150) {
tmp = 4.0 * (x / z);
} 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.7d+78)) then
tmp = -2.0d0
else if (z <= 2.9d+150) then
tmp = 4.0d0 * (x / z)
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.7e+78) {
tmp = -2.0;
} else if (z <= 2.9e+150) {
tmp = 4.0 * (x / z);
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.7e+78: tmp = -2.0 elif z <= 2.9e+150: tmp = 4.0 * (x / z) else: tmp = -2.0 return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.7e+78) tmp = -2.0; elseif (z <= 2.9e+150) tmp = Float64(4.0 * Float64(x / z)); else tmp = -2.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.7e+78) tmp = -2.0; elseif (z <= 2.9e+150) tmp = 4.0 * (x / z); else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.7e+78], -2.0, If[LessEqual[z, 2.9e+150], N[(4.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], -2.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+78}:\\
\;\;\;\;-2\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+150}:\\
\;\;\;\;4 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
if z < -1.70000000000000004e78 or 2.90000000000000011e150 < z Initial program 100.0%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
associate-+l-99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 70.1%
if -1.70000000000000004e78 < z < 2.90000000000000011e150Initial program 100.0%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
associate-+l-99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 53.8%
Final simplification59.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%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
associate-+l-99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 31.8%
Final simplification31.8%
(FPCore (x y z) :precision binary64 (- (* 4.0 (/ x z)) (+ 2.0 (* 4.0 (/ y z)))))
double code(double x, double y, double z) {
return (4.0 * (x / z)) - (2.0 + (4.0 * (y / z)));
}
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)) - (2.0d0 + (4.0d0 * (y / z)))
end function
public static double code(double x, double y, double z) {
return (4.0 * (x / z)) - (2.0 + (4.0 * (y / z)));
}
def code(x, y, z): return (4.0 * (x / z)) - (2.0 + (4.0 * (y / z)))
function code(x, y, z) return Float64(Float64(4.0 * Float64(x / z)) - Float64(2.0 + Float64(4.0 * Float64(y / z)))) end
function tmp = code(x, y, z) tmp = (4.0 * (x / z)) - (2.0 + (4.0 * (y / z))); end
code[x_, y_, z_] := N[(N[(4.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(2.0 + N[(4.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
4 \cdot \frac{x}{z} - \left(2 + 4 \cdot \frac{y}{z}\right)
\end{array}
herbie shell --seed 2024034
(FPCore (x y z)
:name "Data.Array.Repa.Algorithms.ColorRamp:rampColorHotToCold from repa-algorithms-3.4.0.1, B"
:precision binary64
:herbie-target
(- (* 4.0 (/ x z)) (+ 2.0 (* 4.0 (/ y z))))
(/ (* 4.0 (- (- x y) (* z 0.5))) z))