
(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(Float64(y * 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[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 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(Float64(y * 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[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- z t) y) (- a t))))
(if (or (<= t_1 -1e+177) (not (<= t_1 5e+17)))
(+ x (/ (- z t) (/ (- a t) y)))
(+ x t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) * y) / (a - t);
double tmp;
if ((t_1 <= -1e+177) || !(t_1 <= 5e+17)) {
tmp = x + ((z - t) / ((a - t) / y));
} else {
tmp = x + 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 = ((z - t) * y) / (a - t)
if ((t_1 <= (-1d+177)) .or. (.not. (t_1 <= 5d+17))) then
tmp = x + ((z - t) / ((a - t) / y))
else
tmp = x + 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 = ((z - t) * y) / (a - t);
double tmp;
if ((t_1 <= -1e+177) || !(t_1 <= 5e+17)) {
tmp = x + ((z - t) / ((a - t) / y));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((z - t) * y) / (a - t) tmp = 0 if (t_1 <= -1e+177) or not (t_1 <= 5e+17): tmp = x + ((z - t) / ((a - t) / y)) else: tmp = x + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - t) * y) / Float64(a - t)) tmp = 0.0 if ((t_1 <= -1e+177) || !(t_1 <= 5e+17)) tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(a - t) / y))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((z - t) * y) / (a - t); tmp = 0.0; if ((t_1 <= -1e+177) || ~((t_1 <= 5e+17))) tmp = x + ((z - t) / ((a - t) / y)); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+177], N[Not[LessEqual[t$95$1, 5e+17]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+177} \lor \neg \left(t_1 \leq 5 \cdot 10^{+17}\right):\\
\;\;\;\;x + \frac{z - t}{\frac{a - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < -1e177 or 5e17 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) Initial program 54.1%
*-commutative54.1%
associate-/l*99.8%
Simplified99.8%
if -1e177 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < 5e17Initial program 99.2%
Final simplification99.5%
(FPCore (x y z t a) :precision binary64 (fma (/ (- z t) (- a t)) y x))
double code(double x, double y, double z, double t, double a) {
return fma(((z - t) / (a - t)), y, x);
}
function code(x, y, z, t, a) return fma(Float64(Float64(z - t) / Float64(a - t)), y, x) end
code[x_, y_, z_, t_, a_] := N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)
\end{array}
Initial program 82.1%
+-commutative82.1%
*-commutative82.1%
associate-*l/98.6%
fma-def98.6%
Simplified98.6%
Final simplification98.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- z t) y) (- a t))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+266)))
(* (/ (- z t) (- a t)) y)
(+ x t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) * y) / (a - t);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+266)) {
tmp = ((z - t) / (a - t)) * y;
} else {
tmp = x + t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) * y) / (a - t);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+266)) {
tmp = ((z - t) / (a - t)) * y;
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((z - t) * y) / (a - t) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+266): tmp = ((z - t) / (a - t)) * y else: tmp = x + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - t) * y) / Float64(a - t)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+266)) tmp = Float64(Float64(Float64(z - t) / Float64(a - t)) * y); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((z - t) * y) / (a - t); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 5e+266))) tmp = ((z - t) / (a - t)) * y; else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+266]], $MachinePrecision]], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+266}\right):\\
\;\;\;\;\frac{z - t}{a - t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;x + t_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < -inf.0 or 4.9999999999999999e266 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) Initial program 40.7%
Taylor expanded in x around 0 40.7%
*-commutative40.7%
associate-*l/88.1%
Applied egg-rr88.1%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < 4.9999999999999999e266Initial program 99.3%
Final simplification96.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y (- a t))))))
(if (<= t -1.15e+77)
(+ y x)
(if (<= t 5.6e-89)
t_1
(if (<= t 1.35e-7)
(+ x (/ y (/ a (- z t))))
(if (<= t 5.1e+30) t_1 (+ y x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / (a - t)));
double tmp;
if (t <= -1.15e+77) {
tmp = y + x;
} else if (t <= 5.6e-89) {
tmp = t_1;
} else if (t <= 1.35e-7) {
tmp = x + (y / (a / (z - t)));
} else if (t <= 5.1e+30) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (z * (y / (a - t)))
if (t <= (-1.15d+77)) then
tmp = y + x
else if (t <= 5.6d-89) then
tmp = t_1
else if (t <= 1.35d-7) then
tmp = x + (y / (a / (z - t)))
else if (t <= 5.1d+30) then
tmp = t_1
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / (a - t)));
double tmp;
if (t <= -1.15e+77) {
tmp = y + x;
} else if (t <= 5.6e-89) {
tmp = t_1;
} else if (t <= 1.35e-7) {
tmp = x + (y / (a / (z - t)));
} else if (t <= 5.1e+30) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / (a - t))) tmp = 0 if t <= -1.15e+77: tmp = y + x elif t <= 5.6e-89: tmp = t_1 elif t <= 1.35e-7: tmp = x + (y / (a / (z - t))) elif t <= 5.1e+30: tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / Float64(a - t)))) tmp = 0.0 if (t <= -1.15e+77) tmp = Float64(y + x); elseif (t <= 5.6e-89) tmp = t_1; elseif (t <= 1.35e-7) tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); elseif (t <= 5.1e+30) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / (a - t))); tmp = 0.0; if (t <= -1.15e+77) tmp = y + x; elseif (t <= 5.6e-89) tmp = t_1; elseif (t <= 1.35e-7) tmp = x + (y / (a / (z - t))); elseif (t <= 5.1e+30) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+77], N[(y + x), $MachinePrecision], If[LessEqual[t, 5.6e-89], t$95$1, If[LessEqual[t, 1.35e-7], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.1e+30], t$95$1, N[(y + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a - t}\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+77}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-89}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-7}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{+30}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -1.14999999999999997e77 or 5.10000000000000035e30 < t Initial program 64.6%
Taylor expanded in t around inf 82.3%
+-commutative82.3%
Simplified82.3%
if -1.14999999999999997e77 < t < 5.5999999999999998e-89 or 1.35000000000000004e-7 < t < 5.10000000000000035e30Initial program 95.0%
Taylor expanded in z around inf 86.9%
associate-*l/37.9%
*-commutative37.9%
Simplified91.0%
if 5.5999999999999998e-89 < t < 1.35000000000000004e-7Initial program 86.9%
Taylor expanded in a around inf 86.9%
+-commutative86.9%
associate-/l*99.5%
Simplified99.5%
Final simplification88.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ y (/ t (- z t))))))
(if (<= t -5.4e+76)
t_1
(if (<= t 2.65e-89)
(+ x (* z (/ y (- a t))))
(if (<= t 33000000000.0) (+ x (/ y (/ a (- z t)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y / (t / (z - t)));
double tmp;
if (t <= -5.4e+76) {
tmp = t_1;
} else if (t <= 2.65e-89) {
tmp = x + (z * (y / (a - t)));
} else if (t <= 33000000000.0) {
tmp = x + (y / (a / (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 = x - (y / (t / (z - t)))
if (t <= (-5.4d+76)) then
tmp = t_1
else if (t <= 2.65d-89) then
tmp = x + (z * (y / (a - t)))
else if (t <= 33000000000.0d0) then
tmp = x + (y / (a / (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 = x - (y / (t / (z - t)));
double tmp;
if (t <= -5.4e+76) {
tmp = t_1;
} else if (t <= 2.65e-89) {
tmp = x + (z * (y / (a - t)));
} else if (t <= 33000000000.0) {
tmp = x + (y / (a / (z - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y / (t / (z - t))) tmp = 0 if t <= -5.4e+76: tmp = t_1 elif t <= 2.65e-89: tmp = x + (z * (y / (a - t))) elif t <= 33000000000.0: tmp = x + (y / (a / (z - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y / Float64(t / Float64(z - t)))) tmp = 0.0 if (t <= -5.4e+76) tmp = t_1; elseif (t <= 2.65e-89) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); elseif (t <= 33000000000.0) tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y / (t / (z - t))); tmp = 0.0; if (t <= -5.4e+76) tmp = t_1; elseif (t <= 2.65e-89) tmp = x + (z * (y / (a - t))); elseif (t <= 33000000000.0) tmp = x + (y / (a / (z - 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[(t / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.4e+76], t$95$1, If[LessEqual[t, 2.65e-89], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 33000000000.0], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{t}{z - t}}\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{-89}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;t \leq 33000000000:\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -5.3999999999999998e76 or 3.3e10 < t Initial program 66.5%
Taylor expanded in a around 0 63.5%
mul-1-neg63.5%
unsub-neg63.5%
associate-/l*89.3%
Simplified89.3%
if -5.3999999999999998e76 < t < 2.65e-89Initial program 94.7%
Taylor expanded in z around inf 87.7%
associate-*l/38.6%
*-commutative38.6%
Simplified92.0%
if 2.65e-89 < t < 3.3e10Initial program 87.7%
Taylor expanded in a around inf 87.7%
+-commutative87.7%
associate-/l*99.5%
Simplified99.5%
Final simplification91.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.05e+80) (not (<= t 2.05e+30))) (+ y x) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.05e+80) || !(t <= 2.05e+30)) {
tmp = y + x;
} 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) :: tmp
if ((t <= (-1.05d+80)) .or. (.not. (t <= 2.05d+30))) then
tmp = y + x
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 tmp;
if ((t <= -1.05e+80) || !(t <= 2.05e+30)) {
tmp = y + x;
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.05e+80) or not (t <= 2.05e+30): tmp = y + x else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.05e+80) || !(t <= 2.05e+30)) tmp = Float64(y + x); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.05e+80) || ~((t <= 2.05e+30))) tmp = y + x; else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.05e+80], N[Not[LessEqual[t, 2.05e+30]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+80} \lor \neg \left(t \leq 2.05 \cdot 10^{+30}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -1.05000000000000001e80 or 2.05000000000000003e30 < t Initial program 64.6%
Taylor expanded in t around inf 82.3%
+-commutative82.3%
Simplified82.3%
if -1.05000000000000001e80 < t < 2.05000000000000003e30Initial program 94.2%
Taylor expanded in z around inf 84.4%
associate-*l/37.3%
*-commutative37.3%
Simplified88.9%
Final simplification86.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.8e+59) (+ x (* z (/ y (- a t)))) (if (<= z 7e-34) (- x (/ t (/ (- a t) y))) (+ x (* y (/ z (- a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.8e+59) {
tmp = x + (z * (y / (a - t)));
} else if (z <= 7e-34) {
tmp = x - (t / ((a - t) / 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 (z <= (-7.8d+59)) then
tmp = x + (z * (y / (a - t)))
else if (z <= 7d-34) then
tmp = x - (t / ((a - t) / 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 (z <= -7.8e+59) {
tmp = x + (z * (y / (a - t)));
} else if (z <= 7e-34) {
tmp = x - (t / ((a - t) / y));
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.8e+59: tmp = x + (z * (y / (a - t))) elif z <= 7e-34: tmp = x - (t / ((a - t) / y)) else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.8e+59) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); elseif (z <= 7e-34) tmp = Float64(x - Float64(t / Float64(Float64(a - t) / 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 (z <= -7.8e+59) tmp = x + (z * (y / (a - t))); elseif (z <= 7e-34) tmp = x - (t / ((a - t) / y)); else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.8e+59], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-34], N[(x - N[(t / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+59}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-34}:\\
\;\;\;\;x - \frac{t}{\frac{a - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if z < -7.80000000000000043e59Initial program 76.4%
Taylor expanded in z around inf 71.2%
associate-*l/56.8%
*-commutative56.8%
Simplified84.2%
if -7.80000000000000043e59 < z < 7e-34Initial program 83.1%
+-commutative83.1%
associate-*l/94.2%
fma-def94.3%
Simplified94.3%
fma-udef94.2%
associate-*l/83.1%
associate-/l*99.2%
div-inv99.2%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 76.1%
mul-1-neg76.1%
unsub-neg76.1%
associate-/l*87.8%
Simplified87.8%
if 7e-34 < z Initial program 83.7%
+-commutative83.7%
associate-*l/97.6%
fma-def97.6%
Simplified97.6%
fma-udef97.6%
associate-*l/83.7%
associate-/l*99.9%
div-inv99.9%
clear-num100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 91.2%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.9e+84) (+ x (* z (/ y (- a t)))) (if (<= z 2.7e-35) (- x (* y (/ t (- a t)))) (+ x (* y (/ z (- a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e+84) {
tmp = x + (z * (y / (a - t)));
} else if (z <= 2.7e-35) {
tmp = x - (y * (t / (a - t)));
} 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 (z <= (-2.9d+84)) then
tmp = x + (z * (y / (a - t)))
else if (z <= 2.7d-35) then
tmp = x - (y * (t / (a - t)))
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 (z <= -2.9e+84) {
tmp = x + (z * (y / (a - t)));
} else if (z <= 2.7e-35) {
tmp = x - (y * (t / (a - t)));
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.9e+84: tmp = x + (z * (y / (a - t))) elif z <= 2.7e-35: tmp = x - (y * (t / (a - t))) else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.9e+84) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); elseif (z <= 2.7e-35) tmp = Float64(x - Float64(y * Float64(t / Float64(a - t)))); 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 (z <= -2.9e+84) tmp = x + (z * (y / (a - t))); elseif (z <= 2.7e-35) tmp = x - (y * (t / (a - t))); else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e+84], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e-35], N[(x - N[(y * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+84}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-35}:\\
\;\;\;\;x - y \cdot \frac{t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if z < -2.89999999999999989e84Initial program 72.7%
Taylor expanded in z around inf 71.8%
associate-*l/60.2%
*-commutative60.2%
Simplified87.0%
if -2.89999999999999989e84 < z < 2.6999999999999997e-35Initial program 83.8%
Taylor expanded in z around 0 75.9%
+-commutative75.9%
mul-1-neg75.9%
associate-*l/91.0%
distribute-rgt-neg-in91.0%
Simplified91.0%
if 2.6999999999999997e-35 < z Initial program 83.7%
+-commutative83.7%
associate-*l/97.6%
fma-def97.6%
Simplified97.6%
fma-udef97.6%
associate-*l/83.7%
associate-/l*99.9%
div-inv99.9%
clear-num100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 91.2%
Final simplification90.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.3e+197) (not (<= z 2.6e+220))) (* z (/ y (- a t))) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.3e+197) || !(z <= 2.6e+220)) {
tmp = z * (y / (a - 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 <= (-1.3d+197)) .or. (.not. (z <= 2.6d+220))) then
tmp = z * (y / (a - 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 <= -1.3e+197) || !(z <= 2.6e+220)) {
tmp = z * (y / (a - t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.3e+197) or not (z <= 2.6e+220): tmp = z * (y / (a - t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.3e+197) || !(z <= 2.6e+220)) tmp = Float64(z * Float64(y / Float64(a - t))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.3e+197) || ~((z <= 2.6e+220))) tmp = z * (y / (a - t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.3e+197], N[Not[LessEqual[z, 2.6e+220]], $MachinePrecision]], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+197} \lor \neg \left(z \leq 2.6 \cdot 10^{+220}\right):\\
\;\;\;\;z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.29999999999999994e197 or 2.59999999999999994e220 < z Initial program 83.0%
Taylor expanded in x around 0 63.1%
Taylor expanded in z around inf 63.1%
associate-*l/77.6%
*-commutative77.6%
Simplified77.6%
if -1.29999999999999994e197 < z < 2.59999999999999994e220Initial program 82.0%
Taylor expanded in t around inf 65.5%
+-commutative65.5%
Simplified65.5%
Final simplification67.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.8e+205) (/ y (/ a z)) (if (<= z 9.5e+220) (+ y x) (* y (- 1.0 (/ z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+205) {
tmp = y / (a / z);
} else if (z <= 9.5e+220) {
tmp = y + x;
} else {
tmp = y * (1.0 - (z / 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 (z <= (-3.8d+205)) then
tmp = y / (a / z)
else if (z <= 9.5d+220) then
tmp = y + x
else
tmp = y * (1.0d0 - (z / t))
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.8e+205) {
tmp = y / (a / z);
} else if (z <= 9.5e+220) {
tmp = y + x;
} else {
tmp = y * (1.0 - (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+205: tmp = y / (a / z) elif z <= 9.5e+220: tmp = y + x else: tmp = y * (1.0 - (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+205) tmp = Float64(y / Float64(a / z)); elseif (z <= 9.5e+220) tmp = Float64(y + x); else tmp = Float64(y * Float64(1.0 - Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.8e+205) tmp = y / (a / z); elseif (z <= 9.5e+220) tmp = y + x; else tmp = y * (1.0 - (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+205], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+220], N[(y + x), $MachinePrecision], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+205}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+220}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\end{array}
\end{array}
if z < -3.8e205Initial program 79.8%
Taylor expanded in x around 0 59.6%
Taylor expanded in t around 0 38.8%
associate-/l*53.6%
Simplified53.6%
if -3.8e205 < z < 9.50000000000000084e220Initial program 82.0%
Taylor expanded in t around inf 65.5%
+-commutative65.5%
Simplified65.5%
if 9.50000000000000084e220 < z Initial program 85.9%
Taylor expanded in a around 0 56.5%
mul-1-neg56.5%
unsub-neg56.5%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in y around inf 60.9%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -1e+199) (* y (/ (+ z t) a)) (if (<= z 3.65e+220) (+ y x) (* y (- 1.0 (/ z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e+199) {
tmp = y * ((z + t) / a);
} else if (z <= 3.65e+220) {
tmp = y + x;
} else {
tmp = y * (1.0 - (z / 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 (z <= (-1d+199)) then
tmp = y * ((z + t) / a)
else if (z <= 3.65d+220) then
tmp = y + x
else
tmp = y * (1.0d0 - (z / t))
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+199) {
tmp = y * ((z + t) / a);
} else if (z <= 3.65e+220) {
tmp = y + x;
} else {
tmp = y * (1.0 - (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1e+199: tmp = y * ((z + t) / a) elif z <= 3.65e+220: tmp = y + x else: tmp = y * (1.0 - (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e+199) tmp = Float64(y * Float64(Float64(z + t) / a)); elseif (z <= 3.65e+220) tmp = Float64(y + x); else tmp = Float64(y * Float64(1.0 - Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1e+199) tmp = y * ((z + t) / a); elseif (z <= 3.65e+220) tmp = y + x; else tmp = y * (1.0 - (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e+199], N[(y * N[(N[(z + t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.65e+220], N[(y + x), $MachinePrecision], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+199}:\\
\;\;\;\;y \cdot \frac{z + t}{a}\\
\mathbf{elif}\;z \leq 3.65 \cdot 10^{+220}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\end{array}
\end{array}
if z < -1.0000000000000001e199Initial program 79.8%
*-commutative79.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around inf 73.8%
Taylor expanded in y around inf 53.7%
div-sub53.7%
Simplified53.7%
expm1-log1p-u20.8%
expm1-udef20.8%
sub-neg20.8%
add-sqr-sqrt10.7%
sqrt-unprod20.8%
sqr-neg20.8%
sqrt-unprod10.1%
add-sqr-sqrt20.8%
Applied egg-rr20.8%
expm1-def20.8%
expm1-log1p53.7%
Simplified53.7%
if -1.0000000000000001e199 < z < 3.6499999999999998e220Initial program 82.0%
Taylor expanded in t around inf 65.5%
+-commutative65.5%
Simplified65.5%
if 3.6499999999999998e220 < z Initial program 85.9%
Taylor expanded in a around 0 56.5%
mul-1-neg56.5%
unsub-neg56.5%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in y around inf 60.9%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.5e+76) (+ y x) (if (<= t 2.15e-5) (+ x (* y (/ z a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.5e+76) {
tmp = y + x;
} else if (t <= 2.15e-5) {
tmp = x + (y * (z / a));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-4.5d+76)) then
tmp = y + x
else if (t <= 2.15d-5) then
tmp = x + (y * (z / a))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.5e+76) {
tmp = y + x;
} else if (t <= 2.15e-5) {
tmp = x + (y * (z / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.5e+76: tmp = y + x elif t <= 2.15e-5: tmp = x + (y * (z / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.5e+76) tmp = Float64(y + x); elseif (t <= 2.15e-5) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.5e+76) tmp = y + x; elseif (t <= 2.15e-5) tmp = x + (y * (z / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.5e+76], N[(y + x), $MachinePrecision], If[LessEqual[t, 2.15e-5], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+76}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-5}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -4.4999999999999997e76 or 2.1500000000000001e-5 < t Initial program 66.8%
Taylor expanded in t around inf 80.4%
+-commutative80.4%
Simplified80.4%
if -4.4999999999999997e76 < t < 2.1500000000000001e-5Initial program 93.9%
+-commutative93.9%
associate-*l/96.8%
fma-def96.8%
Simplified96.8%
fma-udef96.8%
associate-*l/93.9%
associate-/l*97.9%
div-inv97.3%
clear-num97.7%
Applied egg-rr97.7%
Taylor expanded in t around 0 79.9%
Final simplification80.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -8.5e+78) (+ y x) (if (<= t 1.95e-5) (+ x (* z (/ y a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.5e+78) {
tmp = y + x;
} else if (t <= 1.95e-5) {
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 (t <= (-8.5d+78)) then
tmp = y + x
else if (t <= 1.95d-5) 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 (t <= -8.5e+78) {
tmp = y + x;
} else if (t <= 1.95e-5) {
tmp = x + (z * (y / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8.5e+78: tmp = y + x elif t <= 1.95e-5: tmp = x + (z * (y / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8.5e+78) tmp = Float64(y + x); elseif (t <= 1.95e-5) 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 (t <= -8.5e+78) tmp = y + x; elseif (t <= 1.95e-5) tmp = x + (z * (y / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8.5e+78], N[(y + x), $MachinePrecision], If[LessEqual[t, 1.95e-5], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+78}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-5}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -8.50000000000000079e78 or 1.95e-5 < t Initial program 66.8%
Taylor expanded in t around inf 80.4%
+-commutative80.4%
Simplified80.4%
if -8.50000000000000079e78 < t < 1.95e-5Initial program 93.9%
+-commutative93.9%
associate-*l/96.8%
fma-def96.8%
Simplified96.8%
fma-udef96.8%
associate-*l/93.9%
associate-/l*97.9%
div-inv97.3%
clear-num97.7%
Applied egg-rr97.7%
Taylor expanded in t around 0 75.9%
*-commutative75.9%
associate-*r/79.9%
Simplified79.9%
Final simplification80.1%
(FPCore (x y z t a) :precision binary64 (+ x (* (/ (- z t) (- a t)) y)))
double code(double x, double y, double z, double t, double a) {
return x + (((z - t) / (a - t)) * y);
}
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) / (a - t)) * y)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((z - t) / (a - t)) * y);
}
def code(x, y, z, t, a): return x + (((z - t) / (a - t)) * y)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(z - t) / Float64(a - t)) * y)) end
function tmp = code(x, y, z, t, a) tmp = x + (((z - t) / (a - t)) * y); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{z - t}{a - t} \cdot y
\end{array}
Initial program 82.1%
+-commutative82.1%
associate-*l/95.7%
fma-def95.7%
Simplified95.7%
fma-udef95.7%
associate-*l/82.1%
associate-/l*98.8%
div-inv98.4%
clear-num98.6%
Applied egg-rr98.6%
Final simplification98.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.75e+206) (not (<= z 1.8e+226))) (/ y (/ a z)) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.75e+206) || !(z <= 1.8e+226)) {
tmp = y / (a / 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.75d+206)) .or. (.not. (z <= 1.8d+226))) then
tmp = y / (a / 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.75e+206) || !(z <= 1.8e+226)) {
tmp = y / (a / z);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.75e+206) or not (z <= 1.8e+226): tmp = y / (a / z) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.75e+206) || !(z <= 1.8e+226)) tmp = Float64(y / Float64(a / 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.75e+206) || ~((z <= 1.8e+226))) tmp = y / (a / z); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.75e+206], N[Not[LessEqual[z, 1.8e+226]], $MachinePrecision]], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{+206} \lor \neg \left(z \leq 1.8 \cdot 10^{+226}\right):\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -2.75000000000000011e206 or 1.7999999999999999e226 < z Initial program 84.6%
Taylor expanded in x around 0 63.6%
Taylor expanded in t around 0 44.8%
associate-/l*54.8%
Simplified54.8%
if -2.75000000000000011e206 < z < 1.7999999999999999e226Initial program 81.7%
Taylor expanded in t around inf 65.4%
+-commutative65.4%
Simplified65.4%
Final simplification63.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.6e+78) (+ y x) (if (<= t 1.55e-97) x (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.6e+78) {
tmp = y + x;
} else if (t <= 1.55e-97) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-6.6d+78)) then
tmp = y + x
else if (t <= 1.55d-97) then
tmp = x
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.6e+78) {
tmp = y + x;
} else if (t <= 1.55e-97) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.6e+78: tmp = y + x elif t <= 1.55e-97: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.6e+78) tmp = Float64(y + x); elseif (t <= 1.55e-97) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.6e+78) tmp = y + x; elseif (t <= 1.55e-97) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.6e+78], N[(y + x), $MachinePrecision], If[LessEqual[t, 1.55e-97], x, N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{+78}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-97}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -6.6e78 or 1.55000000000000001e-97 < t Initial program 69.4%
Taylor expanded in t around inf 75.5%
+-commutative75.5%
Simplified75.5%
if -6.6e78 < t < 1.55000000000000001e-97Initial program 94.7%
Taylor expanded in x around inf 57.0%
Final simplification66.2%
(FPCore (x y z t a) :precision binary64 (if (<= y 2.1e+110) x y))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 2.1e+110) {
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 <= 2.1d+110) 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 <= 2.1e+110) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 2.1e+110: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 2.1e+110) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 2.1e+110) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 2.1e+110], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.1 \cdot 10^{+110}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 2.10000000000000015e110Initial program 88.4%
Taylor expanded in x around inf 57.5%
if 2.10000000000000015e110 < y Initial program 49.4%
Taylor expanded in x around 0 39.4%
Taylor expanded in t around inf 35.7%
Final simplification54.0%
(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 82.1%
Taylor expanded in x around inf 51.0%
Final simplification51.0%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (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 / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
herbie shell --seed 2023290
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))