
(FPCore (x y z) :precision binary64 (/ (+ x y) (- 1.0 (/ y z))))
double code(double x, double y, double z) {
return (x + y) / (1.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 = (x + y) / (1.0d0 - (y / z))
end function
public static double code(double x, double y, double z) {
return (x + y) / (1.0 - (y / z));
}
def code(x, y, z): return (x + y) / (1.0 - (y / z))
function code(x, y, z) return Float64(Float64(x + y) / Float64(1.0 - Float64(y / z))) end
function tmp = code(x, y, z) tmp = (x + y) / (1.0 - (y / z)); end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y}{1 - \frac{y}{z}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (+ x y) (- 1.0 (/ y z))))
double code(double x, double y, double z) {
return (x + y) / (1.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 = (x + y) / (1.0d0 - (y / z))
end function
public static double code(double x, double y, double z) {
return (x + y) / (1.0 - (y / z));
}
def code(x, y, z): return (x + y) / (1.0 - (y / z))
function code(x, y, z) return Float64(Float64(x + y) / Float64(1.0 - Float64(y / z))) end
function tmp = code(x, y, z) tmp = (x + y) / (1.0 - (y / z)); end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y}{1 - \frac{y}{z}}
\end{array}
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x y) (- 1.0 (/ y z)))))
(if (or (<= t_0 -2e-266) (not (<= t_0 5e-253)))
t_0
(- (- z) (/ z (/ y x))))))
double code(double x, double y, double z) {
double t_0 = (x + y) / (1.0 - (y / z));
double tmp;
if ((t_0 <= -2e-266) || !(t_0 <= 5e-253)) {
tmp = t_0;
} else {
tmp = -z - (z / (y / 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) :: t_0
real(8) :: tmp
t_0 = (x + y) / (1.0d0 - (y / z))
if ((t_0 <= (-2d-266)) .or. (.not. (t_0 <= 5d-253))) then
tmp = t_0
else
tmp = -z - (z / (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + y) / (1.0 - (y / z));
double tmp;
if ((t_0 <= -2e-266) || !(t_0 <= 5e-253)) {
tmp = t_0;
} else {
tmp = -z - (z / (y / x));
}
return tmp;
}
def code(x, y, z): t_0 = (x + y) / (1.0 - (y / z)) tmp = 0 if (t_0 <= -2e-266) or not (t_0 <= 5e-253): tmp = t_0 else: tmp = -z - (z / (y / x)) return tmp
function code(x, y, z) t_0 = Float64(Float64(x + y) / Float64(1.0 - Float64(y / z))) tmp = 0.0 if ((t_0 <= -2e-266) || !(t_0 <= 5e-253)) tmp = t_0; else tmp = Float64(Float64(-z) - Float64(z / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + y) / (1.0 - (y / z)); tmp = 0.0; if ((t_0 <= -2e-266) || ~((t_0 <= 5e-253))) tmp = t_0; else tmp = -z - (z / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + y), $MachinePrecision] / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -2e-266], N[Not[LessEqual[t$95$0, 5e-253]], $MachinePrecision]], t$95$0, N[((-z) - N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + y}{1 - \frac{y}{z}}\\
\mathbf{if}\;t_0 \leq -2 \cdot 10^{-266} \lor \neg \left(t_0 \leq 5 \cdot 10^{-253}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) - \frac{z}{\frac{y}{x}}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) < -2e-266 or 4.99999999999999971e-253 < (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) Initial program 99.8%
if -2e-266 < (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) < 4.99999999999999971e-253Initial program 29.0%
Taylor expanded in y around inf 100.0%
sub-neg100.0%
mul-1-neg100.0%
unsub-neg100.0%
associate-+l-100.0%
mul-1-neg100.0%
distribute-frac-neg100.0%
mul-1-neg100.0%
div-sub100.0%
sub-neg100.0%
mul-1-neg100.0%
remove-double-neg100.0%
unpow2100.0%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
associate-/l*100.0%
Simplified100.0%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- 1.0 (/ y z))))
(if (<= y -4.8e+40)
(* z (- -1.0 (/ x y)))
(if (<= y 1.66e-164)
(/ x t_0)
(if (<= y 1.62e+40)
(+ x y)
(if (or (<= y 7e+149) (not (<= y 2.45e+191)))
(- (- z) (* z (/ x y)))
(/ y t_0)))))))
double code(double x, double y, double z) {
double t_0 = 1.0 - (y / z);
double tmp;
if (y <= -4.8e+40) {
tmp = z * (-1.0 - (x / y));
} else if (y <= 1.66e-164) {
tmp = x / t_0;
} else if (y <= 1.62e+40) {
tmp = x + y;
} else if ((y <= 7e+149) || !(y <= 2.45e+191)) {
tmp = -z - (z * (x / y));
} else {
tmp = y / 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 - (y / z)
if (y <= (-4.8d+40)) then
tmp = z * ((-1.0d0) - (x / y))
else if (y <= 1.66d-164) then
tmp = x / t_0
else if (y <= 1.62d+40) then
tmp = x + y
else if ((y <= 7d+149) .or. (.not. (y <= 2.45d+191))) then
tmp = -z - (z * (x / y))
else
tmp = y / t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 1.0 - (y / z);
double tmp;
if (y <= -4.8e+40) {
tmp = z * (-1.0 - (x / y));
} else if (y <= 1.66e-164) {
tmp = x / t_0;
} else if (y <= 1.62e+40) {
tmp = x + y;
} else if ((y <= 7e+149) || !(y <= 2.45e+191)) {
tmp = -z - (z * (x / y));
} else {
tmp = y / t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 1.0 - (y / z) tmp = 0 if y <= -4.8e+40: tmp = z * (-1.0 - (x / y)) elif y <= 1.66e-164: tmp = x / t_0 elif y <= 1.62e+40: tmp = x + y elif (y <= 7e+149) or not (y <= 2.45e+191): tmp = -z - (z * (x / y)) else: tmp = y / t_0 return tmp
function code(x, y, z) t_0 = Float64(1.0 - Float64(y / z)) tmp = 0.0 if (y <= -4.8e+40) tmp = Float64(z * Float64(-1.0 - Float64(x / y))); elseif (y <= 1.66e-164) tmp = Float64(x / t_0); elseif (y <= 1.62e+40) tmp = Float64(x + y); elseif ((y <= 7e+149) || !(y <= 2.45e+191)) tmp = Float64(Float64(-z) - Float64(z * Float64(x / y))); else tmp = Float64(y / t_0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 1.0 - (y / z); tmp = 0.0; if (y <= -4.8e+40) tmp = z * (-1.0 - (x / y)); elseif (y <= 1.66e-164) tmp = x / t_0; elseif (y <= 1.62e+40) tmp = x + y; elseif ((y <= 7e+149) || ~((y <= 2.45e+191))) tmp = -z - (z * (x / y)); else tmp = y / t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+40], N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.66e-164], N[(x / t$95$0), $MachinePrecision], If[LessEqual[y, 1.62e+40], N[(x + y), $MachinePrecision], If[Or[LessEqual[y, 7e+149], N[Not[LessEqual[y, 2.45e+191]], $MachinePrecision]], N[((-z) - N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - \frac{y}{z}\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+40}:\\
\;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq 1.66 \cdot 10^{-164}:\\
\;\;\;\;\frac{x}{t_0}\\
\mathbf{elif}\;y \leq 1.62 \cdot 10^{+40}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+149} \lor \neg \left(y \leq 2.45 \cdot 10^{+191}\right):\\
\;\;\;\;\left(-z\right) - z \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t_0}\\
\end{array}
\end{array}
if y < -4.8e40Initial program 66.8%
Taylor expanded in y around inf 82.7%
sub-neg82.7%
mul-1-neg82.7%
unsub-neg82.7%
associate-+l-82.7%
mul-1-neg82.7%
distribute-frac-neg82.7%
mul-1-neg82.7%
div-sub82.7%
sub-neg82.7%
mul-1-neg82.7%
remove-double-neg82.7%
unpow282.7%
distribute-lft-out82.7%
Simplified82.7%
Taylor expanded in z around 0 88.0%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in z around 0 88.0%
associate-*r/90.3%
Simplified90.3%
Taylor expanded in z around 0 90.3%
associate-*r*90.3%
distribute-lft-in90.3%
metadata-eval90.3%
mul-1-neg90.3%
sub-neg90.3%
*-commutative90.3%
Simplified90.3%
if -4.8e40 < y < 1.6599999999999999e-164Initial program 99.8%
Taylor expanded in x around inf 76.5%
if 1.6599999999999999e-164 < y < 1.62e40Initial program 99.9%
Taylor expanded in z around inf 74.0%
if 1.62e40 < y < 7.00000000000000023e149 or 2.45e191 < y Initial program 73.5%
Taylor expanded in y around inf 82.0%
sub-neg82.0%
mul-1-neg82.0%
unsub-neg82.0%
associate-+l-82.0%
mul-1-neg82.0%
distribute-frac-neg82.0%
mul-1-neg82.0%
div-sub82.0%
sub-neg82.0%
mul-1-neg82.0%
remove-double-neg82.0%
unpow282.0%
distribute-lft-out82.1%
Simplified82.1%
Taylor expanded in z around 0 84.8%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in z around 0 84.8%
associate-*r/90.0%
Simplified90.0%
if 7.00000000000000023e149 < y < 2.45e191Initial program 100.0%
Taylor expanded in x around 0 90.1%
Final simplification80.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- 1.0 (/ y z))) (t_1 (- (- z) (/ z (/ y x)))))
(if (<= y -1.2e+41)
t_1
(if (<= y 1.8e-157)
(/ x t_0)
(if (<= y 1.9e+39)
(+ x y)
(if (<= y 5.8e+149)
t_1
(if (<= y 9.5e+190) (/ y t_0) (- (- z) (* z (/ x y))))))))))
double code(double x, double y, double z) {
double t_0 = 1.0 - (y / z);
double t_1 = -z - (z / (y / x));
double tmp;
if (y <= -1.2e+41) {
tmp = t_1;
} else if (y <= 1.8e-157) {
tmp = x / t_0;
} else if (y <= 1.9e+39) {
tmp = x + y;
} else if (y <= 5.8e+149) {
tmp = t_1;
} else if (y <= 9.5e+190) {
tmp = y / t_0;
} else {
tmp = -z - (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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 - (y / z)
t_1 = -z - (z / (y / x))
if (y <= (-1.2d+41)) then
tmp = t_1
else if (y <= 1.8d-157) then
tmp = x / t_0
else if (y <= 1.9d+39) then
tmp = x + y
else if (y <= 5.8d+149) then
tmp = t_1
else if (y <= 9.5d+190) then
tmp = y / t_0
else
tmp = -z - (z * (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 1.0 - (y / z);
double t_1 = -z - (z / (y / x));
double tmp;
if (y <= -1.2e+41) {
tmp = t_1;
} else if (y <= 1.8e-157) {
tmp = x / t_0;
} else if (y <= 1.9e+39) {
tmp = x + y;
} else if (y <= 5.8e+149) {
tmp = t_1;
} else if (y <= 9.5e+190) {
tmp = y / t_0;
} else {
tmp = -z - (z * (x / y));
}
return tmp;
}
def code(x, y, z): t_0 = 1.0 - (y / z) t_1 = -z - (z / (y / x)) tmp = 0 if y <= -1.2e+41: tmp = t_1 elif y <= 1.8e-157: tmp = x / t_0 elif y <= 1.9e+39: tmp = x + y elif y <= 5.8e+149: tmp = t_1 elif y <= 9.5e+190: tmp = y / t_0 else: tmp = -z - (z * (x / y)) return tmp
function code(x, y, z) t_0 = Float64(1.0 - Float64(y / z)) t_1 = Float64(Float64(-z) - Float64(z / Float64(y / x))) tmp = 0.0 if (y <= -1.2e+41) tmp = t_1; elseif (y <= 1.8e-157) tmp = Float64(x / t_0); elseif (y <= 1.9e+39) tmp = Float64(x + y); elseif (y <= 5.8e+149) tmp = t_1; elseif (y <= 9.5e+190) tmp = Float64(y / t_0); else tmp = Float64(Float64(-z) - Float64(z * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 1.0 - (y / z); t_1 = -z - (z / (y / x)); tmp = 0.0; if (y <= -1.2e+41) tmp = t_1; elseif (y <= 1.8e-157) tmp = x / t_0; elseif (y <= 1.9e+39) tmp = x + y; elseif (y <= 5.8e+149) tmp = t_1; elseif (y <= 9.5e+190) tmp = y / t_0; else tmp = -z - (z * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[((-z) - N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.2e+41], t$95$1, If[LessEqual[y, 1.8e-157], N[(x / t$95$0), $MachinePrecision], If[LessEqual[y, 1.9e+39], N[(x + y), $MachinePrecision], If[LessEqual[y, 5.8e+149], t$95$1, If[LessEqual[y, 9.5e+190], N[(y / t$95$0), $MachinePrecision], N[((-z) - N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - \frac{y}{z}\\
t_1 := \left(-z\right) - \frac{z}{\frac{y}{x}}\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-157}:\\
\;\;\;\;\frac{x}{t_0}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+39}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+190}:\\
\;\;\;\;\frac{y}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) - z \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < -1.2000000000000001e41 or 1.8999999999999999e39 < y < 5.8000000000000004e149Initial program 70.9%
Taylor expanded in y around inf 86.2%
sub-neg86.2%
mul-1-neg86.2%
unsub-neg86.2%
associate-+l-86.2%
mul-1-neg86.2%
distribute-frac-neg86.2%
mul-1-neg86.2%
div-sub86.2%
sub-neg86.2%
mul-1-neg86.2%
remove-double-neg86.2%
unpow286.2%
distribute-lft-out86.3%
Simplified86.3%
Taylor expanded in z around 0 89.5%
associate-/l*91.0%
Simplified91.0%
if -1.2000000000000001e41 < y < 1.8e-157Initial program 99.8%
Taylor expanded in x around inf 76.5%
if 1.8e-157 < y < 1.8999999999999999e39Initial program 99.9%
Taylor expanded in z around inf 74.0%
if 5.8000000000000004e149 < y < 9.4999999999999995e190Initial program 100.0%
Taylor expanded in x around 0 90.1%
if 9.4999999999999995e190 < y Initial program 66.6%
Taylor expanded in y around inf 64.3%
sub-neg64.3%
mul-1-neg64.3%
unsub-neg64.3%
associate-+l-64.3%
mul-1-neg64.3%
distribute-frac-neg64.3%
mul-1-neg64.3%
div-sub64.3%
sub-neg64.3%
mul-1-neg64.3%
remove-double-neg64.3%
unpow264.3%
distribute-lft-out64.3%
Simplified64.3%
Taylor expanded in z around 0 72.3%
associate-/l*86.7%
Simplified86.7%
Taylor expanded in z around 0 72.3%
associate-*r/86.7%
Simplified86.7%
Final simplification80.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- -1.0 (/ x y)))))
(if (<= y -4.8e+40)
t_0
(if (<= y 1.02e-159)
(/ x (- 1.0 (/ y z)))
(if (<= y 9.2e+38)
(+ x y)
(if (or (<= y 1.9e+167) (not (<= y 9.5e+190))) t_0 y))))))
double code(double x, double y, double z) {
double t_0 = z * (-1.0 - (x / y));
double tmp;
if (y <= -4.8e+40) {
tmp = t_0;
} else if (y <= 1.02e-159) {
tmp = x / (1.0 - (y / z));
} else if (y <= 9.2e+38) {
tmp = x + y;
} else if ((y <= 1.9e+167) || !(y <= 9.5e+190)) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = z * ((-1.0d0) - (x / y))
if (y <= (-4.8d+40)) then
tmp = t_0
else if (y <= 1.02d-159) then
tmp = x / (1.0d0 - (y / z))
else if (y <= 9.2d+38) then
tmp = x + y
else if ((y <= 1.9d+167) .or. (.not. (y <= 9.5d+190))) then
tmp = t_0
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (-1.0 - (x / y));
double tmp;
if (y <= -4.8e+40) {
tmp = t_0;
} else if (y <= 1.02e-159) {
tmp = x / (1.0 - (y / z));
} else if (y <= 9.2e+38) {
tmp = x + y;
} else if ((y <= 1.9e+167) || !(y <= 9.5e+190)) {
tmp = t_0;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z): t_0 = z * (-1.0 - (x / y)) tmp = 0 if y <= -4.8e+40: tmp = t_0 elif y <= 1.02e-159: tmp = x / (1.0 - (y / z)) elif y <= 9.2e+38: tmp = x + y elif (y <= 1.9e+167) or not (y <= 9.5e+190): tmp = t_0 else: tmp = y return tmp
function code(x, y, z) t_0 = Float64(z * Float64(-1.0 - Float64(x / y))) tmp = 0.0 if (y <= -4.8e+40) tmp = t_0; elseif (y <= 1.02e-159) tmp = Float64(x / Float64(1.0 - Float64(y / z))); elseif (y <= 9.2e+38) tmp = Float64(x + y); elseif ((y <= 1.9e+167) || !(y <= 9.5e+190)) tmp = t_0; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (-1.0 - (x / y)); tmp = 0.0; if (y <= -4.8e+40) tmp = t_0; elseif (y <= 1.02e-159) tmp = x / (1.0 - (y / z)); elseif (y <= 9.2e+38) tmp = x + y; elseif ((y <= 1.9e+167) || ~((y <= 9.5e+190))) tmp = t_0; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+40], t$95$0, If[LessEqual[y, 1.02e-159], N[(x / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.2e+38], N[(x + y), $MachinePrecision], If[Or[LessEqual[y, 1.9e+167], N[Not[LessEqual[y, 9.5e+190]], $MachinePrecision]], t$95$0, y]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(-1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+40}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{-159}:\\
\;\;\;\;\frac{x}{1 - \frac{y}{z}}\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+38}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+167} \lor \neg \left(y \leq 9.5 \cdot 10^{+190}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -4.8e40 or 9.2000000000000005e38 < y < 1.89999999999999997e167 or 9.4999999999999995e190 < y Initial program 71.2%
Taylor expanded in y around inf 80.6%
sub-neg80.6%
mul-1-neg80.6%
unsub-neg80.6%
associate-+l-80.6%
mul-1-neg80.6%
distribute-frac-neg80.6%
mul-1-neg80.6%
div-sub80.6%
sub-neg80.6%
mul-1-neg80.6%
remove-double-neg80.6%
unpow280.6%
distribute-lft-out80.7%
Simplified80.7%
Taylor expanded in z around 0 84.5%
associate-/l*89.3%
Simplified89.3%
Taylor expanded in z around 0 84.5%
associate-*r/89.2%
Simplified89.2%
Taylor expanded in z around 0 89.2%
associate-*r*89.2%
distribute-lft-in89.2%
metadata-eval89.2%
mul-1-neg89.2%
sub-neg89.2%
*-commutative89.2%
Simplified89.2%
if -4.8e40 < y < 1.02e-159Initial program 99.8%
Taylor expanded in x around inf 76.5%
if 1.02e-159 < y < 9.2000000000000005e38Initial program 99.9%
Taylor expanded in z around inf 74.0%
if 1.89999999999999997e167 < y < 9.4999999999999995e190Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in y around 0 85.9%
Final simplification80.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- 1.0 (/ y z))) (t_1 (* z (- -1.0 (/ x y)))))
(if (<= y -2e+40)
t_1
(if (<= y 6.4e-160)
(/ x t_0)
(if (<= y 2.65e+42)
(+ x y)
(if (or (<= y 7.1e+149) (not (<= y 1.05e+191))) t_1 (/ y t_0)))))))
double code(double x, double y, double z) {
double t_0 = 1.0 - (y / z);
double t_1 = z * (-1.0 - (x / y));
double tmp;
if (y <= -2e+40) {
tmp = t_1;
} else if (y <= 6.4e-160) {
tmp = x / t_0;
} else if (y <= 2.65e+42) {
tmp = x + y;
} else if ((y <= 7.1e+149) || !(y <= 1.05e+191)) {
tmp = t_1;
} else {
tmp = y / 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) :: t_1
real(8) :: tmp
t_0 = 1.0d0 - (y / z)
t_1 = z * ((-1.0d0) - (x / y))
if (y <= (-2d+40)) then
tmp = t_1
else if (y <= 6.4d-160) then
tmp = x / t_0
else if (y <= 2.65d+42) then
tmp = x + y
else if ((y <= 7.1d+149) .or. (.not. (y <= 1.05d+191))) then
tmp = t_1
else
tmp = y / t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 1.0 - (y / z);
double t_1 = z * (-1.0 - (x / y));
double tmp;
if (y <= -2e+40) {
tmp = t_1;
} else if (y <= 6.4e-160) {
tmp = x / t_0;
} else if (y <= 2.65e+42) {
tmp = x + y;
} else if ((y <= 7.1e+149) || !(y <= 1.05e+191)) {
tmp = t_1;
} else {
tmp = y / t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 1.0 - (y / z) t_1 = z * (-1.0 - (x / y)) tmp = 0 if y <= -2e+40: tmp = t_1 elif y <= 6.4e-160: tmp = x / t_0 elif y <= 2.65e+42: tmp = x + y elif (y <= 7.1e+149) or not (y <= 1.05e+191): tmp = t_1 else: tmp = y / t_0 return tmp
function code(x, y, z) t_0 = Float64(1.0 - Float64(y / z)) t_1 = Float64(z * Float64(-1.0 - Float64(x / y))) tmp = 0.0 if (y <= -2e+40) tmp = t_1; elseif (y <= 6.4e-160) tmp = Float64(x / t_0); elseif (y <= 2.65e+42) tmp = Float64(x + y); elseif ((y <= 7.1e+149) || !(y <= 1.05e+191)) tmp = t_1; else tmp = Float64(y / t_0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 1.0 - (y / z); t_1 = z * (-1.0 - (x / y)); tmp = 0.0; if (y <= -2e+40) tmp = t_1; elseif (y <= 6.4e-160) tmp = x / t_0; elseif (y <= 2.65e+42) tmp = x + y; elseif ((y <= 7.1e+149) || ~((y <= 1.05e+191))) tmp = t_1; else tmp = y / t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e+40], t$95$1, If[LessEqual[y, 6.4e-160], N[(x / t$95$0), $MachinePrecision], If[LessEqual[y, 2.65e+42], N[(x + y), $MachinePrecision], If[Or[LessEqual[y, 7.1e+149], N[Not[LessEqual[y, 1.05e+191]], $MachinePrecision]], t$95$1, N[(y / t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - \frac{y}{z}\\
t_1 := z \cdot \left(-1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-160}:\\
\;\;\;\;\frac{x}{t_0}\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{+42}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 7.1 \cdot 10^{+149} \lor \neg \left(y \leq 1.05 \cdot 10^{+191}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t_0}\\
\end{array}
\end{array}
if y < -2.00000000000000006e40 or 2.65000000000000014e42 < y < 7.1000000000000001e149 or 1.05e191 < y Initial program 70.1%
Taylor expanded in y around inf 82.4%
sub-neg82.4%
mul-1-neg82.4%
unsub-neg82.4%
associate-+l-82.4%
mul-1-neg82.4%
distribute-frac-neg82.4%
mul-1-neg82.4%
div-sub82.4%
sub-neg82.4%
mul-1-neg82.4%
remove-double-neg82.4%
unpow282.4%
distribute-lft-out82.4%
Simplified82.4%
Taylor expanded in z around 0 86.4%
associate-/l*90.3%
Simplified90.3%
Taylor expanded in z around 0 86.4%
associate-*r/90.2%
Simplified90.2%
Taylor expanded in z around 0 90.1%
associate-*r*90.1%
distribute-lft-in90.1%
metadata-eval90.1%
mul-1-neg90.1%
sub-neg90.1%
*-commutative90.1%
Simplified90.1%
if -2.00000000000000006e40 < y < 6.40000000000000018e-160Initial program 99.8%
Taylor expanded in x around inf 76.5%
if 6.40000000000000018e-160 < y < 2.65000000000000014e42Initial program 99.9%
Taylor expanded in z around inf 74.0%
if 7.1000000000000001e149 < y < 1.05e191Initial program 100.0%
Taylor expanded in x around 0 90.1%
Final simplification80.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- -1.0 (/ x y)))))
(if (<= y -11500.0)
t_0
(if (<= y 3.6e+39)
(+ x y)
(if (or (<= y 1.9e+167) (not (<= y 9.5e+190))) t_0 y)))))
double code(double x, double y, double z) {
double t_0 = z * (-1.0 - (x / y));
double tmp;
if (y <= -11500.0) {
tmp = t_0;
} else if (y <= 3.6e+39) {
tmp = x + y;
} else if ((y <= 1.9e+167) || !(y <= 9.5e+190)) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = z * ((-1.0d0) - (x / y))
if (y <= (-11500.0d0)) then
tmp = t_0
else if (y <= 3.6d+39) then
tmp = x + y
else if ((y <= 1.9d+167) .or. (.not. (y <= 9.5d+190))) then
tmp = t_0
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (-1.0 - (x / y));
double tmp;
if (y <= -11500.0) {
tmp = t_0;
} else if (y <= 3.6e+39) {
tmp = x + y;
} else if ((y <= 1.9e+167) || !(y <= 9.5e+190)) {
tmp = t_0;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z): t_0 = z * (-1.0 - (x / y)) tmp = 0 if y <= -11500.0: tmp = t_0 elif y <= 3.6e+39: tmp = x + y elif (y <= 1.9e+167) or not (y <= 9.5e+190): tmp = t_0 else: tmp = y return tmp
function code(x, y, z) t_0 = Float64(z * Float64(-1.0 - Float64(x / y))) tmp = 0.0 if (y <= -11500.0) tmp = t_0; elseif (y <= 3.6e+39) tmp = Float64(x + y); elseif ((y <= 1.9e+167) || !(y <= 9.5e+190)) tmp = t_0; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (-1.0 - (x / y)); tmp = 0.0; if (y <= -11500.0) tmp = t_0; elseif (y <= 3.6e+39) tmp = x + y; elseif ((y <= 1.9e+167) || ~((y <= 9.5e+190))) tmp = t_0; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -11500.0], t$95$0, If[LessEqual[y, 3.6e+39], N[(x + y), $MachinePrecision], If[Or[LessEqual[y, 1.9e+167], N[Not[LessEqual[y, 9.5e+190]], $MachinePrecision]], t$95$0, y]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(-1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -11500:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+39}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+167} \lor \neg \left(y \leq 9.5 \cdot 10^{+190}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -11500 or 3.59999999999999984e39 < y < 1.89999999999999997e167 or 9.4999999999999995e190 < y Initial program 73.5%
Taylor expanded in y around inf 78.8%
sub-neg78.8%
mul-1-neg78.8%
unsub-neg78.8%
associate-+l-78.8%
mul-1-neg78.8%
distribute-frac-neg78.8%
mul-1-neg78.8%
div-sub78.8%
sub-neg78.8%
mul-1-neg78.8%
remove-double-neg78.8%
unpow278.8%
distribute-lft-out79.0%
Simplified79.0%
Taylor expanded in z around 0 82.4%
associate-/l*87.0%
Simplified87.0%
Taylor expanded in z around 0 82.4%
associate-*r/86.8%
Simplified86.8%
Taylor expanded in z around 0 86.8%
associate-*r*86.8%
distribute-lft-in86.8%
metadata-eval86.8%
mul-1-neg86.8%
sub-neg86.8%
*-commutative86.8%
Simplified86.8%
if -11500 < y < 3.59999999999999984e39Initial program 99.9%
Taylor expanded in z around inf 73.5%
if 1.89999999999999997e167 < y < 9.4999999999999995e190Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in y around 0 85.9%
Final simplification78.5%
(FPCore (x y z)
:precision binary64
(if (<= y -1.18e+41)
(- z)
(if (<= y 1e-53)
x
(if (<= y 1.02e+40)
y
(if (<= y 7.1e+149) (- z) (if (<= y 9.5e+190) y (- z)))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.18e+41) {
tmp = -z;
} else if (y <= 1e-53) {
tmp = x;
} else if (y <= 1.02e+40) {
tmp = y;
} else if (y <= 7.1e+149) {
tmp = -z;
} else if (y <= 9.5e+190) {
tmp = y;
} else {
tmp = -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.18d+41)) then
tmp = -z
else if (y <= 1d-53) then
tmp = x
else if (y <= 1.02d+40) then
tmp = y
else if (y <= 7.1d+149) then
tmp = -z
else if (y <= 9.5d+190) then
tmp = y
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1.18e+41) {
tmp = -z;
} else if (y <= 1e-53) {
tmp = x;
} else if (y <= 1.02e+40) {
tmp = y;
} else if (y <= 7.1e+149) {
tmp = -z;
} else if (y <= 9.5e+190) {
tmp = y;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.18e+41: tmp = -z elif y <= 1e-53: tmp = x elif y <= 1.02e+40: tmp = y elif y <= 7.1e+149: tmp = -z elif y <= 9.5e+190: tmp = y else: tmp = -z return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.18e+41) tmp = Float64(-z); elseif (y <= 1e-53) tmp = x; elseif (y <= 1.02e+40) tmp = y; elseif (y <= 7.1e+149) tmp = Float64(-z); elseif (y <= 9.5e+190) tmp = y; else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.18e+41) tmp = -z; elseif (y <= 1e-53) tmp = x; elseif (y <= 1.02e+40) tmp = y; elseif (y <= 7.1e+149) tmp = -z; elseif (y <= 9.5e+190) tmp = y; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.18e+41], (-z), If[LessEqual[y, 1e-53], x, If[LessEqual[y, 1.02e+40], y, If[LessEqual[y, 7.1e+149], (-z), If[LessEqual[y, 9.5e+190], y, (-z)]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.18 \cdot 10^{+41}:\\
\;\;\;\;-z\\
\mathbf{elif}\;y \leq 10^{-53}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+40}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 7.1 \cdot 10^{+149}:\\
\;\;\;\;-z\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+190}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if y < -1.17999999999999998e41 or 1.02e40 < y < 7.1000000000000001e149 or 9.4999999999999995e190 < y Initial program 70.1%
Taylor expanded in y around inf 69.8%
mul-1-neg69.8%
Simplified69.8%
if -1.17999999999999998e41 < y < 1.00000000000000003e-53Initial program 99.9%
Taylor expanded in y around 0 56.8%
if 1.00000000000000003e-53 < y < 1.02e40 or 7.1000000000000001e149 < y < 9.4999999999999995e190Initial program 99.9%
Taylor expanded in x around 0 74.8%
Taylor expanded in y around 0 54.9%
Final simplification60.6%
(FPCore (x y z)
:precision binary64
(if (<= y -45000000000.0)
(- z)
(if (<= y 1.45e+41)
(+ x y)
(if (<= y 7.1e+149) (- z) (if (<= y 9.5e+190) y (- z))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -45000000000.0) {
tmp = -z;
} else if (y <= 1.45e+41) {
tmp = x + y;
} else if (y <= 7.1e+149) {
tmp = -z;
} else if (y <= 9.5e+190) {
tmp = y;
} else {
tmp = -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 <= (-45000000000.0d0)) then
tmp = -z
else if (y <= 1.45d+41) then
tmp = x + y
else if (y <= 7.1d+149) then
tmp = -z
else if (y <= 9.5d+190) then
tmp = y
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -45000000000.0) {
tmp = -z;
} else if (y <= 1.45e+41) {
tmp = x + y;
} else if (y <= 7.1e+149) {
tmp = -z;
} else if (y <= 9.5e+190) {
tmp = y;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -45000000000.0: tmp = -z elif y <= 1.45e+41: tmp = x + y elif y <= 7.1e+149: tmp = -z elif y <= 9.5e+190: tmp = y else: tmp = -z return tmp
function code(x, y, z) tmp = 0.0 if (y <= -45000000000.0) tmp = Float64(-z); elseif (y <= 1.45e+41) tmp = Float64(x + y); elseif (y <= 7.1e+149) tmp = Float64(-z); elseif (y <= 9.5e+190) tmp = y; else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -45000000000.0) tmp = -z; elseif (y <= 1.45e+41) tmp = x + y; elseif (y <= 7.1e+149) tmp = -z; elseif (y <= 9.5e+190) tmp = y; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -45000000000.0], (-z), If[LessEqual[y, 1.45e+41], N[(x + y), $MachinePrecision], If[LessEqual[y, 7.1e+149], (-z), If[LessEqual[y, 9.5e+190], y, (-z)]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -45000000000:\\
\;\;\;\;-z\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+41}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 7.1 \cdot 10^{+149}:\\
\;\;\;\;-z\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+190}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if y < -4.5e10 or 1.44999999999999994e41 < y < 7.1000000000000001e149 or 9.4999999999999995e190 < y Initial program 71.9%
Taylor expanded in y around inf 68.2%
mul-1-neg68.2%
Simplified68.2%
if -4.5e10 < y < 1.44999999999999994e41Initial program 99.9%
Taylor expanded in z around inf 73.2%
if 7.1000000000000001e149 < y < 9.4999999999999995e190Initial program 100.0%
Taylor expanded in x around 0 90.1%
Taylor expanded in y around 0 71.5%
Final simplification71.5%
(FPCore (x y z) :precision binary64 (if (<= x -1.25e-117) x (if (<= x 7e-244) y x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.25e-117) {
tmp = x;
} else if (x <= 7e-244) {
tmp = 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 (x <= (-1.25d-117)) then
tmp = x
else if (x <= 7d-244) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.25e-117) {
tmp = x;
} else if (x <= 7e-244) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.25e-117: tmp = x elif x <= 7e-244: tmp = y else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.25e-117) tmp = x; elseif (x <= 7e-244) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.25e-117) tmp = x; elseif (x <= 7e-244) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.25e-117], x, If[LessEqual[x, 7e-244], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{-117}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-244}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.25e-117 or 6.99999999999999984e-244 < x Initial program 89.3%
Taylor expanded in y around 0 41.3%
if -1.25e-117 < x < 6.99999999999999984e-244Initial program 96.3%
Taylor expanded in x around 0 86.6%
Taylor expanded in y around 0 52.4%
Final simplification43.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 90.7%
Taylor expanded in y around 0 35.5%
Final simplification35.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (/ (+ y x) (- y)) z)))
(if (< y -3.7429310762689856e+171)
t_0
(if (< y 3.5534662456086734e+168) (/ (+ x y) (- 1.0 (/ y z))) t_0))))
double code(double x, double y, double z) {
double t_0 = ((y + x) / -y) * z;
double tmp;
if (y < -3.7429310762689856e+171) {
tmp = t_0;
} else if (y < 3.5534662456086734e+168) {
tmp = (x + y) / (1.0 - (y / z));
} 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 = ((y + x) / -y) * z
if (y < (-3.7429310762689856d+171)) then
tmp = t_0
else if (y < 3.5534662456086734d+168) then
tmp = (x + y) / (1.0d0 - (y / z))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y + x) / -y) * z;
double tmp;
if (y < -3.7429310762689856e+171) {
tmp = t_0;
} else if (y < 3.5534662456086734e+168) {
tmp = (x + y) / (1.0 - (y / z));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y + x) / -y) * z tmp = 0 if y < -3.7429310762689856e+171: tmp = t_0 elif y < 3.5534662456086734e+168: tmp = (x + y) / (1.0 - (y / z)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y + x) / Float64(-y)) * z) tmp = 0.0 if (y < -3.7429310762689856e+171) tmp = t_0; elseif (y < 3.5534662456086734e+168) tmp = Float64(Float64(x + y) / Float64(1.0 - Float64(y / z))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y + x) / -y) * z; tmp = 0.0; if (y < -3.7429310762689856e+171) tmp = t_0; elseif (y < 3.5534662456086734e+168) tmp = (x + y) / (1.0 - (y / z)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y + x), $MachinePrecision] / (-y)), $MachinePrecision] * z), $MachinePrecision]}, If[Less[y, -3.7429310762689856e+171], t$95$0, If[Less[y, 3.5534662456086734e+168], N[(N[(x + y), $MachinePrecision] / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y + x}{-y} \cdot z\\
\mathbf{if}\;y < -3.7429310762689856 \cdot 10^{+171}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y < 3.5534662456086734 \cdot 10^{+168}:\\
\;\;\;\;\frac{x + y}{1 - \frac{y}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
herbie shell --seed 2023208
(FPCore (x y z)
:name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, A"
:precision binary64
:herbie-target
(if (< y -3.7429310762689856e+171) (* (/ (+ y x) (- y)) z) (if (< y 3.5534662456086734e+168) (/ (+ x y) (- 1.0 (/ y z))) (* (/ (+ y x) (- y)) z)))
(/ (+ x y) (- 1.0 (/ y z))))