
(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(Float64(y * 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[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 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(Float64(y * 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[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+304)))
(+ x (/ (- z t) (/ (- z a) y)))
(+ t_1 x))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+304)) {
tmp = x + ((z - t) / ((z - a) / y));
} else {
tmp = t_1 + x;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+304)) {
tmp = x + ((z - t) / ((z - a) / y));
} else {
tmp = t_1 + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+304): tmp = x + ((z - t) / ((z - a) / y)) else: tmp = t_1 + x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+304)) tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(z - a) / y))); else tmp = Float64(t_1 + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 5e+304))) tmp = x + ((z - t) / ((z - a) / y)); else tmp = t_1 + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+304]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+304}\right):\\
\;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 4.9999999999999997e304 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 39.2%
*-commutative39.2%
associate-/l*99.9%
Simplified99.9%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 4.9999999999999997e304Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 -5e+278) (not (<= t_1 1e+307)))
(+ x (/ y (/ z (- z t))))
(+ t_1 x))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -5e+278) || !(t_1 <= 1e+307)) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = t_1 + 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 * (z - t)) / (z - a)
if ((t_1 <= (-5d+278)) .or. (.not. (t_1 <= 1d+307))) then
tmp = x + (y / (z / (z - t)))
else
tmp = t_1 + 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 * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -5e+278) || !(t_1 <= 1e+307)) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = t_1 + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -5e+278) or not (t_1 <= 1e+307): tmp = x + (y / (z / (z - t))) else: tmp = t_1 + x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if ((t_1 <= -5e+278) || !(t_1 <= 1e+307)) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); else tmp = Float64(t_1 + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if ((t_1 <= -5e+278) || ~((t_1 <= 1e+307))) tmp = x + (y / (z / (z - t))); else tmp = t_1 + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+278], N[Not[LessEqual[t$95$1, 1e+307]], $MachinePrecision]], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+278} \lor \neg \left(t\_1 \leq 10^{+307}\right):\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -5.00000000000000029e278 or 9.99999999999999986e306 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 40.9%
Taylor expanded in a around 0 34.7%
+-commutative34.7%
associate-/l*80.1%
Simplified80.1%
if -5.00000000000000029e278 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 9.99999999999999986e306Initial program 99.9%
Final simplification94.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- t z) a)))))
(if (<= a -5.5e+80)
t_1
(if (<= a 1.9e-90)
(+ x (/ y (/ z (- z t))))
(if (<= a 3.8e-15)
(/ (* y (- z t)) (- z a))
(if (<= a 3800.0) t_1 (+ x (/ y (/ (- z a) z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((t - z) / a));
double tmp;
if (a <= -5.5e+80) {
tmp = t_1;
} else if (a <= 1.9e-90) {
tmp = x + (y / (z / (z - t)));
} else if (a <= 3.8e-15) {
tmp = (y * (z - t)) / (z - a);
} else if (a <= 3800.0) {
tmp = t_1;
} else {
tmp = x + (y / ((z - 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) :: t_1
real(8) :: tmp
t_1 = x + (y * ((t - z) / a))
if (a <= (-5.5d+80)) then
tmp = t_1
else if (a <= 1.9d-90) then
tmp = x + (y / (z / (z - t)))
else if (a <= 3.8d-15) then
tmp = (y * (z - t)) / (z - a)
else if (a <= 3800.0d0) then
tmp = t_1
else
tmp = x + (y / ((z - a) / 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 * ((t - z) / a));
double tmp;
if (a <= -5.5e+80) {
tmp = t_1;
} else if (a <= 1.9e-90) {
tmp = x + (y / (z / (z - t)));
} else if (a <= 3.8e-15) {
tmp = (y * (z - t)) / (z - a);
} else if (a <= 3800.0) {
tmp = t_1;
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((t - z) / a)) tmp = 0 if a <= -5.5e+80: tmp = t_1 elif a <= 1.9e-90: tmp = x + (y / (z / (z - t))) elif a <= 3.8e-15: tmp = (y * (z - t)) / (z - a) elif a <= 3800.0: tmp = t_1 else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(t - z) / a))) tmp = 0.0 if (a <= -5.5e+80) tmp = t_1; elseif (a <= 1.9e-90) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (a <= 3.8e-15) tmp = Float64(Float64(y * Float64(z - t)) / Float64(z - a)); elseif (a <= 3800.0) tmp = t_1; else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((t - z) / a)); tmp = 0.0; if (a <= -5.5e+80) tmp = t_1; elseif (a <= 1.9e-90) tmp = x + (y / (z / (z - t))); elseif (a <= 3.8e-15) tmp = (y * (z - t)) / (z - a); elseif (a <= 3800.0) tmp = t_1; else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.5e+80], t$95$1, If[LessEqual[a, 1.9e-90], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.8e-15], N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3800.0], t$95$1, N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{t - z}{a}\\
\mathbf{if}\;a \leq -5.5 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-90}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{-15}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{elif}\;a \leq 3800:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if a < -5.49999999999999967e80 or 3.8000000000000002e-15 < a < 3800Initial program 86.2%
Taylor expanded in a around inf 82.0%
mul-1-neg82.0%
unsub-neg82.0%
*-lft-identity82.0%
times-frac87.4%
/-rgt-identity87.4%
Simplified87.4%
if -5.49999999999999967e80 < a < 1.9e-90Initial program 88.5%
Taylor expanded in a around 0 79.7%
+-commutative79.7%
associate-/l*89.6%
Simplified89.6%
if 1.9e-90 < a < 3.8000000000000002e-15Initial program 91.2%
Taylor expanded in x around 0 78.7%
if 3800 < a Initial program 67.6%
Taylor expanded in t around 0 63.5%
associate-/l*87.5%
Simplified87.5%
Final simplification87.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.2e-40)
(+ y x)
(if (<= z 65.0)
(+ x (* t (/ y a)))
(if (or (<= z 7.8e+137) (not (<= z 1.1e+181)))
(+ y x)
(- x (* y (/ t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e-40) {
tmp = y + x;
} else if (z <= 65.0) {
tmp = x + (t * (y / a));
} else if ((z <= 7.8e+137) || !(z <= 1.1e+181)) {
tmp = y + x;
} else {
tmp = x - (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 (z <= (-1.2d-40)) then
tmp = y + x
else if (z <= 65.0d0) then
tmp = x + (t * (y / a))
else if ((z <= 7.8d+137) .or. (.not. (z <= 1.1d+181))) then
tmp = y + x
else
tmp = x - (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 (z <= -1.2e-40) {
tmp = y + x;
} else if (z <= 65.0) {
tmp = x + (t * (y / a));
} else if ((z <= 7.8e+137) || !(z <= 1.1e+181)) {
tmp = y + x;
} else {
tmp = x - (y * (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2e-40: tmp = y + x elif z <= 65.0: tmp = x + (t * (y / a)) elif (z <= 7.8e+137) or not (z <= 1.1e+181): tmp = y + x else: tmp = x - (y * (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2e-40) tmp = Float64(y + x); elseif (z <= 65.0) tmp = Float64(x + Float64(t * Float64(y / a))); elseif ((z <= 7.8e+137) || !(z <= 1.1e+181)) tmp = Float64(y + x); else tmp = Float64(x - Float64(y * Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.2e-40) tmp = y + x; elseif (z <= 65.0) tmp = x + (t * (y / a)); elseif ((z <= 7.8e+137) || ~((z <= 1.1e+181))) tmp = y + x; else tmp = x - (y * (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e-40], N[(y + x), $MachinePrecision], If[LessEqual[z, 65.0], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 7.8e+137], N[Not[LessEqual[z, 1.1e+181]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-40}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 65:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+137} \lor \neg \left(z \leq 1.1 \cdot 10^{+181}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\end{array}
\end{array}
if z < -1.19999999999999996e-40 or 65 < z < 7.80000000000000059e137 or 1.1000000000000001e181 < z Initial program 74.7%
Taylor expanded in z around inf 78.1%
+-commutative78.1%
Simplified78.1%
if -1.19999999999999996e-40 < z < 65Initial program 96.6%
Taylor expanded in z around 0 71.8%
+-commutative71.8%
*-lft-identity71.8%
times-frac72.3%
/-rgt-identity72.3%
Simplified72.3%
if 7.80000000000000059e137 < z < 1.1000000000000001e181Initial program 67.4%
Taylor expanded in t around inf 70.2%
mul-1-neg70.2%
associate-*r/86.4%
distribute-rgt-neg-in86.4%
distribute-neg-frac86.4%
Simplified86.4%
Taylor expanded in z around inf 70.3%
mul-1-neg70.3%
unsub-neg70.3%
associate-/l*86.6%
Simplified86.6%
associate-/r/86.4%
Applied egg-rr86.4%
Final simplification76.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.8e-41)
(+ y x)
(if (<= z 3100000.0)
(+ x (* t (/ y a)))
(if (or (<= z 7.5e+135) (not (<= z 1.35e+181)))
(+ y x)
(- x (/ t (/ z y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.8e-41) {
tmp = y + x;
} else if (z <= 3100000.0) {
tmp = x + (t * (y / a));
} else if ((z <= 7.5e+135) || !(z <= 1.35e+181)) {
tmp = y + x;
} else {
tmp = x - (t / (z / 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 <= (-5.8d-41)) then
tmp = y + x
else if (z <= 3100000.0d0) then
tmp = x + (t * (y / a))
else if ((z <= 7.5d+135) .or. (.not. (z <= 1.35d+181))) then
tmp = y + x
else
tmp = x - (t / (z / 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 <= -5.8e-41) {
tmp = y + x;
} else if (z <= 3100000.0) {
tmp = x + (t * (y / a));
} else if ((z <= 7.5e+135) || !(z <= 1.35e+181)) {
tmp = y + x;
} else {
tmp = x - (t / (z / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.8e-41: tmp = y + x elif z <= 3100000.0: tmp = x + (t * (y / a)) elif (z <= 7.5e+135) or not (z <= 1.35e+181): tmp = y + x else: tmp = x - (t / (z / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.8e-41) tmp = Float64(y + x); elseif (z <= 3100000.0) tmp = Float64(x + Float64(t * Float64(y / a))); elseif ((z <= 7.5e+135) || !(z <= 1.35e+181)) tmp = Float64(y + x); else tmp = Float64(x - Float64(t / Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.8e-41) tmp = y + x; elseif (z <= 3100000.0) tmp = x + (t * (y / a)); elseif ((z <= 7.5e+135) || ~((z <= 1.35e+181))) tmp = y + x; else tmp = x - (t / (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.8e-41], N[(y + x), $MachinePrecision], If[LessEqual[z, 3100000.0], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 7.5e+135], N[Not[LessEqual[z, 1.35e+181]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-41}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 3100000:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+135} \lor \neg \left(z \leq 1.35 \cdot 10^{+181}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\end{array}
\end{array}
if z < -5.79999999999999955e-41 or 3.1e6 < z < 7.49999999999999947e135 or 1.35000000000000004e181 < z Initial program 74.7%
Taylor expanded in z around inf 78.1%
+-commutative78.1%
Simplified78.1%
if -5.79999999999999955e-41 < z < 3.1e6Initial program 96.6%
Taylor expanded in z around 0 71.8%
+-commutative71.8%
*-lft-identity71.8%
times-frac72.3%
/-rgt-identity72.3%
Simplified72.3%
if 7.49999999999999947e135 < z < 1.35000000000000004e181Initial program 67.4%
Taylor expanded in t around inf 70.2%
mul-1-neg70.2%
associate-*r/86.4%
distribute-rgt-neg-in86.4%
distribute-neg-frac86.4%
Simplified86.4%
Taylor expanded in z around inf 70.3%
mul-1-neg70.3%
unsub-neg70.3%
associate-/l*86.6%
Simplified86.6%
Final simplification76.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ t (/ z y)))))
(if (<= t -3.25e+183)
t_1
(if (<= t 5e+112)
(+ x (/ y (/ (- z a) z)))
(if (or (<= t 5.2e+165) (not (<= t 1.62e+223)))
(+ x (* t (/ y a)))
t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t / (z / y));
double tmp;
if (t <= -3.25e+183) {
tmp = t_1;
} else if (t <= 5e+112) {
tmp = x + (y / ((z - a) / z));
} else if ((t <= 5.2e+165) || !(t <= 1.62e+223)) {
tmp = x + (t * (y / 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 - (t / (z / y))
if (t <= (-3.25d+183)) then
tmp = t_1
else if (t <= 5d+112) then
tmp = x + (y / ((z - a) / z))
else if ((t <= 5.2d+165) .or. (.not. (t <= 1.62d+223))) then
tmp = x + (t * (y / 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 - (t / (z / y));
double tmp;
if (t <= -3.25e+183) {
tmp = t_1;
} else if (t <= 5e+112) {
tmp = x + (y / ((z - a) / z));
} else if ((t <= 5.2e+165) || !(t <= 1.62e+223)) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (t / (z / y)) tmp = 0 if t <= -3.25e+183: tmp = t_1 elif t <= 5e+112: tmp = x + (y / ((z - a) / z)) elif (t <= 5.2e+165) or not (t <= 1.62e+223): tmp = x + (t * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(t / Float64(z / y))) tmp = 0.0 if (t <= -3.25e+183) tmp = t_1; elseif (t <= 5e+112) tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); elseif ((t <= 5.2e+165) || !(t <= 1.62e+223)) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (t / (z / y)); tmp = 0.0; if (t <= -3.25e+183) tmp = t_1; elseif (t <= 5e+112) tmp = x + (y / ((z - a) / z)); elseif ((t <= 5.2e+165) || ~((t <= 1.62e+223))) tmp = x + (t * (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.25e+183], t$95$1, If[LessEqual[t, 5e+112], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 5.2e+165], N[Not[LessEqual[t, 1.62e+223]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{t}{\frac{z}{y}}\\
\mathbf{if}\;t \leq -3.25 \cdot 10^{+183}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+112}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+165} \lor \neg \left(t \leq 1.62 \cdot 10^{+223}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.24999999999999991e183 or 5.2000000000000002e165 < t < 1.61999999999999988e223Initial program 80.4%
Taylor expanded in t around inf 77.2%
mul-1-neg77.2%
associate-*r/90.2%
distribute-rgt-neg-in90.2%
distribute-neg-frac90.2%
Simplified90.2%
Taylor expanded in z around inf 60.8%
mul-1-neg60.8%
unsub-neg60.8%
associate-/l*71.6%
Simplified71.6%
if -3.24999999999999991e183 < t < 5e112Initial program 86.5%
Taylor expanded in t around 0 73.7%
associate-/l*86.6%
Simplified86.6%
if 5e112 < t < 5.2000000000000002e165 or 1.61999999999999988e223 < t Initial program 71.5%
Taylor expanded in z around 0 64.3%
+-commutative64.3%
*-lft-identity64.3%
times-frac80.1%
/-rgt-identity80.1%
Simplified80.1%
Final simplification83.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- y) (/ t z))))
(if (<= t -7e+185)
t_1
(if (<= t 1.5e+182) (+ y x) (if (<= t 8.2e+238) t_1 (* y (/ t a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -y * (t / z);
double tmp;
if (t <= -7e+185) {
tmp = t_1;
} else if (t <= 1.5e+182) {
tmp = y + x;
} else if (t <= 8.2e+238) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = -y * (t / z)
if (t <= (-7d+185)) then
tmp = t_1
else if (t <= 1.5d+182) then
tmp = y + x
else if (t <= 8.2d+238) then
tmp = t_1
else
tmp = y * (t / a)
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);
double tmp;
if (t <= -7e+185) {
tmp = t_1;
} else if (t <= 1.5e+182) {
tmp = y + x;
} else if (t <= 8.2e+238) {
tmp = t_1;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -y * (t / z) tmp = 0 if t <= -7e+185: tmp = t_1 elif t <= 1.5e+182: tmp = y + x elif t <= 8.2e+238: tmp = t_1 else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-y) * Float64(t / z)) tmp = 0.0 if (t <= -7e+185) tmp = t_1; elseif (t <= 1.5e+182) tmp = Float64(y + x); elseif (t <= 8.2e+238) tmp = t_1; else tmp = Float64(y * Float64(t / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -y * (t / z); tmp = 0.0; if (t <= -7e+185) tmp = t_1; elseif (t <= 1.5e+182) tmp = y + x; elseif (t <= 8.2e+238) tmp = t_1; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-y) * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e+185], t$95$1, If[LessEqual[t, 1.5e+182], N[(y + x), $MachinePrecision], If[LessEqual[t, 8.2e+238], t$95$1, N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot \frac{t}{z}\\
\mathbf{if}\;t \leq -7 \cdot 10^{+185}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+182}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+238}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if t < -7.00000000000000046e185 or 1.5000000000000001e182 < t < 8.1999999999999998e238Initial program 81.5%
Taylor expanded in t around inf 80.4%
mul-1-neg80.4%
associate-*r/91.9%
distribute-rgt-neg-in91.9%
distribute-neg-frac91.9%
Simplified91.9%
Taylor expanded in z around inf 64.5%
mul-1-neg64.5%
unsub-neg64.5%
associate-/l*73.7%
Simplified73.7%
Taylor expanded in x around 0 52.3%
associate-*l/57.4%
associate-*r*57.4%
neg-mul-157.4%
*-commutative57.4%
distribute-neg-frac57.4%
Simplified57.4%
if -7.00000000000000046e185 < t < 1.5000000000000001e182Initial program 84.9%
Taylor expanded in z around inf 70.9%
+-commutative70.9%
Simplified70.9%
if 8.1999999999999998e238 < t Initial program 73.2%
Taylor expanded in z around 0 58.5%
+-commutative58.5%
*-lft-identity58.5%
times-frac71.9%
/-rgt-identity71.9%
Simplified71.9%
Taylor expanded in t around 0 58.5%
Taylor expanded in t around inf 37.8%
associate-*l/44.2%
*-commutative44.2%
Simplified44.2%
Final simplification67.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -0.0074) (not (<= t 3.2e+123))) (- x (* t (/ y (- z a)))) (+ x (/ y (/ (- z a) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -0.0074) || !(t <= 3.2e+123)) {
tmp = x - (t * (y / (z - a)));
} else {
tmp = x + (y / ((z - 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 ((t <= (-0.0074d0)) .or. (.not. (t <= 3.2d+123))) then
tmp = x - (t * (y / (z - a)))
else
tmp = x + (y / ((z - 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 ((t <= -0.0074) || !(t <= 3.2e+123)) {
tmp = x - (t * (y / (z - a)));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -0.0074) or not (t <= 3.2e+123): tmp = x - (t * (y / (z - a))) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -0.0074) || !(t <= 3.2e+123)) tmp = Float64(x - Float64(t * Float64(y / Float64(z - a)))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -0.0074) || ~((t <= 3.2e+123))) tmp = x - (t * (y / (z - a))); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -0.0074], N[Not[LessEqual[t, 3.2e+123]], $MachinePrecision]], N[(x - N[(t * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0074 \lor \neg \left(t \leq 3.2 \cdot 10^{+123}\right):\\
\;\;\;\;x - t \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if t < -0.0074000000000000003 or 3.20000000000000005e123 < t Initial program 81.7%
Taylor expanded in t around inf 78.6%
mul-1-neg78.6%
associate-*r/91.0%
distribute-rgt-neg-in91.0%
distribute-neg-frac91.0%
Simplified91.0%
if -0.0074000000000000003 < t < 3.20000000000000005e123Initial program 85.0%
Taylor expanded in t around 0 74.7%
associate-/l*89.1%
Simplified89.1%
Final simplification89.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.8e+80) (+ x (* t (/ y a))) (if (<= a 6.5e-72) (+ x (/ (- z t) (/ z y))) (+ x (/ y (/ (- z a) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.8e+80) {
tmp = x + (t * (y / a));
} else if (a <= 6.5e-72) {
tmp = x + ((z - t) / (z / y));
} else {
tmp = x + (y / ((z - 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 <= (-6.8d+80)) then
tmp = x + (t * (y / a))
else if (a <= 6.5d-72) then
tmp = x + ((z - t) / (z / y))
else
tmp = x + (y / ((z - 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 <= -6.8e+80) {
tmp = x + (t * (y / a));
} else if (a <= 6.5e-72) {
tmp = x + ((z - t) / (z / y));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.8e+80: tmp = x + (t * (y / a)) elif a <= 6.5e-72: tmp = x + ((z - t) / (z / y)) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.8e+80) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (a <= 6.5e-72) tmp = Float64(x + Float64(Float64(z - t) / Float64(z / y))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.8e+80) tmp = x + (t * (y / a)); elseif (a <= 6.5e-72) tmp = x + ((z - t) / (z / y)); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.8e+80], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-72], N[(x + N[(N[(z - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{+80}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-72}:\\
\;\;\;\;x + \frac{z - t}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if a < -6.79999999999999984e80Initial program 83.9%
Taylor expanded in z around 0 75.5%
+-commutative75.5%
*-lft-identity75.5%
times-frac79.9%
/-rgt-identity79.9%
Simplified79.9%
if -6.79999999999999984e80 < a < 6.4999999999999997e-72Initial program 88.5%
*-commutative88.5%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in z around inf 84.8%
if 6.4999999999999997e-72 < a Initial program 75.0%
Taylor expanded in t around 0 63.1%
associate-/l*82.0%
Simplified82.0%
Final simplification83.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -8.6e+80) (+ x (* t (/ y a))) (if (<= a 1.26e-71) (+ x (/ y (/ z (- z t)))) (+ x (/ y (/ (- z a) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.6e+80) {
tmp = x + (t * (y / a));
} else if (a <= 1.26e-71) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x + (y / ((z - 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 <= (-8.6d+80)) then
tmp = x + (t * (y / a))
else if (a <= 1.26d-71) then
tmp = x + (y / (z / (z - t)))
else
tmp = x + (y / ((z - 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 <= -8.6e+80) {
tmp = x + (t * (y / a));
} else if (a <= 1.26e-71) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8.6e+80: tmp = x + (t * (y / a)) elif a <= 1.26e-71: tmp = x + (y / (z / (z - t))) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8.6e+80) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (a <= 1.26e-71) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -8.6e+80) tmp = x + (t * (y / a)); elseif (a <= 1.26e-71) tmp = x + (y / (z / (z - t))); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.6e+80], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.26e-71], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{+80}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq 1.26 \cdot 10^{-71}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if a < -8.60000000000000008e80Initial program 83.9%
Taylor expanded in z around 0 75.5%
+-commutative75.5%
*-lft-identity75.5%
times-frac79.9%
/-rgt-identity79.9%
Simplified79.9%
if -8.60000000000000008e80 < a < 1.2600000000000001e-71Initial program 88.5%
Taylor expanded in a around 0 78.0%
+-commutative78.0%
associate-/l*88.1%
Simplified88.1%
if 1.2600000000000001e-71 < a Initial program 75.0%
Taylor expanded in t around 0 63.1%
associate-/l*82.0%
Simplified82.0%
Final simplification85.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -7.5e+80) (+ x (* y (/ (- t z) a))) (if (<= a 6.2e-72) (+ x (/ y (/ z (- z t)))) (+ x (/ y (/ (- z a) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.5e+80) {
tmp = x + (y * ((t - z) / a));
} else if (a <= 6.2e-72) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x + (y / ((z - 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 <= (-7.5d+80)) then
tmp = x + (y * ((t - z) / a))
else if (a <= 6.2d-72) then
tmp = x + (y / (z / (z - t)))
else
tmp = x + (y / ((z - 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 <= -7.5e+80) {
tmp = x + (y * ((t - z) / a));
} else if (a <= 6.2e-72) {
tmp = x + (y / (z / (z - t)));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.5e+80: tmp = x + (y * ((t - z) / a)) elif a <= 6.2e-72: tmp = x + (y / (z / (z - t))) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.5e+80) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); elseif (a <= 6.2e-72) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7.5e+80) tmp = x + (y * ((t - z) / a)); elseif (a <= 6.2e-72) tmp = x + (y / (z / (z - t))); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.5e+80], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.2e-72], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{+80}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-72}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if a < -7.49999999999999994e80Initial program 83.9%
Taylor expanded in a around inf 81.2%
mul-1-neg81.2%
unsub-neg81.2%
*-lft-identity81.2%
times-frac87.6%
/-rgt-identity87.6%
Simplified87.6%
if -7.49999999999999994e80 < a < 6.1999999999999996e-72Initial program 88.5%
Taylor expanded in a around 0 78.0%
+-commutative78.0%
associate-/l*88.1%
Simplified88.1%
if 6.1999999999999996e-72 < a Initial program 75.0%
Taylor expanded in t around 0 63.1%
associate-/l*82.0%
Simplified82.0%
Final simplification86.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.8e-40) (not (<= z 1.35e+25))) (+ y x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.8e-40) || !(z <= 1.35e+25)) {
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 <= (-2.8d-40)) .or. (.not. (z <= 1.35d+25))) 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 <= -2.8e-40) || !(z <= 1.35e+25)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.8e-40) or not (z <= 1.35e+25): tmp = y + x else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.8e-40) || !(z <= 1.35e+25)) tmp = Float64(y + x); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.8e-40) || ~((z <= 1.35e+25))) tmp = y + x; else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.8e-40], N[Not[LessEqual[z, 1.35e+25]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-40} \lor \neg \left(z \leq 1.35 \cdot 10^{+25}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -2.8e-40 or 1.35e25 < z Initial program 73.6%
Taylor expanded in z around inf 76.3%
+-commutative76.3%
Simplified76.3%
if -2.8e-40 < z < 1.35e25Initial program 96.0%
Taylor expanded in z around 0 71.5%
Final simplification74.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.4e-41) (not (<= z 42000.0))) (+ y x) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.4e-41) || !(z <= 42000.0)) {
tmp = y + x;
} 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 ((z <= (-2.4d-41)) .or. (.not. (z <= 42000.0d0))) then
tmp = y + x
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 ((z <= -2.4e-41) || !(z <= 42000.0)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.4e-41) or not (z <= 42000.0): tmp = y + x else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.4e-41) || !(z <= 42000.0)) tmp = Float64(y + x); 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 ((z <= -2.4e-41) || ~((z <= 42000.0))) tmp = y + x; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.4e-41], N[Not[LessEqual[z, 42000.0]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-41} \lor \neg \left(z \leq 42000\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -2.40000000000000022e-41 or 42000 < z Initial program 74.1%
Taylor expanded in z around inf 75.9%
+-commutative75.9%
Simplified75.9%
if -2.40000000000000022e-41 < z < 42000Initial program 96.6%
Taylor expanded in z around 0 71.8%
+-commutative71.8%
*-lft-identity71.8%
times-frac72.3%
/-rgt-identity72.3%
Simplified72.3%
Final simplification74.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.6e+246) (* y (/ t a)) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.6e+246) {
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 (t <= (-3.6d+246)) 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 (t <= -3.6e+246) {
tmp = y * (t / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.6e+246: tmp = y * (t / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.6e+246) 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 (t <= -3.6e+246) tmp = y * (t / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.6e+246], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{+246}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -3.6e246Initial program 90.7%
Taylor expanded in z around 0 83.6%
+-commutative83.6%
*-lft-identity83.6%
times-frac83.6%
/-rgt-identity83.6%
Simplified83.6%
Taylor expanded in t around 0 83.6%
Taylor expanded in t around inf 73.8%
associate-*l/70.6%
*-commutative70.6%
Simplified70.6%
if -3.6e246 < t Initial program 83.5%
Taylor expanded in z around inf 63.6%
+-commutative63.6%
Simplified63.6%
Final simplification63.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.2e+248) (/ (* y t) a) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+248) {
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 (t <= (-6.2d+248)) 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 (t <= -6.2e+248) {
tmp = (y * t) / a;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.2e+248: tmp = (y * t) / a else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e+248) tmp = Float64(Float64(y * t) / a); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.2e+248) tmp = (y * t) / a; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e+248], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+248}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -6.20000000000000011e248Initial program 90.7%
Taylor expanded in z around 0 83.6%
+-commutative83.6%
*-lft-identity83.6%
times-frac83.6%
/-rgt-identity83.6%
Simplified83.6%
Taylor expanded in t around 0 83.6%
Taylor expanded in t around inf 73.8%
if -6.20000000000000011e248 < t Initial program 83.5%
Taylor expanded in z around inf 63.6%
+-commutative63.6%
Simplified63.6%
Final simplification64.0%
(FPCore (x y z t a) :precision binary64 (if (<= a 6.9e+135) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 6.9e+135) {
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 <= 6.9d+135) 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 <= 6.9e+135) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 6.9e+135: tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 6.9e+135) 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 <= 6.9e+135) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 6.9e+135], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 6.9 \cdot 10^{+135}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < 6.89999999999999972e135Initial program 86.7%
Taylor expanded in z around inf 61.5%
+-commutative61.5%
Simplified61.5%
if 6.89999999999999972e135 < a Initial program 62.4%
Taylor expanded in x around inf 76.3%
Final simplification63.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 83.7%
Taylor expanded in x around inf 47.1%
Final simplification47.1%
(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 2024096
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))