
(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 12 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 -1e-283) (not (<= t_0 0.0))) t_0 (/ z (/ y (- (- x) y))))))
double code(double x, double y, double z) {
double t_0 = (x + y) / (1.0 - (y / z));
double tmp;
if ((t_0 <= -1e-283) || !(t_0 <= 0.0)) {
tmp = t_0;
} 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 = (x + y) / (1.0d0 - (y / z))
if ((t_0 <= (-1d-283)) .or. (.not. (t_0 <= 0.0d0))) then
tmp = t_0
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 = (x + y) / (1.0 - (y / z));
double tmp;
if ((t_0 <= -1e-283) || !(t_0 <= 0.0)) {
tmp = t_0;
} else {
tmp = z / (y / (-x - y));
}
return tmp;
}
def code(x, y, z): t_0 = (x + y) / (1.0 - (y / z)) tmp = 0 if (t_0 <= -1e-283) or not (t_0 <= 0.0): tmp = t_0 else: tmp = z / (y / (-x - 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 <= -1e-283) || !(t_0 <= 0.0)) tmp = t_0; else tmp = Float64(z / Float64(y / Float64(Float64(-x) - 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 <= -1e-283) || ~((t_0 <= 0.0))) tmp = t_0; else tmp = z / (y / (-x - 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, -1e-283], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], t$95$0, N[(z / N[(y / N[((-x) - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + y}{1 - \frac{y}{z}}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-283} \lor \neg \left(t\_0 \leq 0\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{y}{\left(-x\right) - y}}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) < -9.99999999999999947e-284 or 0.0 < (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) Initial program 99.9%
if -9.99999999999999947e-284 < (/.f64 (+.f64 x y) (-.f64 1 (/.f64 y z))) < 0.0Initial program 12.4%
Taylor expanded in z around 0 94.6%
mul-1-neg94.6%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-neg-frac299.9%
+-commutative99.9%
Simplified99.9%
associate-*r/94.6%
distribute-frac-neg294.6%
add-sqr-sqrt42.3%
sqrt-unprod30.4%
sqr-neg30.4%
sqrt-unprod3.1%
add-sqr-sqrt5.8%
associate-*r/5.7%
clear-num5.7%
un-div-inv5.7%
add-sqr-sqrt3.0%
sqrt-unprod30.4%
sqr-neg30.4%
sqrt-unprod42.3%
add-sqr-sqrt100.0%
+-commutative100.0%
Applied egg-rr100.0%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ x (- 1.0 (/ y z)))))
(if (<= y -5.5e+56)
(- z)
(if (<= y 5.2e-107)
(+ x y)
(if (<= y 2.4e+45)
t_0
(if (<= y 2.05e+67)
(* y (+ 1.0 (/ y z)))
(if (<= y 1.8e+103) t_0 (- z))))))))
double code(double x, double y, double z) {
double t_0 = x / (1.0 - (y / z));
double tmp;
if (y <= -5.5e+56) {
tmp = -z;
} else if (y <= 5.2e-107) {
tmp = x + y;
} else if (y <= 2.4e+45) {
tmp = t_0;
} else if (y <= 2.05e+67) {
tmp = y * (1.0 + (y / z));
} else if (y <= 1.8e+103) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = x / (1.0d0 - (y / z))
if (y <= (-5.5d+56)) then
tmp = -z
else if (y <= 5.2d-107) then
tmp = x + y
else if (y <= 2.4d+45) then
tmp = t_0
else if (y <= 2.05d+67) then
tmp = y * (1.0d0 + (y / z))
else if (y <= 1.8d+103) then
tmp = t_0
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x / (1.0 - (y / z));
double tmp;
if (y <= -5.5e+56) {
tmp = -z;
} else if (y <= 5.2e-107) {
tmp = x + y;
} else if (y <= 2.4e+45) {
tmp = t_0;
} else if (y <= 2.05e+67) {
tmp = y * (1.0 + (y / z));
} else if (y <= 1.8e+103) {
tmp = t_0;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): t_0 = x / (1.0 - (y / z)) tmp = 0 if y <= -5.5e+56: tmp = -z elif y <= 5.2e-107: tmp = x + y elif y <= 2.4e+45: tmp = t_0 elif y <= 2.05e+67: tmp = y * (1.0 + (y / z)) elif y <= 1.8e+103: tmp = t_0 else: tmp = -z return tmp
function code(x, y, z) t_0 = Float64(x / Float64(1.0 - Float64(y / z))) tmp = 0.0 if (y <= -5.5e+56) tmp = Float64(-z); elseif (y <= 5.2e-107) tmp = Float64(x + y); elseif (y <= 2.4e+45) tmp = t_0; elseif (y <= 2.05e+67) tmp = Float64(y * Float64(1.0 + Float64(y / z))); elseif (y <= 1.8e+103) tmp = t_0; else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x / (1.0 - (y / z)); tmp = 0.0; if (y <= -5.5e+56) tmp = -z; elseif (y <= 5.2e-107) tmp = x + y; elseif (y <= 2.4e+45) tmp = t_0; elseif (y <= 2.05e+67) tmp = y * (1.0 + (y / z)); elseif (y <= 1.8e+103) tmp = t_0; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+56], (-z), If[LessEqual[y, 5.2e-107], N[(x + y), $MachinePrecision], If[LessEqual[y, 2.4e+45], t$95$0, If[LessEqual[y, 2.05e+67], N[(y * N[(1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+103], t$95$0, (-z)]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{1 - \frac{y}{z}}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+56}:\\
\;\;\;\;-z\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-107}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+45}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+67}:\\
\;\;\;\;y \cdot \left(1 + \frac{y}{z}\right)\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+103}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if y < -5.5000000000000002e56 or 1.80000000000000008e103 < y Initial program 68.5%
Taylor expanded in y around inf 73.4%
mul-1-neg73.4%
Simplified73.4%
if -5.5000000000000002e56 < y < 5.2000000000000001e-107Initial program 98.4%
Taylor expanded in z around inf 75.6%
+-commutative75.6%
Simplified75.6%
if 5.2000000000000001e-107 < y < 2.39999999999999989e45 or 2.0499999999999999e67 < y < 1.80000000000000008e103Initial program 93.6%
Taylor expanded in x around inf 72.7%
if 2.39999999999999989e45 < y < 2.0499999999999999e67Initial program 100.0%
Taylor expanded in x around 0 97.1%
Taylor expanded in y around 0 64.6%
Final simplification74.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- 1.0 (/ y z))))
(if (<= y -2.8e+63)
(- z)
(if (<= y 3.6e-107)
(+ x y)
(if (<= y 1.05e+31) (/ x t_0) (if (<= y 7e+75) (/ y t_0) (- z)))))))
double code(double x, double y, double z) {
double t_0 = 1.0 - (y / z);
double tmp;
if (y <= -2.8e+63) {
tmp = -z;
} else if (y <= 3.6e-107) {
tmp = x + y;
} else if (y <= 1.05e+31) {
tmp = x / t_0;
} else if (y <= 7e+75) {
tmp = y / t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = 1.0d0 - (y / z)
if (y <= (-2.8d+63)) then
tmp = -z
else if (y <= 3.6d-107) then
tmp = x + y
else if (y <= 1.05d+31) then
tmp = x / t_0
else if (y <= 7d+75) then
tmp = y / t_0
else
tmp = -z
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 <= -2.8e+63) {
tmp = -z;
} else if (y <= 3.6e-107) {
tmp = x + y;
} else if (y <= 1.05e+31) {
tmp = x / t_0;
} else if (y <= 7e+75) {
tmp = y / t_0;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): t_0 = 1.0 - (y / z) tmp = 0 if y <= -2.8e+63: tmp = -z elif y <= 3.6e-107: tmp = x + y elif y <= 1.05e+31: tmp = x / t_0 elif y <= 7e+75: tmp = y / t_0 else: tmp = -z return tmp
function code(x, y, z) t_0 = Float64(1.0 - Float64(y / z)) tmp = 0.0 if (y <= -2.8e+63) tmp = Float64(-z); elseif (y <= 3.6e-107) tmp = Float64(x + y); elseif (y <= 1.05e+31) tmp = Float64(x / t_0); elseif (y <= 7e+75) tmp = Float64(y / t_0); else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 1.0 - (y / z); tmp = 0.0; if (y <= -2.8e+63) tmp = -z; elseif (y <= 3.6e-107) tmp = x + y; elseif (y <= 1.05e+31) tmp = x / t_0; elseif (y <= 7e+75) tmp = y / t_0; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e+63], (-z), If[LessEqual[y, 3.6e-107], N[(x + y), $MachinePrecision], If[LessEqual[y, 1.05e+31], N[(x / t$95$0), $MachinePrecision], If[LessEqual[y, 7e+75], N[(y / t$95$0), $MachinePrecision], (-z)]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - \frac{y}{z}\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{+63}:\\
\;\;\;\;-z\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-107}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+31}:\\
\;\;\;\;\frac{x}{t\_0}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+75}:\\
\;\;\;\;\frac{y}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if y < -2.79999999999999987e63 or 6.9999999999999997e75 < y Initial program 69.6%
Taylor expanded in y around inf 71.1%
mul-1-neg71.1%
Simplified71.1%
if -2.79999999999999987e63 < y < 3.59999999999999976e-107Initial program 98.4%
Taylor expanded in z around inf 75.6%
+-commutative75.6%
Simplified75.6%
if 3.59999999999999976e-107 < y < 1.04999999999999989e31Initial program 99.8%
Taylor expanded in x around inf 76.8%
if 1.04999999999999989e31 < y < 6.9999999999999997e75Initial program 79.6%
Taylor expanded in x around 0 77.4%
Final simplification74.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ z (/ y (- (- x) y)))))
(if (<= y -1e+42)
t_0
(if (<= y 4.5e-107)
(+ x y)
(if (<= y 2.3e+28) (/ x (- 1.0 (/ y z))) t_0)))))
double code(double x, double y, double z) {
double t_0 = z / (y / (-x - y));
double tmp;
if (y <= -1e+42) {
tmp = t_0;
} else if (y <= 4.5e-107) {
tmp = x + y;
} else if (y <= 2.3e+28) {
tmp = x / (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 = z / (y / (-x - y))
if (y <= (-1d+42)) then
tmp = t_0
else if (y <= 4.5d-107) then
tmp = x + y
else if (y <= 2.3d+28) then
tmp = x / (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 = z / (y / (-x - y));
double tmp;
if (y <= -1e+42) {
tmp = t_0;
} else if (y <= 4.5e-107) {
tmp = x + y;
} else if (y <= 2.3e+28) {
tmp = x / (1.0 - (y / z));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z / (y / (-x - y)) tmp = 0 if y <= -1e+42: tmp = t_0 elif y <= 4.5e-107: tmp = x + y elif y <= 2.3e+28: tmp = x / (1.0 - (y / z)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z / Float64(y / Float64(Float64(-x) - y))) tmp = 0.0 if (y <= -1e+42) tmp = t_0; elseif (y <= 4.5e-107) tmp = Float64(x + y); elseif (y <= 2.3e+28) tmp = Float64(x / Float64(1.0 - Float64(y / z))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z / (y / (-x - y)); tmp = 0.0; if (y <= -1e+42) tmp = t_0; elseif (y <= 4.5e-107) tmp = x + y; elseif (y <= 2.3e+28) tmp = x / (1.0 - (y / z)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z / N[(y / N[((-x) - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+42], t$95$0, If[LessEqual[y, 4.5e-107], N[(x + y), $MachinePrecision], If[LessEqual[y, 2.3e+28], N[(x / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{z}{\frac{y}{\left(-x\right) - y}}\\
\mathbf{if}\;y \leq -1 \cdot 10^{+42}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-107}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+28}:\\
\;\;\;\;\frac{x}{1 - \frac{y}{z}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -1.00000000000000004e42 or 2.29999999999999984e28 < y Initial program 71.4%
Taylor expanded in z around 0 66.6%
mul-1-neg66.6%
associate-/l*82.4%
distribute-rgt-neg-in82.4%
distribute-neg-frac282.4%
+-commutative82.4%
Simplified82.4%
associate-*r/66.6%
distribute-frac-neg266.6%
add-sqr-sqrt31.0%
sqrt-unprod19.5%
sqr-neg19.5%
sqrt-unprod1.2%
add-sqr-sqrt2.9%
associate-*r/3.0%
clear-num3.0%
un-div-inv3.0%
add-sqr-sqrt1.3%
sqrt-unprod20.0%
sqr-neg20.0%
sqrt-unprod36.7%
add-sqr-sqrt82.4%
+-commutative82.4%
Applied egg-rr82.4%
if -1.00000000000000004e42 < y < 4.50000000000000016e-107Initial program 99.1%
Taylor expanded in z around inf 77.1%
+-commutative77.1%
Simplified77.1%
if 4.50000000000000016e-107 < y < 2.29999999999999984e28Initial program 99.8%
Taylor expanded in x around inf 76.1%
Final simplification79.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ z (/ y (- (- x) y)))))
(if (<= y -6.2e+41)
t_0
(if (<= y 3.9e-107)
(* (+ x y) (+ 1.0 (/ y z)))
(if (<= y 2.5e+27) (/ x (- 1.0 (/ y z))) t_0)))))
double code(double x, double y, double z) {
double t_0 = z / (y / (-x - y));
double tmp;
if (y <= -6.2e+41) {
tmp = t_0;
} else if (y <= 3.9e-107) {
tmp = (x + y) * (1.0 + (y / z));
} else if (y <= 2.5e+27) {
tmp = x / (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 = z / (y / (-x - y))
if (y <= (-6.2d+41)) then
tmp = t_0
else if (y <= 3.9d-107) then
tmp = (x + y) * (1.0d0 + (y / z))
else if (y <= 2.5d+27) then
tmp = x / (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 = z / (y / (-x - y));
double tmp;
if (y <= -6.2e+41) {
tmp = t_0;
} else if (y <= 3.9e-107) {
tmp = (x + y) * (1.0 + (y / z));
} else if (y <= 2.5e+27) {
tmp = x / (1.0 - (y / z));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z / (y / (-x - y)) tmp = 0 if y <= -6.2e+41: tmp = t_0 elif y <= 3.9e-107: tmp = (x + y) * (1.0 + (y / z)) elif y <= 2.5e+27: tmp = x / (1.0 - (y / z)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z / Float64(y / Float64(Float64(-x) - y))) tmp = 0.0 if (y <= -6.2e+41) tmp = t_0; elseif (y <= 3.9e-107) tmp = Float64(Float64(x + y) * Float64(1.0 + Float64(y / z))); elseif (y <= 2.5e+27) tmp = Float64(x / Float64(1.0 - Float64(y / z))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z / (y / (-x - y)); tmp = 0.0; if (y <= -6.2e+41) tmp = t_0; elseif (y <= 3.9e-107) tmp = (x + y) * (1.0 + (y / z)); elseif (y <= 2.5e+27) tmp = x / (1.0 - (y / z)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z / N[(y / N[((-x) - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+41], t$95$0, If[LessEqual[y, 3.9e-107], N[(N[(x + y), $MachinePrecision] * N[(1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+27], N[(x / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{z}{\frac{y}{\left(-x\right) - y}}\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+41}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{-107}:\\
\;\;\;\;\left(x + y\right) \cdot \left(1 + \frac{y}{z}\right)\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+27}:\\
\;\;\;\;\frac{x}{1 - \frac{y}{z}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -6.2e41 or 2.4999999999999999e27 < y Initial program 71.4%
Taylor expanded in z around 0 66.6%
mul-1-neg66.6%
associate-/l*82.4%
distribute-rgt-neg-in82.4%
distribute-neg-frac282.4%
+-commutative82.4%
Simplified82.4%
associate-*r/66.6%
distribute-frac-neg266.6%
add-sqr-sqrt31.0%
sqrt-unprod19.5%
sqr-neg19.5%
sqrt-unprod1.2%
add-sqr-sqrt2.9%
associate-*r/3.0%
clear-num3.0%
un-div-inv3.0%
add-sqr-sqrt1.3%
sqrt-unprod20.0%
sqr-neg20.0%
sqrt-unprod36.7%
add-sqr-sqrt82.4%
+-commutative82.4%
Applied egg-rr82.4%
if -6.2e41 < y < 3.9000000000000001e-107Initial program 99.1%
Taylor expanded in z around inf 77.0%
associate-+r+77.0%
*-rgt-identity77.0%
*-commutative77.0%
associate-/l*77.5%
distribute-lft-in77.5%
+-commutative77.5%
Simplified77.5%
if 3.9000000000000001e-107 < y < 2.4999999999999999e27Initial program 99.8%
Taylor expanded in x around inf 76.1%
Final simplification79.3%
(FPCore (x y z)
:precision binary64
(if (<= y -7.5e+62)
(- z)
(if (<= y 3.2e-13)
(+ x y)
(if (<= y 8.5e+45) (/ z (- (/ y x))) (if (<= y 4.1e+51) y (- z))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -7.5e+62) {
tmp = -z;
} else if (y <= 3.2e-13) {
tmp = x + y;
} else if (y <= 8.5e+45) {
tmp = z / -(y / x);
} else if (y <= 4.1e+51) {
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 <= (-7.5d+62)) then
tmp = -z
else if (y <= 3.2d-13) then
tmp = x + y
else if (y <= 8.5d+45) then
tmp = z / -(y / x)
else if (y <= 4.1d+51) 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 <= -7.5e+62) {
tmp = -z;
} else if (y <= 3.2e-13) {
tmp = x + y;
} else if (y <= 8.5e+45) {
tmp = z / -(y / x);
} else if (y <= 4.1e+51) {
tmp = y;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -7.5e+62: tmp = -z elif y <= 3.2e-13: tmp = x + y elif y <= 8.5e+45: tmp = z / -(y / x) elif y <= 4.1e+51: tmp = y else: tmp = -z return tmp
function code(x, y, z) tmp = 0.0 if (y <= -7.5e+62) tmp = Float64(-z); elseif (y <= 3.2e-13) tmp = Float64(x + y); elseif (y <= 8.5e+45) tmp = Float64(z / Float64(-Float64(y / x))); elseif (y <= 4.1e+51) tmp = y; else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -7.5e+62) tmp = -z; elseif (y <= 3.2e-13) tmp = x + y; elseif (y <= 8.5e+45) tmp = z / -(y / x); elseif (y <= 4.1e+51) tmp = y; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -7.5e+62], (-z), If[LessEqual[y, 3.2e-13], N[(x + y), $MachinePrecision], If[LessEqual[y, 8.5e+45], N[(z / (-N[(y / x), $MachinePrecision])), $MachinePrecision], If[LessEqual[y, 4.1e+51], y, (-z)]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+62}:\\
\;\;\;\;-z\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-13}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+45}:\\
\;\;\;\;\frac{z}{-\frac{y}{x}}\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+51}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if y < -7.49999999999999998e62 or 4.10000000000000011e51 < y Initial program 70.9%
Taylor expanded in y around inf 70.0%
mul-1-neg70.0%
Simplified70.0%
if -7.49999999999999998e62 < y < 3.2e-13Initial program 98.7%
Taylor expanded in z around inf 71.5%
+-commutative71.5%
Simplified71.5%
if 3.2e-13 < y < 8.4999999999999996e45Initial program 81.5%
Taylor expanded in z around 0 71.0%
mul-1-neg71.0%
associate-/l*71.2%
distribute-rgt-neg-in71.2%
distribute-neg-frac271.2%
+-commutative71.2%
Simplified71.2%
associate-*r/71.0%
distribute-frac-neg271.0%
add-sqr-sqrt70.9%
sqrt-unprod71.0%
sqr-neg71.0%
sqrt-unprod0.0%
add-sqr-sqrt3.0%
associate-*r/3.0%
clear-num3.0%
un-div-inv3.0%
add-sqr-sqrt0.0%
sqrt-unprod71.0%
sqr-neg71.0%
sqrt-unprod70.9%
add-sqr-sqrt71.0%
+-commutative71.0%
Applied egg-rr71.0%
Taylor expanded in y around 0 66.5%
associate-*r/52.3%
*-commutative52.3%
associate-/r/66.5%
Simplified66.5%
if 8.4999999999999996e45 < y < 4.10000000000000011e51Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in y around 0 100.0%
Final simplification71.1%
(FPCore (x y z)
:precision binary64
(if (<= y -3.1e+62)
(- z)
(if (<= y 1.2e-11)
(+ x y)
(if (<= y 5.8e+44) (* z (/ x (- y))) (if (<= y 2e+48) y (- z))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -3.1e+62) {
tmp = -z;
} else if (y <= 1.2e-11) {
tmp = x + y;
} else if (y <= 5.8e+44) {
tmp = z * (x / -y);
} else if (y <= 2e+48) {
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 <= (-3.1d+62)) then
tmp = -z
else if (y <= 1.2d-11) then
tmp = x + y
else if (y <= 5.8d+44) then
tmp = z * (x / -y)
else if (y <= 2d+48) 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 <= -3.1e+62) {
tmp = -z;
} else if (y <= 1.2e-11) {
tmp = x + y;
} else if (y <= 5.8e+44) {
tmp = z * (x / -y);
} else if (y <= 2e+48) {
tmp = y;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -3.1e+62: tmp = -z elif y <= 1.2e-11: tmp = x + y elif y <= 5.8e+44: tmp = z * (x / -y) elif y <= 2e+48: tmp = y else: tmp = -z return tmp
function code(x, y, z) tmp = 0.0 if (y <= -3.1e+62) tmp = Float64(-z); elseif (y <= 1.2e-11) tmp = Float64(x + y); elseif (y <= 5.8e+44) tmp = Float64(z * Float64(x / Float64(-y))); elseif (y <= 2e+48) tmp = y; else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -3.1e+62) tmp = -z; elseif (y <= 1.2e-11) tmp = x + y; elseif (y <= 5.8e+44) tmp = z * (x / -y); elseif (y <= 2e+48) tmp = y; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -3.1e+62], (-z), If[LessEqual[y, 1.2e-11], N[(x + y), $MachinePrecision], If[LessEqual[y, 5.8e+44], N[(z * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+48], y, (-z)]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+62}:\\
\;\;\;\;-z\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-11}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+44}:\\
\;\;\;\;z \cdot \frac{x}{-y}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+48}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if y < -3.10000000000000014e62 or 2.00000000000000009e48 < y Initial program 70.9%
Taylor expanded in y around inf 70.0%
mul-1-neg70.0%
Simplified70.0%
if -3.10000000000000014e62 < y < 1.2000000000000001e-11Initial program 98.7%
Taylor expanded in z around inf 71.5%
+-commutative71.5%
Simplified71.5%
if 1.2000000000000001e-11 < y < 5.8000000000000004e44Initial program 81.5%
Taylor expanded in z around 0 71.0%
mul-1-neg71.0%
associate-/l*71.2%
distribute-rgt-neg-in71.2%
distribute-neg-frac271.2%
+-commutative71.2%
Simplified71.2%
Taylor expanded in y around 0 66.7%
associate-*r/66.7%
mul-1-neg66.7%
Simplified66.7%
if 5.8000000000000004e44 < y < 2.00000000000000009e48Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in y around 0 100.0%
Final simplification71.1%
(FPCore (x y z)
:precision binary64
(if (<= y -9.2e+61)
(- z)
(if (<= y 1.6e-54)
(+ x y)
(if (<= y 1.2e+45) (/ (* x (- z)) y) (if (<= y 1.2e+48) y (- z))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -9.2e+61) {
tmp = -z;
} else if (y <= 1.6e-54) {
tmp = x + y;
} else if (y <= 1.2e+45) {
tmp = (x * -z) / y;
} else if (y <= 1.2e+48) {
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 <= (-9.2d+61)) then
tmp = -z
else if (y <= 1.6d-54) then
tmp = x + y
else if (y <= 1.2d+45) then
tmp = (x * -z) / y
else if (y <= 1.2d+48) 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 <= -9.2e+61) {
tmp = -z;
} else if (y <= 1.6e-54) {
tmp = x + y;
} else if (y <= 1.2e+45) {
tmp = (x * -z) / y;
} else if (y <= 1.2e+48) {
tmp = y;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -9.2e+61: tmp = -z elif y <= 1.6e-54: tmp = x + y elif y <= 1.2e+45: tmp = (x * -z) / y elif y <= 1.2e+48: tmp = y else: tmp = -z return tmp
function code(x, y, z) tmp = 0.0 if (y <= -9.2e+61) tmp = Float64(-z); elseif (y <= 1.6e-54) tmp = Float64(x + y); elseif (y <= 1.2e+45) tmp = Float64(Float64(x * Float64(-z)) / y); elseif (y <= 1.2e+48) tmp = y; else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -9.2e+61) tmp = -z; elseif (y <= 1.6e-54) tmp = x + y; elseif (y <= 1.2e+45) tmp = (x * -z) / y; elseif (y <= 1.2e+48) tmp = y; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -9.2e+61], (-z), If[LessEqual[y, 1.6e-54], N[(x + y), $MachinePrecision], If[LessEqual[y, 1.2e+45], N[(N[(x * (-z)), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 1.2e+48], y, (-z)]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+61}:\\
\;\;\;\;-z\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-54}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+45}:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{y}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+48}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if y < -9.1999999999999998e61 or 1.2000000000000001e48 < y Initial program 70.9%
Taylor expanded in y around inf 70.0%
mul-1-neg70.0%
Simplified70.0%
if -9.1999999999999998e61 < y < 1.59999999999999999e-54Initial program 98.6%
Taylor expanded in z around inf 74.0%
+-commutative74.0%
Simplified74.0%
if 1.59999999999999999e-54 < y < 1.19999999999999995e45Initial program 91.5%
Taylor expanded in z around 0 61.1%
mul-1-neg61.1%
associate-/l*57.0%
distribute-rgt-neg-in57.0%
distribute-neg-frac257.0%
+-commutative57.0%
Simplified57.0%
Taylor expanded in y around 0 54.5%
associate-*r/54.5%
associate-*r*54.5%
mul-1-neg54.5%
Simplified54.5%
if 1.19999999999999995e45 < y < 1.2000000000000001e48Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in y around 0 100.0%
Final simplification71.2%
(FPCore (x y z) :precision binary64 (if (or (<= y -5.6e+57) (not (<= y 2.5e+49))) (- z) (+ x y)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -5.6e+57) || !(y <= 2.5e+49)) {
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 <= (-5.6d+57)) .or. (.not. (y <= 2.5d+49))) 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 <= -5.6e+57) || !(y <= 2.5e+49)) {
tmp = -z;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -5.6e+57) or not (y <= 2.5e+49): tmp = -z else: tmp = x + y return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -5.6e+57) || !(y <= 2.5e+49)) tmp = Float64(-z); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -5.6e+57) || ~((y <= 2.5e+49))) tmp = -z; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -5.6e+57], N[Not[LessEqual[y, 2.5e+49]], $MachinePrecision]], (-z), N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+57} \lor \neg \left(y \leq 2.5 \cdot 10^{+49}\right):\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < -5.59999999999999999e57 or 2.5000000000000002e49 < y Initial program 70.9%
Taylor expanded in y around inf 70.0%
mul-1-neg70.0%
Simplified70.0%
if -5.59999999999999999e57 < y < 2.5000000000000002e49Initial program 97.6%
Taylor expanded in z around inf 69.3%
+-commutative69.3%
Simplified69.3%
Final simplification69.6%
(FPCore (x y z) :precision binary64 (if (or (<= y -6.2e+41) (not (<= y 2.9e+27))) (- z) x))
double code(double x, double y, double z) {
double tmp;
if ((y <= -6.2e+41) || !(y <= 2.9e+27)) {
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.2d+41)) .or. (.not. (y <= 2.9d+27))) 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.2e+41) || !(y <= 2.9e+27)) {
tmp = -z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -6.2e+41) or not (y <= 2.9e+27): tmp = -z else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -6.2e+41) || !(y <= 2.9e+27)) tmp = Float64(-z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -6.2e+41) || ~((y <= 2.9e+27))) tmp = -z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -6.2e+41], N[Not[LessEqual[y, 2.9e+27]], $MachinePrecision]], (-z), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+41} \lor \neg \left(y \leq 2.9 \cdot 10^{+27}\right):\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.2e41 or 2.9000000000000001e27 < y Initial program 71.4%
Taylor expanded in y around inf 64.0%
mul-1-neg64.0%
Simplified64.0%
if -6.2e41 < y < 2.9000000000000001e27Initial program 99.3%
Taylor expanded in y around 0 54.2%
Final simplification58.2%
(FPCore (x y z) :precision binary64 (if (<= x -2.15e-168) x (if (<= x 3.3e-199) y x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.15e-168) {
tmp = x;
} else if (x <= 3.3e-199) {
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 <= (-2.15d-168)) then
tmp = x
else if (x <= 3.3d-199) 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 <= -2.15e-168) {
tmp = x;
} else if (x <= 3.3e-199) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.15e-168: tmp = x elif x <= 3.3e-199: tmp = y else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.15e-168) tmp = x; elseif (x <= 3.3e-199) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.15e-168) tmp = x; elseif (x <= 3.3e-199) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.15e-168], x, If[LessEqual[x, 3.3e-199], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.15 \cdot 10^{-168}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-199}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.14999999999999998e-168 or 3.3000000000000002e-199 < x Initial program 88.8%
Taylor expanded in y around 0 41.0%
if -2.14999999999999998e-168 < x < 3.3000000000000002e-199Initial program 84.8%
Taylor expanded in x around 0 76.2%
Taylor expanded in y around 0 44.1%
Final simplification41.7%
(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.9%
Taylor expanded in y around 0 34.4%
Final simplification34.4%
(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 2024096
(FPCore (x y z)
:name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, A"
:precision binary64
:alt
(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))))