
(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 (- 1.0 (/ y z))) (t_1 (/ (+ x y) t_0)))
(if (or (<= t_1 -2e-229) (not (<= t_1 0.0)))
(+ (/ y t_0) (/ x t_0))
(- (- z) (/ (* x z) y)))))
double code(double x, double y, double z) {
double t_0 = 1.0 - (y / z);
double t_1 = (x + y) / t_0;
double tmp;
if ((t_1 <= -2e-229) || !(t_1 <= 0.0)) {
tmp = (y / t_0) + (x / t_0);
} else {
tmp = -z - ((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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 - (y / z)
t_1 = (x + y) / t_0
if ((t_1 <= (-2d-229)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = (y / t_0) + (x / t_0)
else
tmp = -z - ((x * z) / 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 = (x + y) / t_0;
double tmp;
if ((t_1 <= -2e-229) || !(t_1 <= 0.0)) {
tmp = (y / t_0) + (x / t_0);
} else {
tmp = -z - ((x * z) / y);
}
return tmp;
}
def code(x, y, z): t_0 = 1.0 - (y / z) t_1 = (x + y) / t_0 tmp = 0 if (t_1 <= -2e-229) or not (t_1 <= 0.0): tmp = (y / t_0) + (x / t_0) else: tmp = -z - ((x * z) / y) return tmp
function code(x, y, z) t_0 = Float64(1.0 - Float64(y / z)) t_1 = Float64(Float64(x + y) / t_0) tmp = 0.0 if ((t_1 <= -2e-229) || !(t_1 <= 0.0)) tmp = Float64(Float64(y / t_0) + Float64(x / t_0)); else tmp = Float64(Float64(-z) - Float64(Float64(x * z) / y)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 1.0 - (y / z); t_1 = (x + y) / t_0; tmp = 0.0; if ((t_1 <= -2e-229) || ~((t_1 <= 0.0))) tmp = (y / t_0) + (x / t_0); else tmp = -z - ((x * z) / 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[(N[(x + y), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-229], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(y / t$95$0), $MachinePrecision] + N[(x / t$95$0), $MachinePrecision]), $MachinePrecision], N[((-z) - N[(N[(x * z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - \frac{y}{z}\\
t_1 := \frac{x + y}{t_0}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-229} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;\frac{y}{t_0} + \frac{x}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) - \frac{x \cdot z}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) < -2.00000000000000014e-229 or 0.0 < (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) Initial program 99.9%
Taylor expanded in x around 0 99.9%
+-commutative99.9%
Simplified99.9%
if -2.00000000000000014e-229 < (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) < 0.0Initial program 6.1%
Taylor expanded in z around 0 99.6%
associate-/l*99.9%
associate-*r/99.9%
associate-/r/16.7%
mul-1-neg16.7%
+-commutative16.7%
Simplified16.7%
Taylor expanded in y around 0 100.0%
associate-/l*83.7%
mul-1-neg83.7%
mul-1-neg83.7%
distribute-neg-out83.7%
associate-/r/99.9%
distribute-rgt1-in99.9%
Simplified99.9%
Taylor expanded in x around 0 100.0%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (let* ((t_0 (/ (+ x y) (- 1.0 (/ y z))))) (if (or (<= t_0 -2e-229) (not (<= t_0 0.0))) t_0 (- (- z) (/ (* x z) y)))))
double code(double x, double y, double z) {
double t_0 = (x + y) / (1.0 - (y / z));
double tmp;
if ((t_0 <= -2e-229) || !(t_0 <= 0.0)) {
tmp = t_0;
} else {
tmp = -z - ((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) :: t_0
real(8) :: tmp
t_0 = (x + y) / (1.0d0 - (y / z))
if ((t_0 <= (-2d-229)) .or. (.not. (t_0 <= 0.0d0))) then
tmp = t_0
else
tmp = -z - ((x * z) / y)
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-229) || !(t_0 <= 0.0)) {
tmp = t_0;
} else {
tmp = -z - ((x * z) / y);
}
return tmp;
}
def code(x, y, z): t_0 = (x + y) / (1.0 - (y / z)) tmp = 0 if (t_0 <= -2e-229) or not (t_0 <= 0.0): tmp = t_0 else: tmp = -z - ((x * z) / y) 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-229) || !(t_0 <= 0.0)) tmp = t_0; else tmp = Float64(Float64(-z) - Float64(Float64(x * z) / y)); 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-229) || ~((t_0 <= 0.0))) tmp = t_0; else tmp = -z - ((x * z) / y); 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-229], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], t$95$0, N[((-z) - N[(N[(x * z), $MachinePrecision] / y), $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^{-229} \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) - \frac{x \cdot z}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) < -2.00000000000000014e-229 or 0.0 < (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) Initial program 99.9%
if -2.00000000000000014e-229 < (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) < 0.0Initial program 6.1%
Taylor expanded in z around 0 99.6%
associate-/l*99.9%
associate-*r/99.9%
associate-/r/16.7%
mul-1-neg16.7%
+-commutative16.7%
Simplified16.7%
Taylor expanded in y around 0 100.0%
associate-/l*83.7%
mul-1-neg83.7%
mul-1-neg83.7%
distribute-neg-out83.7%
associate-/r/99.9%
distribute-rgt1-in99.9%
Simplified99.9%
Taylor expanded in x around 0 100.0%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(if (<= y -2.7e+41)
(* z (- -1.0 (/ x y)))
(if (<= y -270000000000.0)
(+ x y)
(if (<= y -7e-12)
(- (- z) (/ (* x z) y))
(if (<= y -5e-245)
(+ x y)
(if (<= y 4.5e-82)
(/ x (- 1.0 (/ y z)))
(if (<= y 9.8e-51) (+ x y) (/ (- z) (/ y (+ x y))))))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -2.7e+41) {
tmp = z * (-1.0 - (x / y));
} else if (y <= -270000000000.0) {
tmp = x + y;
} else if (y <= -7e-12) {
tmp = -z - ((x * z) / y);
} else if (y <= -5e-245) {
tmp = x + y;
} else if (y <= 4.5e-82) {
tmp = x / (1.0 - (y / z));
} else if (y <= 9.8e-51) {
tmp = x + y;
} else {
tmp = -z / (y / (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 (y <= (-2.7d+41)) then
tmp = z * ((-1.0d0) - (x / y))
else if (y <= (-270000000000.0d0)) then
tmp = x + y
else if (y <= (-7d-12)) then
tmp = -z - ((x * z) / y)
else if (y <= (-5d-245)) then
tmp = x + y
else if (y <= 4.5d-82) then
tmp = x / (1.0d0 - (y / z))
else if (y <= 9.8d-51) then
tmp = x + y
else
tmp = -z / (y / (x + y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -2.7e+41) {
tmp = z * (-1.0 - (x / y));
} else if (y <= -270000000000.0) {
tmp = x + y;
} else if (y <= -7e-12) {
tmp = -z - ((x * z) / y);
} else if (y <= -5e-245) {
tmp = x + y;
} else if (y <= 4.5e-82) {
tmp = x / (1.0 - (y / z));
} else if (y <= 9.8e-51) {
tmp = x + y;
} else {
tmp = -z / (y / (x + y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -2.7e+41: tmp = z * (-1.0 - (x / y)) elif y <= -270000000000.0: tmp = x + y elif y <= -7e-12: tmp = -z - ((x * z) / y) elif y <= -5e-245: tmp = x + y elif y <= 4.5e-82: tmp = x / (1.0 - (y / z)) elif y <= 9.8e-51: tmp = x + y else: tmp = -z / (y / (x + y)) return tmp
function code(x, y, z) tmp = 0.0 if (y <= -2.7e+41) tmp = Float64(z * Float64(-1.0 - Float64(x / y))); elseif (y <= -270000000000.0) tmp = Float64(x + y); elseif (y <= -7e-12) tmp = Float64(Float64(-z) - Float64(Float64(x * z) / y)); elseif (y <= -5e-245) tmp = Float64(x + y); elseif (y <= 4.5e-82) tmp = Float64(x / Float64(1.0 - Float64(y / z))); elseif (y <= 9.8e-51) tmp = Float64(x + y); else tmp = Float64(Float64(-z) / Float64(y / Float64(x + y))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -2.7e+41) tmp = z * (-1.0 - (x / y)); elseif (y <= -270000000000.0) tmp = x + y; elseif (y <= -7e-12) tmp = -z - ((x * z) / y); elseif (y <= -5e-245) tmp = x + y; elseif (y <= 4.5e-82) tmp = x / (1.0 - (y / z)); elseif (y <= 9.8e-51) tmp = x + y; else tmp = -z / (y / (x + y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -2.7e+41], N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -270000000000.0], N[(x + y), $MachinePrecision], If[LessEqual[y, -7e-12], N[((-z) - N[(N[(x * z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5e-245], N[(x + y), $MachinePrecision], If[LessEqual[y, 4.5e-82], N[(x / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e-51], N[(x + y), $MachinePrecision], N[((-z) / N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+41}:\\
\;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq -270000000000:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-12}:\\
\;\;\;\;\left(-z\right) - \frac{x \cdot z}{y}\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-245}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-82}:\\
\;\;\;\;\frac{x}{1 - \frac{y}{z}}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-51}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;\frac{-z}{\frac{y}{x + y}}\\
\end{array}
\end{array}
if y < -2.7e41Initial program 71.1%
Taylor expanded in z around 0 73.1%
associate-/l*80.9%
associate-*r/80.9%
associate-/r/55.0%
mul-1-neg55.0%
+-commutative55.0%
Simplified55.0%
Taylor expanded in y around 0 77.8%
associate-/l*74.9%
mul-1-neg74.9%
mul-1-neg74.9%
distribute-neg-out74.9%
associate-/r/80.9%
distribute-rgt1-in80.9%
Simplified80.9%
if -2.7e41 < y < -2.7e11 or -7.0000000000000001e-12 < y < -4.9999999999999997e-245 or 4.4999999999999998e-82 < y < 9.79999999999999948e-51Initial program 99.9%
Taylor expanded in z around inf 83.6%
+-commutative83.6%
Simplified83.6%
if -2.7e11 < y < -7.0000000000000001e-12Initial program 99.4%
Taylor expanded in z around 0 99.7%
associate-/l*99.4%
associate-*r/99.4%
associate-/r/99.4%
mul-1-neg99.4%
+-commutative99.4%
Simplified99.4%
Taylor expanded in y around 0 100.0%
associate-/l*100.0%
mul-1-neg100.0%
mul-1-neg100.0%
distribute-neg-out100.0%
associate-/r/99.7%
distribute-rgt1-in99.7%
Simplified99.7%
Taylor expanded in x around 0 100.0%
if -4.9999999999999997e-245 < y < 4.4999999999999998e-82Initial program 100.0%
Taylor expanded in x around inf 97.4%
if 9.79999999999999948e-51 < y Initial program 77.6%
Taylor expanded in z around 0 63.2%
associate-/l*76.5%
associate-*r/76.5%
mul-1-neg76.5%
+-commutative76.5%
Simplified76.5%
Final simplification84.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- -1.0 (/ x y)))))
(if (<= y -2.7e+41)
t_0
(if (<= y -6.2e+22)
(* (+ x y) (+ 1.0 (/ y z)))
(if (<= y -2.4e-10)
t_0
(if (<= y -6.2e-238)
(+ x y)
(if (<= y 2.65e-79)
(/ x (- 1.0 (/ y z)))
(if (<= y 9.8e-51) (+ x y) (/ (- z) (/ y (+ x y)))))))))))
double code(double x, double y, double z) {
double t_0 = z * (-1.0 - (x / y));
double tmp;
if (y <= -2.7e+41) {
tmp = t_0;
} else if (y <= -6.2e+22) {
tmp = (x + y) * (1.0 + (y / z));
} else if (y <= -2.4e-10) {
tmp = t_0;
} else if (y <= -6.2e-238) {
tmp = x + y;
} else if (y <= 2.65e-79) {
tmp = x / (1.0 - (y / z));
} else if (y <= 9.8e-51) {
tmp = x + y;
} else {
tmp = -z / (y / (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) :: tmp
t_0 = z * ((-1.0d0) - (x / y))
if (y <= (-2.7d+41)) then
tmp = t_0
else if (y <= (-6.2d+22)) then
tmp = (x + y) * (1.0d0 + (y / z))
else if (y <= (-2.4d-10)) then
tmp = t_0
else if (y <= (-6.2d-238)) then
tmp = x + y
else if (y <= 2.65d-79) then
tmp = x / (1.0d0 - (y / z))
else if (y <= 9.8d-51) then
tmp = x + y
else
tmp = -z / (y / (x + 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 <= -2.7e+41) {
tmp = t_0;
} else if (y <= -6.2e+22) {
tmp = (x + y) * (1.0 + (y / z));
} else if (y <= -2.4e-10) {
tmp = t_0;
} else if (y <= -6.2e-238) {
tmp = x + y;
} else if (y <= 2.65e-79) {
tmp = x / (1.0 - (y / z));
} else if (y <= 9.8e-51) {
tmp = x + y;
} else {
tmp = -z / (y / (x + y));
}
return tmp;
}
def code(x, y, z): t_0 = z * (-1.0 - (x / y)) tmp = 0 if y <= -2.7e+41: tmp = t_0 elif y <= -6.2e+22: tmp = (x + y) * (1.0 + (y / z)) elif y <= -2.4e-10: tmp = t_0 elif y <= -6.2e-238: tmp = x + y elif y <= 2.65e-79: tmp = x / (1.0 - (y / z)) elif y <= 9.8e-51: tmp = x + y else: tmp = -z / (y / (x + y)) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(-1.0 - Float64(x / y))) tmp = 0.0 if (y <= -2.7e+41) tmp = t_0; elseif (y <= -6.2e+22) tmp = Float64(Float64(x + y) * Float64(1.0 + Float64(y / z))); elseif (y <= -2.4e-10) tmp = t_0; elseif (y <= -6.2e-238) tmp = Float64(x + y); elseif (y <= 2.65e-79) tmp = Float64(x / Float64(1.0 - Float64(y / z))); elseif (y <= 9.8e-51) tmp = Float64(x + y); else tmp = Float64(Float64(-z) / Float64(y / Float64(x + y))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (-1.0 - (x / y)); tmp = 0.0; if (y <= -2.7e+41) tmp = t_0; elseif (y <= -6.2e+22) tmp = (x + y) * (1.0 + (y / z)); elseif (y <= -2.4e-10) tmp = t_0; elseif (y <= -6.2e-238) tmp = x + y; elseif (y <= 2.65e-79) tmp = x / (1.0 - (y / z)); elseif (y <= 9.8e-51) tmp = x + y; else tmp = -z / (y / (x + 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, -2.7e+41], t$95$0, If[LessEqual[y, -6.2e+22], N[(N[(x + y), $MachinePrecision] * N[(1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.4e-10], t$95$0, If[LessEqual[y, -6.2e-238], N[(x + y), $MachinePrecision], If[LessEqual[y, 2.65e-79], N[(x / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e-51], N[(x + y), $MachinePrecision], N[((-z) / N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(-1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+41}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{+22}:\\
\;\;\;\;\left(x + y\right) \cdot \left(1 + \frac{y}{z}\right)\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-238}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{-79}:\\
\;\;\;\;\frac{x}{1 - \frac{y}{z}}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-51}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;\frac{-z}{\frac{y}{x + y}}\\
\end{array}
\end{array}
if y < -2.7e41 or -6.2000000000000004e22 < y < -2.4e-10Initial program 73.9%
Taylor expanded in z around 0 74.4%
associate-/l*81.4%
associate-*r/81.4%
associate-/r/58.2%
mul-1-neg58.2%
+-commutative58.2%
Simplified58.2%
Taylor expanded in y around 0 78.7%
associate-/l*76.1%
mul-1-neg76.1%
mul-1-neg76.1%
distribute-neg-out76.1%
associate-/r/81.4%
distribute-rgt1-in81.4%
Simplified81.4%
if -2.7e41 < y < -6.2000000000000004e22Initial program 100.0%
Taylor expanded in z around inf 100.0%
associate-+r+100.0%
*-rgt-identity100.0%
*-commutative100.0%
associate-*r/100.0%
distribute-lft-in99.7%
+-commutative99.7%
Simplified99.7%
if -2.4e-10 < y < -6.2000000000000002e-238 or 2.6499999999999999e-79 < y < 9.79999999999999948e-51Initial program 99.9%
Taylor expanded in z around inf 83.9%
+-commutative83.9%
Simplified83.9%
if -6.2000000000000002e-238 < y < 2.6499999999999999e-79Initial program 100.0%
Taylor expanded in x around inf 97.4%
if 9.79999999999999948e-51 < y Initial program 77.6%
Taylor expanded in z around 0 63.2%
associate-/l*76.5%
associate-*r/76.5%
mul-1-neg76.5%
+-commutative76.5%
Simplified76.5%
Final simplification84.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- -1.0 (/ x y)))))
(if (<= y -2.55e+41)
t_0
(if (<= y -120000000.0)
(+ x y)
(if (<= y -4.5e-11)
t_0
(if (<= y -2.5e-235)
(+ x y)
(if (<= y 1.4e-81)
(/ x (- 1.0 (/ y z)))
(if (<= y 9.4e-51) (+ x y) t_0))))))))
double code(double x, double y, double z) {
double t_0 = z * (-1.0 - (x / y));
double tmp;
if (y <= -2.55e+41) {
tmp = t_0;
} else if (y <= -120000000.0) {
tmp = x + y;
} else if (y <= -4.5e-11) {
tmp = t_0;
} else if (y <= -2.5e-235) {
tmp = x + y;
} else if (y <= 1.4e-81) {
tmp = x / (1.0 - (y / z));
} else if (y <= 9.4e-51) {
tmp = x + 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 = z * ((-1.0d0) - (x / y))
if (y <= (-2.55d+41)) then
tmp = t_0
else if (y <= (-120000000.0d0)) then
tmp = x + y
else if (y <= (-4.5d-11)) then
tmp = t_0
else if (y <= (-2.5d-235)) then
tmp = x + y
else if (y <= 1.4d-81) then
tmp = x / (1.0d0 - (y / z))
else if (y <= 9.4d-51) then
tmp = x + y
else
tmp = t_0
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 <= -2.55e+41) {
tmp = t_0;
} else if (y <= -120000000.0) {
tmp = x + y;
} else if (y <= -4.5e-11) {
tmp = t_0;
} else if (y <= -2.5e-235) {
tmp = x + y;
} else if (y <= 1.4e-81) {
tmp = x / (1.0 - (y / z));
} else if (y <= 9.4e-51) {
tmp = x + y;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * (-1.0 - (x / y)) tmp = 0 if y <= -2.55e+41: tmp = t_0 elif y <= -120000000.0: tmp = x + y elif y <= -4.5e-11: tmp = t_0 elif y <= -2.5e-235: tmp = x + y elif y <= 1.4e-81: tmp = x / (1.0 - (y / z)) elif y <= 9.4e-51: tmp = x + y else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(-1.0 - Float64(x / y))) tmp = 0.0 if (y <= -2.55e+41) tmp = t_0; elseif (y <= -120000000.0) tmp = Float64(x + y); elseif (y <= -4.5e-11) tmp = t_0; elseif (y <= -2.5e-235) tmp = Float64(x + y); elseif (y <= 1.4e-81) tmp = Float64(x / Float64(1.0 - Float64(y / z))); elseif (y <= 9.4e-51) tmp = Float64(x + y); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (-1.0 - (x / y)); tmp = 0.0; if (y <= -2.55e+41) tmp = t_0; elseif (y <= -120000000.0) tmp = x + y; elseif (y <= -4.5e-11) tmp = t_0; elseif (y <= -2.5e-235) tmp = x + y; elseif (y <= 1.4e-81) tmp = x / (1.0 - (y / z)); elseif (y <= 9.4e-51) tmp = x + y; else tmp = t_0; 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, -2.55e+41], t$95$0, If[LessEqual[y, -120000000.0], N[(x + y), $MachinePrecision], If[LessEqual[y, -4.5e-11], t$95$0, If[LessEqual[y, -2.5e-235], N[(x + y), $MachinePrecision], If[LessEqual[y, 1.4e-81], N[(x / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.4e-51], N[(x + y), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(-1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.55 \cdot 10^{+41}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -120000000:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-235}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-81}:\\
\;\;\;\;\frac{x}{1 - \frac{y}{z}}\\
\mathbf{elif}\;y \leq 9.4 \cdot 10^{-51}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y < -2.54999999999999989e41 or -1.2e8 < y < -4.5e-11 or 9.3999999999999995e-51 < y Initial program 75.3%
Taylor expanded in z around 0 69.3%
associate-/l*79.5%
associate-*r/79.5%
associate-/r/57.6%
mul-1-neg57.6%
+-commutative57.6%
Simplified57.6%
Taylor expanded in y around 0 76.0%
associate-/l*75.2%
mul-1-neg75.2%
mul-1-neg75.2%
distribute-neg-out75.2%
associate-/r/79.5%
distribute-rgt1-in79.5%
Simplified79.5%
if -2.54999999999999989e41 < y < -1.2e8 or -4.5e-11 < y < -2.4999999999999999e-235 or 1.3999999999999999e-81 < y < 9.3999999999999995e-51Initial program 99.9%
Taylor expanded in z around inf 83.6%
+-commutative83.6%
Simplified83.6%
if -2.4999999999999999e-235 < y < 1.3999999999999999e-81Initial program 100.0%
Taylor expanded in x around inf 97.4%
Final simplification84.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- -1.0 (/ x y)))))
(if (<= y -2.3e+41)
t_0
(if (<= y -2150000000.0)
(+ x y)
(if (<= y -3.7e-11)
(- (- z) (/ (* x z) y))
(if (<= y -3.3e-235)
(+ x y)
(if (<= y 3e-78)
(/ x (- 1.0 (/ y z)))
(if (<= y 9.8e-51) (+ x y) t_0))))))))
double code(double x, double y, double z) {
double t_0 = z * (-1.0 - (x / y));
double tmp;
if (y <= -2.3e+41) {
tmp = t_0;
} else if (y <= -2150000000.0) {
tmp = x + y;
} else if (y <= -3.7e-11) {
tmp = -z - ((x * z) / y);
} else if (y <= -3.3e-235) {
tmp = x + y;
} else if (y <= 3e-78) {
tmp = x / (1.0 - (y / z));
} else if (y <= 9.8e-51) {
tmp = x + 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 = z * ((-1.0d0) - (x / y))
if (y <= (-2.3d+41)) then
tmp = t_0
else if (y <= (-2150000000.0d0)) then
tmp = x + y
else if (y <= (-3.7d-11)) then
tmp = -z - ((x * z) / y)
else if (y <= (-3.3d-235)) then
tmp = x + y
else if (y <= 3d-78) then
tmp = x / (1.0d0 - (y / z))
else if (y <= 9.8d-51) then
tmp = x + y
else
tmp = t_0
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 <= -2.3e+41) {
tmp = t_0;
} else if (y <= -2150000000.0) {
tmp = x + y;
} else if (y <= -3.7e-11) {
tmp = -z - ((x * z) / y);
} else if (y <= -3.3e-235) {
tmp = x + y;
} else if (y <= 3e-78) {
tmp = x / (1.0 - (y / z));
} else if (y <= 9.8e-51) {
tmp = x + y;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * (-1.0 - (x / y)) tmp = 0 if y <= -2.3e+41: tmp = t_0 elif y <= -2150000000.0: tmp = x + y elif y <= -3.7e-11: tmp = -z - ((x * z) / y) elif y <= -3.3e-235: tmp = x + y elif y <= 3e-78: tmp = x / (1.0 - (y / z)) elif y <= 9.8e-51: tmp = x + y else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(-1.0 - Float64(x / y))) tmp = 0.0 if (y <= -2.3e+41) tmp = t_0; elseif (y <= -2150000000.0) tmp = Float64(x + y); elseif (y <= -3.7e-11) tmp = Float64(Float64(-z) - Float64(Float64(x * z) / y)); elseif (y <= -3.3e-235) tmp = Float64(x + y); elseif (y <= 3e-78) tmp = Float64(x / Float64(1.0 - Float64(y / z))); elseif (y <= 9.8e-51) tmp = Float64(x + y); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (-1.0 - (x / y)); tmp = 0.0; if (y <= -2.3e+41) tmp = t_0; elseif (y <= -2150000000.0) tmp = x + y; elseif (y <= -3.7e-11) tmp = -z - ((x * z) / y); elseif (y <= -3.3e-235) tmp = x + y; elseif (y <= 3e-78) tmp = x / (1.0 - (y / z)); elseif (y <= 9.8e-51) tmp = x + y; else tmp = t_0; 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, -2.3e+41], t$95$0, If[LessEqual[y, -2150000000.0], N[(x + y), $MachinePrecision], If[LessEqual[y, -3.7e-11], N[((-z) - N[(N[(x * z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.3e-235], N[(x + y), $MachinePrecision], If[LessEqual[y, 3e-78], N[(x / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e-51], N[(x + y), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(-1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{+41}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -2150000000:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-11}:\\
\;\;\;\;\left(-z\right) - \frac{x \cdot z}{y}\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{-235}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-78}:\\
\;\;\;\;\frac{x}{1 - \frac{y}{z}}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-51}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y < -2.2999999999999998e41 or 9.79999999999999948e-51 < y Initial program 74.3%
Taylor expanded in z around 0 68.1%
associate-/l*78.7%
associate-*r/78.7%
associate-/r/55.9%
mul-1-neg55.9%
+-commutative55.9%
Simplified55.9%
Taylor expanded in y around 0 75.1%
associate-/l*74.3%
mul-1-neg74.3%
mul-1-neg74.3%
distribute-neg-out74.3%
associate-/r/78.7%
distribute-rgt1-in78.7%
Simplified78.7%
if -2.2999999999999998e41 < y < -2.15e9 or -3.7000000000000001e-11 < y < -3.30000000000000028e-235 or 2.99999999999999988e-78 < y < 9.79999999999999948e-51Initial program 99.9%
Taylor expanded in z around inf 83.6%
+-commutative83.6%
Simplified83.6%
if -2.15e9 < y < -3.7000000000000001e-11Initial program 99.4%
Taylor expanded in z around 0 99.7%
associate-/l*99.4%
associate-*r/99.4%
associate-/r/99.4%
mul-1-neg99.4%
+-commutative99.4%
Simplified99.4%
Taylor expanded in y around 0 100.0%
associate-/l*100.0%
mul-1-neg100.0%
mul-1-neg100.0%
distribute-neg-out100.0%
associate-/r/99.7%
distribute-rgt1-in99.7%
Simplified99.7%
Taylor expanded in x around 0 100.0%
if -3.30000000000000028e-235 < y < 2.99999999999999988e-78Initial program 100.0%
Taylor expanded in x around inf 97.4%
Final simplification84.8%
(FPCore (x y z)
:precision binary64
(if (<= y -5.8e+45)
(- z)
(if (<= y -5.6e-233)
(+ x y)
(if (<= y 4.5e-84)
(/ x (- 1.0 (/ y z)))
(if (<= y 9.8e-51) (+ x y) (- z))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -5.8e+45) {
tmp = -z;
} else if (y <= -5.6e-233) {
tmp = x + y;
} else if (y <= 4.5e-84) {
tmp = x / (1.0 - (y / z));
} else if (y <= 9.8e-51) {
tmp = x + 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 <= (-5.8d+45)) then
tmp = -z
else if (y <= (-5.6d-233)) then
tmp = x + y
else if (y <= 4.5d-84) then
tmp = x / (1.0d0 - (y / z))
else if (y <= 9.8d-51) then
tmp = x + y
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -5.8e+45) {
tmp = -z;
} else if (y <= -5.6e-233) {
tmp = x + y;
} else if (y <= 4.5e-84) {
tmp = x / (1.0 - (y / z));
} else if (y <= 9.8e-51) {
tmp = x + y;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -5.8e+45: tmp = -z elif y <= -5.6e-233: tmp = x + y elif y <= 4.5e-84: tmp = x / (1.0 - (y / z)) elif y <= 9.8e-51: tmp = x + y else: tmp = -z return tmp
function code(x, y, z) tmp = 0.0 if (y <= -5.8e+45) tmp = Float64(-z); elseif (y <= -5.6e-233) tmp = Float64(x + y); elseif (y <= 4.5e-84) tmp = Float64(x / Float64(1.0 - Float64(y / z))); elseif (y <= 9.8e-51) tmp = Float64(x + y); else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -5.8e+45) tmp = -z; elseif (y <= -5.6e-233) tmp = x + y; elseif (y <= 4.5e-84) tmp = x / (1.0 - (y / z)); elseif (y <= 9.8e-51) tmp = x + y; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -5.8e+45], (-z), If[LessEqual[y, -5.6e-233], N[(x + y), $MachinePrecision], If[LessEqual[y, 4.5e-84], N[(x / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e-51], N[(x + y), $MachinePrecision], (-z)]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+45}:\\
\;\;\;\;-z\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{-233}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-84}:\\
\;\;\;\;\frac{x}{1 - \frac{y}{z}}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-51}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if y < -5.7999999999999994e45 or 9.79999999999999948e-51 < y Initial program 73.5%
Taylor expanded in y around inf 64.8%
mul-1-neg64.8%
Simplified64.8%
if -5.7999999999999994e45 < y < -5.6000000000000002e-233 or 4.50000000000000016e-84 < y < 9.79999999999999948e-51Initial program 99.9%
Taylor expanded in z around inf 76.4%
+-commutative76.4%
Simplified76.4%
if -5.6000000000000002e-233 < y < 4.50000000000000016e-84Initial program 100.0%
Taylor expanded in x around inf 97.4%
Final simplification75.9%
(FPCore (x y z) :precision binary64 (if (or (<= y -2.1e+45) (not (<= y 9.8e-51))) (- z) (+ x y)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2.1e+45) || !(y <= 9.8e-51)) {
tmp = -z;
} else {
tmp = 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 ((y <= (-2.1d+45)) .or. (.not. (y <= 9.8d-51))) then
tmp = -z
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -2.1e+45) || !(y <= 9.8e-51)) {
tmp = -z;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -2.1e+45) or not (y <= 9.8e-51): tmp = -z else: tmp = x + y return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -2.1e+45) || !(y <= 9.8e-51)) tmp = Float64(-z); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -2.1e+45) || ~((y <= 9.8e-51))) tmp = -z; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -2.1e+45], N[Not[LessEqual[y, 9.8e-51]], $MachinePrecision]], (-z), N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+45} \lor \neg \left(y \leq 9.8 \cdot 10^{-51}\right):\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < -2.09999999999999995e45 or 9.79999999999999948e-51 < y Initial program 73.5%
Taylor expanded in y around inf 64.8%
mul-1-neg64.8%
Simplified64.8%
if -2.09999999999999995e45 < y < 9.79999999999999948e-51Initial program 99.9%
Taylor expanded in z around inf 82.4%
+-commutative82.4%
Simplified82.4%
Final simplification74.1%
(FPCore (x y z) :precision binary64 (if (or (<= y -6.5e-42) (not (<= y 9.8e-51))) (- z) x))
double code(double x, double y, double z) {
double tmp;
if ((y <= -6.5e-42) || !(y <= 9.8e-51)) {
tmp = -z;
} 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 ((y <= (-6.5d-42)) .or. (.not. (y <= 9.8d-51))) then
tmp = -z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -6.5e-42) || !(y <= 9.8e-51)) {
tmp = -z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -6.5e-42) or not (y <= 9.8e-51): tmp = -z else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -6.5e-42) || !(y <= 9.8e-51)) tmp = Float64(-z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -6.5e-42) || ~((y <= 9.8e-51))) tmp = -z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -6.5e-42], N[Not[LessEqual[y, 9.8e-51]], $MachinePrecision]], (-z), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{-42} \lor \neg \left(y \leq 9.8 \cdot 10^{-51}\right):\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.4999999999999998e-42 or 9.79999999999999948e-51 < y Initial program 77.0%
Taylor expanded in y around inf 59.0%
mul-1-neg59.0%
Simplified59.0%
if -6.4999999999999998e-42 < y < 9.79999999999999948e-51Initial program 100.0%
Taylor expanded in y around 0 72.1%
Final simplification64.9%
(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 87.4%
Taylor expanded in y around 0 39.0%
Final simplification39.0%
(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 2023301
(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))))