
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= t -4e+107)
(+ (- x (* a (/ y t))) (* y (/ z t)))
(if (<= t 2.8e+84)
(+ (+ x y) (/ (- z t) (/ (- t a) y)))
(- x (* y (/ (- a z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4e+107) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else if (t <= 2.8e+84) {
tmp = (x + y) + ((z - t) / ((t - a) / y));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-4d+107)) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else if (t <= 2.8d+84) then
tmp = (x + y) + ((z - t) / ((t - a) / y))
else
tmp = x - (y * ((a - z) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4e+107) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else if (t <= 2.8e+84) {
tmp = (x + y) + ((z - t) / ((t - a) / y));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4e+107: tmp = (x - (a * (y / t))) + (y * (z / t)) elif t <= 2.8e+84: tmp = (x + y) + ((z - t) / ((t - a) / y)) else: tmp = x - (y * ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4e+107) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); elseif (t <= 2.8e+84) tmp = Float64(Float64(x + y) + Float64(Float64(z - t) / Float64(Float64(t - a) / y))); else tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4e+107) tmp = (x - (a * (y / t))) + (y * (z / t)); elseif (t <= 2.8e+84) tmp = (x + y) + ((z - t) / ((t - a) / y)); else tmp = x - (y * ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4e+107], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+84], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] / N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+107}:\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+84}:\\
\;\;\;\;\left(x + y\right) + \frac{z - t}{\frac{t - a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\end{array}
\end{array}
if t < -3.9999999999999999e107Initial program 61.4%
associate-/l*66.9%
*-commutative66.9%
Applied egg-rr66.9%
Taylor expanded in t around inf 87.2%
sub-neg87.2%
mul-1-neg87.2%
unsub-neg87.2%
associate-/l*94.8%
mul-1-neg94.8%
remove-double-neg94.8%
associate-/l*97.3%
Simplified97.3%
if -3.9999999999999999e107 < t < 2.79999999999999982e84Initial program 93.5%
associate-/l*93.9%
*-commutative93.9%
Applied egg-rr93.9%
*-commutative93.9%
clear-num93.9%
un-div-inv94.7%
Applied egg-rr94.7%
if 2.79999999999999982e84 < t Initial program 62.9%
associate-/l*66.0%
*-commutative66.0%
Applied egg-rr66.0%
*-commutative66.0%
clear-num65.6%
un-div-inv65.8%
Applied egg-rr65.8%
Taylor expanded in t around -inf 76.5%
mul-1-neg76.5%
unsub-neg76.5%
*-commutative76.5%
cancel-sign-sub-inv76.5%
mul-1-neg76.5%
distribute-rgt-in78.3%
associate-/l*87.1%
mul-1-neg87.1%
sub-neg87.1%
Simplified87.1%
Final simplification93.5%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -1.12e+24)
(and (not (<= a -3.8e-33)) (or (<= a -4.1e-70) (not (<= a 6.5e+83)))))
(+ x y)
(- x (/ (* y (- a z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.12e+24) || (!(a <= -3.8e-33) && ((a <= -4.1e-70) || !(a <= 6.5e+83)))) {
tmp = x + y;
} else {
tmp = x - ((y * (a - z)) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.12d+24)) .or. (.not. (a <= (-3.8d-33))) .and. (a <= (-4.1d-70)) .or. (.not. (a <= 6.5d+83))) then
tmp = x + y
else
tmp = x - ((y * (a - z)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.12e+24) || (!(a <= -3.8e-33) && ((a <= -4.1e-70) || !(a <= 6.5e+83)))) {
tmp = x + y;
} else {
tmp = x - ((y * (a - z)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.12e+24) or (not (a <= -3.8e-33) and ((a <= -4.1e-70) or not (a <= 6.5e+83))): tmp = x + y else: tmp = x - ((y * (a - z)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.12e+24) || (!(a <= -3.8e-33) && ((a <= -4.1e-70) || !(a <= 6.5e+83)))) tmp = Float64(x + y); else tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.12e+24) || (~((a <= -3.8e-33)) && ((a <= -4.1e-70) || ~((a <= 6.5e+83))))) tmp = x + y; else tmp = x - ((y * (a - z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.12e+24], And[N[Not[LessEqual[a, -3.8e-33]], $MachinePrecision], Or[LessEqual[a, -4.1e-70], N[Not[LessEqual[a, 6.5e+83]], $MachinePrecision]]]], N[(x + y), $MachinePrecision], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.12 \cdot 10^{+24} \lor \neg \left(a \leq -3.8 \cdot 10^{-33}\right) \land \left(a \leq -4.1 \cdot 10^{-70} \lor \neg \left(a \leq 6.5 \cdot 10^{+83}\right)\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\end{array}
\end{array}
if a < -1.12e24 or -3.79999999999999994e-33 < a < -4.09999999999999977e-70 or 6.5000000000000003e83 < a Initial program 87.2%
Taylor expanded in a around inf 82.9%
+-commutative82.9%
Simplified82.9%
if -1.12e24 < a < -3.79999999999999994e-33 or -4.09999999999999977e-70 < a < 6.5000000000000003e83Initial program 78.1%
Taylor expanded in t around inf 81.8%
associate--l+81.8%
distribute-lft-out--81.8%
div-sub81.9%
mul-1-neg81.9%
unsub-neg81.9%
*-commutative81.9%
distribute-lft-out--81.9%
Simplified81.9%
Final simplification82.3%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -2.95e+23)
(not
(or (<= a -1.08e-33) (and (not (<= a -1.3e-68)) (<= a 8.5e+83)))))
(+ x y)
(- x (* y (/ (- a z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.95e+23) || !((a <= -1.08e-33) || (!(a <= -1.3e-68) && (a <= 8.5e+83)))) {
tmp = x + y;
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.95d+23)) .or. (.not. (a <= (-1.08d-33)) .or. (.not. (a <= (-1.3d-68))) .and. (a <= 8.5d+83))) then
tmp = x + y
else
tmp = x - (y * ((a - z) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.95e+23) || !((a <= -1.08e-33) || (!(a <= -1.3e-68) && (a <= 8.5e+83)))) {
tmp = x + y;
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.95e+23) or not ((a <= -1.08e-33) or (not (a <= -1.3e-68) and (a <= 8.5e+83))): tmp = x + y else: tmp = x - (y * ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.95e+23) || !((a <= -1.08e-33) || (!(a <= -1.3e-68) && (a <= 8.5e+83)))) tmp = Float64(x + y); else tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.95e+23) || ~(((a <= -1.08e-33) || (~((a <= -1.3e-68)) && (a <= 8.5e+83))))) tmp = x + y; else tmp = x - (y * ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.95e+23], N[Not[Or[LessEqual[a, -1.08e-33], And[N[Not[LessEqual[a, -1.3e-68]], $MachinePrecision], LessEqual[a, 8.5e+83]]]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.95 \cdot 10^{+23} \lor \neg \left(a \leq -1.08 \cdot 10^{-33} \lor \neg \left(a \leq -1.3 \cdot 10^{-68}\right) \land a \leq 8.5 \cdot 10^{+83}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\end{array}
\end{array}
if a < -2.94999999999999994e23 or -1.08000000000000007e-33 < a < -1.2999999999999999e-68 or 8.4999999999999995e83 < a Initial program 87.2%
Taylor expanded in a around inf 82.9%
+-commutative82.9%
Simplified82.9%
if -2.94999999999999994e23 < a < -1.08000000000000007e-33 or -1.2999999999999999e-68 < a < 8.4999999999999995e83Initial program 78.1%
associate-/l*76.7%
*-commutative76.7%
Applied egg-rr76.7%
*-commutative76.7%
clear-num76.4%
un-div-inv77.5%
Applied egg-rr77.5%
Taylor expanded in t around -inf 81.9%
mul-1-neg81.9%
unsub-neg81.9%
*-commutative81.9%
cancel-sign-sub-inv81.9%
mul-1-neg81.9%
distribute-rgt-in81.9%
associate-/l*81.5%
mul-1-neg81.5%
sub-neg81.5%
Simplified81.5%
Final simplification82.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z t))))
(if (<= t -9e+106)
(+ (- x (* a (/ y t))) t_1)
(if (<= t -7.3e-23)
(+ x y)
(if (<= t -5.8e-58)
(+ x t_1)
(if (<= t 3.6e-28)
(- (+ x y) (* y (/ z a)))
(- x (* y (/ (- a z) t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / t);
double tmp;
if (t <= -9e+106) {
tmp = (x - (a * (y / t))) + t_1;
} else if (t <= -7.3e-23) {
tmp = x + y;
} else if (t <= -5.8e-58) {
tmp = x + t_1;
} else if (t <= 3.6e-28) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z / t)
if (t <= (-9d+106)) then
tmp = (x - (a * (y / t))) + t_1
else if (t <= (-7.3d-23)) then
tmp = x + y
else if (t <= (-5.8d-58)) then
tmp = x + t_1
else if (t <= 3.6d-28) then
tmp = (x + y) - (y * (z / a))
else
tmp = x - (y * ((a - z) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / t);
double tmp;
if (t <= -9e+106) {
tmp = (x - (a * (y / t))) + t_1;
} else if (t <= -7.3e-23) {
tmp = x + y;
} else if (t <= -5.8e-58) {
tmp = x + t_1;
} else if (t <= 3.6e-28) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / t) tmp = 0 if t <= -9e+106: tmp = (x - (a * (y / t))) + t_1 elif t <= -7.3e-23: tmp = x + y elif t <= -5.8e-58: tmp = x + t_1 elif t <= 3.6e-28: tmp = (x + y) - (y * (z / a)) else: tmp = x - (y * ((a - z) / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / t)) tmp = 0.0 if (t <= -9e+106) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + t_1); elseif (t <= -7.3e-23) tmp = Float64(x + y); elseif (t <= -5.8e-58) tmp = Float64(x + t_1); elseif (t <= 3.6e-28) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / t); tmp = 0.0; if (t <= -9e+106) tmp = (x - (a * (y / t))) + t_1; elseif (t <= -7.3e-23) tmp = x + y; elseif (t <= -5.8e-58) tmp = x + t_1; elseif (t <= 3.6e-28) tmp = (x + y) - (y * (z / a)); else tmp = x - (y * ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+106], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, -7.3e-23], N[(x + y), $MachinePrecision], If[LessEqual[t, -5.8e-58], N[(x + t$95$1), $MachinePrecision], If[LessEqual[t, 3.6e-28], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -9 \cdot 10^{+106}:\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + t\_1\\
\mathbf{elif}\;t \leq -7.3 \cdot 10^{-23}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-58}:\\
\;\;\;\;x + t\_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-28}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\end{array}
\end{array}
if t < -8.9999999999999994e106Initial program 61.4%
associate-/l*66.9%
*-commutative66.9%
Applied egg-rr66.9%
Taylor expanded in t around inf 87.2%
sub-neg87.2%
mul-1-neg87.2%
unsub-neg87.2%
associate-/l*94.8%
mul-1-neg94.8%
remove-double-neg94.8%
associate-/l*97.3%
Simplified97.3%
if -8.9999999999999994e106 < t < -7.30000000000000005e-23Initial program 90.4%
Taylor expanded in a around inf 86.9%
+-commutative86.9%
Simplified86.9%
if -7.30000000000000005e-23 < t < -5.7999999999999998e-58Initial program 96.5%
associate-/l*96.5%
*-commutative96.5%
Applied egg-rr96.5%
*-commutative96.5%
clear-num96.5%
un-div-inv96.8%
Applied egg-rr96.8%
div-sub96.8%
Applied egg-rr96.8%
Taylor expanded in a around 0 99.7%
sub-neg99.7%
distribute-rgt1-in99.7%
metadata-eval99.7%
mul0-lft99.7%
+-rgt-identity99.7%
mul-1-neg99.7%
remove-double-neg99.7%
associate-/l*100.0%
Simplified100.0%
if -5.7999999999999998e-58 < t < 3.5999999999999999e-28Initial program 95.3%
Taylor expanded in t around 0 86.2%
+-commutative86.2%
associate-/l*87.3%
Simplified87.3%
if 3.5999999999999999e-28 < t Initial program 68.3%
associate-/l*71.8%
*-commutative71.8%
Applied egg-rr71.8%
*-commutative71.8%
clear-num71.6%
un-div-inv71.6%
Applied egg-rr71.6%
Taylor expanded in t around -inf 75.9%
mul-1-neg75.9%
unsub-neg75.9%
*-commutative75.9%
cancel-sign-sub-inv75.9%
mul-1-neg75.9%
distribute-rgt-in77.2%
associate-/l*83.8%
mul-1-neg83.8%
sub-neg83.8%
Simplified83.8%
Final simplification88.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ (- a z) t)))))
(if (<= t -1.6e+105)
t_1
(if (<= t -6e-18)
(+ x y)
(if (<= t -1.5e-57)
(+ x (* y (/ z t)))
(if (<= t 1.8e-29) (- (+ x y) (* y (/ z a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * ((a - z) / t));
double tmp;
if (t <= -1.6e+105) {
tmp = t_1;
} else if (t <= -6e-18) {
tmp = x + y;
} else if (t <= -1.5e-57) {
tmp = x + (y * (z / t));
} else if (t <= 1.8e-29) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y * ((a - z) / t))
if (t <= (-1.6d+105)) then
tmp = t_1
else if (t <= (-6d-18)) then
tmp = x + y
else if (t <= (-1.5d-57)) then
tmp = x + (y * (z / t))
else if (t <= 1.8d-29) then
tmp = (x + y) - (y * (z / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * ((a - z) / t));
double tmp;
if (t <= -1.6e+105) {
tmp = t_1;
} else if (t <= -6e-18) {
tmp = x + y;
} else if (t <= -1.5e-57) {
tmp = x + (y * (z / t));
} else if (t <= 1.8e-29) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * ((a - z) / t)) tmp = 0 if t <= -1.6e+105: tmp = t_1 elif t <= -6e-18: tmp = x + y elif t <= -1.5e-57: tmp = x + (y * (z / t)) elif t <= 1.8e-29: tmp = (x + y) - (y * (z / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(Float64(a - z) / t))) tmp = 0.0 if (t <= -1.6e+105) tmp = t_1; elseif (t <= -6e-18) tmp = Float64(x + y); elseif (t <= -1.5e-57) tmp = Float64(x + Float64(y * Float64(z / t))); elseif (t <= 1.8e-29) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * ((a - z) / t)); tmp = 0.0; if (t <= -1.6e+105) tmp = t_1; elseif (t <= -6e-18) tmp = x + y; elseif (t <= -1.5e-57) tmp = x + (y * (z / t)); elseif (t <= 1.8e-29) tmp = (x + y) - (y * (z / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+105], t$95$1, If[LessEqual[t, -6e-18], N[(x + y), $MachinePrecision], If[LessEqual[t, -1.5e-57], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e-29], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{a - z}{t}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-18}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-57}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-29}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.6e105 or 1.79999999999999987e-29 < t Initial program 65.9%
associate-/l*70.1%
*-commutative70.1%
Applied egg-rr70.1%
*-commutative70.1%
clear-num69.9%
un-div-inv70.0%
Applied egg-rr70.0%
Taylor expanded in t around -inf 79.8%
mul-1-neg79.8%
unsub-neg79.8%
*-commutative79.8%
cancel-sign-sub-inv79.8%
mul-1-neg79.8%
distribute-rgt-in80.7%
associate-/l*87.6%
mul-1-neg87.6%
sub-neg87.6%
Simplified87.6%
if -1.6e105 < t < -5.99999999999999966e-18Initial program 90.4%
Taylor expanded in a around inf 86.9%
+-commutative86.9%
Simplified86.9%
if -5.99999999999999966e-18 < t < -1.5e-57Initial program 96.5%
associate-/l*96.5%
*-commutative96.5%
Applied egg-rr96.5%
*-commutative96.5%
clear-num96.5%
un-div-inv96.8%
Applied egg-rr96.8%
div-sub96.8%
Applied egg-rr96.8%
Taylor expanded in a around 0 99.7%
sub-neg99.7%
distribute-rgt1-in99.7%
metadata-eval99.7%
mul0-lft99.7%
+-rgt-identity99.7%
mul-1-neg99.7%
remove-double-neg99.7%
associate-/l*100.0%
Simplified100.0%
if -1.5e-57 < t < 1.79999999999999987e-29Initial program 95.3%
Taylor expanded in t around 0 86.2%
+-commutative86.2%
associate-/l*87.3%
Simplified87.3%
Final simplification87.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -8.2e+112)
x
(if (<= t -4.4e-256)
(+ x y)
(if (<= t 8e-279) (* y (- 1.0 (/ z a))) (if (<= t 7.7e+84) (+ x y) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.2e+112) {
tmp = x;
} else if (t <= -4.4e-256) {
tmp = x + y;
} else if (t <= 8e-279) {
tmp = y * (1.0 - (z / a));
} else if (t <= 7.7e+84) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-8.2d+112)) then
tmp = x
else if (t <= (-4.4d-256)) then
tmp = x + y
else if (t <= 8d-279) then
tmp = y * (1.0d0 - (z / a))
else if (t <= 7.7d+84) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.2e+112) {
tmp = x;
} else if (t <= -4.4e-256) {
tmp = x + y;
} else if (t <= 8e-279) {
tmp = y * (1.0 - (z / a));
} else if (t <= 7.7e+84) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8.2e+112: tmp = x elif t <= -4.4e-256: tmp = x + y elif t <= 8e-279: tmp = y * (1.0 - (z / a)) elif t <= 7.7e+84: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8.2e+112) tmp = x; elseif (t <= -4.4e-256) tmp = Float64(x + y); elseif (t <= 8e-279) tmp = Float64(y * Float64(1.0 - Float64(z / a))); elseif (t <= 7.7e+84) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8.2e+112) tmp = x; elseif (t <= -4.4e-256) tmp = x + y; elseif (t <= 8e-279) tmp = y * (1.0 - (z / a)); elseif (t <= 7.7e+84) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8.2e+112], x, If[LessEqual[t, -4.4e-256], N[(x + y), $MachinePrecision], If[LessEqual[t, 8e-279], N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.7e+84], N[(x + y), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+112}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{-256}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-279}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;t \leq 7.7 \cdot 10^{+84}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -8.19999999999999951e112 or 7.7000000000000003e84 < t Initial program 62.3%
Taylor expanded in x around inf 68.1%
if -8.19999999999999951e112 < t < -4.4000000000000002e-256 or 8.00000000000000044e-279 < t < 7.7000000000000003e84Initial program 93.4%
Taylor expanded in a around inf 71.5%
+-commutative71.5%
Simplified71.5%
if -4.4000000000000002e-256 < t < 8.00000000000000044e-279Initial program 94.5%
Taylor expanded in t around 0 94.5%
+-commutative94.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around inf 77.0%
Final simplification70.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.05e+105)
(+ (- x (* a (/ y t))) (* y (/ z t)))
(if (<= t 8.8e+45)
(+ (+ x y) (* (- z t) (/ y (- t a))))
(- x (* y (/ (- a z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.05e+105) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else if (t <= 8.8e+45) {
tmp = (x + y) + ((z - t) * (y / (t - a)));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.05d+105)) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else if (t <= 8.8d+45) then
tmp = (x + y) + ((z - t) * (y / (t - a)))
else
tmp = x - (y * ((a - z) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.05e+105) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else if (t <= 8.8e+45) {
tmp = (x + y) + ((z - t) * (y / (t - a)));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.05e+105: tmp = (x - (a * (y / t))) + (y * (z / t)) elif t <= 8.8e+45: tmp = (x + y) + ((z - t) * (y / (t - a))) else: tmp = x - (y * ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.05e+105) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); elseif (t <= 8.8e+45) tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a)))); else tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.05e+105) tmp = (x - (a * (y / t))) + (y * (z / t)); elseif (t <= 8.8e+45) tmp = (x + y) + ((z - t) * (y / (t - a))); else tmp = x - (y * ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.05e+105], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e+45], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+105}:\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{+45}:\\
\;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\end{array}
\end{array}
if t < -1.05000000000000005e105Initial program 61.4%
associate-/l*66.9%
*-commutative66.9%
Applied egg-rr66.9%
Taylor expanded in t around inf 87.2%
sub-neg87.2%
mul-1-neg87.2%
unsub-neg87.2%
associate-/l*94.8%
mul-1-neg94.8%
remove-double-neg94.8%
associate-/l*97.3%
Simplified97.3%
if -1.05000000000000005e105 < t < 8.8000000000000001e45Initial program 93.8%
associate-/l*94.2%
*-commutative94.2%
Applied egg-rr94.2%
if 8.8000000000000001e45 < t Initial program 65.6%
associate-/l*68.3%
*-commutative68.3%
Applied egg-rr68.3%
*-commutative68.3%
clear-num68.1%
un-div-inv68.1%
Applied egg-rr68.1%
Taylor expanded in t around -inf 77.6%
mul-1-neg77.6%
unsub-neg77.6%
*-commutative77.6%
cancel-sign-sub-inv77.6%
mul-1-neg77.6%
distribute-rgt-in79.3%
associate-/l*87.0%
mul-1-neg87.0%
sub-neg87.0%
Simplified87.0%
Final simplification93.0%
(FPCore (x y z t a) :precision binary64 (if (and (not (<= a -1.3e-68)) (<= a 3.4e-30)) (+ x (* y (/ z t))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (!(a <= -1.3e-68) && (a <= 3.4e-30)) {
tmp = x + (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((.not. (a <= (-1.3d-68))) .and. (a <= 3.4d-30)) then
tmp = x + (y * (z / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (!(a <= -1.3e-68) && (a <= 3.4e-30)) {
tmp = x + (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if not (a <= -1.3e-68) and (a <= 3.4e-30): tmp = x + (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (!(a <= -1.3e-68) && (a <= 3.4e-30)) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (~((a <= -1.3e-68)) && (a <= 3.4e-30)) tmp = x + (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[And[N[Not[LessEqual[a, -1.3e-68]], $MachinePrecision], LessEqual[a, 3.4e-30]], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\neg \left(a \leq -1.3 \cdot 10^{-68}\right) \land a \leq 3.4 \cdot 10^{-30}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.2999999999999999e-68 or 3.4000000000000003e-30 < a Initial program 81.9%
Taylor expanded in a around inf 74.4%
+-commutative74.4%
Simplified74.4%
if -1.2999999999999999e-68 < a < 3.4000000000000003e-30Initial program 82.9%
associate-/l*80.1%
*-commutative80.1%
Applied egg-rr80.1%
*-commutative80.1%
clear-num79.7%
un-div-inv81.2%
Applied egg-rr81.2%
div-sub80.3%
Applied egg-rr80.3%
Taylor expanded in a around 0 84.5%
sub-neg84.5%
distribute-rgt1-in84.5%
metadata-eval84.5%
mul0-lft84.5%
+-rgt-identity84.5%
mul-1-neg84.5%
remove-double-neg84.5%
associate-/l*84.9%
Simplified84.9%
Final simplification78.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.5e+241) (not (<= z 8.5e+223))) (* z (/ y (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e+241) || !(z <= 8.5e+223)) {
tmp = z * (y / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.5d+241)) .or. (.not. (z <= 8.5d+223))) then
tmp = z * (y / (t - a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e+241) || !(z <= 8.5e+223)) {
tmp = z * (y / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.5e+241) or not (z <= 8.5e+223): tmp = z * (y / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.5e+241) || !(z <= 8.5e+223)) tmp = Float64(z * Float64(y / Float64(t - a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.5e+241) || ~((z <= 8.5e+223))) tmp = z * (y / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.5e+241], N[Not[LessEqual[z, 8.5e+223]], $MachinePrecision]], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+241} \lor \neg \left(z \leq 8.5 \cdot 10^{+223}\right):\\
\;\;\;\;z \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -4.49999999999999993e241 or 8.5000000000000005e223 < z Initial program 89.3%
sub-neg89.3%
+-commutative89.3%
distribute-frac-neg89.3%
distribute-rgt-neg-out89.3%
associate-/l*96.8%
fma-define96.8%
distribute-frac-neg96.8%
distribute-neg-frac296.8%
sub-neg96.8%
distribute-neg-in96.8%
remove-double-neg96.8%
+-commutative96.8%
sub-neg96.8%
Simplified96.8%
Taylor expanded in z around inf 67.1%
associate-/l*61.4%
Simplified61.4%
clear-num61.3%
un-div-inv61.4%
Applied egg-rr61.4%
associate-/r/71.0%
Simplified71.0%
if -4.49999999999999993e241 < z < 8.5000000000000005e223Initial program 81.3%
Taylor expanded in a around inf 68.4%
+-commutative68.4%
Simplified68.4%
Final simplification68.7%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.85e+112) x (if (<= t 1.95e+84) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.85e+112) {
tmp = x;
} else if (t <= 1.95e+84) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.85d+112)) then
tmp = x
else if (t <= 1.95d+84) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.85e+112) {
tmp = x;
} else if (t <= 1.95e+84) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.85e+112: tmp = x elif t <= 1.95e+84: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.85e+112) tmp = x; elseif (t <= 1.95e+84) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.85e+112) tmp = x; elseif (t <= 1.95e+84) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.85e+112], x, If[LessEqual[t, 1.95e+84], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{+112}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+84}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.85000000000000002e112 or 1.95000000000000008e84 < t Initial program 62.3%
Taylor expanded in x around inf 68.1%
if -1.85000000000000002e112 < t < 1.95000000000000008e84Initial program 93.5%
Taylor expanded in a around inf 68.6%
+-commutative68.6%
Simplified68.6%
Final simplification68.4%
(FPCore (x y z t a) :precision binary64 (if (<= z 8.7e+223) (+ x y) (* y (/ z (- t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 8.7e+223) {
tmp = x + y;
} else {
tmp = y * (z / (t - a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= 8.7d+223) then
tmp = x + y
else
tmp = y * (z / (t - a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 8.7e+223) {
tmp = x + y;
} else {
tmp = y * (z / (t - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 8.7e+223: tmp = x + y else: tmp = y * (z / (t - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 8.7e+223) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / Float64(t - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 8.7e+223) tmp = x + y; else tmp = y * (z / (t - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 8.7e+223], N[(x + y), $MachinePrecision], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 8.7 \cdot 10^{+223}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if z < 8.7000000000000001e223Initial program 81.2%
Taylor expanded in a around inf 66.7%
+-commutative66.7%
Simplified66.7%
if 8.7000000000000001e223 < z Initial program 93.4%
sub-neg93.4%
+-commutative93.4%
distribute-frac-neg93.4%
distribute-rgt-neg-out93.4%
associate-/l*95.6%
fma-define95.6%
distribute-frac-neg95.6%
distribute-neg-frac295.6%
sub-neg95.6%
distribute-neg-in95.6%
remove-double-neg95.6%
+-commutative95.6%
sub-neg95.6%
Simplified95.6%
Taylor expanded in z around inf 66.8%
associate-/l*62.9%
Simplified62.9%
Final simplification66.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.8e+124) y (if (<= y 1.15e+214) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.8e+124) {
tmp = y;
} else if (y <= 1.15e+214) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.8d+124)) then
tmp = y
else if (y <= 1.15d+214) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.8e+124) {
tmp = y;
} else if (y <= 1.15e+214) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.8e+124: tmp = y elif y <= 1.15e+214: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.8e+124) tmp = y; elseif (y <= 1.15e+214) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.8e+124) tmp = y; elseif (y <= 1.15e+214) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.8e+124], y, If[LessEqual[y, 1.15e+214], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+124}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+214}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.79999999999999993e124 or 1.15e214 < y Initial program 66.2%
Taylor expanded in x around 0 59.4%
associate-*r/68.3%
sub-neg68.3%
*-rgt-identity68.3%
distribute-rgt-neg-in68.3%
mul-1-neg68.3%
distribute-lft-in68.4%
mul-1-neg68.4%
unsub-neg68.4%
Simplified68.4%
Taylor expanded in a around inf 48.2%
if -1.79999999999999993e124 < y < 1.15e214Initial program 86.6%
Taylor expanded in x around inf 62.8%
Final simplification59.7%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 82.3%
Taylor expanded in x around inf 53.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (< t_2 -1.3664970889390727e-7)
t_1
(if (< t_2 1.4754293444577233e-239)
(/ (- (* y (- a z)) (* x t)) (- a t))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 < (-1.3664970889390727d-7)) then
tmp = t_1
else if (t_2 < 1.4754293444577233d-239) then
tmp = ((y * (a - z)) - (x * t)) / (a - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 < -1.3664970889390727e-7: tmp = t_1 elif t_2 < 1.4754293444577233e-239: tmp = ((y * (a - z)) - (x * t)) / (a - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = ((y * (a - z)) - (x * t)) / (a - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024087
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))