
(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 20 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 (<= t_1 (- INFINITY))
(+ x (* (- z t) (/ y (- z a))))
(if (<= t_1 5e+251) (+ x t_1) (* y (+ (/ (- z t) (- z a)) (/ x y)))))))
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)) {
tmp = x + ((z - t) * (y / (z - a)));
} else if (t_1 <= 5e+251) {
tmp = x + t_1;
} else {
tmp = y * (((z - t) / (z - a)) + (x / y));
}
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) {
tmp = x + ((z - t) * (y / (z - a)));
} else if (t_1 <= 5e+251) {
tmp = x + t_1;
} else {
tmp = y * (((z - t) / (z - a)) + (x / y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if t_1 <= -math.inf: tmp = x + ((z - t) * (y / (z - a))) elif t_1 <= 5e+251: tmp = x + t_1 else: tmp = y * (((z - t) / (z - a)) + (x / y)) 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)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))); elseif (t_1 <= 5e+251) tmp = Float64(x + t_1); else tmp = Float64(y * Float64(Float64(Float64(z - t) / Float64(z - a)) + Float64(x / y))); 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) tmp = x + ((z - t) * (y / (z - a))); elseif (t_1 <= 5e+251) tmp = x + t_1; else tmp = y * (((z - t) / (z - a)) + (x / y)); 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[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+251], N[(x + t$95$1), $MachinePrecision], N[(y * N[(N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+251}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{z - t}{z - a} + \frac{x}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0Initial program 38.1%
+-commutative38.1%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
fma-undefine99.9%
associate-/l*38.1%
div-inv38.1%
*-commutative38.1%
associate-*r*99.8%
div-inv99.9%
Applied egg-rr99.9%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 5.0000000000000005e251Initial program 99.9%
if 5.0000000000000005e251 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 65.0%
Taylor expanded in y around inf 100.0%
associate--l+100.0%
div-sub100.0%
Simplified100.0%
Final simplification99.9%
(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 86.2%
+-commutative86.2%
associate-/l*97.7%
fma-define97.7%
Simplified97.7%
Final simplification97.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+173)))
(* (- z t) (/ y (- z a)))
(+ x t_1))))
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 <= 2e+173)) {
tmp = (z - t) * (y / (z - a));
} else {
tmp = x + t_1;
}
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 <= 2e+173)) {
tmp = (z - t) * (y / (z - a));
} else {
tmp = x + t_1;
}
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 <= 2e+173): tmp = (z - t) * (y / (z - a)) else: tmp = x + t_1 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 <= 2e+173)) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); else tmp = Float64(x + t_1); 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 <= 2e+173))) tmp = (z - t) * (y / (z - a)); else tmp = x + t_1; 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, 2e+173]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $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 2 \cdot 10^{+173}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 2e173 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 55.2%
Taylor expanded in x around 0 55.2%
*-commutative55.2%
associate-*r/89.3%
*-commutative89.3%
Applied egg-rr89.3%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 2e173Initial program 99.9%
Final simplification96.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+173)))
(+ x (* (- z t) (/ y (- z a))))
(+ x t_1))))
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 <= 2e+173)) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = x + t_1;
}
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 <= 2e+173)) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = x + t_1;
}
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 <= 2e+173): tmp = x + ((z - t) * (y / (z - a))) else: tmp = x + t_1 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 <= 2e+173)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))); else tmp = Float64(x + t_1); 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 <= 2e+173))) tmp = x + ((z - t) * (y / (z - a))); else tmp = x + t_1; 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, 2e+173]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $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 2 \cdot 10^{+173}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 2e173 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 55.2%
+-commutative55.2%
associate-/l*96.3%
fma-define96.3%
Simplified96.3%
fma-undefine96.3%
associate-/l*55.2%
div-inv55.1%
*-commutative55.1%
associate-*r*99.7%
div-inv99.9%
Applied egg-rr99.9%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 2e173Initial 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 -2e+141) (not (<= t_1 4e+98)))
(* (- z t) (/ y (- z a)))
(+ x (/ (* y z) (- z a))))))
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 <= -2e+141) || !(t_1 <= 4e+98)) {
tmp = (z - t) * (y / (z - a));
} else {
tmp = x + ((y * z) / (z - 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 * (z - t)) / (z - a)
if ((t_1 <= (-2d+141)) .or. (.not. (t_1 <= 4d+98))) then
tmp = (z - t) * (y / (z - a))
else
tmp = x + ((y * z) / (z - 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 * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -2e+141) || !(t_1 <= 4e+98)) {
tmp = (z - t) * (y / (z - a));
} else {
tmp = x + ((y * z) / (z - a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -2e+141) or not (t_1 <= 4e+98): tmp = (z - t) * (y / (z - a)) else: tmp = x + ((y * z) / (z - a)) 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 <= -2e+141) || !(t_1 <= 4e+98)) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); else tmp = Float64(x + Float64(Float64(y * z) / Float64(z - a))); 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 <= -2e+141) || ~((t_1 <= 4e+98))) tmp = (z - t) * (y / (z - a)); else tmp = x + ((y * z) / (z - a)); 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, -2e+141], N[Not[LessEqual[t$95$1, 4e+98]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+141} \lor \neg \left(t\_1 \leq 4 \cdot 10^{+98}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{z - a}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -2.00000000000000003e141 or 3.99999999999999999e98 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 65.3%
Taylor expanded in x around 0 60.5%
*-commutative60.5%
associate-*r/86.9%
*-commutative86.9%
Applied egg-rr86.9%
if -2.00000000000000003e141 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 3.99999999999999999e98Initial program 99.9%
Taylor expanded in t around 0 87.1%
+-commutative87.1%
Simplified87.1%
Final simplification87.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))))
(if (<= z -3.2e-30)
t_1
(if (<= z 2.6e-142)
(+ x (/ (* y t) a))
(if (<= z 2.9e-47)
(* (- z t) (/ y (- z a)))
(if (or (<= z 2.5e+53) (not (<= z 2.4e+155)))
t_1
(+ x (* y (/ z (- z a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -3.2e-30) {
tmp = t_1;
} else if (z <= 2.6e-142) {
tmp = x + ((y * t) / a);
} else if (z <= 2.9e-47) {
tmp = (z - t) * (y / (z - a));
} else if ((z <= 2.5e+53) || !(z <= 2.4e+155)) {
tmp = t_1;
} else {
tmp = x + (y * (z / (z - 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 = x + (y * (1.0d0 - (t / z)))
if (z <= (-3.2d-30)) then
tmp = t_1
else if (z <= 2.6d-142) then
tmp = x + ((y * t) / a)
else if (z <= 2.9d-47) then
tmp = (z - t) * (y / (z - a))
else if ((z <= 2.5d+53) .or. (.not. (z <= 2.4d+155))) then
tmp = t_1
else
tmp = x + (y * (z / (z - a)))
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 * (1.0 - (t / z)));
double tmp;
if (z <= -3.2e-30) {
tmp = t_1;
} else if (z <= 2.6e-142) {
tmp = x + ((y * t) / a);
} else if (z <= 2.9e-47) {
tmp = (z - t) * (y / (z - a));
} else if ((z <= 2.5e+53) || !(z <= 2.4e+155)) {
tmp = t_1;
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -3.2e-30: tmp = t_1 elif z <= 2.6e-142: tmp = x + ((y * t) / a) elif z <= 2.9e-47: tmp = (z - t) * (y / (z - a)) elif (z <= 2.5e+53) or not (z <= 2.4e+155): tmp = t_1 else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -3.2e-30) tmp = t_1; elseif (z <= 2.6e-142) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 2.9e-47) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); elseif ((z <= 2.5e+53) || !(z <= 2.4e+155)) tmp = t_1; else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -3.2e-30) tmp = t_1; elseif (z <= 2.6e-142) tmp = x + ((y * t) / a); elseif (z <= 2.9e-47) tmp = (z - t) * (y / (z - a)); elseif ((z <= 2.5e+53) || ~((z <= 2.4e+155))) tmp = t_1; else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e-30], t$95$1, If[LessEqual[z, 2.6e-142], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e-47], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2.5e+53], N[Not[LessEqual[z, 2.4e+155]], $MachinePrecision]], t$95$1, N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-142}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-47}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+53} \lor \neg \left(z \leq 2.4 \cdot 10^{+155}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -3.2e-30 or 2.9e-47 < z < 2.5000000000000002e53 or 2.40000000000000021e155 < z Initial program 77.9%
Taylor expanded in a around 0 70.0%
associate-/l*39.8%
div-sub39.8%
*-inverses39.8%
Simplified89.8%
if -3.2e-30 < z < 2.6e-142Initial program 98.8%
Taylor expanded in z around 0 88.2%
if 2.6e-142 < z < 2.9e-47Initial program 85.2%
Taylor expanded in x around 0 69.5%
*-commutative69.5%
associate-*r/83.9%
*-commutative83.9%
Applied egg-rr83.9%
if 2.5000000000000002e53 < z < 2.40000000000000021e155Initial program 77.5%
Taylor expanded in t around 0 73.8%
associate-/l*60.4%
Simplified96.3%
Final simplification89.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.8e-32)
(+ x (* y (/ (- z t) z)))
(if (<= z 3.7e-144)
(+ x (/ (* y t) a))
(if (<= z 1.96e-47)
(* (- z t) (/ y (- z a)))
(if (or (<= z 2.9e+53) (not (<= z 2.9e+164)))
(+ x (* y (- 1.0 (/ t z))))
(+ x (* y (/ z (- z a)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8e-32) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 3.7e-144) {
tmp = x + ((y * t) / a);
} else if (z <= 1.96e-47) {
tmp = (z - t) * (y / (z - a));
} else if ((z <= 2.9e+53) || !(z <= 2.9e+164)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + (y * (z / (z - 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-32)) then
tmp = x + (y * ((z - t) / z))
else if (z <= 3.7d-144) then
tmp = x + ((y * t) / a)
else if (z <= 1.96d-47) then
tmp = (z - t) * (y / (z - a))
else if ((z <= 2.9d+53) .or. (.not. (z <= 2.9d+164))) then
tmp = x + (y * (1.0d0 - (t / z)))
else
tmp = x + (y * (z / (z - 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-32) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 3.7e-144) {
tmp = x + ((y * t) / a);
} else if (z <= 1.96e-47) {
tmp = (z - t) * (y / (z - a));
} else if ((z <= 2.9e+53) || !(z <= 2.9e+164)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.8e-32: tmp = x + (y * ((z - t) / z)) elif z <= 3.7e-144: tmp = x + ((y * t) / a) elif z <= 1.96e-47: tmp = (z - t) * (y / (z - a)) elif (z <= 2.9e+53) or not (z <= 2.9e+164): tmp = x + (y * (1.0 - (t / z))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.8e-32) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); elseif (z <= 3.7e-144) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 1.96e-47) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); elseif ((z <= 2.9e+53) || !(z <= 2.9e+164)) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.8e-32) tmp = x + (y * ((z - t) / z)); elseif (z <= 3.7e-144) tmp = x + ((y * t) / a); elseif (z <= 1.96e-47) tmp = (z - t) * (y / (z - a)); elseif ((z <= 2.9e+53) || ~((z <= 2.9e+164))) tmp = x + (y * (1.0 - (t / z))); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8e-32], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-144], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.96e-47], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2.9e+53], N[Not[LessEqual[z, 2.9e+164]], $MachinePrecision]], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-32}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-144}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.96 \cdot 10^{-47}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+53} \lor \neg \left(z \leq 2.9 \cdot 10^{+164}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -2.7999999999999999e-32Initial program 78.3%
Taylor expanded in a around 0 66.8%
+-commutative66.8%
associate-/l*86.0%
Simplified86.0%
if -2.7999999999999999e-32 < z < 3.7000000000000003e-144Initial program 98.8%
Taylor expanded in z around 0 88.2%
if 3.7000000000000003e-144 < z < 1.9600000000000001e-47Initial program 85.2%
Taylor expanded in x around 0 69.5%
*-commutative69.5%
associate-*r/83.9%
*-commutative83.9%
Applied egg-rr83.9%
if 1.9600000000000001e-47 < z < 2.9000000000000002e53 or 2.8999999999999999e164 < z Initial program 77.2%
Taylor expanded in a around 0 74.6%
associate-/l*39.1%
div-sub39.2%
*-inverses39.2%
Simplified95.5%
if 2.9000000000000002e53 < z < 2.8999999999999999e164Initial program 77.5%
Taylor expanded in t around 0 73.8%
associate-/l*60.4%
Simplified96.3%
Final simplification89.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- z t) (/ y (- z a)))))
(if (<= z -1.75e+18)
(+ y x)
(if (<= z 1.3e-145)
(+ x (/ (* y t) a))
(if (<= z 6.6e-47)
t_1
(if (<= z 7e+44)
(- x (* t (/ y z)))
(if (<= z 5e+87) t_1 (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * (y / (z - a));
double tmp;
if (z <= -1.75e+18) {
tmp = y + x;
} else if (z <= 1.3e-145) {
tmp = x + ((y * t) / a);
} else if (z <= 6.6e-47) {
tmp = t_1;
} else if (z <= 7e+44) {
tmp = x - (t * (y / z));
} else if (z <= 5e+87) {
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 = (z - t) * (y / (z - a))
if (z <= (-1.75d+18)) then
tmp = y + x
else if (z <= 1.3d-145) then
tmp = x + ((y * t) / a)
else if (z <= 6.6d-47) then
tmp = t_1
else if (z <= 7d+44) then
tmp = x - (t * (y / z))
else if (z <= 5d+87) 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 = (z - t) * (y / (z - a));
double tmp;
if (z <= -1.75e+18) {
tmp = y + x;
} else if (z <= 1.3e-145) {
tmp = x + ((y * t) / a);
} else if (z <= 6.6e-47) {
tmp = t_1;
} else if (z <= 7e+44) {
tmp = x - (t * (y / z));
} else if (z <= 5e+87) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) * (y / (z - a)) tmp = 0 if z <= -1.75e+18: tmp = y + x elif z <= 1.3e-145: tmp = x + ((y * t) / a) elif z <= 6.6e-47: tmp = t_1 elif z <= 7e+44: tmp = x - (t * (y / z)) elif z <= 5e+87: tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) * Float64(y / Float64(z - a))) tmp = 0.0 if (z <= -1.75e+18) tmp = Float64(y + x); elseif (z <= 1.3e-145) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 6.6e-47) tmp = t_1; elseif (z <= 7e+44) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 5e+87) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) * (y / (z - a)); tmp = 0.0; if (z <= -1.75e+18) tmp = y + x; elseif (z <= 1.3e-145) tmp = x + ((y * t) / a); elseif (z <= 6.6e-47) tmp = t_1; elseif (z <= 7e+44) tmp = x - (t * (y / z)); elseif (z <= 5e+87) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+18], N[(y + x), $MachinePrecision], If[LessEqual[z, 1.3e-145], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e-47], t$95$1, If[LessEqual[z, 7e+44], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+87], t$95$1, N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+18}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-145}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+44}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.75e18 or 4.9999999999999998e87 < z Initial program 72.0%
Taylor expanded in z around inf 84.1%
+-commutative84.1%
Simplified84.1%
if -1.75e18 < z < 1.3e-145Initial program 97.4%
Taylor expanded in z around 0 83.8%
if 1.3e-145 < z < 6.60000000000000007e-47 or 6.9999999999999998e44 < z < 4.9999999999999998e87Initial program 89.1%
Taylor expanded in x around 0 73.9%
*-commutative73.9%
associate-*r/84.4%
*-commutative84.4%
Applied egg-rr84.4%
if 6.60000000000000007e-47 < z < 6.9999999999999998e44Initial program 94.8%
Taylor expanded in a around 0 89.3%
+-commutative89.3%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in z around 0 84.0%
associate-*r/84.0%
neg-mul-184.0%
distribute-rgt-neg-in84.0%
associate-*r/88.9%
Simplified88.9%
Final simplification84.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.7e+18)
(+ y x)
(if (<= z 3800000000000.0)
(+ x (/ (* y t) a))
(if (<= z 3.2e+53)
(* y (- 1.0 (/ t z)))
(if (<= z 1.05e+72) (* y (/ z (- z a))) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e+18) {
tmp = y + x;
} else if (z <= 3800000000000.0) {
tmp = x + ((y * t) / a);
} else if (z <= 3.2e+53) {
tmp = y * (1.0 - (t / z));
} else if (z <= 1.05e+72) {
tmp = y * (z / (z - 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 <= (-1.7d+18)) then
tmp = y + x
else if (z <= 3800000000000.0d0) then
tmp = x + ((y * t) / a)
else if (z <= 3.2d+53) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 1.05d+72) then
tmp = y * (z / (z - 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 <= -1.7e+18) {
tmp = y + x;
} else if (z <= 3800000000000.0) {
tmp = x + ((y * t) / a);
} else if (z <= 3.2e+53) {
tmp = y * (1.0 - (t / z));
} else if (z <= 1.05e+72) {
tmp = y * (z / (z - a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.7e+18: tmp = y + x elif z <= 3800000000000.0: tmp = x + ((y * t) / a) elif z <= 3.2e+53: tmp = y * (1.0 - (t / z)) elif z <= 1.05e+72: tmp = y * (z / (z - a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.7e+18) tmp = Float64(y + x); elseif (z <= 3800000000000.0) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 3.2e+53) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 1.05e+72) tmp = Float64(y * Float64(z / Float64(z - a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.7e+18) tmp = y + x; elseif (z <= 3800000000000.0) tmp = x + ((y * t) / a); elseif (z <= 3.2e+53) tmp = y * (1.0 - (t / z)); elseif (z <= 1.05e+72) tmp = y * (z / (z - a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e+18], N[(y + x), $MachinePrecision], If[LessEqual[z, 3800000000000.0], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+53], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+72], N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+18}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 3800000000000:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+53}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+72}:\\
\;\;\;\;y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.7e18 or 1.0500000000000001e72 < z Initial program 72.0%
Taylor expanded in z around inf 84.1%
+-commutative84.1%
Simplified84.1%
if -1.7e18 < z < 3.8e12Initial program 96.0%
Taylor expanded in z around 0 77.6%
if 3.8e12 < z < 3.2e53Initial program 86.7%
Taylor expanded in x around 0 72.7%
Taylor expanded in a around 0 73.4%
associate-/l*86.7%
div-sub86.7%
*-inverses86.7%
Simplified86.7%
if 3.2e53 < z < 1.0500000000000001e72Initial program 100.0%
Taylor expanded in x around 0 75.6%
Taylor expanded in t around 0 75.6%
associate-/l*75.6%
Simplified75.6%
Final simplification80.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.02e+18)
(+ y x)
(if (<= z 7500000000000.0)
(+ x (* t (/ y a)))
(if (<= z 3.2e+53)
(* y (- 1.0 (/ t z)))
(if (<= z 1.05e+72) (* y (/ z (- z a))) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.02e+18) {
tmp = y + x;
} else if (z <= 7500000000000.0) {
tmp = x + (t * (y / a));
} else if (z <= 3.2e+53) {
tmp = y * (1.0 - (t / z));
} else if (z <= 1.05e+72) {
tmp = y * (z / (z - 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 <= (-1.02d+18)) then
tmp = y + x
else if (z <= 7500000000000.0d0) then
tmp = x + (t * (y / a))
else if (z <= 3.2d+53) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 1.05d+72) then
tmp = y * (z / (z - 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 <= -1.02e+18) {
tmp = y + x;
} else if (z <= 7500000000000.0) {
tmp = x + (t * (y / a));
} else if (z <= 3.2e+53) {
tmp = y * (1.0 - (t / z));
} else if (z <= 1.05e+72) {
tmp = y * (z / (z - a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.02e+18: tmp = y + x elif z <= 7500000000000.0: tmp = x + (t * (y / a)) elif z <= 3.2e+53: tmp = y * (1.0 - (t / z)) elif z <= 1.05e+72: tmp = y * (z / (z - a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.02e+18) tmp = Float64(y + x); elseif (z <= 7500000000000.0) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 3.2e+53) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 1.05e+72) tmp = Float64(y * Float64(z / Float64(z - a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.02e+18) tmp = y + x; elseif (z <= 7500000000000.0) tmp = x + (t * (y / a)); elseif (z <= 3.2e+53) tmp = y * (1.0 - (t / z)); elseif (z <= 1.05e+72) tmp = y * (z / (z - a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.02e+18], N[(y + x), $MachinePrecision], If[LessEqual[z, 7500000000000.0], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+53], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+72], N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+18}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 7500000000000:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+53}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+72}:\\
\;\;\;\;y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.02e18 or 1.0500000000000001e72 < z Initial program 72.0%
Taylor expanded in z around inf 84.1%
+-commutative84.1%
Simplified84.1%
if -1.02e18 < z < 7.5e12Initial program 96.0%
Taylor expanded in z around 0 77.6%
+-commutative77.6%
associate-/l*78.8%
Simplified78.8%
if 7.5e12 < z < 3.2e53Initial program 86.7%
Taylor expanded in x around 0 72.7%
Taylor expanded in a around 0 73.4%
associate-/l*86.7%
div-sub86.7%
*-inverses86.7%
Simplified86.7%
if 3.2e53 < z < 1.0500000000000001e72Initial program 100.0%
Taylor expanded in x around 0 75.6%
Taylor expanded in t around 0 75.6%
associate-/l*75.6%
Simplified75.6%
Final simplification81.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.5e+17)
(+ y x)
(if (<= z 5500000000000.0)
(+ x (/ t (/ a y)))
(if (<= z 3.2e+53)
(* y (- 1.0 (/ t z)))
(if (<= z 1.05e+72) (* y (/ z (- z a))) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+17) {
tmp = y + x;
} else if (z <= 5500000000000.0) {
tmp = x + (t / (a / y));
} else if (z <= 3.2e+53) {
tmp = y * (1.0 - (t / z));
} else if (z <= 1.05e+72) {
tmp = y * (z / (z - 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 <= (-9.5d+17)) then
tmp = y + x
else if (z <= 5500000000000.0d0) then
tmp = x + (t / (a / y))
else if (z <= 3.2d+53) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 1.05d+72) then
tmp = y * (z / (z - 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 <= -9.5e+17) {
tmp = y + x;
} else if (z <= 5500000000000.0) {
tmp = x + (t / (a / y));
} else if (z <= 3.2e+53) {
tmp = y * (1.0 - (t / z));
} else if (z <= 1.05e+72) {
tmp = y * (z / (z - a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e+17: tmp = y + x elif z <= 5500000000000.0: tmp = x + (t / (a / y)) elif z <= 3.2e+53: tmp = y * (1.0 - (t / z)) elif z <= 1.05e+72: tmp = y * (z / (z - a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e+17) tmp = Float64(y + x); elseif (z <= 5500000000000.0) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 3.2e+53) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 1.05e+72) tmp = Float64(y * Float64(z / Float64(z - a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e+17) tmp = y + x; elseif (z <= 5500000000000.0) tmp = x + (t / (a / y)); elseif (z <= 3.2e+53) tmp = y * (1.0 - (t / z)); elseif (z <= 1.05e+72) tmp = y * (z / (z - a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+17], N[(y + x), $MachinePrecision], If[LessEqual[z, 5500000000000.0], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+53], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+72], N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+17}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 5500000000000:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+53}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+72}:\\
\;\;\;\;y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -9.5e17 or 1.0500000000000001e72 < z Initial program 72.0%
Taylor expanded in z around inf 84.1%
+-commutative84.1%
Simplified84.1%
if -9.5e17 < z < 5.5e12Initial program 96.0%
Taylor expanded in z around 0 77.6%
+-commutative77.6%
associate-/l*78.8%
Simplified78.8%
clear-num78.8%
un-div-inv78.8%
Applied egg-rr78.8%
if 5.5e12 < z < 3.2e53Initial program 86.7%
Taylor expanded in x around 0 72.7%
Taylor expanded in a around 0 73.4%
associate-/l*86.7%
div-sub86.7%
*-inverses86.7%
Simplified86.7%
if 3.2e53 < z < 1.0500000000000001e72Initial program 100.0%
Taylor expanded in x around 0 75.6%
Taylor expanded in t around 0 75.6%
associate-/l*75.6%
Simplified75.6%
Final simplification81.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.5e+17)
(+ y x)
(if (<= z 7500000000000.0)
(+ x (/ t (/ a y)))
(if (<= z 1.9e+53)
(* y (- 1.0 (/ t z)))
(if (<= z 5.5e+83) (- x (* y (/ z a))) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+17) {
tmp = y + x;
} else if (z <= 7500000000000.0) {
tmp = x + (t / (a / y));
} else if (z <= 1.9e+53) {
tmp = y * (1.0 - (t / z));
} else if (z <= 5.5e+83) {
tmp = x - (y * (z / 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 <= (-9.5d+17)) then
tmp = y + x
else if (z <= 7500000000000.0d0) then
tmp = x + (t / (a / y))
else if (z <= 1.9d+53) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 5.5d+83) then
tmp = x - (y * (z / 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 <= -9.5e+17) {
tmp = y + x;
} else if (z <= 7500000000000.0) {
tmp = x + (t / (a / y));
} else if (z <= 1.9e+53) {
tmp = y * (1.0 - (t / z));
} else if (z <= 5.5e+83) {
tmp = x - (y * (z / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e+17: tmp = y + x elif z <= 7500000000000.0: tmp = x + (t / (a / y)) elif z <= 1.9e+53: tmp = y * (1.0 - (t / z)) elif z <= 5.5e+83: tmp = x - (y * (z / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e+17) tmp = Float64(y + x); elseif (z <= 7500000000000.0) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 1.9e+53) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 5.5e+83) tmp = Float64(x - Float64(y * Float64(z / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e+17) tmp = y + x; elseif (z <= 7500000000000.0) tmp = x + (t / (a / y)); elseif (z <= 1.9e+53) tmp = y * (1.0 - (t / z)); elseif (z <= 5.5e+83) tmp = x - (y * (z / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+17], N[(y + x), $MachinePrecision], If[LessEqual[z, 7500000000000.0], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+53], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+83], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+17}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 7500000000000:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+53}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+83}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -9.5e17 or 5.4999999999999996e83 < z Initial program 72.0%
Taylor expanded in z around inf 84.1%
+-commutative84.1%
Simplified84.1%
if -9.5e17 < z < 7.5e12Initial program 96.0%
Taylor expanded in z around 0 77.6%
+-commutative77.6%
associate-/l*78.8%
Simplified78.8%
clear-num78.8%
un-div-inv78.8%
Applied egg-rr78.8%
if 7.5e12 < z < 1.89999999999999999e53Initial program 86.7%
Taylor expanded in x around 0 72.7%
Taylor expanded in a around 0 73.4%
associate-/l*86.7%
div-sub86.7%
*-inverses86.7%
Simplified86.7%
if 1.89999999999999999e53 < z < 5.4999999999999996e83Initial program 100.0%
+-commutative100.0%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
fma-undefine100.0%
associate-/l*100.0%
div-inv99.6%
*-commutative99.6%
associate-*r*99.6%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in a around inf 85.5%
mul-1-neg85.5%
unsub-neg85.5%
*-commutative85.5%
associate-/l*85.1%
Simplified85.1%
Taylor expanded in z around inf 85.5%
associate-*r/85.5%
Simplified85.5%
Final simplification81.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= z -2.05e-81)
(+ y x)
(if (<= z 1e-211)
t_1
(if (<= z 4.2e-143) x (if (<= z 5.4e-46) t_1 (+ y x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (z <= -2.05e-81) {
tmp = y + x;
} else if (z <= 1e-211) {
tmp = t_1;
} else if (z <= 4.2e-143) {
tmp = x;
} else if (z <= 5.4e-46) {
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 = t * (y / a)
if (z <= (-2.05d-81)) then
tmp = y + x
else if (z <= 1d-211) then
tmp = t_1
else if (z <= 4.2d-143) then
tmp = x
else if (z <= 5.4d-46) 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 = t * (y / a);
double tmp;
if (z <= -2.05e-81) {
tmp = y + x;
} else if (z <= 1e-211) {
tmp = t_1;
} else if (z <= 4.2e-143) {
tmp = x;
} else if (z <= 5.4e-46) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if z <= -2.05e-81: tmp = y + x elif z <= 1e-211: tmp = t_1 elif z <= 4.2e-143: tmp = x elif z <= 5.4e-46: tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (z <= -2.05e-81) tmp = Float64(y + x); elseif (z <= 1e-211) tmp = t_1; elseif (z <= 4.2e-143) tmp = x; elseif (z <= 5.4e-46) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (z <= -2.05e-81) tmp = y + x; elseif (z <= 1e-211) tmp = t_1; elseif (z <= 4.2e-143) tmp = x; elseif (z <= 5.4e-46) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e-81], N[(y + x), $MachinePrecision], If[LessEqual[z, 1e-211], t$95$1, If[LessEqual[z, 4.2e-143], x, If[LessEqual[z, 5.4e-46], t$95$1, N[(y + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{-81}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 10^{-211}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-143}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -2.04999999999999992e-81 or 5.4e-46 < z Initial program 79.6%
Taylor expanded in z around inf 72.4%
+-commutative72.4%
Simplified72.4%
if -2.04999999999999992e-81 < z < 1.00000000000000009e-211 or 4.2000000000000002e-143 < z < 5.4e-46Initial program 96.6%
Taylor expanded in x around 0 66.2%
Taylor expanded in z around 0 50.7%
associate-/l*52.6%
Simplified52.6%
if 1.00000000000000009e-211 < z < 4.2000000000000002e-143Initial program 99.9%
Taylor expanded in x around inf 74.8%
Final simplification65.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.2e-81)
(+ y x)
(if (<= z 2.2e-208)
(/ (* y t) a)
(if (<= z 2.95e-145) x (if (<= z 2.7e-46) (* t (/ y a)) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.2e-81) {
tmp = y + x;
} else if (z <= 2.2e-208) {
tmp = (y * t) / a;
} else if (z <= 2.95e-145) {
tmp = x;
} else if (z <= 2.7e-46) {
tmp = t * (y / 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 <= (-6.2d-81)) then
tmp = y + x
else if (z <= 2.2d-208) then
tmp = (y * t) / a
else if (z <= 2.95d-145) then
tmp = x
else if (z <= 2.7d-46) then
tmp = t * (y / 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 <= -6.2e-81) {
tmp = y + x;
} else if (z <= 2.2e-208) {
tmp = (y * t) / a;
} else if (z <= 2.95e-145) {
tmp = x;
} else if (z <= 2.7e-46) {
tmp = t * (y / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.2e-81: tmp = y + x elif z <= 2.2e-208: tmp = (y * t) / a elif z <= 2.95e-145: tmp = x elif z <= 2.7e-46: tmp = t * (y / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.2e-81) tmp = Float64(y + x); elseif (z <= 2.2e-208) tmp = Float64(Float64(y * t) / a); elseif (z <= 2.95e-145) tmp = x; elseif (z <= 2.7e-46) tmp = Float64(t * Float64(y / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.2e-81) tmp = y + x; elseif (z <= 2.2e-208) tmp = (y * t) / a; elseif (z <= 2.95e-145) tmp = x; elseif (z <= 2.7e-46) tmp = t * (y / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.2e-81], N[(y + x), $MachinePrecision], If[LessEqual[z, 2.2e-208], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 2.95e-145], x, If[LessEqual[z, 2.7e-46], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-81}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-208}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 2.95 \cdot 10^{-145}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-46}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -6.19999999999999976e-81 or 2.7e-46 < z Initial program 79.6%
Taylor expanded in z around inf 72.4%
+-commutative72.4%
Simplified72.4%
if -6.19999999999999976e-81 < z < 2.2e-208Initial program 99.8%
Taylor expanded in x around 0 65.3%
Taylor expanded in z around 0 55.5%
if 2.2e-208 < z < 2.9499999999999999e-145Initial program 99.9%
Taylor expanded in x around inf 74.8%
if 2.9499999999999999e-145 < z < 2.7e-46Initial program 85.2%
Taylor expanded in x around 0 69.5%
Taylor expanded in z around 0 33.7%
associate-/l*48.2%
Simplified48.2%
Final simplification66.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))))
(if (<= z -1.3e-32)
t_1
(if (<= z 2.05e-142)
(+ x (/ (* y t) a))
(if (<= z 1.14e-46) (* (- z t) (/ y (- z a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -1.3e-32) {
tmp = t_1;
} else if (z <= 2.05e-142) {
tmp = x + ((y * t) / a);
} else if (z <= 1.14e-46) {
tmp = (z - t) * (y / (z - a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (1.0d0 - (t / z)))
if (z <= (-1.3d-32)) then
tmp = t_1
else if (z <= 2.05d-142) then
tmp = x + ((y * t) / a)
else if (z <= 1.14d-46) then
tmp = (z - t) * (y / (z - a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -1.3e-32) {
tmp = t_1;
} else if (z <= 2.05e-142) {
tmp = x + ((y * t) / a);
} else if (z <= 1.14e-46) {
tmp = (z - t) * (y / (z - a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -1.3e-32: tmp = t_1 elif z <= 2.05e-142: tmp = x + ((y * t) / a) elif z <= 1.14e-46: tmp = (z - t) * (y / (z - a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -1.3e-32) tmp = t_1; elseif (z <= 2.05e-142) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 1.14e-46) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -1.3e-32) tmp = t_1; elseif (z <= 2.05e-142) tmp = x + ((y * t) / a); elseif (z <= 1.14e-46) tmp = (z - t) * (y / (z - a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e-32], t$95$1, If[LessEqual[z, 2.05e-142], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.14e-46], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-142}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.14 \cdot 10^{-46}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.2999999999999999e-32 or 1.14000000000000009e-46 < z Initial program 77.8%
Taylor expanded in a around 0 67.4%
associate-/l*39.5%
div-sub39.5%
*-inverses39.5%
Simplified86.9%
if -1.2999999999999999e-32 < z < 2.05e-142Initial program 98.8%
Taylor expanded in z around 0 88.2%
if 2.05e-142 < z < 1.14000000000000009e-46Initial program 85.2%
Taylor expanded in x around 0 69.5%
*-commutative69.5%
associate-*r/83.9%
*-commutative83.9%
Applied egg-rr83.9%
Final simplification87.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.85e+18)
(+ y x)
(if (<= z 1.15e-32)
(+ x (/ t (/ a y)))
(if (<= z 8.5e+86) (- x (* t (/ y z))) (+ 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 <= 1.15e-32) {
tmp = x + (t / (a / y));
} else if (z <= 8.5e+86) {
tmp = x - (t * (y / z));
} 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 <= 1.15d-32) then
tmp = x + (t / (a / y))
else if (z <= 8.5d+86) then
tmp = x - (t * (y / z))
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 <= 1.15e-32) {
tmp = x + (t / (a / y));
} else if (z <= 8.5e+86) {
tmp = x - (t * (y / z));
} 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 <= 1.15e-32: tmp = x + (t / (a / y)) elif z <= 8.5e+86: tmp = x - (t * (y / z)) 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 <= 1.15e-32) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 8.5e+86) tmp = Float64(x - Float64(t * Float64(y / z))); 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 <= 1.15e-32) tmp = x + (t / (a / y)); elseif (z <= 8.5e+86) tmp = x - (t * (y / z)); 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, 1.15e-32], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+86], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 1.15 \cdot 10^{-32}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+86}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.85e18 or 8.5000000000000005e86 < z Initial program 72.0%
Taylor expanded in z around inf 84.1%
+-commutative84.1%
Simplified84.1%
if -1.85e18 < z < 1.15e-32Initial program 95.7%
Taylor expanded in z around 0 78.2%
+-commutative78.2%
associate-/l*79.5%
Simplified79.5%
clear-num79.5%
un-div-inv79.5%
Applied egg-rr79.5%
if 1.15e-32 < z < 8.5000000000000005e86Initial program 95.3%
Taylor expanded in a around 0 75.7%
+-commutative75.7%
associate-/l*80.2%
Simplified80.2%
Taylor expanded in z around 0 71.1%
associate-*r/71.1%
neg-mul-171.1%
distribute-rgt-neg-in71.1%
associate-*r/75.6%
Simplified75.6%
Final simplification81.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.2e+18) (+ x (* y (/ (- z t) z))) (if (<= z 2.1e+41) (+ x (* t (/ y (- a z)))) (+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e+18) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 2.1e+41) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (y * (z / (z - 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 <= (-1.2d+18)) then
tmp = x + (y * ((z - t) / z))
else if (z <= 2.1d+41) then
tmp = x + (t * (y / (a - z)))
else
tmp = x + (y * (z / (z - 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 <= -1.2e+18) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 2.1e+41) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2e+18: tmp = x + (y * ((z - t) / z)) elif z <= 2.1e+41: tmp = x + (t * (y / (a - z))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2e+18) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); elseif (z <= 2.1e+41) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.2e+18) tmp = x + (y * ((z - t) / z)); elseif (z <= 2.1e+41) tmp = x + (t * (y / (a - z))); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e+18], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+41], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+18}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+41}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -1.2e18Initial program 76.3%
Taylor expanded in a around 0 70.1%
+-commutative70.1%
associate-/l*92.3%
Simplified92.3%
if -1.2e18 < z < 2.1e41Initial program 95.4%
Taylor expanded in t around inf 88.7%
mul-1-neg88.7%
associate-/l*91.1%
distribute-rgt-neg-in91.1%
distribute-frac-neg91.1%
Simplified91.1%
if 2.1e41 < z Initial program 71.4%
Taylor expanded in t around 0 66.2%
associate-/l*37.5%
Simplified90.8%
Final simplification91.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.1e+18) (not (<= z 2.05e-53))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.1e+18) || !(z <= 2.05e-53)) {
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 <= (-1.1d+18)) .or. (.not. (z <= 2.05d-53))) 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 <= -1.1e+18) || !(z <= 2.05e-53)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.1e+18) or not (z <= 2.05e-53): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.1e+18) || !(z <= 2.05e-53)) 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 <= -1.1e+18) || ~((z <= 2.05e-53))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.1e+18], N[Not[LessEqual[z, 2.05e-53]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+18} \lor \neg \left(z \leq 2.05 \cdot 10^{-53}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.1e18 or 2.05e-53 < z Initial program 76.8%
Taylor expanded in z around inf 75.7%
+-commutative75.7%
Simplified75.7%
if -1.1e18 < z < 2.05e-53Initial program 96.2%
Taylor expanded in x around inf 42.8%
Final simplification59.6%
(FPCore (x y z t a) :precision binary64 (if (<= x -2.3e-182) x (if (<= x 5.4e-149) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.3e-182) {
tmp = x;
} else if (x <= 5.4e-149) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-2.3d-182)) then
tmp = x
else if (x <= 5.4d-149) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.3e-182) {
tmp = x;
} else if (x <= 5.4e-149) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.3e-182: tmp = x elif x <= 5.4e-149: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.3e-182) tmp = x; elseif (x <= 5.4e-149) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.3e-182) tmp = x; elseif (x <= 5.4e-149) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.3e-182], x, If[LessEqual[x, 5.4e-149], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{-182}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{-149}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.2999999999999999e-182 or 5.40000000000000028e-149 < x Initial program 85.1%
Taylor expanded in x around inf 59.5%
if -2.2999999999999999e-182 < x < 5.40000000000000028e-149Initial program 89.2%
Taylor expanded in x around 0 76.0%
Taylor expanded in z around inf 26.8%
Final simplification50.4%
(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 86.2%
Taylor expanded in x around inf 47.2%
Final simplification47.2%
(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 2024071
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))