
(FPCore (x y z) :precision binary64 (/ (* x (- y z)) y))
double code(double x, double y, double z) {
return (x * (y - 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 = (x * (y - z)) / y
end function
public static double code(double x, double y, double z) {
return (x * (y - z)) / y;
}
def code(x, y, z): return (x * (y - z)) / y
function code(x, y, z) return Float64(Float64(x * Float64(y - z)) / y) end
function tmp = code(x, y, z) tmp = (x * (y - z)) / y; end
code[x_, y_, z_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (* x (- y z)) y))
double code(double x, double y, double z) {
return (x * (y - 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 = (x * (y - z)) / y
end function
public static double code(double x, double y, double z) {
return (x * (y - z)) / y;
}
def code(x, y, z): return (x * (y - z)) / y
function code(x, y, z) return Float64(Float64(x * Float64(y - z)) / y) end
function tmp = code(x, y, z) tmp = (x * (y - z)) / y; end
code[x_, y_, z_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{y}
\end{array}
(FPCore (x y z) :precision binary64 (/ x (/ y (- y z))))
double code(double x, double y, double z) {
return x / (y / (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 = x / (y / (y - z))
end function
public static double code(double x, double y, double z) {
return x / (y / (y - z));
}
def code(x, y, z): return x / (y / (y - z))
function code(x, y, z) return Float64(x / Float64(y / Float64(y - z))) end
function tmp = code(x, y, z) tmp = x / (y / (y - z)); end
code[x_, y_, z_] := N[(x / N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{y}{y - z}}
\end{array}
Initial program 85.0%
associate-/l*96.5%
add-sqr-sqrt44.3%
associate-*l*44.3%
Applied egg-rr44.3%
associate-*r*44.3%
add-sqr-sqrt96.5%
clear-num96.5%
un-div-inv97.3%
Applied egg-rr97.3%
Final simplification97.3%
(FPCore (x y z)
:precision binary64
(if (or (<= z -320000000000.0)
(and (not (<= z 5.2e-105)) (or (<= z 1.85e-78) (not (<= z 0.00022)))))
(* x (/ z (- y)))
x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -320000000000.0) || (!(z <= 5.2e-105) && ((z <= 1.85e-78) || !(z <= 0.00022)))) {
tmp = x * (z / -y);
} else {
tmp = x;
}
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 <= (-320000000000.0d0)) .or. (.not. (z <= 5.2d-105)) .and. (z <= 1.85d-78) .or. (.not. (z <= 0.00022d0))) then
tmp = x * (z / -y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -320000000000.0) || (!(z <= 5.2e-105) && ((z <= 1.85e-78) || !(z <= 0.00022)))) {
tmp = x * (z / -y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -320000000000.0) or (not (z <= 5.2e-105) and ((z <= 1.85e-78) or not (z <= 0.00022))): tmp = x * (z / -y) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -320000000000.0) || (!(z <= 5.2e-105) && ((z <= 1.85e-78) || !(z <= 0.00022)))) tmp = Float64(x * Float64(z / Float64(-y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -320000000000.0) || (~((z <= 5.2e-105)) && ((z <= 1.85e-78) || ~((z <= 0.00022))))) tmp = x * (z / -y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -320000000000.0], And[N[Not[LessEqual[z, 5.2e-105]], $MachinePrecision], Or[LessEqual[z, 1.85e-78], N[Not[LessEqual[z, 0.00022]], $MachinePrecision]]]], N[(x * N[(z / (-y)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -320000000000 \lor \neg \left(z \leq 5.2 \cdot 10^{-105}\right) \land \left(z \leq 1.85 \cdot 10^{-78} \lor \neg \left(z \leq 0.00022\right)\right):\\
\;\;\;\;x \cdot \frac{z}{-y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.2e11 or 5.1999999999999997e-105 < z < 1.85000000000000003e-78 or 2.20000000000000008e-4 < z Initial program 89.2%
associate-/l*93.3%
add-sqr-sqrt42.8%
associate-*l*42.8%
Applied egg-rr42.8%
Taylor expanded in y around 0 77.3%
mul-1-neg77.3%
distribute-frac-neg77.3%
distribute-rgt-neg-in77.3%
associate-*r/75.7%
Simplified75.7%
if -3.2e11 < z < 5.1999999999999997e-105 or 1.85000000000000003e-78 < z < 2.20000000000000008e-4Initial program 80.6%
remove-double-neg80.6%
distribute-frac-neg280.6%
distribute-frac-neg80.6%
distribute-rgt-neg-in80.6%
associate-/l*99.9%
distribute-frac-neg99.9%
distribute-frac-neg299.9%
remove-double-neg99.9%
div-sub99.9%
*-inverses99.9%
Simplified99.9%
Taylor expanded in z around 0 82.0%
Final simplification78.7%
(FPCore (x y z)
:precision binary64
(if (<= z -12500000000000.0)
(* z (/ x (- y)))
(if (or (<= z 5e-103) (and (not (<= z 2e-80)) (<= z 0.011)))
x
(* x (/ z (- y))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -12500000000000.0) {
tmp = z * (x / -y);
} else if ((z <= 5e-103) || (!(z <= 2e-80) && (z <= 0.011))) {
tmp = x;
} 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 (z <= (-12500000000000.0d0)) then
tmp = z * (x / -y)
else if ((z <= 5d-103) .or. (.not. (z <= 2d-80)) .and. (z <= 0.011d0)) then
tmp = x
else
tmp = x * (z / -y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -12500000000000.0) {
tmp = z * (x / -y);
} else if ((z <= 5e-103) || (!(z <= 2e-80) && (z <= 0.011))) {
tmp = x;
} else {
tmp = x * (z / -y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -12500000000000.0: tmp = z * (x / -y) elif (z <= 5e-103) or (not (z <= 2e-80) and (z <= 0.011)): tmp = x else: tmp = x * (z / -y) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -12500000000000.0) tmp = Float64(z * Float64(x / Float64(-y))); elseif ((z <= 5e-103) || (!(z <= 2e-80) && (z <= 0.011))) tmp = x; else tmp = Float64(x * Float64(z / Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -12500000000000.0) tmp = z * (x / -y); elseif ((z <= 5e-103) || (~((z <= 2e-80)) && (z <= 0.011))) tmp = x; else tmp = x * (z / -y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -12500000000000.0], N[(z * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 5e-103], And[N[Not[LessEqual[z, 2e-80]], $MachinePrecision], LessEqual[z, 0.011]]], x, N[(x * N[(z / (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12500000000000:\\
\;\;\;\;z \cdot \frac{x}{-y}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-103} \lor \neg \left(z \leq 2 \cdot 10^{-80}\right) \land z \leq 0.011:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{-y}\\
\end{array}
\end{array}
if z < -1.25e13Initial program 91.4%
remove-double-neg91.4%
distribute-frac-neg291.4%
distribute-frac-neg91.4%
distribute-rgt-neg-in91.4%
associate-/l*91.3%
distribute-frac-neg91.3%
distribute-frac-neg291.3%
remove-double-neg91.3%
div-sub91.4%
*-inverses91.4%
Simplified91.4%
Taylor expanded in z around inf 76.8%
associate-*l/73.5%
associate-*l*73.5%
*-commutative73.5%
associate-*r/73.5%
mul-1-neg73.5%
Simplified73.5%
if -1.25e13 < z < 4.99999999999999966e-103 or 1.99999999999999992e-80 < z < 0.010999999999999999Initial program 80.6%
remove-double-neg80.6%
distribute-frac-neg280.6%
distribute-frac-neg80.6%
distribute-rgt-neg-in80.6%
associate-/l*99.9%
distribute-frac-neg99.9%
distribute-frac-neg299.9%
remove-double-neg99.9%
div-sub99.9%
*-inverses99.9%
Simplified99.9%
Taylor expanded in z around 0 82.0%
if 4.99999999999999966e-103 < z < 1.99999999999999992e-80 or 0.010999999999999999 < z Initial program 87.6%
associate-/l*94.8%
add-sqr-sqrt44.0%
associate-*l*44.0%
Applied egg-rr44.0%
Taylor expanded in y around 0 77.6%
mul-1-neg77.6%
distribute-frac-neg77.6%
distribute-rgt-neg-in77.6%
associate-*r/79.8%
Simplified79.8%
Final simplification79.5%
(FPCore (x y z)
:precision binary64
(if (<= z -150000000000.0)
(* z (/ x (- y)))
(if (or (<= z 6e-103) (and (not (<= z 1.2e-80)) (<= z 0.0085)))
x
(/ x (/ y (- z))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -150000000000.0) {
tmp = z * (x / -y);
} else if ((z <= 6e-103) || (!(z <= 1.2e-80) && (z <= 0.0085))) {
tmp = x;
} else {
tmp = 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 <= (-150000000000.0d0)) then
tmp = z * (x / -y)
else if ((z <= 6d-103) .or. (.not. (z <= 1.2d-80)) .and. (z <= 0.0085d0)) then
tmp = x
else
tmp = x / (y / -z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -150000000000.0) {
tmp = z * (x / -y);
} else if ((z <= 6e-103) || (!(z <= 1.2e-80) && (z <= 0.0085))) {
tmp = x;
} else {
tmp = x / (y / -z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -150000000000.0: tmp = z * (x / -y) elif (z <= 6e-103) or (not (z <= 1.2e-80) and (z <= 0.0085)): tmp = x else: tmp = x / (y / -z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -150000000000.0) tmp = Float64(z * Float64(x / Float64(-y))); elseif ((z <= 6e-103) || (!(z <= 1.2e-80) && (z <= 0.0085))) tmp = x; else tmp = Float64(x / Float64(y / Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -150000000000.0) tmp = z * (x / -y); elseif ((z <= 6e-103) || (~((z <= 1.2e-80)) && (z <= 0.0085))) tmp = x; else tmp = x / (y / -z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -150000000000.0], N[(z * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 6e-103], And[N[Not[LessEqual[z, 1.2e-80]], $MachinePrecision], LessEqual[z, 0.0085]]], x, N[(x / N[(y / (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -150000000000:\\
\;\;\;\;z \cdot \frac{x}{-y}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-103} \lor \neg \left(z \leq 1.2 \cdot 10^{-80}\right) \land z \leq 0.0085:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{-z}}\\
\end{array}
\end{array}
if z < -1.5e11Initial program 91.4%
remove-double-neg91.4%
distribute-frac-neg291.4%
distribute-frac-neg91.4%
distribute-rgt-neg-in91.4%
associate-/l*91.3%
distribute-frac-neg91.3%
distribute-frac-neg291.3%
remove-double-neg91.3%
div-sub91.4%
*-inverses91.4%
Simplified91.4%
Taylor expanded in z around inf 76.8%
associate-*l/73.5%
associate-*l*73.5%
*-commutative73.5%
associate-*r/73.5%
mul-1-neg73.5%
Simplified73.5%
if -1.5e11 < z < 6e-103 or 1.2e-80 < z < 0.0085000000000000006Initial program 80.6%
remove-double-neg80.6%
distribute-frac-neg280.6%
distribute-frac-neg80.6%
distribute-rgt-neg-in80.6%
associate-/l*99.9%
distribute-frac-neg99.9%
distribute-frac-neg299.9%
remove-double-neg99.9%
div-sub99.9%
*-inverses99.9%
Simplified99.9%
Taylor expanded in z around 0 82.0%
if 6e-103 < z < 1.2e-80 or 0.0085000000000000006 < z Initial program 87.6%
associate-/l*94.8%
add-sqr-sqrt44.0%
associate-*l*44.0%
Applied egg-rr44.0%
associate-*r*44.0%
add-sqr-sqrt94.8%
clear-num94.7%
un-div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in y around 0 77.6%
mul-1-neg77.6%
associate-*l/78.7%
associate-/r/80.9%
distribute-neg-frac80.9%
Simplified80.9%
Final simplification79.8%
(FPCore (x y z)
:precision binary64
(if (<= z -340000000.0)
(/ (* x (- z)) y)
(if (or (<= z 2e-103) (and (not (<= z 8.8e-79)) (<= z 0.00145)))
x
(/ x (/ y (- z))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -340000000.0) {
tmp = (x * -z) / y;
} else if ((z <= 2e-103) || (!(z <= 8.8e-79) && (z <= 0.00145))) {
tmp = x;
} else {
tmp = 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 <= (-340000000.0d0)) then
tmp = (x * -z) / y
else if ((z <= 2d-103) .or. (.not. (z <= 8.8d-79)) .and. (z <= 0.00145d0)) then
tmp = x
else
tmp = x / (y / -z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -340000000.0) {
tmp = (x * -z) / y;
} else if ((z <= 2e-103) || (!(z <= 8.8e-79) && (z <= 0.00145))) {
tmp = x;
} else {
tmp = x / (y / -z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -340000000.0: tmp = (x * -z) / y elif (z <= 2e-103) or (not (z <= 8.8e-79) and (z <= 0.00145)): tmp = x else: tmp = x / (y / -z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -340000000.0) tmp = Float64(Float64(x * Float64(-z)) / y); elseif ((z <= 2e-103) || (!(z <= 8.8e-79) && (z <= 0.00145))) tmp = x; else tmp = Float64(x / Float64(y / Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -340000000.0) tmp = (x * -z) / y; elseif ((z <= 2e-103) || (~((z <= 8.8e-79)) && (z <= 0.00145))) tmp = x; else tmp = x / (y / -z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -340000000.0], N[(N[(x * (-z)), $MachinePrecision] / y), $MachinePrecision], If[Or[LessEqual[z, 2e-103], And[N[Not[LessEqual[z, 8.8e-79]], $MachinePrecision], LessEqual[z, 0.00145]]], x, N[(x / N[(y / (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -340000000:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{y}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-103} \lor \neg \left(z \leq 8.8 \cdot 10^{-79}\right) \land z \leq 0.00145:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{-z}}\\
\end{array}
\end{array}
if z < -3.4e8Initial program 91.4%
Taylor expanded in y around 0 76.8%
associate-*r*76.8%
*-commutative76.8%
mul-1-neg76.8%
Simplified76.8%
if -3.4e8 < z < 1.99999999999999992e-103 or 8.7999999999999995e-79 < z < 0.00145Initial program 80.6%
remove-double-neg80.6%
distribute-frac-neg280.6%
distribute-frac-neg80.6%
distribute-rgt-neg-in80.6%
associate-/l*99.9%
distribute-frac-neg99.9%
distribute-frac-neg299.9%
remove-double-neg99.9%
div-sub99.9%
*-inverses99.9%
Simplified99.9%
Taylor expanded in z around 0 82.0%
if 1.99999999999999992e-103 < z < 8.7999999999999995e-79 or 0.00145 < z Initial program 87.6%
associate-/l*94.8%
add-sqr-sqrt44.0%
associate-*l*44.0%
Applied egg-rr44.0%
associate-*r*44.0%
add-sqr-sqrt94.8%
clear-num94.7%
un-div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in y around 0 77.6%
mul-1-neg77.6%
associate-*l/78.7%
associate-/r/80.9%
distribute-neg-frac80.9%
Simplified80.9%
Final simplification80.5%
(FPCore (x y z) :precision binary64 (* x (- 1.0 (/ z y))))
double code(double x, double y, double z) {
return x * (1.0 - (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 = x * (1.0d0 - (z / y))
end function
public static double code(double x, double y, double z) {
return x * (1.0 - (z / y));
}
def code(x, y, z): return x * (1.0 - (z / y))
function code(x, y, z) return Float64(x * Float64(1.0 - Float64(z / y))) end
function tmp = code(x, y, z) tmp = x * (1.0 - (z / y)); end
code[x_, y_, z_] := N[(x * N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(1 - \frac{z}{y}\right)
\end{array}
Initial program 85.0%
remove-double-neg85.0%
distribute-frac-neg285.0%
distribute-frac-neg85.0%
distribute-rgt-neg-in85.0%
associate-/l*96.5%
distribute-frac-neg96.5%
distribute-frac-neg296.5%
remove-double-neg96.5%
div-sub96.5%
*-inverses96.5%
Simplified96.5%
Final simplification96.5%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 85.0%
remove-double-neg85.0%
distribute-frac-neg285.0%
distribute-frac-neg85.0%
distribute-rgt-neg-in85.0%
associate-/l*96.5%
distribute-frac-neg96.5%
distribute-frac-neg296.5%
remove-double-neg96.5%
div-sub96.5%
*-inverses96.5%
Simplified96.5%
Taylor expanded in z around 0 49.6%
Final simplification49.6%
(FPCore (x y z) :precision binary64 (if (< z -2.060202331921739e+104) (- x (/ (* z x) y)) (if (< z 1.6939766013828526e+213) (/ x (/ y (- y z))) (* (- y z) (/ x y)))))
double code(double x, double y, double z) {
double tmp;
if (z < -2.060202331921739e+104) {
tmp = x - ((z * x) / y);
} else if (z < 1.6939766013828526e+213) {
tmp = x / (y / (y - z));
} else {
tmp = (y - z) * (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.060202331921739d+104)) then
tmp = x - ((z * x) / y)
else if (z < 1.6939766013828526d+213) then
tmp = x / (y / (y - z))
else
tmp = (y - z) * (x / y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z < -2.060202331921739e+104) {
tmp = x - ((z * x) / y);
} else if (z < 1.6939766013828526e+213) {
tmp = x / (y / (y - z));
} else {
tmp = (y - z) * (x / y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z < -2.060202331921739e+104: tmp = x - ((z * x) / y) elif z < 1.6939766013828526e+213: tmp = x / (y / (y - z)) else: tmp = (y - z) * (x / y) return tmp
function code(x, y, z) tmp = 0.0 if (z < -2.060202331921739e+104) tmp = Float64(x - Float64(Float64(z * x) / y)); elseif (z < 1.6939766013828526e+213) tmp = Float64(x / Float64(y / Float64(y - z))); else tmp = Float64(Float64(y - z) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z < -2.060202331921739e+104) tmp = x - ((z * x) / y); elseif (z < 1.6939766013828526e+213) tmp = x / (y / (y - z)); else tmp = (y - z) * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Less[z, -2.060202331921739e+104], N[(x - N[(N[(z * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[Less[z, 1.6939766013828526e+213], N[(x / N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z < -2.060202331921739 \cdot 10^{+104}:\\
\;\;\;\;x - \frac{z \cdot x}{y}\\
\mathbf{elif}\;z < 1.6939766013828526 \cdot 10^{+213}:\\
\;\;\;\;\frac{x}{\frac{y}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{y}\\
\end{array}
\end{array}
herbie shell --seed 2024050
(FPCore (x y z)
:name "Diagrams.Backend.Cairo.Internal:setTexture from diagrams-cairo-1.3.0.3"
:precision binary64
:alt
(if (< z -2.060202331921739e+104) (- x (/ (* z x) y)) (if (< z 1.6939766013828526e+213) (/ x (/ y (- y z))) (* (- y z) (/ x y))))
(/ (* x (- y z)) y))