
(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 21 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 -5e+277)
(fma y (/ (- z t) (- z a)) x)
(if (<= t_1 2e+257) (+ t_1 x) (+ x (/ y (/ (- z a) (- z t))))))))
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+277) {
tmp = fma(y, ((z - t) / (z - a)), x);
} else if (t_1 <= 2e+257) {
tmp = t_1 + x;
} else {
tmp = x + (y / ((z - a) / (z - t)));
}
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+277) tmp = fma(y, Float64(Float64(z - t) / Float64(z - a)), x); elseif (t_1 <= 2e+257) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))); end return 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, -5e+277], N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+257], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $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 -5 \cdot 10^{+277}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+257}:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z - t}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -4.99999999999999982e277Initial program 49.5%
+-commutative49.5%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
if -4.99999999999999982e277 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 2.00000000000000006e257Initial program 99.9%
if 2.00000000000000006e257 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 40.8%
+-commutative40.8%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
fma-undefine99.9%
associate-/l*40.8%
div-inv40.8%
*-commutative40.8%
associate-*r*99.7%
div-inv99.8%
Applied egg-rr99.8%
*-commutative99.8%
div-inv99.7%
associate-*r*99.7%
associate-/r/99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Final simplification99.9%
(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+257)))
(+ x (/ y (/ (- z a) (- 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 <= -((double) INFINITY)) || !(t_1 <= 2e+257)) {
tmp = x + (y / ((z - a) / (z - t)));
} 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 <= 2e+257)) {
tmp = x + (y / ((z - a) / (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 <= -math.inf) or not (t_1 <= 2e+257): tmp = x + (y / ((z - a) / (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 <= Float64(-Inf)) || !(t_1 <= 2e+257)) tmp = Float64(x + Float64(y / Float64(Float64(z - a) / 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 <= -Inf) || ~((t_1 <= 2e+257))) tmp = x + (y / ((z - a) / (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, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+257]], $MachinePrecision]], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / 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 -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+257}\right):\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 2.00000000000000006e257 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 43.0%
+-commutative43.0%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
fma-undefine100.0%
associate-/l*43.0%
div-inv43.0%
*-commutative43.0%
associate-*r*99.7%
div-inv99.8%
Applied egg-rr99.8%
*-commutative99.8%
div-inv99.7%
associate-*r*99.7%
associate-/r/99.9%
un-div-inv99.9%
Applied egg-rr99.9%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 2.00000000000000006e257Initial 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 (- INFINITY)) (not (<= t_1 2e+212)))
(+ x (* (- z t) (/ y (- z a))))
(+ 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 <= 2e+212)) {
tmp = x + ((z - t) * (y / (z - a)));
} 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 <= 2e+212)) {
tmp = x + ((z - t) * (y / (z - a)));
} 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 <= 2e+212): tmp = x + ((z - t) * (y / (z - a))) 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 <= 2e+212)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))); 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 <= 2e+212))) tmp = x + ((z - t) * (y / (z - a))); 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, 2e+212]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $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 -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+212}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 1.9999999999999998e212 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 46.1%
+-commutative46.1%
associate-/l*96.4%
fma-define96.4%
Simplified96.4%
fma-undefine96.4%
associate-/l*46.1%
div-inv46.1%
*-commutative46.1%
associate-*r*99.7%
div-inv99.8%
Applied egg-rr99.8%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.9999999999999998e212Initial 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+277) (not (<= t_1 2e+257)))
(* y (/ (- z t) (- z a)))
(+ 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+277) || !(t_1 <= 2e+257)) {
tmp = y * ((z - t) / (z - a));
} 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+277)) .or. (.not. (t_1 <= 2d+257))) then
tmp = y * ((z - t) / (z - a))
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+277) || !(t_1 <= 2e+257)) {
tmp = y * ((z - t) / (z - a));
} 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+277) or not (t_1 <= 2e+257): tmp = y * ((z - t) / (z - a)) 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+277) || !(t_1 <= 2e+257)) tmp = Float64(y * Float64(Float64(z - t) / Float64(z - a))); 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+277) || ~((t_1 <= 2e+257))) tmp = y * ((z - t) / (z - a)); 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+277], N[Not[LessEqual[t$95$1, 2e+257]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $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^{+277} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+257}\right):\\
\;\;\;\;y \cdot \frac{z - t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -4.99999999999999982e277 or 2.00000000000000006e257 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 45.1%
+-commutative45.1%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
clear-num99.9%
inv-pow99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Taylor expanded in y around inf 95.0%
div-sub95.0%
Simplified95.0%
if -4.99999999999999982e277 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 2.00000000000000006e257Initial program 99.9%
Final simplification98.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (<= t_1 (- INFINITY))
(+ x (/ (- z t) (/ (- z a) y)))
(if (<= t_1 2e+257) (+ t_1 x) (+ x (/ y (/ (- z a) (- z t))))))))
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) / ((z - a) / y));
} else if (t_1 <= 2e+257) {
tmp = t_1 + x;
} else {
tmp = x + (y / ((z - a) / (z - t)));
}
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) / ((z - a) / y));
} else if (t_1 <= 2e+257) {
tmp = t_1 + x;
} else {
tmp = x + (y / ((z - a) / (z - t)));
}
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) / ((z - a) / y)) elif t_1 <= 2e+257: tmp = t_1 + x else: tmp = x + (y / ((z - a) / (z - t))) 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(Float64(z - a) / y))); elseif (t_1 <= 2e+257) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))); 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) / ((z - a) / y)); elseif (t_1 <= 2e+257) tmp = t_1 + x; else tmp = x + (y / ((z - a) / (z - t))); 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[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+257], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $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 + \frac{z - t}{\frac{z - a}{y}}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+257}:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z - t}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0Initial program 45.4%
+-commutative45.4%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
fma-undefine100.0%
associate-/l*45.4%
div-inv45.4%
*-commutative45.4%
associate-*r*99.7%
div-inv99.8%
Applied egg-rr99.8%
clear-num99.7%
un-div-inv99.9%
Applied egg-rr99.9%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 2.00000000000000006e257Initial program 99.9%
if 2.00000000000000006e257 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 40.8%
+-commutative40.8%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
fma-undefine99.9%
associate-/l*40.8%
div-inv40.8%
*-commutative40.8%
associate-*r*99.7%
div-inv99.8%
Applied egg-rr99.8%
*-commutative99.8%
div-inv99.7%
associate-*r*99.7%
associate-/r/99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))))
(if (<= z -1.22e+95)
(+ x (/ y (/ z (- z t))))
(if (<= z -4e-88)
t_1
(if (<= z 5.5e-60)
(+ x (/ t (/ a y)))
(if (<= z 1.9e-13)
(* y (/ (- z t) (- z a)))
(if (<= z 1.1e+124) t_1 (+ x (* y (- 1.0 (/ t z)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -1.22e+95) {
tmp = x + (y / (z / (z - t)));
} else if (z <= -4e-88) {
tmp = t_1;
} else if (z <= 5.5e-60) {
tmp = x + (t / (a / y));
} else if (z <= 1.9e-13) {
tmp = y * ((z - t) / (z - a));
} else if (z <= 1.1e+124) {
tmp = t_1;
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / (z - a)))
if (z <= (-1.22d+95)) then
tmp = x + (y / (z / (z - t)))
else if (z <= (-4d-88)) then
tmp = t_1
else if (z <= 5.5d-60) then
tmp = x + (t / (a / y))
else if (z <= 1.9d-13) then
tmp = y * ((z - t) / (z - a))
else if (z <= 1.1d+124) then
tmp = t_1
else
tmp = x + (y * (1.0d0 - (t / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -1.22e+95) {
tmp = x + (y / (z / (z - t)));
} else if (z <= -4e-88) {
tmp = t_1;
} else if (z <= 5.5e-60) {
tmp = x + (t / (a / y));
} else if (z <= 1.9e-13) {
tmp = y * ((z - t) / (z - a));
} else if (z <= 1.1e+124) {
tmp = t_1;
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (z - a))) tmp = 0 if z <= -1.22e+95: tmp = x + (y / (z / (z - t))) elif z <= -4e-88: tmp = t_1 elif z <= 5.5e-60: tmp = x + (t / (a / y)) elif z <= 1.9e-13: tmp = y * ((z - t) / (z - a)) elif z <= 1.1e+124: tmp = t_1 else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(z - a)))) tmp = 0.0 if (z <= -1.22e+95) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (z <= -4e-88) tmp = t_1; elseif (z <= 5.5e-60) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 1.9e-13) tmp = Float64(y * Float64(Float64(z - t) / Float64(z - a))); elseif (z <= 1.1e+124) tmp = t_1; else tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (z - a))); tmp = 0.0; if (z <= -1.22e+95) tmp = x + (y / (z / (z - t))); elseif (z <= -4e-88) tmp = t_1; elseif (z <= 5.5e-60) tmp = x + (t / (a / y)); elseif (z <= 1.9e-13) tmp = y * ((z - t) / (z - a)); elseif (z <= 1.1e+124) tmp = t_1; else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.22e+95], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e-88], t$95$1, If[LessEqual[z, 5.5e-60], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e-13], N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+124], t$95$1, N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{+95}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-60}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-13}:\\
\;\;\;\;y \cdot \frac{z - t}{z - a}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < -1.22000000000000007e95Initial program 78.4%
+-commutative78.4%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
fma-undefine99.9%
associate-/l*78.4%
div-inv78.4%
*-commutative78.4%
associate-*r*92.0%
div-inv92.1%
Applied egg-rr92.1%
*-commutative92.1%
div-inv92.0%
associate-*r*99.8%
associate-/r/99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 97.9%
if -1.22000000000000007e95 < z < -3.99999999999999974e-88 or 1.9e-13 < z < 1.1e124Initial program 89.4%
Taylor expanded in t around 0 71.4%
+-commutative71.4%
associate-/l*79.3%
Simplified79.3%
if -3.99999999999999974e-88 < z < 5.4999999999999997e-60Initial program 96.7%
Taylor expanded in z around 0 82.2%
+-commutative82.2%
associate-/l*83.1%
Simplified83.1%
clear-num83.1%
un-div-inv84.3%
Applied egg-rr84.3%
if 5.4999999999999997e-60 < z < 1.9e-13Initial program 99.7%
+-commutative99.7%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in y around inf 99.7%
div-sub99.7%
Simplified99.7%
if 1.1e124 < z Initial program 78.0%
Taylor expanded in a around 0 77.4%
associate-/l*94.4%
div-sub94.5%
*-inverses94.5%
Simplified94.5%
Final simplification87.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))) (t_2 (+ x (* y (- 1.0 (/ t z))))))
(if (<= z -2.3e+94)
t_2
(if (<= z -1.46e-86)
t_1
(if (<= z 6.2e-60)
(+ x (/ t (/ a y)))
(if (<= z 2.8e-13)
(* y (/ (- z t) (- z a)))
(if (<= z 1.3e+125) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double t_2 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -2.3e+94) {
tmp = t_2;
} else if (z <= -1.46e-86) {
tmp = t_1;
} else if (z <= 6.2e-60) {
tmp = x + (t / (a / y));
} else if (z <= 2.8e-13) {
tmp = y * ((z - t) / (z - a));
} else if (z <= 1.3e+125) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y * (z / (z - a)))
t_2 = x + (y * (1.0d0 - (t / z)))
if (z <= (-2.3d+94)) then
tmp = t_2
else if (z <= (-1.46d-86)) then
tmp = t_1
else if (z <= 6.2d-60) then
tmp = x + (t / (a / y))
else if (z <= 2.8d-13) then
tmp = y * ((z - t) / (z - a))
else if (z <= 1.3d+125) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double t_2 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -2.3e+94) {
tmp = t_2;
} else if (z <= -1.46e-86) {
tmp = t_1;
} else if (z <= 6.2e-60) {
tmp = x + (t / (a / y));
} else if (z <= 2.8e-13) {
tmp = y * ((z - t) / (z - a));
} else if (z <= 1.3e+125) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (z - a))) t_2 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -2.3e+94: tmp = t_2 elif z <= -1.46e-86: tmp = t_1 elif z <= 6.2e-60: tmp = x + (t / (a / y)) elif z <= 2.8e-13: tmp = y * ((z - t) / (z - a)) elif z <= 1.3e+125: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(z - a)))) t_2 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -2.3e+94) tmp = t_2; elseif (z <= -1.46e-86) tmp = t_1; elseif (z <= 6.2e-60) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 2.8e-13) tmp = Float64(y * Float64(Float64(z - t) / Float64(z - a))); elseif (z <= 1.3e+125) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (z - a))); t_2 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -2.3e+94) tmp = t_2; elseif (z <= -1.46e-86) tmp = t_1; elseif (z <= 6.2e-60) tmp = x + (t / (a / y)); elseif (z <= 2.8e-13) tmp = y * ((z - t) / (z - a)); elseif (z <= 1.3e+125) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+94], t$95$2, If[LessEqual[z, -1.46e-86], t$95$1, If[LessEqual[z, 6.2e-60], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-13], N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+125], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
t_2 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+94}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-60}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-13}:\\
\;\;\;\;y \cdot \frac{z - t}{z - a}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.3e94 or 1.30000000000000002e125 < z Initial program 78.2%
Taylor expanded in a around 0 77.9%
associate-/l*96.3%
div-sub96.3%
*-inverses96.3%
Simplified96.3%
if -2.3e94 < z < -1.45999999999999993e-86 or 2.8000000000000002e-13 < z < 1.30000000000000002e125Initial program 89.4%
Taylor expanded in t around 0 71.4%
+-commutative71.4%
associate-/l*79.3%
Simplified79.3%
if -1.45999999999999993e-86 < z < 6.19999999999999976e-60Initial program 96.7%
Taylor expanded in z around 0 82.2%
+-commutative82.2%
associate-/l*83.1%
Simplified83.1%
clear-num83.1%
un-div-inv84.3%
Applied egg-rr84.3%
if 6.19999999999999976e-60 < z < 2.8000000000000002e-13Initial program 99.7%
+-commutative99.7%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in y around inf 99.7%
div-sub99.7%
Simplified99.7%
Final simplification87.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.1e+52)
(+ x (/ y (/ z (- z t))))
(if (<= z 8.6e-170)
(+ x (* y (/ (- t z) a)))
(if (<= z 3.5e-13)
(/ (* y (- z t)) (- z a))
(if (<= z 1.95e+125)
(+ x (* y (/ z (- z a))))
(+ x (* y (- 1.0 (/ t z)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.1e+52) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 8.6e-170) {
tmp = x + (y * ((t - z) / a));
} else if (z <= 3.5e-13) {
tmp = (y * (z - t)) / (z - a);
} else if (z <= 1.95e+125) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y * (1.0 - (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 <= (-3.1d+52)) then
tmp = x + (y / (z / (z - t)))
else if (z <= 8.6d-170) then
tmp = x + (y * ((t - z) / a))
else if (z <= 3.5d-13) then
tmp = (y * (z - t)) / (z - a)
else if (z <= 1.95d+125) then
tmp = x + (y * (z / (z - a)))
else
tmp = x + (y * (1.0d0 - (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 <= -3.1e+52) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 8.6e-170) {
tmp = x + (y * ((t - z) / a));
} else if (z <= 3.5e-13) {
tmp = (y * (z - t)) / (z - a);
} else if (z <= 1.95e+125) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.1e+52: tmp = x + (y / (z / (z - t))) elif z <= 8.6e-170: tmp = x + (y * ((t - z) / a)) elif z <= 3.5e-13: tmp = (y * (z - t)) / (z - a) elif z <= 1.95e+125: tmp = x + (y * (z / (z - a))) else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.1e+52) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (z <= 8.6e-170) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); elseif (z <= 3.5e-13) tmp = Float64(Float64(y * Float64(z - t)) / Float64(z - a)); elseif (z <= 1.95e+125) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.1e+52) tmp = x + (y / (z / (z - t))); elseif (z <= 8.6e-170) tmp = x + (y * ((t - z) / a)); elseif (z <= 3.5e-13) tmp = (y * (z - t)) / (z - a); elseif (z <= 1.95e+125) tmp = x + (y * (z / (z - a))); else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.1e+52], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.6e-170], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e-13], N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e+125], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+52}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{-170}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-13}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+125}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < -3.1e52Initial program 78.3%
+-commutative78.3%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
fma-undefine99.9%
associate-/l*78.3%
div-inv78.3%
*-commutative78.3%
associate-*r*92.7%
div-inv92.7%
Applied egg-rr92.7%
*-commutative92.7%
div-inv92.7%
associate-*r*99.8%
associate-/r/99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 96.3%
if -3.1e52 < z < 8.5999999999999997e-170Initial program 97.9%
Taylor expanded in a around inf 90.4%
mul-1-neg90.4%
unsub-neg90.4%
associate-/l*90.3%
Simplified90.3%
if 8.5999999999999997e-170 < z < 3.5000000000000002e-13Initial program 97.1%
Taylor expanded in x around 0 75.1%
if 3.5000000000000002e-13 < z < 1.9500000000000001e125Initial program 83.4%
Taylor expanded in t around 0 70.6%
+-commutative70.6%
associate-/l*82.3%
Simplified82.3%
if 1.9500000000000001e125 < z Initial program 78.0%
Taylor expanded in a around 0 77.4%
associate-/l*94.4%
div-sub94.5%
*-inverses94.5%
Simplified94.5%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.95e+52)
(+ x (/ y (/ z (- z t))))
(if (<= z -2e-143)
(+ x (* y (/ (- t z) a)))
(if (<= z 2.75e+66)
(+ x (/ (* y t) (- a z)))
(+ x (* y (- 1.0 (/ t z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e+52) {
tmp = x + (y / (z / (z - t)));
} else if (z <= -2e-143) {
tmp = x + (y * ((t - z) / a));
} else if (z <= 2.75e+66) {
tmp = x + ((y * t) / (a - z));
} else {
tmp = x + (y * (1.0 - (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.95d+52)) then
tmp = x + (y / (z / (z - t)))
else if (z <= (-2d-143)) then
tmp = x + (y * ((t - z) / a))
else if (z <= 2.75d+66) then
tmp = x + ((y * t) / (a - z))
else
tmp = x + (y * (1.0d0 - (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.95e+52) {
tmp = x + (y / (z / (z - t)));
} else if (z <= -2e-143) {
tmp = x + (y * ((t - z) / a));
} else if (z <= 2.75e+66) {
tmp = x + ((y * t) / (a - z));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.95e+52: tmp = x + (y / (z / (z - t))) elif z <= -2e-143: tmp = x + (y * ((t - z) / a)) elif z <= 2.75e+66: tmp = x + ((y * t) / (a - z)) else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.95e+52) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (z <= -2e-143) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); elseif (z <= 2.75e+66) tmp = Float64(x + Float64(Float64(y * t) / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.95e+52) tmp = x + (y / (z / (z - t))); elseif (z <= -2e-143) tmp = x + (y * ((t - z) / a)); elseif (z <= 2.75e+66) tmp = x + ((y * t) / (a - z)); else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.95e+52], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2e-143], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.75e+66], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+52}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-143}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{+66}:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < -1.95e52Initial program 78.3%
+-commutative78.3%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
fma-undefine99.9%
associate-/l*78.3%
div-inv78.3%
*-commutative78.3%
associate-*r*92.7%
div-inv92.7%
Applied egg-rr92.7%
*-commutative92.7%
div-inv92.7%
associate-*r*99.8%
associate-/r/99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 96.3%
if -1.95e52 < z < -1.9999999999999999e-143Initial program 95.4%
Taylor expanded in a around inf 86.0%
mul-1-neg86.0%
unsub-neg86.0%
associate-/l*90.4%
Simplified90.4%
if -1.9999999999999999e-143 < z < 2.75e66Initial program 98.1%
Taylor expanded in t around inf 88.1%
associate-*r/88.1%
mul-1-neg88.1%
distribute-lft-neg-out88.1%
*-commutative88.1%
Simplified88.1%
if 2.75e66 < z Initial program 75.3%
Taylor expanded in a around 0 70.4%
associate-/l*86.7%
div-sub86.7%
*-inverses86.7%
Simplified86.7%
Final simplification89.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- z a)))))
(if (<= y -5.5e+18)
t_1
(if (<= y 7.5e-62)
(+ x (/ (* y t) a))
(if (<= y 6.6e+124) (- x (/ y (/ z t))) 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 (y <= -5.5e+18) {
tmp = t_1;
} else if (y <= 7.5e-62) {
tmp = x + ((y * t) / a);
} else if (y <= 6.6e+124) {
tmp = x - (y / (z / t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / (z - a))
if (y <= (-5.5d+18)) then
tmp = t_1
else if (y <= 7.5d-62) then
tmp = x + ((y * t) / a)
else if (y <= 6.6d+124) then
tmp = x - (y / (z / t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (z - a));
double tmp;
if (y <= -5.5e+18) {
tmp = t_1;
} else if (y <= 7.5e-62) {
tmp = x + ((y * t) / a);
} else if (y <= 6.6e+124) {
tmp = x - (y / (z / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (z - a)) tmp = 0 if y <= -5.5e+18: tmp = t_1 elif y <= 7.5e-62: tmp = x + ((y * t) / a) elif y <= 6.6e+124: tmp = x - (y / (z / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(z - a))) tmp = 0.0 if (y <= -5.5e+18) tmp = t_1; elseif (y <= 7.5e-62) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (y <= 6.6e+124) tmp = Float64(x - Float64(y / Float64(z / t))); else tmp = 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 (y <= -5.5e+18) tmp = t_1; elseif (y <= 7.5e-62) tmp = x + ((y * t) / a); elseif (y <= 6.6e+124) tmp = x - (y / (z / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+18], t$95$1, If[LessEqual[y, 7.5e-62], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e+124], N[(x - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{z - a}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-62}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{+124}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.5e18 or 6.60000000000000029e124 < y Initial program 73.5%
+-commutative73.5%
associate-/l*98.0%
fma-define98.0%
Simplified98.0%
clear-num97.9%
inv-pow97.9%
Applied egg-rr97.9%
unpow-197.9%
Simplified97.9%
Taylor expanded in y around inf 81.6%
div-sub81.6%
Simplified81.6%
if -5.5e18 < y < 7.5000000000000003e-62Initial program 100.0%
Taylor expanded in z around 0 79.6%
if 7.5000000000000003e-62 < y < 6.60000000000000029e124Initial program 90.7%
+-commutative90.7%
associate-/l*97.0%
fma-define97.0%
Simplified97.0%
fma-undefine97.0%
associate-/l*90.7%
div-inv90.5%
*-commutative90.5%
associate-*r*99.6%
div-inv99.8%
Applied egg-rr99.8%
*-commutative99.8%
div-inv99.6%
associate-*r*96.8%
associate-/r/96.9%
un-div-inv96.9%
Applied egg-rr96.9%
Taylor expanded in a around 0 76.0%
Taylor expanded in z around 0 70.1%
associate-*r/70.1%
neg-mul-170.1%
Simplified70.1%
Final simplification79.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1e+65)
(+ y x)
(if (<= z 6.8e-81)
(+ x (/ (* y t) a))
(if (<= z 2.1e+50) (- x (/ y (/ z t))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e+65) {
tmp = y + x;
} else if (z <= 6.8e-81) {
tmp = x + ((y * t) / a);
} else if (z <= 2.1e+50) {
tmp = x - (y / (z / t));
} 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 <= (-1d+65)) then
tmp = y + x
else if (z <= 6.8d-81) then
tmp = x + ((y * t) / a)
else if (z <= 2.1d+50) then
tmp = x - (y / (z / t))
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 <= -1e+65) {
tmp = y + x;
} else if (z <= 6.8e-81) {
tmp = x + ((y * t) / a);
} else if (z <= 2.1e+50) {
tmp = x - (y / (z / t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1e+65: tmp = y + x elif z <= 6.8e-81: tmp = x + ((y * t) / a) elif z <= 2.1e+50: tmp = x - (y / (z / t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e+65) tmp = Float64(y + x); elseif (z <= 6.8e-81) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 2.1e+50) tmp = Float64(x - Float64(y / Float64(z / t))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1e+65) tmp = y + x; elseif (z <= 6.8e-81) tmp = x + ((y * t) / a); elseif (z <= 2.1e+50) tmp = x - (y / (z / t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e+65], N[(y + x), $MachinePrecision], If[LessEqual[z, 6.8e-81], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+50], N[(x - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+65}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-81}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+50}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -9.9999999999999999e64 or 2.1e50 < z Initial program 77.3%
Taylor expanded in z around inf 76.6%
+-commutative76.6%
Simplified76.6%
if -9.9999999999999999e64 < z < 6.7999999999999997e-81Initial program 97.4%
Taylor expanded in z around 0 78.6%
if 6.7999999999999997e-81 < z < 2.1e50Initial program 97.0%
+-commutative97.0%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
fma-undefine99.9%
associate-/l*97.0%
div-inv96.7%
*-commutative96.7%
associate-*r*99.8%
div-inv99.9%
Applied egg-rr99.9%
*-commutative99.9%
div-inv99.8%
associate-*r*99.7%
associate-/r/99.7%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 68.1%
Taylor expanded in z around 0 68.3%
associate-*r/68.3%
neg-mul-168.3%
Simplified68.3%
Final simplification76.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.05e+53)
(+ y x)
(if (<= z 3.3e-31)
(+ x (/ (* y t) a))
(if (<= z 4e+41) (- x (* z (/ y a))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.05e+53) {
tmp = y + x;
} else if (z <= 3.3e-31) {
tmp = x + ((y * t) / a);
} else if (z <= 4e+41) {
tmp = x - (z * (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 <= (-1.05d+53)) then
tmp = y + x
else if (z <= 3.3d-31) then
tmp = x + ((y * t) / a)
else if (z <= 4d+41) then
tmp = x - (z * (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 <= -1.05e+53) {
tmp = y + x;
} else if (z <= 3.3e-31) {
tmp = x + ((y * t) / a);
} else if (z <= 4e+41) {
tmp = x - (z * (y / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.05e+53: tmp = y + x elif z <= 3.3e-31: tmp = x + ((y * t) / a) elif z <= 4e+41: tmp = x - (z * (y / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.05e+53) tmp = Float64(y + x); elseif (z <= 3.3e-31) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 4e+41) tmp = Float64(x - Float64(z * 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 <= -1.05e+53) tmp = y + x; elseif (z <= 3.3e-31) tmp = x + ((y * t) / a); elseif (z <= 4e+41) tmp = x - (z * (y / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.05e+53], N[(y + x), $MachinePrecision], If[LessEqual[z, 3.3e-31], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+41], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+53}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-31}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+41}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.0500000000000001e53 or 4.00000000000000002e41 < z Initial program 78.3%
Taylor expanded in z around inf 76.7%
+-commutative76.7%
Simplified76.7%
if -1.0500000000000001e53 < z < 3.2999999999999999e-31Initial program 97.6%
Taylor expanded in z around 0 76.6%
if 3.2999999999999999e-31 < z < 4.00000000000000002e41Initial program 94.2%
Taylor expanded in a around inf 53.8%
mul-1-neg53.8%
unsub-neg53.8%
associate-/l*59.5%
Simplified59.5%
Taylor expanded in z around inf 59.4%
div-inv59.3%
*-commutative59.3%
associate-*l*65.0%
div-inv65.1%
Applied egg-rr65.1%
Final simplification75.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -4e+55) (+ y x) (if (<= z 4.4e-141) x (if (<= z 1.9e-13) (/ (- t) (/ z y)) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+55) {
tmp = y + x;
} else if (z <= 4.4e-141) {
tmp = x;
} else if (z <= 1.9e-13) {
tmp = -t / (z / y);
} 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 <= (-4d+55)) then
tmp = y + x
else if (z <= 4.4d-141) then
tmp = x
else if (z <= 1.9d-13) then
tmp = -t / (z / y)
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 <= -4e+55) {
tmp = y + x;
} else if (z <= 4.4e-141) {
tmp = x;
} else if (z <= 1.9e-13) {
tmp = -t / (z / y);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4e+55: tmp = y + x elif z <= 4.4e-141: tmp = x elif z <= 1.9e-13: tmp = -t / (z / y) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+55) tmp = Float64(y + x); elseif (z <= 4.4e-141) tmp = x; elseif (z <= 1.9e-13) tmp = Float64(Float64(-t) / Float64(z / y)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4e+55) tmp = y + x; elseif (z <= 4.4e-141) tmp = x; elseif (z <= 1.9e-13) tmp = -t / (z / y); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+55], N[(y + x), $MachinePrecision], If[LessEqual[z, 4.4e-141], x, If[LessEqual[z, 1.9e-13], N[((-t) / N[(z / y), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+55}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-141}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-13}:\\
\;\;\;\;\frac{-t}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -4.00000000000000004e55 or 1.9e-13 < z Initial program 79.7%
Taylor expanded in z around inf 74.3%
+-commutative74.3%
Simplified74.3%
if -4.00000000000000004e55 < z < 4.40000000000000018e-141Initial program 98.0%
Taylor expanded in x around inf 52.9%
if 4.40000000000000018e-141 < z < 1.9e-13Initial program 96.5%
+-commutative96.5%
associate-/l*86.8%
fma-define86.8%
Simplified86.8%
clear-num86.7%
inv-pow86.7%
Applied egg-rr86.7%
unpow-186.7%
Simplified86.7%
Taylor expanded in t around inf 53.7%
mul-1-neg53.7%
associate-/l*56.9%
distribute-lft-neg-out56.9%
*-commutative56.9%
Simplified56.9%
Taylor expanded in z around inf 41.2%
distribute-rgt-neg-out41.2%
neg-sub041.2%
add-sqr-sqrt22.2%
sqrt-unprod22.7%
sqr-neg22.7%
sqrt-unprod0.6%
add-sqr-sqrt1.7%
*-commutative1.7%
clear-num1.7%
un-div-inv1.7%
add-sqr-sqrt0.6%
sqrt-unprod22.7%
sqr-neg22.7%
sqrt-unprod22.3%
add-sqr-sqrt41.3%
Applied egg-rr41.3%
neg-sub041.3%
distribute-frac-neg41.3%
Simplified41.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.4e+51) (+ y x) (if (<= z 4.4e-141) x (if (<= z 1.9e-13) (* (- t) (/ y z)) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+51) {
tmp = y + x;
} else if (z <= 4.4e-141) {
tmp = x;
} else if (z <= 1.9e-13) {
tmp = -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 <= (-2.4d+51)) then
tmp = y + x
else if (z <= 4.4d-141) then
tmp = x
else if (z <= 1.9d-13) then
tmp = -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 <= -2.4e+51) {
tmp = y + x;
} else if (z <= 4.4e-141) {
tmp = x;
} else if (z <= 1.9e-13) {
tmp = -t * (y / z);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.4e+51: tmp = y + x elif z <= 4.4e-141: tmp = x elif z <= 1.9e-13: tmp = -t * (y / z) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.4e+51) tmp = Float64(y + x); elseif (z <= 4.4e-141) tmp = x; elseif (z <= 1.9e-13) tmp = Float64(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 <= -2.4e+51) tmp = y + x; elseif (z <= 4.4e-141) tmp = x; elseif (z <= 1.9e-13) tmp = -t * (y / z); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e+51], N[(y + x), $MachinePrecision], If[LessEqual[z, 4.4e-141], x, If[LessEqual[z, 1.9e-13], N[((-t) * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+51}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-141}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-13}:\\
\;\;\;\;\left(-t\right) \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -2.3999999999999999e51 or 1.9e-13 < z Initial program 79.7%
Taylor expanded in z around inf 74.3%
+-commutative74.3%
Simplified74.3%
if -2.3999999999999999e51 < z < 4.40000000000000018e-141Initial program 98.0%
Taylor expanded in x around inf 52.9%
if 4.40000000000000018e-141 < z < 1.9e-13Initial program 96.5%
+-commutative96.5%
associate-/l*86.8%
fma-define86.8%
Simplified86.8%
clear-num86.7%
inv-pow86.7%
Applied egg-rr86.7%
unpow-186.7%
Simplified86.7%
Taylor expanded in t around inf 53.7%
mul-1-neg53.7%
associate-/l*56.9%
distribute-lft-neg-out56.9%
*-commutative56.9%
Simplified56.9%
Taylor expanded in z around inf 41.2%
Final simplification62.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.9) (not (<= t 8.8e-58))) (+ 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 ((t <= -2.9) || !(t <= 8.8e-58)) {
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 ((t <= (-2.9d0)) .or. (.not. (t <= 8.8d-58))) 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 ((t <= -2.9) || !(t <= 8.8e-58)) {
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 (t <= -2.9) or not (t <= 8.8e-58): 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 ((t <= -2.9) || !(t <= 8.8e-58)) 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 ((t <= -2.9) || ~((t <= 8.8e-58))) 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[Or[LessEqual[t, -2.9], N[Not[LessEqual[t, 8.8e-58]], $MachinePrecision]], 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}\;t \leq -2.9 \lor \neg \left(t \leq 8.8 \cdot 10^{-58}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -2.89999999999999991 or 8.80000000000000023e-58 < t Initial program 88.1%
+-commutative88.1%
associate-/l*95.6%
fma-define95.6%
Simplified95.6%
fma-undefine95.6%
associate-/l*88.1%
div-inv88.0%
*-commutative88.0%
associate-*r*97.6%
div-inv97.7%
Applied egg-rr97.7%
Taylor expanded in z around 0 86.7%
neg-mul-186.7%
Simplified86.7%
if -2.89999999999999991 < t < 8.80000000000000023e-58Initial program 89.0%
Taylor expanded in t around 0 84.4%
+-commutative84.4%
associate-/l*93.0%
Simplified93.0%
Final simplification89.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.1e+51) (not (<= z 1.16e-61))) (+ x (* y (- 1.0 (/ t z)))) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.1e+51) || !(z <= 1.16e-61)) {
tmp = x + (y * (1.0 - (t / z)));
} 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.1d+51)) .or. (.not. (z <= 1.16d-61))) then
tmp = x + (y * (1.0d0 - (t / z)))
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.1e+51) || !(z <= 1.16e-61)) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.1e+51) or not (z <= 1.16e-61): tmp = x + (y * (1.0 - (t / z))) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.1e+51) || !(z <= 1.16e-61)) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); 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.1e+51) || ~((z <= 1.16e-61))) tmp = x + (y * (1.0 - (t / z))); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.1e+51], N[Not[LessEqual[z, 1.16e-61]], $MachinePrecision]], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+51} \lor \neg \left(z \leq 1.16 \cdot 10^{-61}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -2.1000000000000001e51 or 1.15999999999999994e-61 < z Initial program 81.4%
Taylor expanded in a around 0 72.7%
associate-/l*86.5%
div-sub86.5%
*-inverses86.5%
Simplified86.5%
if -2.1000000000000001e51 < z < 1.15999999999999994e-61Initial program 97.4%
Taylor expanded in z around 0 78.4%
Final simplification82.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.5e+66) (+ x (/ y (/ z (- z t)))) (if (<= z 4.7e-35) (+ x (* y (/ (- t z) a))) (+ x (* y (- 1.0 (/ t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+66) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 4.7e-35) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + (y * (1.0 - (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 <= (-6.5d+66)) then
tmp = x + (y / (z / (z - t)))
else if (z <= 4.7d-35) then
tmp = x + (y * ((t - z) / a))
else
tmp = x + (y * (1.0d0 - (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 <= -6.5e+66) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 4.7e-35) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e+66: tmp = x + (y / (z / (z - t))) elif z <= 4.7e-35: tmp = x + (y * ((t - z) / a)) else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e+66) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (z <= 4.7e-35) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e+66) tmp = x + (y / (z / (z - t))); elseif (z <= 4.7e-35) tmp = x + (y * ((t - z) / a)); else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e+66], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e-35], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+66}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-35}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < -6.5000000000000001e66Initial program 78.3%
+-commutative78.3%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
fma-undefine99.9%
associate-/l*78.3%
div-inv78.3%
*-commutative78.3%
associate-*r*92.7%
div-inv92.7%
Applied egg-rr92.7%
*-commutative92.7%
div-inv92.7%
associate-*r*99.8%
associate-/r/99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 96.3%
if -6.5000000000000001e66 < z < 4.7e-35Initial program 97.6%
Taylor expanded in a around inf 85.0%
mul-1-neg85.0%
unsub-neg85.0%
associate-/l*82.2%
Simplified82.2%
if 4.7e-35 < z Initial program 82.0%
Taylor expanded in a around 0 71.9%
associate-/l*82.9%
div-sub83.0%
*-inverses83.0%
Simplified83.0%
Final simplification85.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.6e+52) (not (<= z 3e+68))) (+ y x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.6e+52) || !(z <= 3e+68)) {
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 <= (-1.6d+52)) .or. (.not. (z <= 3d+68))) 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 <= -1.6e+52) || !(z <= 3e+68)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.6e+52) or not (z <= 3e+68): tmp = y + x else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.6e+52) || !(z <= 3e+68)) 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 <= -1.6e+52) || ~((z <= 3e+68))) tmp = y + x; else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.6e+52], N[Not[LessEqual[z, 3e+68]], $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 -1.6 \cdot 10^{+52} \lor \neg \left(z \leq 3 \cdot 10^{+68}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -1.6e52 or 3.0000000000000002e68 < z Initial program 76.7%
Taylor expanded in z around inf 76.8%
+-commutative76.8%
Simplified76.8%
if -1.6e52 < z < 3.0000000000000002e68Initial program 97.3%
Taylor expanded in z around 0 72.5%
Final simplification74.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.4e+51) (not (<= z 5.5e-63))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.4e+51) || !(z <= 5.5e-63)) {
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 <= (-4.4d+51)) .or. (.not. (z <= 5.5d-63))) 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 <= -4.4e+51) || !(z <= 5.5e-63)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.4e+51) or not (z <= 5.5e-63): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.4e+51) || !(z <= 5.5e-63)) 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 <= -4.4e+51) || ~((z <= 5.5e-63))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.4e+51], N[Not[LessEqual[z, 5.5e-63]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+51} \lor \neg \left(z \leq 5.5 \cdot 10^{-63}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.39999999999999984e51 or 5.50000000000000043e-63 < z Initial program 81.4%
Taylor expanded in z around inf 70.1%
+-commutative70.1%
Simplified70.1%
if -4.39999999999999984e51 < z < 5.50000000000000043e-63Initial program 97.4%
Taylor expanded in x around inf 49.3%
Final simplification60.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.02e+213) y (if (<= y 2.9e+131) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.02e+213) {
tmp = y;
} else if (y <= 2.9e+131) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.02d+213)) then
tmp = y
else if (y <= 2.9d+131) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.02e+213) {
tmp = y;
} else if (y <= 2.9e+131) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.02e+213: tmp = y elif y <= 2.9e+131: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.02e+213) tmp = y; elseif (y <= 2.9e+131) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.02e+213) tmp = y; elseif (y <= 2.9e+131) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.02e+213], y, If[LessEqual[y, 2.9e+131], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+213}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+131}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.02e213 or 2.9000000000000001e131 < y Initial program 65.8%
Taylor expanded in z around inf 34.8%
+-commutative34.8%
Simplified34.8%
Taylor expanded in y around inf 34.8%
+-commutative34.8%
Simplified34.8%
Taylor expanded in x around 0 30.5%
if -1.02e213 < y < 2.9000000000000001e131Initial program 95.5%
Taylor expanded in x around inf 61.0%
Final simplification53.9%
(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 88.6%
Taylor expanded in x around inf 49.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 2024135
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(! :herbie-platform default (+ x (/ y (/ (- z a) (- z t)))))
(+ x (/ (* y (- z t)) (- z a))))