
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
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) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
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) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a) return fma(y, Float64(Float64(z - t) / Float64(z - a)), x) end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)
\end{array}
Initial program 97.3%
+-commutative97.3%
fma-define97.3%
Simplified97.3%
Final simplification97.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5e-19)
(+ y x)
(if (<= z -1.9e-253)
x
(if (<= z 1.55e-273)
(/ (* y t) a)
(if (<= z 1.12e-153)
x
(if (<= z 1.02e-133)
(* y (/ t (- z)))
(if (<= z 2.05e-118) x (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e-19) {
tmp = y + x;
} else if (z <= -1.9e-253) {
tmp = x;
} else if (z <= 1.55e-273) {
tmp = (y * t) / a;
} else if (z <= 1.12e-153) {
tmp = x;
} else if (z <= 1.02e-133) {
tmp = y * (t / -z);
} else if (z <= 2.05e-118) {
tmp = x;
} else {
tmp = y + 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 (z <= (-5d-19)) then
tmp = y + x
else if (z <= (-1.9d-253)) then
tmp = x
else if (z <= 1.55d-273) then
tmp = (y * t) / a
else if (z <= 1.12d-153) then
tmp = x
else if (z <= 1.02d-133) then
tmp = y * (t / -z)
else if (z <= 2.05d-118) then
tmp = x
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e-19) {
tmp = y + x;
} else if (z <= -1.9e-253) {
tmp = x;
} else if (z <= 1.55e-273) {
tmp = (y * t) / a;
} else if (z <= 1.12e-153) {
tmp = x;
} else if (z <= 1.02e-133) {
tmp = y * (t / -z);
} else if (z <= 2.05e-118) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e-19: tmp = y + x elif z <= -1.9e-253: tmp = x elif z <= 1.55e-273: tmp = (y * t) / a elif z <= 1.12e-153: tmp = x elif z <= 1.02e-133: tmp = y * (t / -z) elif z <= 2.05e-118: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e-19) tmp = Float64(y + x); elseif (z <= -1.9e-253) tmp = x; elseif (z <= 1.55e-273) tmp = Float64(Float64(y * t) / a); elseif (z <= 1.12e-153) tmp = x; elseif (z <= 1.02e-133) tmp = Float64(y * Float64(t / Float64(-z))); elseif (z <= 2.05e-118) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e-19) tmp = y + x; elseif (z <= -1.9e-253) tmp = x; elseif (z <= 1.55e-273) tmp = (y * t) / a; elseif (z <= 1.12e-153) tmp = x; elseif (z <= 1.02e-133) tmp = y * (t / -z); elseif (z <= 2.05e-118) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e-19], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.9e-253], x, If[LessEqual[z, 1.55e-273], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.12e-153], x, If[LessEqual[z, 1.02e-133], N[(y * N[(t / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e-118], x, N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-19}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-253}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-273}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-153}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-133}:\\
\;\;\;\;y \cdot \frac{t}{-z}\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-118}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -5.0000000000000004e-19 or 2.0500000000000002e-118 < z Initial program 98.9%
Taylor expanded in z around inf 72.0%
+-commutative72.0%
Simplified72.0%
if -5.0000000000000004e-19 < z < -1.90000000000000006e-253 or 1.54999999999999994e-273 < z < 1.12000000000000005e-153 or 1.02e-133 < z < 2.0500000000000002e-118Initial program 96.9%
Taylor expanded in x around inf 57.7%
if -1.90000000000000006e-253 < z < 1.54999999999999994e-273Initial program 82.1%
Taylor expanded in y around inf 69.6%
Taylor expanded in z around 0 67.9%
associate-*r/76.4%
Applied egg-rr76.4%
if 1.12000000000000005e-153 < z < 1.02e-133Initial program 100.0%
Taylor expanded in y around inf 79.0%
Taylor expanded in t around inf 79.1%
mul-1-neg79.1%
distribute-frac-neg279.1%
Simplified79.1%
Taylor expanded in z around inf 68.8%
associate-*r/68.8%
neg-mul-168.8%
Simplified68.8%
Final simplification67.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.95e-19)
(+ y x)
(if (<= z -4.8e-252)
x
(if (<= z 2.3e-275)
(/ (* y t) a)
(if (<= z 1.06e-153)
x
(if (<= z 1.15e-133)
(/ (* y (- t)) z)
(if (<= z 1.35e-118) x (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e-19) {
tmp = y + x;
} else if (z <= -4.8e-252) {
tmp = x;
} else if (z <= 2.3e-275) {
tmp = (y * t) / a;
} else if (z <= 1.06e-153) {
tmp = x;
} else if (z <= 1.15e-133) {
tmp = (y * -t) / z;
} else if (z <= 1.35e-118) {
tmp = x;
} else {
tmp = y + 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 (z <= (-1.95d-19)) then
tmp = y + x
else if (z <= (-4.8d-252)) then
tmp = x
else if (z <= 2.3d-275) then
tmp = (y * t) / a
else if (z <= 1.06d-153) then
tmp = x
else if (z <= 1.15d-133) then
tmp = (y * -t) / z
else if (z <= 1.35d-118) then
tmp = x
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e-19) {
tmp = y + x;
} else if (z <= -4.8e-252) {
tmp = x;
} else if (z <= 2.3e-275) {
tmp = (y * t) / a;
} else if (z <= 1.06e-153) {
tmp = x;
} else if (z <= 1.15e-133) {
tmp = (y * -t) / z;
} else if (z <= 1.35e-118) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.95e-19: tmp = y + x elif z <= -4.8e-252: tmp = x elif z <= 2.3e-275: tmp = (y * t) / a elif z <= 1.06e-153: tmp = x elif z <= 1.15e-133: tmp = (y * -t) / z elif z <= 1.35e-118: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.95e-19) tmp = Float64(y + x); elseif (z <= -4.8e-252) tmp = x; elseif (z <= 2.3e-275) tmp = Float64(Float64(y * t) / a); elseif (z <= 1.06e-153) tmp = x; elseif (z <= 1.15e-133) tmp = Float64(Float64(y * Float64(-t)) / z); elseif (z <= 1.35e-118) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.95e-19) tmp = y + x; elseif (z <= -4.8e-252) tmp = x; elseif (z <= 2.3e-275) tmp = (y * t) / a; elseif (z <= 1.06e-153) tmp = x; elseif (z <= 1.15e-133) tmp = (y * -t) / z; elseif (z <= 1.35e-118) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.95e-19], N[(y + x), $MachinePrecision], If[LessEqual[z, -4.8e-252], x, If[LessEqual[z, 2.3e-275], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.06e-153], x, If[LessEqual[z, 1.15e-133], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.35e-118], x, N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-19}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-252}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-275}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{-153}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-133}:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-118}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.94999999999999998e-19 or 1.34999999999999997e-118 < z Initial program 98.9%
Taylor expanded in z around inf 72.0%
+-commutative72.0%
Simplified72.0%
if -1.94999999999999998e-19 < z < -4.8000000000000003e-252 or 2.2999999999999999e-275 < z < 1.06e-153 or 1.15e-133 < z < 1.34999999999999997e-118Initial program 96.9%
Taylor expanded in x around inf 57.7%
if -4.8000000000000003e-252 < z < 2.2999999999999999e-275Initial program 82.1%
Taylor expanded in y around inf 69.6%
Taylor expanded in z around 0 67.9%
associate-*r/76.4%
Applied egg-rr76.4%
if 1.06e-153 < z < 1.15e-133Initial program 100.0%
Taylor expanded in y around inf 79.0%
Taylor expanded in t around inf 79.1%
mul-1-neg79.1%
distribute-frac-neg279.1%
Simplified79.1%
Taylor expanded in z around inf 68.9%
associate-*r/68.9%
mul-1-neg68.9%
distribute-lft-neg-out68.9%
*-commutative68.9%
Simplified68.9%
Final simplification67.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.02e+157)
x
(if (<= a -6.5e-185)
(+ y x)
(if (<= a 1.14e-305)
(* y (- 1.0 (/ t z)))
(if (<= a 1.9e-193)
(+ y x)
(if (<= a 3e-126)
(/ (* y (- t)) z)
(if (<= a 2.35e+92) (+ y x) x)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.02e+157) {
tmp = x;
} else if (a <= -6.5e-185) {
tmp = y + x;
} else if (a <= 1.14e-305) {
tmp = y * (1.0 - (t / z));
} else if (a <= 1.9e-193) {
tmp = y + x;
} else if (a <= 3e-126) {
tmp = (y * -t) / z;
} else if (a <= 2.35e+92) {
tmp = y + x;
} 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 (a <= (-1.02d+157)) then
tmp = x
else if (a <= (-6.5d-185)) then
tmp = y + x
else if (a <= 1.14d-305) then
tmp = y * (1.0d0 - (t / z))
else if (a <= 1.9d-193) then
tmp = y + x
else if (a <= 3d-126) then
tmp = (y * -t) / z
else if (a <= 2.35d+92) then
tmp = y + x
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 (a <= -1.02e+157) {
tmp = x;
} else if (a <= -6.5e-185) {
tmp = y + x;
} else if (a <= 1.14e-305) {
tmp = y * (1.0 - (t / z));
} else if (a <= 1.9e-193) {
tmp = y + x;
} else if (a <= 3e-126) {
tmp = (y * -t) / z;
} else if (a <= 2.35e+92) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.02e+157: tmp = x elif a <= -6.5e-185: tmp = y + x elif a <= 1.14e-305: tmp = y * (1.0 - (t / z)) elif a <= 1.9e-193: tmp = y + x elif a <= 3e-126: tmp = (y * -t) / z elif a <= 2.35e+92: tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.02e+157) tmp = x; elseif (a <= -6.5e-185) tmp = Float64(y + x); elseif (a <= 1.14e-305) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (a <= 1.9e-193) tmp = Float64(y + x); elseif (a <= 3e-126) tmp = Float64(Float64(y * Float64(-t)) / z); elseif (a <= 2.35e+92) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.02e+157) tmp = x; elseif (a <= -6.5e-185) tmp = y + x; elseif (a <= 1.14e-305) tmp = y * (1.0 - (t / z)); elseif (a <= 1.9e-193) tmp = y + x; elseif (a <= 3e-126) tmp = (y * -t) / z; elseif (a <= 2.35e+92) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.02e+157], x, If[LessEqual[a, -6.5e-185], N[(y + x), $MachinePrecision], If[LessEqual[a, 1.14e-305], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.9e-193], N[(y + x), $MachinePrecision], If[LessEqual[a, 3e-126], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 2.35e+92], N[(y + x), $MachinePrecision], x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{+157}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{-185}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 1.14 \cdot 10^{-305}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-193}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 3 \cdot 10^{-126}:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\
\mathbf{elif}\;a \leq 2.35 \cdot 10^{+92}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.02000000000000003e157 or 2.35e92 < a Initial program 97.7%
Taylor expanded in x around inf 64.2%
if -1.02000000000000003e157 < a < -6.49999999999999946e-185 or 1.14e-305 < a < 1.90000000000000002e-193 or 3.0000000000000002e-126 < a < 2.35e92Initial program 96.9%
Taylor expanded in z around inf 70.2%
+-commutative70.2%
Simplified70.2%
if -6.49999999999999946e-185 < a < 1.14e-305Initial program 99.8%
Taylor expanded in y around inf 87.2%
Taylor expanded in a around 0 80.7%
if 1.90000000000000002e-193 < a < 3.0000000000000002e-126Initial program 91.9%
Taylor expanded in y around inf 75.0%
Taylor expanded in t around inf 74.8%
mul-1-neg74.8%
distribute-frac-neg274.8%
Simplified74.8%
Taylor expanded in z around inf 65.3%
associate-*r/65.3%
mul-1-neg65.3%
distribute-lft-neg-out65.3%
*-commutative65.3%
Simplified65.3%
Final simplification69.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ t z)))) (t_2 (* y (/ t (- a z)))))
(if (<= x -4.5e-143)
(+ y x)
(if (<= x -3.55e-186)
t_2
(if (<= x -4.2e-254)
t_1
(if (<= x 1.85e-230) t_2 (if (<= x 1.95e-14) t_1 (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (t / z));
double t_2 = y * (t / (a - z));
double tmp;
if (x <= -4.5e-143) {
tmp = y + x;
} else if (x <= -3.55e-186) {
tmp = t_2;
} else if (x <= -4.2e-254) {
tmp = t_1;
} else if (x <= 1.85e-230) {
tmp = t_2;
} else if (x <= 1.95e-14) {
tmp = t_1;
} else {
tmp = y + 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (1.0d0 - (t / z))
t_2 = y * (t / (a - z))
if (x <= (-4.5d-143)) then
tmp = y + x
else if (x <= (-3.55d-186)) then
tmp = t_2
else if (x <= (-4.2d-254)) then
tmp = t_1
else if (x <= 1.85d-230) then
tmp = t_2
else if (x <= 1.95d-14) then
tmp = t_1
else
tmp = y + x
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 - (t / z));
double t_2 = y * (t / (a - z));
double tmp;
if (x <= -4.5e-143) {
tmp = y + x;
} else if (x <= -3.55e-186) {
tmp = t_2;
} else if (x <= -4.2e-254) {
tmp = t_1;
} else if (x <= 1.85e-230) {
tmp = t_2;
} else if (x <= 1.95e-14) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (t / z)) t_2 = y * (t / (a - z)) tmp = 0 if x <= -4.5e-143: tmp = y + x elif x <= -3.55e-186: tmp = t_2 elif x <= -4.2e-254: tmp = t_1 elif x <= 1.85e-230: tmp = t_2 elif x <= 1.95e-14: tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(t / z))) t_2 = Float64(y * Float64(t / Float64(a - z))) tmp = 0.0 if (x <= -4.5e-143) tmp = Float64(y + x); elseif (x <= -3.55e-186) tmp = t_2; elseif (x <= -4.2e-254) tmp = t_1; elseif (x <= 1.85e-230) tmp = t_2; elseif (x <= 1.95e-14) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (1.0 - (t / z)); t_2 = y * (t / (a - z)); tmp = 0.0; if (x <= -4.5e-143) tmp = y + x; elseif (x <= -3.55e-186) tmp = t_2; elseif (x <= -4.2e-254) tmp = t_1; elseif (x <= 1.85e-230) tmp = t_2; elseif (x <= 1.95e-14) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e-143], N[(y + x), $MachinePrecision], If[LessEqual[x, -3.55e-186], t$95$2, If[LessEqual[x, -4.2e-254], t$95$1, If[LessEqual[x, 1.85e-230], t$95$2, If[LessEqual[x, 1.95e-14], t$95$1, N[(y + x), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{t}{z}\right)\\
t_2 := y \cdot \frac{t}{a - z}\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{-143}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;x \leq -3.55 \cdot 10^{-186}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-254}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{-230}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if x < -4.5e-143 or 1.9499999999999999e-14 < x Initial program 99.3%
Taylor expanded in z around inf 74.7%
+-commutative74.7%
Simplified74.7%
if -4.5e-143 < x < -3.55000000000000007e-186 or -4.19999999999999993e-254 < x < 1.84999999999999991e-230Initial program 95.1%
Taylor expanded in y around inf 75.3%
Taylor expanded in t around inf 60.6%
mul-1-neg60.6%
distribute-frac-neg260.6%
Simplified60.6%
Taylor expanded in t around 0 60.6%
if -3.55000000000000007e-186 < x < -4.19999999999999993e-254 or 1.84999999999999991e-230 < x < 1.9499999999999999e-14Initial program 94.1%
Taylor expanded in y around inf 76.3%
Taylor expanded in a around 0 61.4%
Final simplification68.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ t a))))
(if (<= z -3.2e-11)
(+ y x)
(if (<= z -8e-255)
x
(if (<= z 4.2e-272)
t_1
(if (<= z 1.12e-153) x (if (<= z 4e-132) t_1 (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / a);
double tmp;
if (z <= -3.2e-11) {
tmp = y + x;
} else if (z <= -8e-255) {
tmp = x;
} else if (z <= 4.2e-272) {
tmp = t_1;
} else if (z <= 1.12e-153) {
tmp = x;
} else if (z <= 4e-132) {
tmp = t_1;
} else {
tmp = y + 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) :: t_1
real(8) :: tmp
t_1 = y * (t / a)
if (z <= (-3.2d-11)) then
tmp = y + x
else if (z <= (-8d-255)) then
tmp = x
else if (z <= 4.2d-272) then
tmp = t_1
else if (z <= 1.12d-153) then
tmp = x
else if (z <= 4d-132) then
tmp = t_1
else
tmp = y + x
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 / a);
double tmp;
if (z <= -3.2e-11) {
tmp = y + x;
} else if (z <= -8e-255) {
tmp = x;
} else if (z <= 4.2e-272) {
tmp = t_1;
} else if (z <= 1.12e-153) {
tmp = x;
} else if (z <= 4e-132) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / a) tmp = 0 if z <= -3.2e-11: tmp = y + x elif z <= -8e-255: tmp = x elif z <= 4.2e-272: tmp = t_1 elif z <= 1.12e-153: tmp = x elif z <= 4e-132: tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / a)) tmp = 0.0 if (z <= -3.2e-11) tmp = Float64(y + x); elseif (z <= -8e-255) tmp = x; elseif (z <= 4.2e-272) tmp = t_1; elseif (z <= 1.12e-153) tmp = x; elseif (z <= 4e-132) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / a); tmp = 0.0; if (z <= -3.2e-11) tmp = y + x; elseif (z <= -8e-255) tmp = x; elseif (z <= 4.2e-272) tmp = t_1; elseif (z <= 1.12e-153) tmp = x; elseif (z <= 4e-132) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e-11], N[(y + x), $MachinePrecision], If[LessEqual[z, -8e-255], x, If[LessEqual[z, 4.2e-272], t$95$1, If[LessEqual[z, 1.12e-153], x, If[LessEqual[z, 4e-132], t$95$1, N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{-11}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-255}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-272}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-153}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -3.19999999999999994e-11 or 3.9999999999999999e-132 < z Initial program 98.9%
Taylor expanded in z around inf 71.5%
+-commutative71.5%
Simplified71.5%
if -3.19999999999999994e-11 < z < -8.0000000000000001e-255 or 4.19999999999999974e-272 < z < 1.12000000000000005e-153Initial program 95.6%
Taylor expanded in x around inf 54.8%
if -8.0000000000000001e-255 < z < 4.19999999999999974e-272 or 1.12000000000000005e-153 < z < 3.9999999999999999e-132Initial program 91.8%
Taylor expanded in y around inf 75.9%
Taylor expanded in z around 0 66.4%
Final simplification66.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -7.8e-15)
(+ y x)
(if (<= z -6.8e-255)
x
(if (<= z 7.6e-266)
(/ y (/ a t))
(if (<= z 2.6e-157) x (if (<= z 1.95e-132) (* y (/ t a)) (+ y x)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.8e-15) {
tmp = y + x;
} else if (z <= -6.8e-255) {
tmp = x;
} else if (z <= 7.6e-266) {
tmp = y / (a / t);
} else if (z <= 2.6e-157) {
tmp = x;
} else if (z <= 1.95e-132) {
tmp = y * (t / a);
} else {
tmp = y + 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 (z <= (-7.8d-15)) then
tmp = y + x
else if (z <= (-6.8d-255)) then
tmp = x
else if (z <= 7.6d-266) then
tmp = y / (a / t)
else if (z <= 2.6d-157) then
tmp = x
else if (z <= 1.95d-132) then
tmp = y * (t / a)
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.8e-15) {
tmp = y + x;
} else if (z <= -6.8e-255) {
tmp = x;
} else if (z <= 7.6e-266) {
tmp = y / (a / t);
} else if (z <= 2.6e-157) {
tmp = x;
} else if (z <= 1.95e-132) {
tmp = y * (t / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.8e-15: tmp = y + x elif z <= -6.8e-255: tmp = x elif z <= 7.6e-266: tmp = y / (a / t) elif z <= 2.6e-157: tmp = x elif z <= 1.95e-132: tmp = y * (t / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.8e-15) tmp = Float64(y + x); elseif (z <= -6.8e-255) tmp = x; elseif (z <= 7.6e-266) tmp = Float64(y / Float64(a / t)); elseif (z <= 2.6e-157) tmp = x; elseif (z <= 1.95e-132) tmp = Float64(y * Float64(t / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.8e-15) tmp = y + x; elseif (z <= -6.8e-255) tmp = x; elseif (z <= 7.6e-266) tmp = y / (a / t); elseif (z <= 2.6e-157) tmp = x; elseif (z <= 1.95e-132) tmp = y * (t / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.8e-15], N[(y + x), $MachinePrecision], If[LessEqual[z, -6.8e-255], x, If[LessEqual[z, 7.6e-266], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-157], x, If[LessEqual[z, 1.95e-132], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{-15}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-255}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-266}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-157}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-132}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -7.80000000000000053e-15 or 1.94999999999999991e-132 < z Initial program 98.9%
Taylor expanded in z around inf 71.5%
+-commutative71.5%
Simplified71.5%
if -7.80000000000000053e-15 < z < -6.79999999999999967e-255 or 7.59999999999999988e-266 < z < 2.59999999999999988e-157Initial program 95.6%
Taylor expanded in x around inf 54.8%
if -6.79999999999999967e-255 < z < 7.59999999999999988e-266Initial program 87.0%
Taylor expanded in y around inf 74.0%
Taylor expanded in z around 0 72.1%
clear-num72.1%
un-div-inv72.4%
Applied egg-rr72.4%
if 2.59999999999999988e-157 < z < 1.94999999999999991e-132Initial program 100.0%
Taylor expanded in y around inf 79.0%
Taylor expanded in z around 0 56.9%
Final simplification66.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) z)))))
(if (<= z -1.16e+78)
t_1
(if (<= z -2.05e+49)
(- x (* y (/ z a)))
(if (<= z -6.8e-130)
(+ x (* (- z t) (/ y z)))
(if (<= z 7.5e-49) (+ x (/ t (/ a y))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / z));
double tmp;
if (z <= -1.16e+78) {
tmp = t_1;
} else if (z <= -2.05e+49) {
tmp = x - (y * (z / a));
} else if (z <= -6.8e-130) {
tmp = x + ((z - t) * (y / z));
} else if (z <= 7.5e-49) {
tmp = x + (t / (a / y));
} 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 * ((z - t) / z))
if (z <= (-1.16d+78)) then
tmp = t_1
else if (z <= (-2.05d+49)) then
tmp = x - (y * (z / a))
else if (z <= (-6.8d-130)) then
tmp = x + ((z - t) * (y / z))
else if (z <= 7.5d-49) then
tmp = x + (t / (a / y))
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 * ((z - t) / z));
double tmp;
if (z <= -1.16e+78) {
tmp = t_1;
} else if (z <= -2.05e+49) {
tmp = x - (y * (z / a));
} else if (z <= -6.8e-130) {
tmp = x + ((z - t) * (y / z));
} else if (z <= 7.5e-49) {
tmp = x + (t / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / z)) tmp = 0 if z <= -1.16e+78: tmp = t_1 elif z <= -2.05e+49: tmp = x - (y * (z / a)) elif z <= -6.8e-130: tmp = x + ((z - t) * (y / z)) elif z <= 7.5e-49: tmp = x + (t / (a / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / z))) tmp = 0.0 if (z <= -1.16e+78) tmp = t_1; elseif (z <= -2.05e+49) tmp = Float64(x - Float64(y * Float64(z / a))); elseif (z <= -6.8e-130) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / z))); elseif (z <= 7.5e-49) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / z)); tmp = 0.0; if (z <= -1.16e+78) tmp = t_1; elseif (z <= -2.05e+49) tmp = x - (y * (z / a)); elseif (z <= -6.8e-130) tmp = x + ((z - t) * (y / z)); elseif (z <= 7.5e-49) tmp = x + (t / (a / y)); 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[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e+78], t$95$1, If[LessEqual[z, -2.05e+49], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.8e-130], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-49], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{z}\\
\mathbf{if}\;z \leq -1.16 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.05 \cdot 10^{+49}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-130}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1600000000000001e78 or 7.4999999999999998e-49 < z Initial program 99.9%
Taylor expanded in a around 0 90.3%
if -1.1600000000000001e78 < z < -2.05e49Initial program 99.4%
clear-num99.4%
un-div-inv99.4%
Applied egg-rr99.4%
Taylor expanded in t around 0 22.8%
+-commutative22.8%
associate-*l/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in z around 0 22.8%
mul-1-neg22.8%
unsub-neg22.8%
associate-/l*99.4%
Simplified99.4%
if -2.05e49 < z < -6.8000000000000001e-130Initial program 99.9%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 72.5%
*-commutative72.5%
associate-*r/72.5%
Simplified72.5%
if -6.8000000000000001e-130 < z < 7.4999999999999998e-49Initial program 92.3%
Taylor expanded in z around 0 76.3%
+-commutative76.3%
associate-/l*78.0%
Simplified78.0%
clear-num78.0%
un-div-inv78.0%
Applied egg-rr78.0%
Final simplification83.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) z)))))
(if (<= z -1.16e+78)
t_1
(if (<= z -2.05e+49)
(- x (* y (/ z a)))
(if (<= z -2.1e-13)
(+ x (/ (* y z) (- z a)))
(if (<= z 2.3e-50) (+ x (* y (/ t a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / z));
double tmp;
if (z <= -1.16e+78) {
tmp = t_1;
} else if (z <= -2.05e+49) {
tmp = x - (y * (z / a));
} else if (z <= -2.1e-13) {
tmp = x + ((y * z) / (z - a));
} else if (z <= 2.3e-50) {
tmp = x + (y * (t / 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 * ((z - t) / z))
if (z <= (-1.16d+78)) then
tmp = t_1
else if (z <= (-2.05d+49)) then
tmp = x - (y * (z / a))
else if (z <= (-2.1d-13)) then
tmp = x + ((y * z) / (z - a))
else if (z <= 2.3d-50) then
tmp = x + (y * (t / 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 * ((z - t) / z));
double tmp;
if (z <= -1.16e+78) {
tmp = t_1;
} else if (z <= -2.05e+49) {
tmp = x - (y * (z / a));
} else if (z <= -2.1e-13) {
tmp = x + ((y * z) / (z - a));
} else if (z <= 2.3e-50) {
tmp = x + (y * (t / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / z)) tmp = 0 if z <= -1.16e+78: tmp = t_1 elif z <= -2.05e+49: tmp = x - (y * (z / a)) elif z <= -2.1e-13: tmp = x + ((y * z) / (z - a)) elif z <= 2.3e-50: tmp = x + (y * (t / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / z))) tmp = 0.0 if (z <= -1.16e+78) tmp = t_1; elseif (z <= -2.05e+49) tmp = Float64(x - Float64(y * Float64(z / a))); elseif (z <= -2.1e-13) tmp = Float64(x + Float64(Float64(y * z) / Float64(z - a))); elseif (z <= 2.3e-50) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / z)); tmp = 0.0; if (z <= -1.16e+78) tmp = t_1; elseif (z <= -2.05e+49) tmp = x - (y * (z / a)); elseif (z <= -2.1e-13) tmp = x + ((y * z) / (z - a)); elseif (z <= 2.3e-50) tmp = x + (y * (t / 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[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e+78], t$95$1, If[LessEqual[z, -2.05e+49], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.1e-13], N[(x + N[(N[(y * z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e-50], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{z}\\
\mathbf{if}\;z \leq -1.16 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.05 \cdot 10^{+49}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-13}:\\
\;\;\;\;x + \frac{y \cdot z}{z - a}\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-50}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1600000000000001e78 or 2.3000000000000002e-50 < z Initial program 99.9%
Taylor expanded in a around 0 90.3%
if -1.1600000000000001e78 < z < -2.05e49Initial program 99.4%
clear-num99.4%
un-div-inv99.4%
Applied egg-rr99.4%
Taylor expanded in t around 0 22.8%
+-commutative22.8%
associate-*l/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in z around 0 22.8%
mul-1-neg22.8%
unsub-neg22.8%
associate-/l*99.4%
Simplified99.4%
if -2.05e49 < z < -2.09999999999999989e-13Initial program 100.0%
Taylor expanded in t around 0 81.6%
if -2.09999999999999989e-13 < z < 2.3000000000000002e-50Initial program 94.2%
Taylor expanded in z around 0 74.2%
*-commutative74.2%
associate-/l*75.6%
Simplified75.6%
Final simplification83.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) z)))))
(if (<= z -8.5e+188)
t_1
(if (<= z -9.8e-17)
(+ x (* z (/ y (- z a))))
(if (<= z 1.4e-49) (+ x (* y (/ t a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / z));
double tmp;
if (z <= -8.5e+188) {
tmp = t_1;
} else if (z <= -9.8e-17) {
tmp = x + (z * (y / (z - a)));
} else if (z <= 1.4e-49) {
tmp = x + (y * (t / 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 * ((z - t) / z))
if (z <= (-8.5d+188)) then
tmp = t_1
else if (z <= (-9.8d-17)) then
tmp = x + (z * (y / (z - a)))
else if (z <= 1.4d-49) then
tmp = x + (y * (t / 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 * ((z - t) / z));
double tmp;
if (z <= -8.5e+188) {
tmp = t_1;
} else if (z <= -9.8e-17) {
tmp = x + (z * (y / (z - a)));
} else if (z <= 1.4e-49) {
tmp = x + (y * (t / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / z)) tmp = 0 if z <= -8.5e+188: tmp = t_1 elif z <= -9.8e-17: tmp = x + (z * (y / (z - a))) elif z <= 1.4e-49: tmp = x + (y * (t / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / z))) tmp = 0.0 if (z <= -8.5e+188) tmp = t_1; elseif (z <= -9.8e-17) tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); elseif (z <= 1.4e-49) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / z)); tmp = 0.0; if (z <= -8.5e+188) tmp = t_1; elseif (z <= -9.8e-17) tmp = x + (z * (y / (z - a))); elseif (z <= 1.4e-49) tmp = x + (y * (t / 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[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+188], t$95$1, If[LessEqual[z, -9.8e-17], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e-49], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{z}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9.8 \cdot 10^{-17}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-49}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.49999999999999958e188 or 1.39999999999999999e-49 < z Initial program 99.8%
Taylor expanded in a around 0 91.5%
if -8.49999999999999958e188 < z < -9.80000000000000024e-17Initial program 99.9%
clear-num99.9%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 78.0%
+-commutative78.0%
associate-*l/89.8%
*-commutative89.8%
Simplified89.8%
if -9.80000000000000024e-17 < z < 1.39999999999999999e-49Initial program 94.2%
Taylor expanded in z around 0 74.2%
*-commutative74.2%
associate-/l*75.6%
Simplified75.6%
Final simplification83.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) z)))))
(if (<= z -9.8e+187)
t_1
(if (<= z -9e-8)
(+ x (* z (/ y (- z a))))
(if (<= z 4.1e+27) (+ x (* t (/ y (- a z)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / z));
double tmp;
if (z <= -9.8e+187) {
tmp = t_1;
} else if (z <= -9e-8) {
tmp = x + (z * (y / (z - a)));
} else if (z <= 4.1e+27) {
tmp = x + (t * (y / (a - z)));
} 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 * ((z - t) / z))
if (z <= (-9.8d+187)) then
tmp = t_1
else if (z <= (-9d-8)) then
tmp = x + (z * (y / (z - a)))
else if (z <= 4.1d+27) then
tmp = x + (t * (y / (a - z)))
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 * ((z - t) / z));
double tmp;
if (z <= -9.8e+187) {
tmp = t_1;
} else if (z <= -9e-8) {
tmp = x + (z * (y / (z - a)));
} else if (z <= 4.1e+27) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / z)) tmp = 0 if z <= -9.8e+187: tmp = t_1 elif z <= -9e-8: tmp = x + (z * (y / (z - a))) elif z <= 4.1e+27: tmp = x + (t * (y / (a - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / z))) tmp = 0.0 if (z <= -9.8e+187) tmp = t_1; elseif (z <= -9e-8) tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); elseif (z <= 4.1e+27) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / z)); tmp = 0.0; if (z <= -9.8e+187) tmp = t_1; elseif (z <= -9e-8) tmp = x + (z * (y / (z - a))); elseif (z <= 4.1e+27) tmp = x + (t * (y / (a - z))); 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[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.8e+187], t$95$1, If[LessEqual[z, -9e-8], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+27], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{z}\\
\mathbf{if}\;z \leq -9.8 \cdot 10^{+187}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-8}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+27}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.8000000000000006e187 or 4.1000000000000002e27 < z Initial program 99.8%
Taylor expanded in a around 0 94.1%
if -9.8000000000000006e187 < z < -8.99999999999999986e-8Initial program 99.9%
clear-num99.9%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 78.0%
+-commutative78.0%
associate-*l/89.8%
*-commutative89.8%
Simplified89.8%
if -8.99999999999999986e-8 < z < 4.1000000000000002e27Initial program 94.7%
Taylor expanded in t around inf 85.3%
associate-*r/85.3%
mul-1-neg85.3%
distribute-rgt-neg-in85.3%
associate-*r/87.5%
Simplified87.5%
Final simplification90.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.85e-18)
(+ y x)
(if (<= z -9.5e-254)
x
(if (<= z 2.15e-269) (/ (* y t) a) (if (<= z 1.88e-118) x (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.85e-18) {
tmp = y + x;
} else if (z <= -9.5e-254) {
tmp = x;
} else if (z <= 2.15e-269) {
tmp = (y * t) / a;
} else if (z <= 1.88e-118) {
tmp = x;
} else {
tmp = y + 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 (z <= (-1.85d-18)) then
tmp = y + x
else if (z <= (-9.5d-254)) then
tmp = x
else if (z <= 2.15d-269) then
tmp = (y * t) / a
else if (z <= 1.88d-118) then
tmp = x
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.85e-18) {
tmp = y + x;
} else if (z <= -9.5e-254) {
tmp = x;
} else if (z <= 2.15e-269) {
tmp = (y * t) / a;
} else if (z <= 1.88e-118) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.85e-18: tmp = y + x elif z <= -9.5e-254: tmp = x elif z <= 2.15e-269: tmp = (y * t) / a elif z <= 1.88e-118: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.85e-18) tmp = Float64(y + x); elseif (z <= -9.5e-254) tmp = x; elseif (z <= 2.15e-269) tmp = Float64(Float64(y * t) / a); elseif (z <= 1.88e-118) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.85e-18) tmp = y + x; elseif (z <= -9.5e-254) tmp = x; elseif (z <= 2.15e-269) tmp = (y * t) / a; elseif (z <= 1.88e-118) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.85e-18], N[(y + x), $MachinePrecision], If[LessEqual[z, -9.5e-254], x, If[LessEqual[z, 2.15e-269], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.88e-118], x, N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{-18}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-254}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-269}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.88 \cdot 10^{-118}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.8500000000000002e-18 or 1.88000000000000001e-118 < z Initial program 98.9%
Taylor expanded in z around inf 72.0%
+-commutative72.0%
Simplified72.0%
if -1.8500000000000002e-18 < z < -9.5000000000000003e-254 or 2.14999999999999994e-269 < z < 1.88000000000000001e-118Initial program 97.2%
Taylor expanded in x around inf 53.4%
if -9.5000000000000003e-254 < z < 2.14999999999999994e-269Initial program 82.1%
Taylor expanded in y around inf 69.6%
Taylor expanded in z around 0 67.9%
associate-*r/76.4%
Applied egg-rr76.4%
Final simplification66.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.5e+61) (not (<= a 1060.0))) (- x (* (- z t) (/ y a))) (+ x (* y (/ (- z t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.5e+61) || !(a <= 1060.0)) {
tmp = x - ((z - t) * (y / a));
} else {
tmp = x + (y * ((z - 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 ((a <= (-8.5d+61)) .or. (.not. (a <= 1060.0d0))) then
tmp = x - ((z - t) * (y / a))
else
tmp = x + (y * ((z - 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 ((a <= -8.5e+61) || !(a <= 1060.0)) {
tmp = x - ((z - t) * (y / a));
} else {
tmp = x + (y * ((z - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8.5e+61) or not (a <= 1060.0): tmp = x - ((z - t) * (y / a)) else: tmp = x + (y * ((z - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8.5e+61) || !(a <= 1060.0)) tmp = Float64(x - Float64(Float64(z - t) * Float64(y / a))); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -8.5e+61) || ~((a <= 1060.0))) tmp = x - ((z - t) * (y / a)); else tmp = x + (y * ((z - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8.5e+61], N[Not[LessEqual[a, 1060.0]], $MachinePrecision]], N[(x - N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{+61} \lor \neg \left(a \leq 1060\right):\\
\;\;\;\;x - \left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\end{array}
\end{array}
if a < -8.50000000000000035e61 or 1060 < a Initial program 97.2%
Taylor expanded in a around inf 75.3%
mul-1-neg75.3%
unsub-neg75.3%
*-commutative75.3%
associate-/l*87.2%
Simplified87.2%
if -8.50000000000000035e61 < a < 1060Initial program 97.3%
Taylor expanded in a around 0 85.8%
Final simplification86.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.35e+102) (- x (* y (/ z a))) (if (<= a 780.0) (+ x (* y (/ (- z t) z))) (+ x (* t (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.35e+102) {
tmp = x - (y * (z / a));
} else if (a <= 780.0) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + (t * (y / 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 (a <= (-1.35d+102)) then
tmp = x - (y * (z / a))
else if (a <= 780.0d0) then
tmp = x + (y * ((z - t) / z))
else
tmp = x + (t * (y / a))
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.35e+102) {
tmp = x - (y * (z / a));
} else if (a <= 780.0) {
tmp = x + (y * ((z - t) / z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.35e+102: tmp = x - (y * (z / a)) elif a <= 780.0: tmp = x + (y * ((z - t) / z)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.35e+102) tmp = Float64(x - Float64(y * Float64(z / a))); elseif (a <= 780.0) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.35e+102) tmp = x - (y * (z / a)); elseif (a <= 780.0) tmp = x + (y * ((z - t) / z)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.35e+102], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 780.0], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.35 \cdot 10^{+102}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq 780:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -1.3500000000000001e102Initial program 95.7%
clear-num95.1%
un-div-inv95.2%
Applied egg-rr95.2%
Taylor expanded in t around 0 68.0%
+-commutative68.0%
associate-*l/81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in z around 0 68.2%
mul-1-neg68.2%
unsub-neg68.2%
associate-/l*77.3%
Simplified77.3%
if -1.3500000000000001e102 < a < 780Initial program 97.2%
Taylor expanded in a around 0 84.6%
if 780 < a Initial program 98.5%
Taylor expanded in z around 0 65.3%
+-commutative65.3%
associate-/l*75.5%
Simplified75.5%
Final simplification81.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.4e-16) (+ x (* y (/ z (- z a)))) (if (<= z 1.05e-50) (+ x (* y (/ t a))) (+ x (* y (/ (- z t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e-16) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 1.05e-50) {
tmp = x + (y * (t / a));
} else {
tmp = x + (y * ((z - 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 (z <= (-2.4d-16)) then
tmp = x + (y * (z / (z - a)))
else if (z <= 1.05d-50) then
tmp = x + (y * (t / a))
else
tmp = x + (y * ((z - 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 (z <= -2.4e-16) {
tmp = x + (y * (z / (z - a)));
} else if (z <= 1.05e-50) {
tmp = x + (y * (t / a));
} else {
tmp = x + (y * ((z - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.4e-16: tmp = x + (y * (z / (z - a))) elif z <= 1.05e-50: tmp = x + (y * (t / a)) else: tmp = x + (y * ((z - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.4e-16) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif (z <= 1.05e-50) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.4e-16) tmp = x + (y * (z / (z - a))); elseif (z <= 1.05e-50) tmp = x + (y * (t / a)); else tmp = x + (y * ((z - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e-16], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-50], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-16}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-50}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\end{array}
\end{array}
if z < -2.40000000000000005e-16Initial program 99.9%
Taylor expanded in t around 0 70.1%
+-commutative70.1%
associate-/l*85.7%
Simplified85.7%
if -2.40000000000000005e-16 < z < 1.05e-50Initial program 94.2%
Taylor expanded in z around 0 74.2%
*-commutative74.2%
associate-/l*75.6%
Simplified75.6%
if 1.05e-50 < z Initial program 99.8%
Taylor expanded in a around 0 89.2%
Final simplification82.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -245.0) (not (<= z 6.4e-7))) (+ y x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -245.0) || !(z <= 6.4e-7)) {
tmp = y + x;
} else {
tmp = x + (y * (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 <= (-245.0d0)) .or. (.not. (z <= 6.4d-7))) then
tmp = y + x
else
tmp = x + (y * (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 <= -245.0) || !(z <= 6.4e-7)) {
tmp = y + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -245.0) or not (z <= 6.4e-7): tmp = y + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -245.0) || !(z <= 6.4e-7)) tmp = Float64(y + x); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -245.0) || ~((z <= 6.4e-7))) tmp = y + x; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -245.0], N[Not[LessEqual[z, 6.4e-7]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -245 \lor \neg \left(z \leq 6.4 \cdot 10^{-7}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -245 or 6.4000000000000001e-7 < z Initial program 99.9%
Taylor expanded in z around inf 77.2%
+-commutative77.2%
Simplified77.2%
if -245 < z < 6.4000000000000001e-7Initial program 94.7%
Taylor expanded in z around 0 71.7%
*-commutative71.7%
associate-/l*73.7%
Simplified73.7%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.8e-17) (not (<= z 1.9e-118))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.8e-17) || !(z <= 1.9e-118)) {
tmp = y + x;
} 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 ((z <= (-9.8d-17)) .or. (.not. (z <= 1.9d-118))) then
tmp = y + x
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 ((z <= -9.8e-17) || !(z <= 1.9e-118)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.8e-17) or not (z <= 1.9e-118): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.8e-17) || !(z <= 1.9e-118)) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.8e-17) || ~((z <= 1.9e-118))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.8e-17], N[Not[LessEqual[z, 1.9e-118]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{-17} \lor \neg \left(z \leq 1.9 \cdot 10^{-118}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.80000000000000024e-17 or 1.9e-118 < z Initial program 98.9%
Taylor expanded in z around inf 72.0%
+-commutative72.0%
Simplified72.0%
if -9.80000000000000024e-17 < z < 1.9e-118Initial program 94.9%
Taylor expanded in x around inf 47.5%
Final simplification62.2%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
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) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Initial program 97.3%
Final simplification97.3%
(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 97.3%
Taylor expanded in x around inf 47.5%
Final simplification47.5%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - 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 - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024067
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))