
(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 16 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 -6.5e+186)
(- x (/ y (/ t (- a z))))
(if (<= t 1.45e+76)
(fma (/ (- t z) (- a t)) y (+ x y))
(+ (- x (/ a (/ t y))) (/ y (/ t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.5e+186) {
tmp = x - (y / (t / (a - z)));
} else if (t <= 1.45e+76) {
tmp = fma(((t - z) / (a - t)), y, (x + y));
} else {
tmp = (x - (a / (t / y))) + (y / (t / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.5e+186) tmp = Float64(x - Float64(y / Float64(t / Float64(a - z)))); elseif (t <= 1.45e+76) tmp = fma(Float64(Float64(t - z) / Float64(a - t)), y, Float64(x + y)); else tmp = Float64(Float64(x - Float64(a / Float64(t / y))) + Float64(y / Float64(t / z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.5e+186], N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+76], N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+186}:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+76}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - z}{a - t}, y, x + y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{a}{\frac{t}{y}}\right) + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if t < -6.4999999999999997e186Initial program 37.5%
associate-*l/57.4%
Simplified57.4%
associate-*l/37.5%
clear-num37.5%
*-commutative37.5%
Applied egg-rr37.5%
Taylor expanded in t around inf 73.0%
associate--l+73.0%
associate-*r/73.0%
associate-*r/73.0%
div-sub73.0%
distribute-lft-out--73.0%
associate-*r/73.0%
mul-1-neg73.0%
unsub-neg73.0%
*-commutative73.0%
cancel-sign-sub-inv73.0%
distribute-rgt-in73.2%
sub-neg73.2%
associate-/l*96.2%
Simplified96.2%
if -6.4999999999999997e186 < t < 1.4500000000000001e76Initial program 90.9%
sub-neg90.9%
distribute-frac-neg90.9%
distribute-rgt-neg-out90.9%
+-commutative90.9%
associate-*l/92.9%
distribute-rgt-neg-in92.9%
distribute-lft-neg-in92.9%
distribute-frac-neg92.9%
fma-def93.0%
sub-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
+-commutative93.0%
sub-neg93.0%
Simplified93.0%
if 1.4500000000000001e76 < t Initial program 56.9%
associate-*l/70.4%
Simplified70.4%
Taylor expanded in t around inf 75.3%
sub-neg75.3%
mul-1-neg75.3%
unsub-neg75.3%
associate-/l*83.0%
mul-1-neg83.0%
remove-double-neg83.0%
associate-/l*90.3%
Simplified90.3%
Final simplification92.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (/ y (/ a z)))))
(if (<= t -4.2e+36)
(- x (/ y (/ t (- a z))))
(if (<= t -9e-15)
t_1
(if (<= t -4.2e-87)
(+ x (/ (* y z) t))
(if (<= t 5.9e-86)
t_1
(if (<= t 1.02e-23)
(+ y (* (/ y (- a t)) (- t z)))
(if (<= t 0.001)
(- (+ x y) (* y (/ z a)))
(+ (- x (/ a (/ t y))) (/ y (/ t z)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - (y / (a / z));
double tmp;
if (t <= -4.2e+36) {
tmp = x - (y / (t / (a - z)));
} else if (t <= -9e-15) {
tmp = t_1;
} else if (t <= -4.2e-87) {
tmp = x + ((y * z) / t);
} else if (t <= 5.9e-86) {
tmp = t_1;
} else if (t <= 1.02e-23) {
tmp = y + ((y / (a - t)) * (t - z));
} else if (t <= 0.001) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = (x - (a / (t / y))) + (y / (t / z));
}
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) - (y / (a / z))
if (t <= (-4.2d+36)) then
tmp = x - (y / (t / (a - z)))
else if (t <= (-9d-15)) then
tmp = t_1
else if (t <= (-4.2d-87)) then
tmp = x + ((y * z) / t)
else if (t <= 5.9d-86) then
tmp = t_1
else if (t <= 1.02d-23) then
tmp = y + ((y / (a - t)) * (t - z))
else if (t <= 0.001d0) then
tmp = (x + y) - (y * (z / a))
else
tmp = (x - (a / (t / y))) + (y / (t / z))
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) - (y / (a / z));
double tmp;
if (t <= -4.2e+36) {
tmp = x - (y / (t / (a - z)));
} else if (t <= -9e-15) {
tmp = t_1;
} else if (t <= -4.2e-87) {
tmp = x + ((y * z) / t);
} else if (t <= 5.9e-86) {
tmp = t_1;
} else if (t <= 1.02e-23) {
tmp = y + ((y / (a - t)) * (t - z));
} else if (t <= 0.001) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = (x - (a / (t / y))) + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - (y / (a / z)) tmp = 0 if t <= -4.2e+36: tmp = x - (y / (t / (a - z))) elif t <= -9e-15: tmp = t_1 elif t <= -4.2e-87: tmp = x + ((y * z) / t) elif t <= 5.9e-86: tmp = t_1 elif t <= 1.02e-23: tmp = y + ((y / (a - t)) * (t - z)) elif t <= 0.001: tmp = (x + y) - (y * (z / a)) else: tmp = (x - (a / (t / y))) + (y / (t / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(y / Float64(a / z))) tmp = 0.0 if (t <= -4.2e+36) tmp = Float64(x - Float64(y / Float64(t / Float64(a - z)))); elseif (t <= -9e-15) tmp = t_1; elseif (t <= -4.2e-87) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (t <= 5.9e-86) tmp = t_1; elseif (t <= 1.02e-23) tmp = Float64(y + Float64(Float64(y / Float64(a - t)) * Float64(t - z))); elseif (t <= 0.001) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(Float64(x - Float64(a / Float64(t / y))) + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - (y / (a / z)); tmp = 0.0; if (t <= -4.2e+36) tmp = x - (y / (t / (a - z))); elseif (t <= -9e-15) tmp = t_1; elseif (t <= -4.2e-87) tmp = x + ((y * z) / t); elseif (t <= 5.9e-86) tmp = t_1; elseif (t <= 1.02e-23) tmp = y + ((y / (a - t)) * (t - z)); elseif (t <= 0.001) tmp = (x + y) - (y * (z / a)); else tmp = (x - (a / (t / y))) + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e+36], N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9e-15], t$95$1, If[LessEqual[t, -4.2e-87], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.9e-86], t$95$1, If[LessEqual[t, 1.02e-23], N[(y + N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.001], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{+36}:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 5.9 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-23}:\\
\;\;\;\;y + \frac{y}{a - t} \cdot \left(t - z\right)\\
\mathbf{elif}\;t \leq 0.001:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{a}{\frac{t}{y}}\right) + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if t < -4.20000000000000009e36Initial program 61.9%
associate-*l/75.3%
Simplified75.3%
associate-*l/61.9%
clear-num61.9%
*-commutative61.9%
Applied egg-rr61.9%
Taylor expanded in t around inf 80.9%
associate--l+80.9%
associate-*r/80.9%
associate-*r/80.9%
div-sub80.9%
distribute-lft-out--80.9%
associate-*r/80.9%
mul-1-neg80.9%
unsub-neg80.9%
*-commutative80.9%
cancel-sign-sub-inv80.9%
distribute-rgt-in81.2%
sub-neg81.2%
associate-/l*92.2%
Simplified92.2%
if -4.20000000000000009e36 < t < -8.9999999999999995e-15 or -4.20000000000000014e-87 < t < 5.89999999999999998e-86Initial program 92.9%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in t around 0 86.8%
associate-/l*89.3%
Simplified89.3%
if -8.9999999999999995e-15 < t < -4.20000000000000014e-87Initial program 77.5%
associate-*l/77.6%
Simplified77.6%
Taylor expanded in t around inf 63.1%
sub-neg63.1%
mul-1-neg63.1%
unsub-neg63.1%
associate-/l*55.4%
mul-1-neg55.4%
remove-double-neg55.4%
associate-/l*55.3%
Simplified55.3%
Taylor expanded in a around 0 88.4%
if 5.89999999999999998e-86 < t < 1.02000000000000005e-23Initial program 95.2%
associate-*l/90.2%
Simplified90.2%
Taylor expanded in x around 0 79.5%
*-commutative79.5%
associate-*r/84.2%
Simplified84.2%
if 1.02000000000000005e-23 < t < 1e-3Initial program 84.8%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around 0 90.8%
if 1e-3 < t Initial program 61.4%
associate-*l/73.5%
Simplified73.5%
Taylor expanded in t around inf 74.6%
sub-neg74.6%
mul-1-neg74.6%
unsub-neg74.6%
associate-/l*81.5%
mul-1-neg81.5%
remove-double-neg81.5%
associate-/l*88.0%
Simplified88.0%
Final simplification89.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (/ y (/ a z)))) (t_2 (- x (/ y (/ t (- a z))))))
(if (<= t -2.9e+39)
t_2
(if (<= t -8.5e-15)
t_1
(if (<= t -7.5e-83)
(+ x (/ (* y z) t))
(if (<= t 2.6e-89)
t_1
(if (<= t 1.7e-23)
(+ y (* (/ y (- a t)) (- t z)))
(if (<= t 3200.0) (- (+ x y) (* y (/ z a))) t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - (y / (a / z));
double t_2 = x - (y / (t / (a - z)));
double tmp;
if (t <= -2.9e+39) {
tmp = t_2;
} else if (t <= -8.5e-15) {
tmp = t_1;
} else if (t <= -7.5e-83) {
tmp = x + ((y * z) / t);
} else if (t <= 2.6e-89) {
tmp = t_1;
} else if (t <= 1.7e-23) {
tmp = y + ((y / (a - t)) * (t - z));
} else if (t <= 3200.0) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = t_2;
}
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 = (x + y) - (y / (a / z))
t_2 = x - (y / (t / (a - z)))
if (t <= (-2.9d+39)) then
tmp = t_2
else if (t <= (-8.5d-15)) then
tmp = t_1
else if (t <= (-7.5d-83)) then
tmp = x + ((y * z) / t)
else if (t <= 2.6d-89) then
tmp = t_1
else if (t <= 1.7d-23) then
tmp = y + ((y / (a - t)) * (t - z))
else if (t <= 3200.0d0) then
tmp = (x + y) - (y * (z / a))
else
tmp = t_2
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) - (y / (a / z));
double t_2 = x - (y / (t / (a - z)));
double tmp;
if (t <= -2.9e+39) {
tmp = t_2;
} else if (t <= -8.5e-15) {
tmp = t_1;
} else if (t <= -7.5e-83) {
tmp = x + ((y * z) / t);
} else if (t <= 2.6e-89) {
tmp = t_1;
} else if (t <= 1.7e-23) {
tmp = y + ((y / (a - t)) * (t - z));
} else if (t <= 3200.0) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - (y / (a / z)) t_2 = x - (y / (t / (a - z))) tmp = 0 if t <= -2.9e+39: tmp = t_2 elif t <= -8.5e-15: tmp = t_1 elif t <= -7.5e-83: tmp = x + ((y * z) / t) elif t <= 2.6e-89: tmp = t_1 elif t <= 1.7e-23: tmp = y + ((y / (a - t)) * (t - z)) elif t <= 3200.0: tmp = (x + y) - (y * (z / a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(y / Float64(a / z))) t_2 = Float64(x - Float64(y / Float64(t / Float64(a - z)))) tmp = 0.0 if (t <= -2.9e+39) tmp = t_2; elseif (t <= -8.5e-15) tmp = t_1; elseif (t <= -7.5e-83) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (t <= 2.6e-89) tmp = t_1; elseif (t <= 1.7e-23) tmp = Float64(y + Float64(Float64(y / Float64(a - t)) * Float64(t - z))); elseif (t <= 3200.0) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - (y / (a / z)); t_2 = x - (y / (t / (a - z))); tmp = 0.0; if (t <= -2.9e+39) tmp = t_2; elseif (t <= -8.5e-15) tmp = t_1; elseif (t <= -7.5e-83) tmp = x + ((y * z) / t); elseif (t <= 2.6e-89) tmp = t_1; elseif (t <= 1.7e-23) tmp = y + ((y / (a - t)) * (t - z)); elseif (t <= 3200.0) tmp = (x + y) - (y * (z / a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e+39], t$95$2, If[LessEqual[t, -8.5e-15], t$95$1, If[LessEqual[t, -7.5e-83], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-89], t$95$1, If[LessEqual[t, 1.7e-23], N[(y + N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3200.0], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{y}{\frac{a}{z}}\\
t_2 := x - \frac{y}{\frac{t}{a - z}}\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{+39}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-83}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-23}:\\
\;\;\;\;y + \frac{y}{a - t} \cdot \left(t - z\right)\\
\mathbf{elif}\;t \leq 3200:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.90000000000000029e39 or 3200 < t Initial program 61.6%
associate-*l/74.4%
Simplified74.4%
associate-*l/61.6%
clear-num61.6%
*-commutative61.6%
Applied egg-rr61.6%
Taylor expanded in t around inf 77.6%
associate--l+77.6%
associate-*r/77.6%
associate-*r/77.6%
div-sub77.6%
distribute-lft-out--77.6%
associate-*r/77.6%
mul-1-neg77.6%
unsub-neg77.6%
*-commutative77.6%
cancel-sign-sub-inv77.6%
distribute-rgt-in78.7%
sub-neg78.7%
associate-/l*89.1%
Simplified89.1%
if -2.90000000000000029e39 < t < -8.50000000000000007e-15 or -7.4999999999999997e-83 < t < 2.5999999999999999e-89Initial program 92.9%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in t around 0 86.8%
associate-/l*89.3%
Simplified89.3%
if -8.50000000000000007e-15 < t < -7.4999999999999997e-83Initial program 77.5%
associate-*l/77.6%
Simplified77.6%
Taylor expanded in t around inf 63.1%
sub-neg63.1%
mul-1-neg63.1%
unsub-neg63.1%
associate-/l*55.4%
mul-1-neg55.4%
remove-double-neg55.4%
associate-/l*55.3%
Simplified55.3%
Taylor expanded in a around 0 88.4%
if 2.5999999999999999e-89 < t < 1.7e-23Initial program 95.2%
associate-*l/90.2%
Simplified90.2%
Taylor expanded in x around 0 79.5%
*-commutative79.5%
associate-*r/84.2%
Simplified84.2%
if 1.7e-23 < t < 3200Initial program 84.8%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around 0 90.8%
Final simplification88.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ z a)))))
(if (<= z -3.8e+218)
(/ (* y z) t)
(if (<= z 4.55e+80)
(+ x y)
(if (<= z 8.5e+144)
t_1
(if (<= z 9e+182) x (if (<= z 4.8e+206) t_1 (/ y (/ t z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / a));
double tmp;
if (z <= -3.8e+218) {
tmp = (y * z) / t;
} else if (z <= 4.55e+80) {
tmp = x + y;
} else if (z <= 8.5e+144) {
tmp = t_1;
} else if (z <= 9e+182) {
tmp = x;
} else if (z <= 4.8e+206) {
tmp = t_1;
} else {
tmp = y / (t / z);
}
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 * (1.0d0 - (z / a))
if (z <= (-3.8d+218)) then
tmp = (y * z) / t
else if (z <= 4.55d+80) then
tmp = x + y
else if (z <= 8.5d+144) then
tmp = t_1
else if (z <= 9d+182) then
tmp = x
else if (z <= 4.8d+206) then
tmp = t_1
else
tmp = y / (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / a));
double tmp;
if (z <= -3.8e+218) {
tmp = (y * z) / t;
} else if (z <= 4.55e+80) {
tmp = x + y;
} else if (z <= 8.5e+144) {
tmp = t_1;
} else if (z <= 9e+182) {
tmp = x;
} else if (z <= 4.8e+206) {
tmp = t_1;
} else {
tmp = y / (t / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (z / a)) tmp = 0 if z <= -3.8e+218: tmp = (y * z) / t elif z <= 4.55e+80: tmp = x + y elif z <= 8.5e+144: tmp = t_1 elif z <= 9e+182: tmp = x elif z <= 4.8e+206: tmp = t_1 else: tmp = y / (t / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (z <= -3.8e+218) tmp = Float64(Float64(y * z) / t); elseif (z <= 4.55e+80) tmp = Float64(x + y); elseif (z <= 8.5e+144) tmp = t_1; elseif (z <= 9e+182) tmp = x; elseif (z <= 4.8e+206) tmp = t_1; else tmp = Float64(y / Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (1.0 - (z / a)); tmp = 0.0; if (z <= -3.8e+218) tmp = (y * z) / t; elseif (z <= 4.55e+80) tmp = x + y; elseif (z <= 8.5e+144) tmp = t_1; elseif (z <= 9e+182) tmp = x; elseif (z <= 4.8e+206) tmp = t_1; else tmp = y / (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+218], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 4.55e+80], N[(x + y), $MachinePrecision], If[LessEqual[z, 8.5e+144], t$95$1, If[LessEqual[z, 9e+182], x, If[LessEqual[z, 4.8e+206], t$95$1, N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+218}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;z \leq 4.55 \cdot 10^{+80}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+182}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+206}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if z < -3.80000000000000012e218Initial program 80.1%
associate-*l/87.8%
Simplified87.8%
Taylor expanded in z around inf 59.9%
associate-*r/59.9%
associate-*r*59.9%
neg-mul-159.9%
Simplified59.9%
Taylor expanded in a around 0 51.1%
if -3.80000000000000012e218 < z < 4.55000000000000007e80Initial program 79.4%
associate-*l/84.9%
Simplified84.9%
Taylor expanded in a around inf 72.2%
+-commutative72.2%
Simplified72.2%
if 4.55000000000000007e80 < z < 8.4999999999999998e144 or 9.00000000000000058e182 < z < 4.7999999999999999e206Initial program 78.6%
associate-*l/92.4%
Simplified92.4%
Taylor expanded in x around 0 77.5%
sub-neg77.5%
associate-*r/86.3%
*-rgt-identity86.3%
distribute-rgt-neg-in86.3%
distribute-frac-neg86.3%
distribute-lft-in86.2%
distribute-frac-neg86.2%
sub-neg86.2%
Simplified86.2%
Taylor expanded in t around 0 69.9%
if 8.4999999999999998e144 < z < 9.00000000000000058e182Initial program 65.6%
associate-*l/65.3%
Simplified65.3%
Taylor expanded in x around inf 62.1%
if 4.7999999999999999e206 < z Initial program 80.4%
associate-*l/86.5%
Simplified86.5%
Taylor expanded in z around inf 67.2%
associate-*r/67.2%
associate-*r*67.2%
neg-mul-167.2%
Simplified67.2%
Taylor expanded in a around 0 54.9%
associate-/l*61.3%
Simplified61.3%
Final simplification69.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (* y (/ z a)))) (t_2 (- x (/ y (/ t (- a z))))))
(if (<= t -5.4e+38)
t_2
(if (<= t -1.05e-14)
t_1
(if (<= t -3.8e-88) (+ x (/ (* y z) t)) (if (<= t 0.008) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - (y * (z / a));
double t_2 = x - (y / (t / (a - z)));
double tmp;
if (t <= -5.4e+38) {
tmp = t_2;
} else if (t <= -1.05e-14) {
tmp = t_1;
} else if (t <= -3.8e-88) {
tmp = x + ((y * z) / t);
} else if (t <= 0.008) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = (x + y) - (y * (z / a))
t_2 = x - (y / (t / (a - z)))
if (t <= (-5.4d+38)) then
tmp = t_2
else if (t <= (-1.05d-14)) then
tmp = t_1
else if (t <= (-3.8d-88)) then
tmp = x + ((y * z) / t)
else if (t <= 0.008d0) then
tmp = t_1
else
tmp = t_2
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) - (y * (z / a));
double t_2 = x - (y / (t / (a - z)));
double tmp;
if (t <= -5.4e+38) {
tmp = t_2;
} else if (t <= -1.05e-14) {
tmp = t_1;
} else if (t <= -3.8e-88) {
tmp = x + ((y * z) / t);
} else if (t <= 0.008) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - (y * (z / a)) t_2 = x - (y / (t / (a - z))) tmp = 0 if t <= -5.4e+38: tmp = t_2 elif t <= -1.05e-14: tmp = t_1 elif t <= -3.8e-88: tmp = x + ((y * z) / t) elif t <= 0.008: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(y * Float64(z / a))) t_2 = Float64(x - Float64(y / Float64(t / Float64(a - z)))) tmp = 0.0 if (t <= -5.4e+38) tmp = t_2; elseif (t <= -1.05e-14) tmp = t_1; elseif (t <= -3.8e-88) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (t <= 0.008) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - (y * (z / a)); t_2 = x - (y / (t / (a - z))); tmp = 0.0; if (t <= -5.4e+38) tmp = t_2; elseif (t <= -1.05e-14) tmp = t_1; elseif (t <= -3.8e-88) tmp = x + ((y * z) / t); elseif (t <= 0.008) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.4e+38], t$95$2, If[LessEqual[t, -1.05e-14], t$95$1, If[LessEqual[t, -3.8e-88], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.008], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - y \cdot \frac{z}{a}\\
t_2 := x - \frac{y}{\frac{t}{a - z}}\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-88}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 0.008:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.39999999999999992e38 or 0.0080000000000000002 < t Initial program 61.6%
associate-*l/74.4%
Simplified74.4%
associate-*l/61.6%
clear-num61.6%
*-commutative61.6%
Applied egg-rr61.6%
Taylor expanded in t around inf 77.6%
associate--l+77.6%
associate-*r/77.6%
associate-*r/77.6%
div-sub77.6%
distribute-lft-out--77.6%
associate-*r/77.6%
mul-1-neg77.6%
unsub-neg77.6%
*-commutative77.6%
cancel-sign-sub-inv77.6%
distribute-rgt-in78.7%
sub-neg78.7%
associate-/l*89.1%
Simplified89.1%
if -5.39999999999999992e38 < t < -1.0499999999999999e-14 or -3.80000000000000011e-88 < t < 0.0080000000000000002Initial program 92.8%
associate-*l/94.2%
Simplified94.2%
Taylor expanded in t around 0 85.2%
if -1.0499999999999999e-14 < t < -3.80000000000000011e-88Initial program 77.5%
associate-*l/77.6%
Simplified77.6%
Taylor expanded in t around inf 63.1%
sub-neg63.1%
mul-1-neg63.1%
unsub-neg63.1%
associate-/l*55.4%
mul-1-neg55.4%
remove-double-neg55.4%
associate-/l*55.3%
Simplified55.3%
Taylor expanded in a around 0 88.4%
Final simplification87.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ y (/ t (- a z))))))
(if (<= t -3.3e+40)
t_1
(if (<= t -1.05e-14)
(- (+ x y) (/ y (/ a z)))
(if (<= t -4e-87)
(+ x (/ (* y z) t))
(if (<= t 0.72) (- (+ x y) (* y (/ z a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y / (t / (a - z)));
double tmp;
if (t <= -3.3e+40) {
tmp = t_1;
} else if (t <= -1.05e-14) {
tmp = (x + y) - (y / (a / z));
} else if (t <= -4e-87) {
tmp = x + ((y * z) / t);
} else if (t <= 0.72) {
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 / (t / (a - z)))
if (t <= (-3.3d+40)) then
tmp = t_1
else if (t <= (-1.05d-14)) then
tmp = (x + y) - (y / (a / z))
else if (t <= (-4d-87)) then
tmp = x + ((y * z) / t)
else if (t <= 0.72d0) 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 / (t / (a - z)));
double tmp;
if (t <= -3.3e+40) {
tmp = t_1;
} else if (t <= -1.05e-14) {
tmp = (x + y) - (y / (a / z));
} else if (t <= -4e-87) {
tmp = x + ((y * z) / t);
} else if (t <= 0.72) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y / (t / (a - z))) tmp = 0 if t <= -3.3e+40: tmp = t_1 elif t <= -1.05e-14: tmp = (x + y) - (y / (a / z)) elif t <= -4e-87: tmp = x + ((y * z) / t) elif t <= 0.72: 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(t / Float64(a - z)))) tmp = 0.0 if (t <= -3.3e+40) tmp = t_1; elseif (t <= -1.05e-14) tmp = Float64(Float64(x + y) - Float64(y / Float64(a / z))); elseif (t <= -4e-87) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (t <= 0.72) 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 / (t / (a - z))); tmp = 0.0; if (t <= -3.3e+40) tmp = t_1; elseif (t <= -1.05e-14) tmp = (x + y) - (y / (a / z)); elseif (t <= -4e-87) tmp = x + ((y * z) / t); elseif (t <= 0.72) 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[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e+40], t$95$1, If[LessEqual[t, -1.05e-14], N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4e-87], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.72], 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 - \frac{y}{\frac{t}{a - z}}\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-14}:\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 0.72:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.2999999999999998e40 or 0.71999999999999997 < t Initial program 61.6%
associate-*l/74.4%
Simplified74.4%
associate-*l/61.6%
clear-num61.6%
*-commutative61.6%
Applied egg-rr61.6%
Taylor expanded in t around inf 77.6%
associate--l+77.6%
associate-*r/77.6%
associate-*r/77.6%
div-sub77.6%
distribute-lft-out--77.6%
associate-*r/77.6%
mul-1-neg77.6%
unsub-neg77.6%
*-commutative77.6%
cancel-sign-sub-inv77.6%
distribute-rgt-in78.7%
sub-neg78.7%
associate-/l*89.1%
Simplified89.1%
if -3.2999999999999998e40 < t < -1.0499999999999999e-14Initial program 72.3%
associate-*l/89.7%
Simplified89.7%
Taylor expanded in t around 0 64.7%
associate-/l*82.3%
Simplified82.3%
if -1.0499999999999999e-14 < t < -4.00000000000000007e-87Initial program 77.5%
associate-*l/77.6%
Simplified77.6%
Taylor expanded in t around inf 63.1%
sub-neg63.1%
mul-1-neg63.1%
unsub-neg63.1%
associate-/l*55.4%
mul-1-neg55.4%
remove-double-neg55.4%
associate-/l*55.3%
Simplified55.3%
Taylor expanded in a around 0 88.4%
if -4.00000000000000007e-87 < t < 0.71999999999999997Initial program 94.7%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in t around 0 85.5%
Final simplification87.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y t) (- z a))))
(if (<= a -1.12e-131)
(+ x y)
(if (<= a 1.85e-240)
t_1
(if (<= a 7e-167) x (if (<= a 2.45e-64) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / t) * (z - a);
double tmp;
if (a <= -1.12e-131) {
tmp = x + y;
} else if (a <= 1.85e-240) {
tmp = t_1;
} else if (a <= 7e-167) {
tmp = x;
} else if (a <= 2.45e-64) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (y / t) * (z - a)
if (a <= (-1.12d-131)) then
tmp = x + y
else if (a <= 1.85d-240) then
tmp = t_1
else if (a <= 7d-167) then
tmp = x
else if (a <= 2.45d-64) then
tmp = t_1
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 t_1 = (y / t) * (z - a);
double tmp;
if (a <= -1.12e-131) {
tmp = x + y;
} else if (a <= 1.85e-240) {
tmp = t_1;
} else if (a <= 7e-167) {
tmp = x;
} else if (a <= 2.45e-64) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / t) * (z - a) tmp = 0 if a <= -1.12e-131: tmp = x + y elif a <= 1.85e-240: tmp = t_1 elif a <= 7e-167: tmp = x elif a <= 2.45e-64: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / t) * Float64(z - a)) tmp = 0.0 if (a <= -1.12e-131) tmp = Float64(x + y); elseif (a <= 1.85e-240) tmp = t_1; elseif (a <= 7e-167) tmp = x; elseif (a <= 2.45e-64) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / t) * (z - a); tmp = 0.0; if (a <= -1.12e-131) tmp = x + y; elseif (a <= 1.85e-240) tmp = t_1; elseif (a <= 7e-167) tmp = x; elseif (a <= 2.45e-64) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.12e-131], N[(x + y), $MachinePrecision], If[LessEqual[a, 1.85e-240], t$95$1, If[LessEqual[a, 7e-167], x, If[LessEqual[a, 2.45e-64], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{t} \cdot \left(z - a\right)\\
\mathbf{if}\;a \leq -1.12 \cdot 10^{-131}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-240}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-167}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.45 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.12000000000000001e-131 or 2.4500000000000001e-64 < a Initial program 79.7%
associate-*l/91.4%
Simplified91.4%
Taylor expanded in a around inf 70.0%
+-commutative70.0%
Simplified70.0%
if -1.12000000000000001e-131 < a < 1.8500000000000001e-240 or 6.9999999999999998e-167 < a < 2.4500000000000001e-64Initial program 77.0%
associate-*l/72.9%
Simplified72.9%
Taylor expanded in t around inf 87.8%
sub-neg87.8%
mul-1-neg87.8%
unsub-neg87.8%
associate-/l*81.7%
mul-1-neg81.7%
remove-double-neg81.7%
associate-/l*78.7%
Simplified78.7%
Taylor expanded in x around 0 57.8%
associate-*l/62.3%
associate-*r/56.2%
*-commutative56.2%
distribute-lft-out--62.2%
Simplified62.2%
if 1.8500000000000001e-240 < a < 6.9999999999999998e-167Initial program 78.0%
associate-*l/68.2%
Simplified68.2%
Taylor expanded in x around inf 71.8%
Final simplification68.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.2e+218)
(/ (* y z) t)
(if (<= z 1.85e+81)
(+ x y)
(if (<= z 4.7e+144)
(/ (- y) (/ a z))
(if (<= z 6.2e+179) x (* y (/ z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.2e+218) {
tmp = (y * z) / t;
} else if (z <= 1.85e+81) {
tmp = x + y;
} else if (z <= 4.7e+144) {
tmp = -y / (a / z);
} else if (z <= 6.2e+179) {
tmp = x;
} else {
tmp = y * (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 (z <= (-6.2d+218)) then
tmp = (y * z) / t
else if (z <= 1.85d+81) then
tmp = x + y
else if (z <= 4.7d+144) then
tmp = -y / (a / z)
else if (z <= 6.2d+179) then
tmp = x
else
tmp = y * (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 (z <= -6.2e+218) {
tmp = (y * z) / t;
} else if (z <= 1.85e+81) {
tmp = x + y;
} else if (z <= 4.7e+144) {
tmp = -y / (a / z);
} else if (z <= 6.2e+179) {
tmp = x;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.2e+218: tmp = (y * z) / t elif z <= 1.85e+81: tmp = x + y elif z <= 4.7e+144: tmp = -y / (a / z) elif z <= 6.2e+179: tmp = x else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.2e+218) tmp = Float64(Float64(y * z) / t); elseif (z <= 1.85e+81) tmp = Float64(x + y); elseif (z <= 4.7e+144) tmp = Float64(Float64(-y) / Float64(a / z)); elseif (z <= 6.2e+179) tmp = x; else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.2e+218) tmp = (y * z) / t; elseif (z <= 1.85e+81) tmp = x + y; elseif (z <= 4.7e+144) tmp = -y / (a / z); elseif (z <= 6.2e+179) tmp = x; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.2e+218], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.85e+81], N[(x + y), $MachinePrecision], If[LessEqual[z, 4.7e+144], N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+179], x, N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+218}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+81}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{+144}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+179}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if z < -6.2000000000000003e218Initial program 80.1%
associate-*l/87.8%
Simplified87.8%
Taylor expanded in z around inf 59.9%
associate-*r/59.9%
associate-*r*59.9%
neg-mul-159.9%
Simplified59.9%
Taylor expanded in a around 0 51.1%
if -6.2000000000000003e218 < z < 1.85e81Initial program 79.4%
associate-*l/84.9%
Simplified84.9%
Taylor expanded in a around inf 72.2%
+-commutative72.2%
Simplified72.2%
if 1.85e81 < z < 4.7000000000000002e144Initial program 84.8%
associate-*l/91.7%
Simplified91.7%
Taylor expanded in z around inf 74.9%
associate-*r/74.9%
associate-*r*74.9%
neg-mul-174.9%
Simplified74.9%
Taylor expanded in a around inf 60.9%
mul-1-neg60.9%
associate-/l*68.0%
Simplified68.0%
if 4.7000000000000002e144 < z < 6.2e179Initial program 71.8%
associate-*l/71.5%
Simplified71.5%
Taylor expanded in x around inf 67.8%
if 6.2e179 < z Initial program 73.5%
associate-*l/85.3%
Simplified85.3%
Taylor expanded in x around 0 65.2%
sub-neg65.2%
associate-*r/77.0%
*-rgt-identity77.0%
distribute-rgt-neg-in77.0%
distribute-frac-neg77.0%
distribute-lft-in76.9%
distribute-frac-neg76.9%
sub-neg76.9%
Simplified76.9%
Taylor expanded in a around 0 55.3%
Final simplification68.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.5e+186)
(- x (/ y (/ t (- a z))))
(if (<= t 1.28e+76)
(- (+ x y) (* y (/ (- z t) (- a t))))
(+ (- x (/ a (/ t y))) (/ y (/ t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.5e+186) {
tmp = x - (y / (t / (a - z)));
} else if (t <= 1.28e+76) {
tmp = (x + y) - (y * ((z - t) / (a - t)));
} else {
tmp = (x - (a / (t / y))) + (y / (t / z));
}
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 <= (-6.5d+186)) then
tmp = x - (y / (t / (a - z)))
else if (t <= 1.28d+76) then
tmp = (x + y) - (y * ((z - t) / (a - t)))
else
tmp = (x - (a / (t / y))) + (y / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.5e+186) {
tmp = x - (y / (t / (a - z)));
} else if (t <= 1.28e+76) {
tmp = (x + y) - (y * ((z - t) / (a - t)));
} else {
tmp = (x - (a / (t / y))) + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.5e+186: tmp = x - (y / (t / (a - z))) elif t <= 1.28e+76: tmp = (x + y) - (y * ((z - t) / (a - t))) else: tmp = (x - (a / (t / y))) + (y / (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.5e+186) tmp = Float64(x - Float64(y / Float64(t / Float64(a - z)))); elseif (t <= 1.28e+76) tmp = Float64(Float64(x + y) - Float64(y * Float64(Float64(z - t) / Float64(a - t)))); else tmp = Float64(Float64(x - Float64(a / Float64(t / y))) + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.5e+186) tmp = x - (y / (t / (a - z))); elseif (t <= 1.28e+76) tmp = (x + y) - (y * ((z - t) / (a - t))); else tmp = (x - (a / (t / y))) + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.5e+186], N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.28e+76], N[(N[(x + y), $MachinePrecision] - N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+186}:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\
\mathbf{elif}\;t \leq 1.28 \cdot 10^{+76}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{a}{\frac{t}{y}}\right) + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if t < -6.4999999999999997e186Initial program 37.5%
associate-*l/57.4%
Simplified57.4%
associate-*l/37.5%
clear-num37.5%
*-commutative37.5%
Applied egg-rr37.5%
Taylor expanded in t around inf 73.0%
associate--l+73.0%
associate-*r/73.0%
associate-*r/73.0%
div-sub73.0%
distribute-lft-out--73.0%
associate-*r/73.0%
mul-1-neg73.0%
unsub-neg73.0%
*-commutative73.0%
cancel-sign-sub-inv73.0%
distribute-rgt-in73.2%
sub-neg73.2%
associate-/l*96.2%
Simplified96.2%
if -6.4999999999999997e186 < t < 1.27999999999999994e76Initial program 90.9%
associate-*l/92.9%
Simplified92.9%
if 1.27999999999999994e76 < t Initial program 56.9%
associate-*l/70.4%
Simplified70.4%
Taylor expanded in t around inf 75.3%
sub-neg75.3%
mul-1-neg75.3%
unsub-neg75.3%
associate-/l*83.0%
mul-1-neg83.0%
remove-double-neg83.0%
associate-/l*90.3%
Simplified90.3%
Final simplification92.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.76e+118) (not (<= a 2900000.0))) (+ x y) (- x (/ y (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.76e+118) || !(a <= 2900000.0)) {
tmp = x + y;
} else {
tmp = x - (y / (t / (a - z)));
}
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.76d+118)) .or. (.not. (a <= 2900000.0d0))) then
tmp = x + y
else
tmp = x - (y / (t / (a - z)))
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.76e+118) || !(a <= 2900000.0)) {
tmp = x + y;
} else {
tmp = x - (y / (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.76e+118) or not (a <= 2900000.0): tmp = x + y else: tmp = x - (y / (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.76e+118) || !(a <= 2900000.0)) tmp = Float64(x + y); else tmp = Float64(x - Float64(y / Float64(t / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.76e+118) || ~((a <= 2900000.0))) tmp = x + y; else tmp = x - (y / (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.76e+118], N[Not[LessEqual[a, 2900000.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.76 \cdot 10^{+118} \lor \neg \left(a \leq 2900000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\
\end{array}
\end{array}
if a < -1.76000000000000011e118 or 2.9e6 < a Initial program 80.6%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in a around inf 83.9%
+-commutative83.9%
Simplified83.9%
if -1.76000000000000011e118 < a < 2.9e6Initial program 77.7%
associate-*l/77.8%
Simplified77.8%
associate-*l/77.7%
clear-num77.7%
*-commutative77.7%
Applied egg-rr77.7%
Taylor expanded in t around inf 71.4%
associate--l+71.4%
associate-*r/71.4%
associate-*r/71.4%
div-sub71.5%
distribute-lft-out--71.5%
associate-*r/71.5%
mul-1-neg71.5%
unsub-neg71.5%
*-commutative71.5%
cancel-sign-sub-inv71.5%
distribute-rgt-in71.5%
sub-neg71.5%
associate-/l*70.8%
Simplified70.8%
Final simplification76.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.2e-10) (not (<= a 110000000.0))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.2e-10) || !(a <= 110000000.0)) {
tmp = x + y;
} else {
tmp = x + ((y * 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.2d-10)) .or. (.not. (a <= 110000000.0d0))) then
tmp = x + y
else
tmp = x + ((y * 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.2e-10) || !(a <= 110000000.0)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.2e-10) or not (a <= 110000000.0): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.2e-10) || !(a <= 110000000.0)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.2e-10) || ~((a <= 110000000.0))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.2e-10], N[Not[LessEqual[a, 110000000.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{-10} \lor \neg \left(a \leq 110000000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -2.1999999999999999e-10 or 1.1e8 < a Initial program 80.2%
associate-*l/93.4%
Simplified93.4%
Taylor expanded in a around inf 74.7%
+-commutative74.7%
Simplified74.7%
if -2.1999999999999999e-10 < a < 1.1e8Initial program 77.4%
associate-*l/75.3%
Simplified75.3%
Taylor expanded in t around inf 79.6%
sub-neg79.6%
mul-1-neg79.6%
unsub-neg79.6%
associate-/l*76.3%
mul-1-neg76.3%
remove-double-neg76.3%
associate-/l*74.6%
Simplified74.6%
Taylor expanded in a around 0 76.8%
Final simplification75.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3e+218) (not (<= z 2.5e+180))) (* y (/ z t)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3e+218) || !(z <= 2.5e+180)) {
tmp = 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 ((z <= (-3d+218)) .or. (.not. (z <= 2.5d+180))) then
tmp = 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 ((z <= -3e+218) || !(z <= 2.5e+180)) {
tmp = y * (z / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3e+218) or not (z <= 2.5e+180): tmp = y * (z / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3e+218) || !(z <= 2.5e+180)) tmp = 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 ((z <= -3e+218) || ~((z <= 2.5e+180))) tmp = y * (z / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3e+218], N[Not[LessEqual[z, 2.5e+180]], $MachinePrecision]], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+218} \lor \neg \left(z \leq 2.5 \cdot 10^{+180}\right):\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -3.0000000000000001e218 or 2.4999999999999998e180 < z Initial program 76.8%
associate-*l/86.5%
Simplified86.5%
Taylor expanded in x around 0 62.4%
sub-neg62.4%
associate-*r/72.0%
*-rgt-identity72.0%
distribute-rgt-neg-in72.0%
distribute-frac-neg72.0%
distribute-lft-in71.9%
distribute-frac-neg71.9%
sub-neg71.9%
Simplified71.9%
Taylor expanded in a around 0 51.2%
if -3.0000000000000001e218 < z < 2.4999999999999998e180Initial program 79.4%
associate-*l/84.6%
Simplified84.6%
Taylor expanded in a around inf 68.3%
+-commutative68.3%
Simplified68.3%
Final simplification65.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.9e+218) (/ (* y z) t) (if (<= z 2.5e+180) (+ x y) (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e+218) {
tmp = (y * z) / t;
} else if (z <= 2.5e+180) {
tmp = x + y;
} else {
tmp = y * (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 (z <= (-2.9d+218)) then
tmp = (y * z) / t
else if (z <= 2.5d+180) then
tmp = x + y
else
tmp = y * (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 (z <= -2.9e+218) {
tmp = (y * z) / t;
} else if (z <= 2.5e+180) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.9e+218: tmp = (y * z) / t elif z <= 2.5e+180: tmp = x + y else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.9e+218) tmp = Float64(Float64(y * z) / t); elseif (z <= 2.5e+180) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.9e+218) tmp = (y * z) / t; elseif (z <= 2.5e+180) tmp = x + y; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e+218], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 2.5e+180], N[(x + y), $MachinePrecision], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+218}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+180}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if z < -2.8999999999999999e218Initial program 80.1%
associate-*l/87.8%
Simplified87.8%
Taylor expanded in z around inf 59.9%
associate-*r/59.9%
associate-*r*59.9%
neg-mul-159.9%
Simplified59.9%
Taylor expanded in a around 0 51.1%
if -2.8999999999999999e218 < z < 2.4999999999999998e180Initial program 79.4%
associate-*l/84.6%
Simplified84.6%
Taylor expanded in a around inf 68.3%
+-commutative68.3%
Simplified68.3%
if 2.4999999999999998e180 < z Initial program 73.5%
associate-*l/85.3%
Simplified85.3%
Taylor expanded in x around 0 65.2%
sub-neg65.2%
associate-*r/77.0%
*-rgt-identity77.0%
distribute-rgt-neg-in77.0%
distribute-frac-neg77.0%
distribute-lft-in76.9%
distribute-frac-neg76.9%
sub-neg76.9%
Simplified76.9%
Taylor expanded in a around 0 55.3%
Final simplification65.5%
(FPCore (x y z t a) :precision binary64 (if (<= y -3.8e+135) y (if (<= y 1.9e+170) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.8e+135) {
tmp = y;
} else if (y <= 1.9e+170) {
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 <= (-3.8d+135)) then
tmp = y
else if (y <= 1.9d+170) 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 <= -3.8e+135) {
tmp = y;
} else if (y <= 1.9e+170) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -3.8e+135: tmp = y elif y <= 1.9e+170: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -3.8e+135) tmp = y; elseif (y <= 1.9e+170) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -3.8e+135) tmp = y; elseif (y <= 1.9e+170) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -3.8e+135], y, If[LessEqual[y, 1.9e+170], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+135}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+170}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -3.8000000000000001e135 or 1.8999999999999999e170 < y Initial program 55.8%
associate-*l/75.7%
Simplified75.7%
Taylor expanded in x around 0 54.3%
sub-neg54.3%
associate-*r/71.4%
*-rgt-identity71.4%
distribute-rgt-neg-in71.4%
distribute-frac-neg71.4%
distribute-lft-in71.4%
distribute-frac-neg71.4%
sub-neg71.4%
Simplified71.4%
Taylor expanded in a around inf 36.7%
Taylor expanded in y around 0 36.7%
if -3.8000000000000001e135 < y < 1.8999999999999999e170Initial program 87.3%
associate-*l/88.4%
Simplified88.4%
Taylor expanded in x around inf 58.3%
Final simplification52.5%
(FPCore (x y z t a) :precision binary64 (+ x y))
double code(double x, double y, double z, double t, double a) {
return x + y;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x + y;
}
def code(x, y, z, t, a): return x + y
function code(x, y, z, t, a) return Float64(x + y) end
function tmp = code(x, y, z, t, a) tmp = x + y; end
code[x_, y_, z_, t_, a_] := N[(x + y), $MachinePrecision]
\begin{array}{l}
\\
x + y
\end{array}
Initial program 78.9%
associate-*l/85.0%
Simplified85.0%
Taylor expanded in a around inf 59.7%
+-commutative59.7%
Simplified59.7%
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 78.9%
associate-*l/85.0%
Simplified85.0%
Taylor expanded in x around inf 45.9%
Final simplification45.9%
(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 2024096
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(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))))