
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (- z t) (- a t)))) (if (<= t_1 1e+68) (+ x (* y t_1)) (+ x (/ (* z y) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double tmp;
if (t_1 <= 1e+68) {
tmp = x + (y * t_1);
} else {
tmp = x + ((z * y) / (a - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (z - t) / (a - t)
if (t_1 <= 1d+68) then
tmp = x + (y * t_1)
else
tmp = x + ((z * y) / (a - t))
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) / (a - t);
double tmp;
if (t_1 <= 1e+68) {
tmp = x + (y * t_1);
} else {
tmp = x + ((z * y) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (a - t) tmp = 0 if t_1 <= 1e+68: tmp = x + (y * t_1) else: tmp = x + ((z * y) / (a - t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) tmp = 0.0 if (t_1 <= 1e+68) tmp = Float64(x + Float64(y * t_1)); else tmp = Float64(x + Float64(Float64(z * y) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (a - t); tmp = 0.0; if (t_1 <= 1e+68) tmp = x + (y * t_1); else tmp = x + ((z * y) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+68], N[(x + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
\mathbf{if}\;t\_1 \leq 10^{+68}:\\
\;\;\;\;x + y \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot y}{a - t}\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < 9.99999999999999953e67Initial program 98.5%
if 9.99999999999999953e67 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 85.1%
Taylor expanded in z around inf 97.3%
Final simplification98.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- a t))))))
(if (<= t -1.9e+108)
(+ x y)
(if (<= t -2e-87)
t_1
(if (<= t -7.8e-253)
(+ x (/ (* z y) (- a t)))
(if (or (<= t 2.1e+78) (and (not (<= t 1.9e+152)) (<= t 1.2e+173)))
t_1
(+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (a - t)));
double tmp;
if (t <= -1.9e+108) {
tmp = x + y;
} else if (t <= -2e-87) {
tmp = t_1;
} else if (t <= -7.8e-253) {
tmp = x + ((z * y) / (a - t));
} else if ((t <= 2.1e+78) || (!(t <= 1.9e+152) && (t <= 1.2e+173))) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / (a - t)))
if (t <= (-1.9d+108)) then
tmp = x + y
else if (t <= (-2d-87)) then
tmp = t_1
else if (t <= (-7.8d-253)) then
tmp = x + ((z * y) / (a - t))
else if ((t <= 2.1d+78) .or. (.not. (t <= 1.9d+152)) .and. (t <= 1.2d+173)) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (a - t)));
double tmp;
if (t <= -1.9e+108) {
tmp = x + y;
} else if (t <= -2e-87) {
tmp = t_1;
} else if (t <= -7.8e-253) {
tmp = x + ((z * y) / (a - t));
} else if ((t <= 2.1e+78) || (!(t <= 1.9e+152) && (t <= 1.2e+173))) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (a - t))) tmp = 0 if t <= -1.9e+108: tmp = x + y elif t <= -2e-87: tmp = t_1 elif t <= -7.8e-253: tmp = x + ((z * y) / (a - t)) elif (t <= 2.1e+78) or (not (t <= 1.9e+152) and (t <= 1.2e+173)): tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(a - t)))) tmp = 0.0 if (t <= -1.9e+108) tmp = Float64(x + y); elseif (t <= -2e-87) tmp = t_1; elseif (t <= -7.8e-253) tmp = Float64(x + Float64(Float64(z * y) / Float64(a - t))); elseif ((t <= 2.1e+78) || (!(t <= 1.9e+152) && (t <= 1.2e+173))) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (a - t))); tmp = 0.0; if (t <= -1.9e+108) tmp = x + y; elseif (t <= -2e-87) tmp = t_1; elseif (t <= -7.8e-253) tmp = x + ((z * y) / (a - t)); elseif ((t <= 2.1e+78) || (~((t <= 1.9e+152)) && (t <= 1.2e+173))) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.9e+108], N[(x + y), $MachinePrecision], If[LessEqual[t, -2e-87], t$95$1, If[LessEqual[t, -7.8e-253], N[(x + N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 2.1e+78], And[N[Not[LessEqual[t, 1.9e+152]], $MachinePrecision], LessEqual[t, 1.2e+173]]], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{a - t}\\
\mathbf{if}\;t \leq -1.9 \cdot 10^{+108}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{-253}:\\
\;\;\;\;x + \frac{z \cdot y}{a - t}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+78} \lor \neg \left(t \leq 1.9 \cdot 10^{+152}\right) \land t \leq 1.2 \cdot 10^{+173}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.90000000000000004e108 or 2.1000000000000001e78 < t < 1.9e152 or 1.2e173 < t Initial program 99.9%
Taylor expanded in t around inf 86.2%
+-commutative86.2%
Simplified86.2%
if -1.90000000000000004e108 < t < -2.00000000000000004e-87 or -7.7999999999999998e-253 < t < 2.1000000000000001e78 or 1.9e152 < t < 1.2e173Initial program 97.7%
Taylor expanded in z around inf 81.1%
associate-/l*84.6%
Simplified84.6%
if -2.00000000000000004e-87 < t < -7.7999999999999998e-253Initial program 84.5%
Taylor expanded in z around inf 94.7%
Final simplification86.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- a t))))))
(if (<= t -1.05e+101)
(+ x y)
(if (<= t -2e-87)
t_1
(if (<= t -5e-253)
(+ x (/ (* z y) (- a t)))
(if (<= t 5.3e+79)
t_1
(if (<= t 1.15e+152)
(+ x y)
(if (<= t 1.25e+175) t_1 (+ y (+ x (* a (/ y t))))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (a - t)));
double tmp;
if (t <= -1.05e+101) {
tmp = x + y;
} else if (t <= -2e-87) {
tmp = t_1;
} else if (t <= -5e-253) {
tmp = x + ((z * y) / (a - t));
} else if (t <= 5.3e+79) {
tmp = t_1;
} else if (t <= 1.15e+152) {
tmp = x + y;
} else if (t <= 1.25e+175) {
tmp = t_1;
} else {
tmp = y + (x + (a * (y / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / (a - t)))
if (t <= (-1.05d+101)) then
tmp = x + y
else if (t <= (-2d-87)) then
tmp = t_1
else if (t <= (-5d-253)) then
tmp = x + ((z * y) / (a - t))
else if (t <= 5.3d+79) then
tmp = t_1
else if (t <= 1.15d+152) then
tmp = x + y
else if (t <= 1.25d+175) then
tmp = t_1
else
tmp = y + (x + (a * (y / t)))
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 / (a - t)));
double tmp;
if (t <= -1.05e+101) {
tmp = x + y;
} else if (t <= -2e-87) {
tmp = t_1;
} else if (t <= -5e-253) {
tmp = x + ((z * y) / (a - t));
} else if (t <= 5.3e+79) {
tmp = t_1;
} else if (t <= 1.15e+152) {
tmp = x + y;
} else if (t <= 1.25e+175) {
tmp = t_1;
} else {
tmp = y + (x + (a * (y / t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (a - t))) tmp = 0 if t <= -1.05e+101: tmp = x + y elif t <= -2e-87: tmp = t_1 elif t <= -5e-253: tmp = x + ((z * y) / (a - t)) elif t <= 5.3e+79: tmp = t_1 elif t <= 1.15e+152: tmp = x + y elif t <= 1.25e+175: tmp = t_1 else: tmp = y + (x + (a * (y / t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(a - t)))) tmp = 0.0 if (t <= -1.05e+101) tmp = Float64(x + y); elseif (t <= -2e-87) tmp = t_1; elseif (t <= -5e-253) tmp = Float64(x + Float64(Float64(z * y) / Float64(a - t))); elseif (t <= 5.3e+79) tmp = t_1; elseif (t <= 1.15e+152) tmp = Float64(x + y); elseif (t <= 1.25e+175) tmp = t_1; else tmp = Float64(y + Float64(x + Float64(a * Float64(y / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (a - t))); tmp = 0.0; if (t <= -1.05e+101) tmp = x + y; elseif (t <= -2e-87) tmp = t_1; elseif (t <= -5e-253) tmp = x + ((z * y) / (a - t)); elseif (t <= 5.3e+79) tmp = t_1; elseif (t <= 1.15e+152) tmp = x + y; elseif (t <= 1.25e+175) tmp = t_1; else tmp = y + (x + (a * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e+101], N[(x + y), $MachinePrecision], If[LessEqual[t, -2e-87], t$95$1, If[LessEqual[t, -5e-253], N[(x + N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.3e+79], t$95$1, If[LessEqual[t, 1.15e+152], N[(x + y), $MachinePrecision], If[LessEqual[t, 1.25e+175], t$95$1, N[(y + N[(x + N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{a - t}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+101}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-253}:\\
\;\;\;\;x + \frac{z \cdot y}{a - t}\\
\mathbf{elif}\;t \leq 5.3 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+152}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+175}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y + \left(x + a \cdot \frac{y}{t}\right)\\
\end{array}
\end{array}
if t < -1.05e101 or 5.29999999999999978e79 < t < 1.14999999999999993e152Initial program 99.9%
Taylor expanded in t around inf 79.5%
+-commutative79.5%
Simplified79.5%
if -1.05e101 < t < -2.00000000000000004e-87 or -4.99999999999999971e-253 < t < 5.29999999999999978e79 or 1.14999999999999993e152 < t < 1.25e175Initial program 97.7%
Taylor expanded in z around inf 81.1%
associate-/l*84.6%
Simplified84.6%
if -2.00000000000000004e-87 < t < -4.99999999999999971e-253Initial program 84.5%
Taylor expanded in z around inf 94.7%
if 1.25e175 < t Initial program 100.0%
Taylor expanded in z around 0 66.8%
mul-1-neg66.8%
unsub-neg66.8%
*-commutative66.8%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in t around inf 88.5%
cancel-sign-sub-inv88.5%
+-commutative88.5%
associate-/l*97.1%
metadata-eval97.1%
*-commutative97.1%
*-rgt-identity97.1%
Simplified97.1%
Final simplification86.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- y (* y (/ z t))))))
(if (<= t -1.85e+30)
t_1
(if (<= t -5.5e-65)
(+ x (* y (/ z (- a t))))
(if (<= t 1.05e-80)
(+ x (/ (* z y) (- a t)))
(if (or (<= t 6.5e+88) (not (<= t 1.18e+154)))
(+ x (* y (/ t (- t a))))
t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - (y * (z / t)));
double tmp;
if (t <= -1.85e+30) {
tmp = t_1;
} else if (t <= -5.5e-65) {
tmp = x + (y * (z / (a - t)));
} else if (t <= 1.05e-80) {
tmp = x + ((z * y) / (a - t));
} else if ((t <= 6.5e+88) || !(t <= 1.18e+154)) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y - (y * (z / t)))
if (t <= (-1.85d+30)) then
tmp = t_1
else if (t <= (-5.5d-65)) then
tmp = x + (y * (z / (a - t)))
else if (t <= 1.05d-80) then
tmp = x + ((z * y) / (a - t))
else if ((t <= 6.5d+88) .or. (.not. (t <= 1.18d+154))) then
tmp = x + (y * (t / (t - a)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - (y * (z / t)));
double tmp;
if (t <= -1.85e+30) {
tmp = t_1;
} else if (t <= -5.5e-65) {
tmp = x + (y * (z / (a - t)));
} else if (t <= 1.05e-80) {
tmp = x + ((z * y) / (a - t));
} else if ((t <= 6.5e+88) || !(t <= 1.18e+154)) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y - (y * (z / t))) tmp = 0 if t <= -1.85e+30: tmp = t_1 elif t <= -5.5e-65: tmp = x + (y * (z / (a - t))) elif t <= 1.05e-80: tmp = x + ((z * y) / (a - t)) elif (t <= 6.5e+88) or not (t <= 1.18e+154): tmp = x + (y * (t / (t - a))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - Float64(y * Float64(z / t)))) tmp = 0.0 if (t <= -1.85e+30) tmp = t_1; elseif (t <= -5.5e-65) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); elseif (t <= 1.05e-80) tmp = Float64(x + Float64(Float64(z * y) / Float64(a - t))); elseif ((t <= 6.5e+88) || !(t <= 1.18e+154)) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y - (y * (z / t))); tmp = 0.0; if (t <= -1.85e+30) tmp = t_1; elseif (t <= -5.5e-65) tmp = x + (y * (z / (a - t))); elseif (t <= 1.05e-80) tmp = x + ((z * y) / (a - t)); elseif ((t <= 6.5e+88) || ~((t <= 1.18e+154))) tmp = x + (y * (t / (t - a))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.85e+30], t$95$1, If[LessEqual[t, -5.5e-65], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-80], N[(x + N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 6.5e+88], N[Not[LessEqual[t, 1.18e+154]], $MachinePrecision]], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - y \cdot \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -1.85 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-65}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-80}:\\
\;\;\;\;x + \frac{z \cdot y}{a - t}\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+88} \lor \neg \left(t \leq 1.18 \cdot 10^{+154}\right):\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.85000000000000008e30 or 6.5000000000000002e88 < t < 1.18000000000000004e154Initial program 99.9%
Taylor expanded in a around 0 63.9%
+-commutative63.9%
associate-*r/63.9%
mul-1-neg63.9%
*-commutative63.9%
distribute-rgt-neg-out63.9%
Simplified63.9%
Taylor expanded in z around 0 75.5%
mul-1-neg75.5%
unsub-neg75.5%
associate-/l*92.3%
Simplified92.3%
if -1.85000000000000008e30 < t < -5.4999999999999999e-65Initial program 99.8%
Taylor expanded in z around inf 69.7%
associate-/l*79.6%
Simplified79.6%
if -5.4999999999999999e-65 < t < 1.05000000000000001e-80Initial program 91.6%
Taylor expanded in z around inf 94.4%
if 1.05000000000000001e-80 < t < 6.5000000000000002e88 or 1.18000000000000004e154 < t Initial program 99.9%
Taylor expanded in z around 0 70.3%
mul-1-neg70.3%
unsub-neg70.3%
*-commutative70.3%
associate-/l*85.9%
Simplified85.9%
Final simplification90.4%
(FPCore (x y z t a)
:precision binary64
(if (or (<= t -5.8e+106)
(and (not (<= t 8e+79)) (or (<= t 1.2e+152) (not (<= t 2.9e+183)))))
(+ x y)
(+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.8e+106) || (!(t <= 8e+79) && ((t <= 1.2e+152) || !(t <= 2.9e+183)))) {
tmp = x + y;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-5.8d+106)) .or. (.not. (t <= 8d+79)) .and. (t <= 1.2d+152) .or. (.not. (t <= 2.9d+183))) then
tmp = x + y
else
tmp = x + (y * (z / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.8e+106) || (!(t <= 8e+79) && ((t <= 1.2e+152) || !(t <= 2.9e+183)))) {
tmp = x + y;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.8e+106) or (not (t <= 8e+79) and ((t <= 1.2e+152) or not (t <= 2.9e+183))): tmp = x + y else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.8e+106) || (!(t <= 8e+79) && ((t <= 1.2e+152) || !(t <= 2.9e+183)))) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.8e+106) || (~((t <= 8e+79)) && ((t <= 1.2e+152) || ~((t <= 2.9e+183))))) tmp = x + y; else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.8e+106], And[N[Not[LessEqual[t, 8e+79]], $MachinePrecision], Or[LessEqual[t, 1.2e+152], N[Not[LessEqual[t, 2.9e+183]], $MachinePrecision]]]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{+106} \lor \neg \left(t \leq 8 \cdot 10^{+79}\right) \land \left(t \leq 1.2 \cdot 10^{+152} \lor \neg \left(t \leq 2.9 \cdot 10^{+183}\right)\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -5.8000000000000004e106 or 7.99999999999999974e79 < t < 1.2e152 or 2.9000000000000001e183 < t Initial program 99.9%
Taylor expanded in t around inf 86.9%
+-commutative86.9%
Simplified86.9%
if -5.8000000000000004e106 < t < 7.99999999999999974e79 or 1.2e152 < t < 2.9000000000000001e183Initial program 94.9%
Taylor expanded in z around inf 83.8%
associate-/l*84.3%
Simplified84.3%
Final simplification85.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- y (* y (/ z t))))))
(if (<= t -4.4e+30)
t_1
(if (<= t -1e-69)
(+ x (* y (/ z (- a t))))
(if (<= t 2.15e-100) (+ x (/ (* z y) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - (y * (z / t)));
double tmp;
if (t <= -4.4e+30) {
tmp = t_1;
} else if (t <= -1e-69) {
tmp = x + (y * (z / (a - t)));
} else if (t <= 2.15e-100) {
tmp = x + ((z * y) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y - (y * (z / t)))
if (t <= (-4.4d+30)) then
tmp = t_1
else if (t <= (-1d-69)) then
tmp = x + (y * (z / (a - t)))
else if (t <= 2.15d-100) then
tmp = x + ((z * y) / (a - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - (y * (z / t)));
double tmp;
if (t <= -4.4e+30) {
tmp = t_1;
} else if (t <= -1e-69) {
tmp = x + (y * (z / (a - t)));
} else if (t <= 2.15e-100) {
tmp = x + ((z * y) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y - (y * (z / t))) tmp = 0 if t <= -4.4e+30: tmp = t_1 elif t <= -1e-69: tmp = x + (y * (z / (a - t))) elif t <= 2.15e-100: tmp = x + ((z * y) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - Float64(y * Float64(z / t)))) tmp = 0.0 if (t <= -4.4e+30) tmp = t_1; elseif (t <= -1e-69) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); elseif (t <= 2.15e-100) tmp = Float64(x + Float64(Float64(z * y) / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y - (y * (z / t))); tmp = 0.0; if (t <= -4.4e+30) tmp = t_1; elseif (t <= -1e-69) tmp = x + (y * (z / (a - t))); elseif (t <= 2.15e-100) tmp = x + ((z * y) / (a - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e+30], t$95$1, If[LessEqual[t, -1e-69], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.15e-100], N[(x + N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - y \cdot \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-69}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-100}:\\
\;\;\;\;x + \frac{z \cdot y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.4e30 or 2.14999999999999999e-100 < t Initial program 99.9%
Taylor expanded in a around 0 64.0%
+-commutative64.0%
associate-*r/64.0%
mul-1-neg64.0%
*-commutative64.0%
distribute-rgt-neg-out64.0%
Simplified64.0%
Taylor expanded in z around 0 77.1%
mul-1-neg77.1%
unsub-neg77.1%
associate-/l*86.0%
Simplified86.0%
if -4.4e30 < t < -9.9999999999999996e-70Initial program 99.8%
Taylor expanded in z around inf 69.7%
associate-/l*79.6%
Simplified79.6%
if -9.9999999999999996e-70 < t < 2.14999999999999999e-100Initial program 91.2%
Taylor expanded in z around inf 95.1%
Final simplification89.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.4e+102)
(+ x y)
(if (<= t -6.8e-5)
(- x (/ (* z y) t))
(if (<= t 8.2e-81) (+ x (/ z (/ a y))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.4e+102) {
tmp = x + y;
} else if (t <= -6.8e-5) {
tmp = x - ((z * y) / t);
} else if (t <= 8.2e-81) {
tmp = x + (z / (a / y));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-5.4d+102)) then
tmp = x + y
else if (t <= (-6.8d-5)) then
tmp = x - ((z * y) / t)
else if (t <= 8.2d-81) then
tmp = x + (z / (a / y))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.4e+102) {
tmp = x + y;
} else if (t <= -6.8e-5) {
tmp = x - ((z * y) / t);
} else if (t <= 8.2e-81) {
tmp = x + (z / (a / y));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.4e+102: tmp = x + y elif t <= -6.8e-5: tmp = x - ((z * y) / t) elif t <= 8.2e-81: tmp = x + (z / (a / y)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.4e+102) tmp = Float64(x + y); elseif (t <= -6.8e-5) tmp = Float64(x - Float64(Float64(z * y) / t)); elseif (t <= 8.2e-81) tmp = Float64(x + Float64(z / Float64(a / y))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.4e+102) tmp = x + y; elseif (t <= -6.8e-5) tmp = x - ((z * y) / t); elseif (t <= 8.2e-81) tmp = x + (z / (a / y)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.4e+102], N[(x + y), $MachinePrecision], If[LessEqual[t, -6.8e-5], N[(x - N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e-81], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{+102}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{-5}:\\
\;\;\;\;x - \frac{z \cdot y}{t}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-81}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -5.4000000000000002e102 or 8.19999999999999968e-81 < t Initial program 99.9%
Taylor expanded in t around inf 77.7%
+-commutative77.7%
Simplified77.7%
if -5.4000000000000002e102 < t < -6.7999999999999999e-5Initial program 99.9%
Taylor expanded in z around inf 81.9%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in a around 0 77.6%
mul-1-neg77.6%
unsub-neg77.6%
associate-/l*77.5%
Simplified77.5%
Taylor expanded in x around 0 77.6%
if -6.7999999999999999e-5 < t < 8.19999999999999968e-81Initial program 92.4%
Taylor expanded in z around inf 91.7%
associate-/l*88.4%
Simplified88.4%
associate-*r/91.7%
clear-num91.7%
Applied egg-rr91.7%
Taylor expanded in a around inf 76.0%
*-commutative76.0%
associate-*r/79.3%
Simplified79.3%
Taylor expanded in z around 0 76.0%
associate-/l*76.8%
*-commutative76.8%
associate-/r/79.3%
Simplified79.3%
Final simplification78.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3e+103)
(+ x y)
(if (<= t -0.0065)
(- x (* y (/ z t)))
(if (<= t 8.8e-71) (+ x (/ z (/ a y))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3e+103) {
tmp = x + y;
} else if (t <= -0.0065) {
tmp = x - (y * (z / t));
} else if (t <= 8.8e-71) {
tmp = x + (z / (a / y));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-3d+103)) then
tmp = x + y
else if (t <= (-0.0065d0)) then
tmp = x - (y * (z / t))
else if (t <= 8.8d-71) then
tmp = x + (z / (a / y))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3e+103) {
tmp = x + y;
} else if (t <= -0.0065) {
tmp = x - (y * (z / t));
} else if (t <= 8.8e-71) {
tmp = x + (z / (a / y));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3e+103: tmp = x + y elif t <= -0.0065: tmp = x - (y * (z / t)) elif t <= 8.8e-71: tmp = x + (z / (a / y)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3e+103) tmp = Float64(x + y); elseif (t <= -0.0065) tmp = Float64(x - Float64(y * Float64(z / t))); elseif (t <= 8.8e-71) tmp = Float64(x + Float64(z / Float64(a / y))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3e+103) tmp = x + y; elseif (t <= -0.0065) tmp = x - (y * (z / t)); elseif (t <= 8.8e-71) tmp = x + (z / (a / y)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3e+103], N[(x + y), $MachinePrecision], If[LessEqual[t, -0.0065], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e-71], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+103}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -0.0065:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{-71}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -3e103 or 8.7999999999999999e-71 < t Initial program 99.9%
Taylor expanded in t around inf 79.0%
+-commutative79.0%
Simplified79.0%
if -3e103 < t < -0.0064999999999999997Initial program 99.9%
Taylor expanded in z around inf 81.9%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in a around 0 77.6%
mul-1-neg77.6%
unsub-neg77.6%
associate-/l*77.5%
Simplified77.5%
if -0.0064999999999999997 < t < 8.7999999999999999e-71Initial program 92.6%
Taylor expanded in z around inf 91.0%
associate-/l*87.8%
Simplified87.8%
associate-*r/91.0%
clear-num91.0%
Applied egg-rr91.0%
Taylor expanded in a around inf 75.6%
*-commutative75.6%
associate-*r/78.8%
Simplified78.8%
Taylor expanded in z around 0 75.6%
associate-/l*76.3%
*-commutative76.3%
associate-/r/78.8%
Simplified78.8%
Final simplification78.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.45e-24) (not (<= t 6e-87))) (+ x y) (+ x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.45e-24) || !(t <= 6e-87)) {
tmp = x + y;
} else {
tmp = x + (z / (a / 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 ((t <= (-1.45d-24)) .or. (.not. (t <= 6d-87))) then
tmp = x + y
else
tmp = x + (z / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.45e-24) || !(t <= 6e-87)) {
tmp = x + y;
} else {
tmp = x + (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.45e-24) or not (t <= 6e-87): tmp = x + y else: tmp = x + (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.45e-24) || !(t <= 6e-87)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.45e-24) || ~((t <= 6e-87))) tmp = x + y; else tmp = x + (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.45e-24], N[Not[LessEqual[t, 6e-87]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-24} \lor \neg \left(t \leq 6 \cdot 10^{-87}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -1.4499999999999999e-24 or 6.00000000000000033e-87 < t Initial program 99.9%
Taylor expanded in t around inf 74.8%
+-commutative74.8%
Simplified74.8%
if -1.4499999999999999e-24 < t < 6.00000000000000033e-87Initial program 92.1%
Taylor expanded in z around inf 92.1%
associate-/l*88.7%
Simplified88.7%
associate-*r/92.1%
clear-num92.2%
Applied egg-rr92.2%
Taylor expanded in a around inf 76.6%
*-commutative76.6%
associate-*r/80.0%
Simplified80.0%
Taylor expanded in z around 0 76.6%
associate-/l*77.4%
*-commutative77.4%
associate-/r/80.1%
Simplified80.1%
Final simplification77.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.5e-28) (not (<= t 8.5e-89))) (+ x y) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.5e-28) || !(t <= 8.5e-89)) {
tmp = x + y;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2.5d-28)) .or. (.not. (t <= 8.5d-89))) then
tmp = x + y
else
tmp = x + (z * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.5e-28) || !(t <= 8.5e-89)) {
tmp = x + y;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.5e-28) or not (t <= 8.5e-89): tmp = x + y else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.5e-28) || !(t <= 8.5e-89)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.5e-28) || ~((t <= 8.5e-89))) tmp = x + y; else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.5e-28], N[Not[LessEqual[t, 8.5e-89]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{-28} \lor \neg \left(t \leq 8.5 \cdot 10^{-89}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -2.5000000000000001e-28 or 8.49999999999999937e-89 < t Initial program 99.9%
Taylor expanded in t around inf 74.8%
+-commutative74.8%
Simplified74.8%
if -2.5000000000000001e-28 < t < 8.49999999999999937e-89Initial program 92.1%
Taylor expanded in z around inf 92.1%
associate-/l*88.7%
Simplified88.7%
associate-*r/92.1%
clear-num92.2%
Applied egg-rr92.2%
Taylor expanded in a around inf 76.6%
*-commutative76.6%
associate-*r/80.0%
Simplified80.0%
Final simplification77.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.2e+30) (not (<= t 3.2e-165))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e+30) || !(t <= 3.2e-165)) {
tmp = x + 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 ((t <= (-1.2d+30)) .or. (.not. (t <= 3.2d-165))) then
tmp = x + 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 ((t <= -1.2e+30) || !(t <= 3.2e-165)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.2e+30) or not (t <= 3.2e-165): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.2e+30) || !(t <= 3.2e-165)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.2e+30) || ~((t <= 3.2e-165))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.2e+30], N[Not[LessEqual[t, 3.2e-165]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+30} \lor \neg \left(t \leq 3.2 \cdot 10^{-165}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.2e30 or 3.20000000000000013e-165 < t Initial program 99.9%
Taylor expanded in t around inf 73.3%
+-commutative73.3%
Simplified73.3%
if -1.2e30 < t < 3.20000000000000013e-165Initial program 92.0%
Taylor expanded in x around inf 51.4%
Final simplification64.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -2e+193) (* z (/ y (- t))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2e+193) {
tmp = z * (y / -t);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2d+193)) then
tmp = z * (y / -t)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2e+193) {
tmp = z * (y / -t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2e+193: tmp = z * (y / -t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2e+193) tmp = Float64(z * Float64(y / Float64(-t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2e+193) tmp = z * (y / -t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2e+193], N[(z * N[(y / (-t)), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+193}:\\
\;\;\;\;z \cdot \frac{y}{-t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.00000000000000013e193Initial program 93.6%
Taylor expanded in z around inf 78.3%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in a around 0 55.6%
mul-1-neg55.6%
unsub-neg55.6%
associate-/l*55.2%
Simplified55.2%
Taylor expanded in x around 0 45.9%
mul-1-neg45.9%
associate-*r/48.8%
distribute-rgt-neg-out48.8%
distribute-neg-frac48.8%
Simplified48.8%
Taylor expanded in y around 0 45.9%
mul-1-neg45.9%
distribute-neg-frac245.9%
*-commutative45.9%
associate-*r/51.9%
Simplified51.9%
if -2.00000000000000013e193 < z Initial program 97.0%
Taylor expanded in t around inf 65.6%
+-commutative65.6%
Simplified65.6%
Final simplification64.0%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((z - t) * (y / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - t)));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{a - t}
\end{array}
Initial program 96.6%
associate-*r/84.2%
Simplified84.2%
*-commutative84.2%
associate-/l*97.2%
Applied egg-rr97.2%
(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 96.6%
Taylor expanded in x around inf 46.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (< y -8.508084860551241e-17)
t_1
(if (< y 2.894426862792089e-49)
(+ x (* (* y (- z t)) (/ 1.0 (- a t))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * ((z - t) / (a - t)))
if (y < (-8.508084860551241d-17)) then
tmp = t_1
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) * (1.0d0 / (a - t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) tmp = 0 if y < -8.508084860551241e-17: tmp = t_1 elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) * (1.0 / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) * Float64(1.0 / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); tmp = 0.0; if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) * (1.0 / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -8.508084860551241e-17], t$95$1, If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024107
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:alt
(if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))