
(FPCore (x y z) :precision binary64 (/ (+ x (* y (- z x))) z))
double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x + (y * (z - x))) / z
end function
public static double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
def code(x, y, z): return (x + (y * (z - x))) / z
function code(x, y, z) return Float64(Float64(x + Float64(y * Float64(z - x))) / z) end
function tmp = code(x, y, z) tmp = (x + (y * (z - x))) / z; end
code[x_, y_, z_] := N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y \cdot \left(z - x\right)}{z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (+ x (* y (- z x))) z))
double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x + (y * (z - x))) / z
end function
public static double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
def code(x, y, z): return (x + (y * (z - x))) / z
function code(x, y, z) return Float64(Float64(x + Float64(y * Float64(z - x))) / z) end
function tmp = code(x, y, z) tmp = (x + (y * (z - x))) / z; end
code[x_, y_, z_] := N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y \cdot \left(z - x\right)}{z}
\end{array}
(FPCore (x y z) :precision binary64 (if (or (<= z -8.5e+47) (not (<= z 1e-7))) (+ (/ x z) (* (- 1.0 (/ x z)) y)) (/ (+ x (* y (- z x))) z)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -8.5e+47) || !(z <= 1e-7)) {
tmp = (x / z) + ((1.0 - (x / z)) * y);
} else {
tmp = (x + (y * (z - x))) / 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+47)) .or. (.not. (z <= 1d-7))) then
tmp = (x / z) + ((1.0d0 - (x / z)) * y)
else
tmp = (x + (y * (z - x))) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -8.5e+47) || !(z <= 1e-7)) {
tmp = (x / z) + ((1.0 - (x / z)) * y);
} else {
tmp = (x + (y * (z - x))) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -8.5e+47) or not (z <= 1e-7): tmp = (x / z) + ((1.0 - (x / z)) * y) else: tmp = (x + (y * (z - x))) / z return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -8.5e+47) || !(z <= 1e-7)) tmp = Float64(Float64(x / z) + Float64(Float64(1.0 - Float64(x / z)) * y)); else tmp = Float64(Float64(x + Float64(y * Float64(z - x))) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -8.5e+47) || ~((z <= 1e-7))) tmp = (x / z) + ((1.0 - (x / z)) * y); else tmp = (x + (y * (z - x))) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -8.5e+47], N[Not[LessEqual[z, 1e-7]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] + N[(N[(1.0 - N[(x / z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+47} \lor \neg \left(z \leq 10^{-7}\right):\\
\;\;\;\;\frac{x}{z} + \left(1 - \frac{x}{z}\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \left(z - x\right)}{z}\\
\end{array}
\end{array}
if z < -8.5000000000000008e47 or 9.9999999999999995e-8 < z Initial program 78.8%
Taylor expanded in y around 0 100.0%
if -8.5000000000000008e47 < z < 9.9999999999999995e-8Initial program 99.9%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (if (or (<= y -10000000000000.0) (not (<= y 4e+49))) (* (- 1.0 (/ x z)) y) (/ (+ x (* y (- z x))) z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -10000000000000.0) || !(y <= 4e+49)) {
tmp = (1.0 - (x / z)) * y;
} else {
tmp = (x + (y * (z - x))) / 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 ((y <= (-10000000000000.0d0)) .or. (.not. (y <= 4d+49))) then
tmp = (1.0d0 - (x / z)) * y
else
tmp = (x + (y * (z - x))) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -10000000000000.0) || !(y <= 4e+49)) {
tmp = (1.0 - (x / z)) * y;
} else {
tmp = (x + (y * (z - x))) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -10000000000000.0) or not (y <= 4e+49): tmp = (1.0 - (x / z)) * y else: tmp = (x + (y * (z - x))) / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -10000000000000.0) || !(y <= 4e+49)) tmp = Float64(Float64(1.0 - Float64(x / z)) * y); else tmp = Float64(Float64(x + Float64(y * Float64(z - x))) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -10000000000000.0) || ~((y <= 4e+49))) tmp = (1.0 - (x / z)) * y; else tmp = (x + (y * (z - x))) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -10000000000000.0], N[Not[LessEqual[y, 4e+49]], $MachinePrecision]], N[(N[(1.0 - N[(x / z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -10000000000000 \lor \neg \left(y \leq 4 \cdot 10^{+49}\right):\\
\;\;\;\;\left(1 - \frac{x}{z}\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \left(z - x\right)}{z}\\
\end{array}
\end{array}
if y < -1e13 or 3.99999999999999979e49 < y Initial program 79.9%
Taylor expanded in y around 0 89.3%
Taylor expanded in y around inf 99.9%
if -1e13 < y < 3.99999999999999979e49Initial program 100.0%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (if (or (<= y -1600000.0) (not (<= y 1.0))) (* (- 1.0 (/ x z)) y) (+ (/ x z) y)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1600000.0) || !(y <= 1.0)) {
tmp = (1.0 - (x / z)) * y;
} else {
tmp = (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 ((y <= (-1600000.0d0)) .or. (.not. (y <= 1.0d0))) then
tmp = (1.0d0 - (x / z)) * y
else
tmp = (x / z) + y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1600000.0) || !(y <= 1.0)) {
tmp = (1.0 - (x / z)) * y;
} else {
tmp = (x / z) + y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1600000.0) or not (y <= 1.0): tmp = (1.0 - (x / z)) * y else: tmp = (x / z) + y return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1600000.0) || !(y <= 1.0)) tmp = Float64(Float64(1.0 - Float64(x / z)) * y); else tmp = Float64(Float64(x / z) + y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1600000.0) || ~((y <= 1.0))) tmp = (1.0 - (x / z)) * y; else tmp = (x / z) + y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1600000.0], N[Not[LessEqual[y, 1.0]], $MachinePrecision]], N[(N[(1.0 - N[(x / z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(x / z), $MachinePrecision] + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1600000 \lor \neg \left(y \leq 1\right):\\
\;\;\;\;\left(1 - \frac{x}{z}\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} + y\\
\end{array}
\end{array}
if y < -1.6e6 or 1 < y Initial program 82.0%
Taylor expanded in y around 0 85.6%
Taylor expanded in y around inf 99.4%
if -1.6e6 < y < 1Initial program 100.0%
Taylor expanded in y around 0 93.1%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around 0 99.6%
+-commutative99.6%
Simplified99.6%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.05e-56) (not (<= y 1.35e-6))) (* z (/ y z)) (/ x z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.05e-56) || !(y <= 1.35e-6)) {
tmp = z * (y / z);
} else {
tmp = x / 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 ((y <= (-1.05d-56)) .or. (.not. (y <= 1.35d-6))) then
tmp = z * (y / z)
else
tmp = x / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.05e-56) || !(y <= 1.35e-6)) {
tmp = z * (y / z);
} else {
tmp = x / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.05e-56) or not (y <= 1.35e-6): tmp = z * (y / z) else: tmp = x / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.05e-56) || !(y <= 1.35e-6)) tmp = Float64(z * Float64(y / z)); else tmp = Float64(x / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.05e-56) || ~((y <= 1.35e-6))) tmp = z * (y / z); else tmp = x / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.05e-56], N[Not[LessEqual[y, 1.35e-6]], $MachinePrecision]], N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-56} \lor \neg \left(y \leq 1.35 \cdot 10^{-6}\right):\\
\;\;\;\;z \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z}\\
\end{array}
\end{array}
if y < -1.05000000000000003e-56 or 1.34999999999999999e-6 < y Initial program 83.8%
Taylor expanded in y around inf 80.5%
Taylor expanded in z around inf 34.0%
associate-/l*45.0%
associate-/r/52.3%
Applied egg-rr52.3%
if -1.05000000000000003e-56 < y < 1.34999999999999999e-6Initial program 100.0%
Taylor expanded in y around 0 82.7%
Final simplification66.1%
(FPCore (x y z) :precision binary64 (if (<= y -1.05e+30) (* (/ x z) (- y)) (if (<= y 1.0) (+ (/ x z) y) (- y (/ x z)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.05e+30) {
tmp = (x / z) * -y;
} else if (y <= 1.0) {
tmp = (x / z) + y;
} else {
tmp = y - (x / 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 (y <= (-1.05d+30)) then
tmp = (x / z) * -y
else if (y <= 1.0d0) then
tmp = (x / z) + y
else
tmp = y - (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1.05e+30) {
tmp = (x / z) * -y;
} else if (y <= 1.0) {
tmp = (x / z) + y;
} else {
tmp = y - (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.05e+30: tmp = (x / z) * -y elif y <= 1.0: tmp = (x / z) + y else: tmp = y - (x / z) return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.05e+30) tmp = Float64(Float64(x / z) * Float64(-y)); elseif (y <= 1.0) tmp = Float64(Float64(x / z) + y); else tmp = Float64(y - Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.05e+30) tmp = (x / z) * -y; elseif (y <= 1.0) tmp = (x / z) + y; else tmp = y - (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.05e+30], N[(N[(x / z), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[y, 1.0], N[(N[(x / z), $MachinePrecision] + y), $MachinePrecision], N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+30}:\\
\;\;\;\;\frac{x}{z} \cdot \left(-y\right)\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\frac{x}{z} + y\\
\mathbf{else}:\\
\;\;\;\;y - \frac{x}{z}\\
\end{array}
\end{array}
if y < -1.05e30Initial program 90.8%
Taylor expanded in y around 0 99.9%
Taylor expanded in y around inf 99.9%
Taylor expanded in x around inf 64.5%
mul-1-neg64.5%
distribute-frac-neg64.5%
Simplified64.5%
if -1.05e30 < y < 1Initial program 100.0%
Taylor expanded in y around 0 93.2%
Taylor expanded in x around 0 98.9%
Taylor expanded in y around 0 98.9%
+-commutative98.9%
Simplified98.9%
if 1 < y Initial program 74.8%
Taylor expanded in y around 0 74.5%
Taylor expanded in x around 0 44.6%
*-un-lft-identity44.6%
div-inv44.6%
add-sqr-sqrt31.1%
sqrt-unprod58.1%
sqr-neg58.1%
sqrt-unprod27.7%
add-sqr-sqrt70.6%
cancel-sign-sub-inv70.6%
div-inv70.6%
Applied egg-rr70.6%
Final simplification84.1%
(FPCore (x y z) :precision binary64 (if (<= y -5.6e-55) y (if (<= y 0.49) (/ x z) y)))
double code(double x, double y, double z) {
double tmp;
if (y <= -5.6e-55) {
tmp = y;
} else if (y <= 0.49) {
tmp = x / z;
} else {
tmp = 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 (y <= (-5.6d-55)) then
tmp = y
else if (y <= 0.49d0) then
tmp = x / z
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -5.6e-55) {
tmp = y;
} else if (y <= 0.49) {
tmp = x / z;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -5.6e-55: tmp = y elif y <= 0.49: tmp = x / z else: tmp = y return tmp
function code(x, y, z) tmp = 0.0 if (y <= -5.6e-55) tmp = y; elseif (y <= 0.49) tmp = Float64(x / z); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -5.6e-55) tmp = y; elseif (y <= 0.49) tmp = x / z; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -5.6e-55], y, If[LessEqual[y, 0.49], N[(x / z), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{-55}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 0.49:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -5.59999999999999968e-55 or 0.48999999999999999 < y Initial program 83.8%
Taylor expanded in x around 0 45.0%
if -5.59999999999999968e-55 < y < 0.48999999999999999Initial program 100.0%
Taylor expanded in y around 0 82.7%
Final simplification62.1%
(FPCore (x y z) :precision binary64 (if (<= y 1.0) (+ (/ x z) y) (* z (/ y z))))
double code(double x, double y, double z) {
double tmp;
if (y <= 1.0) {
tmp = (x / z) + y;
} else {
tmp = z * (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 (y <= 1.0d0) then
tmp = (x / z) + y
else
tmp = z * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 1.0) {
tmp = (x / z) + y;
} else {
tmp = z * (y / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 1.0: tmp = (x / z) + y else: tmp = z * (y / z) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 1.0) tmp = Float64(Float64(x / z) + y); else tmp = Float64(z * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 1.0) tmp = (x / z) + y; else tmp = z * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 1.0], N[(N[(x / z), $MachinePrecision] + y), $MachinePrecision], N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1:\\
\;\;\;\;\frac{x}{z} + y\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < 1Initial program 97.4%
Taylor expanded in y around 0 95.1%
Taylor expanded in x around 0 84.1%
Taylor expanded in y around 0 84.1%
+-commutative84.1%
Simplified84.1%
if 1 < y Initial program 74.8%
Taylor expanded in y around inf 74.4%
Taylor expanded in z around inf 28.2%
associate-/l*45.7%
associate-/r/55.0%
Applied egg-rr55.0%
Final simplification76.1%
(FPCore (x y z) :precision binary64 (if (<= y 1.0) (+ (/ x z) y) (- y (/ x z))))
double code(double x, double y, double z) {
double tmp;
if (y <= 1.0) {
tmp = (x / z) + y;
} else {
tmp = y - (x / 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 (y <= 1.0d0) then
tmp = (x / z) + y
else
tmp = y - (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 1.0) {
tmp = (x / z) + y;
} else {
tmp = y - (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 1.0: tmp = (x / z) + y else: tmp = y - (x / z) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 1.0) tmp = Float64(Float64(x / z) + y); else tmp = Float64(y - Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 1.0) tmp = (x / z) + y; else tmp = y - (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 1.0], N[(N[(x / z), $MachinePrecision] + y), $MachinePrecision], N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1:\\
\;\;\;\;\frac{x}{z} + y\\
\mathbf{else}:\\
\;\;\;\;y - \frac{x}{z}\\
\end{array}
\end{array}
if y < 1Initial program 97.4%
Taylor expanded in y around 0 95.1%
Taylor expanded in x around 0 84.1%
Taylor expanded in y around 0 84.1%
+-commutative84.1%
Simplified84.1%
if 1 < y Initial program 74.8%
Taylor expanded in y around 0 74.5%
Taylor expanded in x around 0 44.6%
*-un-lft-identity44.6%
div-inv44.6%
add-sqr-sqrt31.1%
sqrt-unprod58.1%
sqr-neg58.1%
sqrt-unprod27.7%
add-sqr-sqrt70.6%
cancel-sign-sub-inv70.6%
div-inv70.6%
Applied egg-rr70.6%
Final simplification80.4%
(FPCore (x y z) :precision binary64 y)
double code(double x, double y, double z) {
return y;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = y
end function
public static double code(double x, double y, double z) {
return y;
}
def code(x, y, z): return y
function code(x, y, z) return y end
function tmp = code(x, y, z) tmp = y; end
code[x_, y_, z_] := y
\begin{array}{l}
\\
y
\end{array}
Initial program 91.1%
Taylor expanded in x around 0 33.0%
Final simplification33.0%
(FPCore (x y z) :precision binary64 (- (+ y (/ x z)) (/ y (/ z x))))
double code(double x, double y, double z) {
return (y + (x / z)) - (y / (z / x));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (y + (x / z)) - (y / (z / x))
end function
public static double code(double x, double y, double z) {
return (y + (x / z)) - (y / (z / x));
}
def code(x, y, z): return (y + (x / z)) - (y / (z / x))
function code(x, y, z) return Float64(Float64(y + Float64(x / z)) - Float64(y / Float64(z / x))) end
function tmp = code(x, y, z) tmp = (y + (x / z)) - (y / (z / x)); end
code[x_, y_, z_] := N[(N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y + \frac{x}{z}\right) - \frac{y}{\frac{z}{x}}
\end{array}
herbie shell --seed 2023200
(FPCore (x y z)
:name "Diagrams.Backend.Rasterific:rasterificRadialGradient from diagrams-rasterific-1.3.1.3"
:precision binary64
:herbie-target
(- (+ y (/ x z)) (/ y (/ z x)))
(/ (+ x (* y (- z x))) z))