
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
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 - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
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 - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z)))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -1e-271)
t_2
(if (<= t_2 0.0)
(- t (/ (* (- t x) (- y a)) z))
(if (<= t_2 2e+295) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -1e-271) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (t_2 <= 2e+295) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -1e-271) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (t_2 <= 2e+295) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -1e-271: tmp = t_2 elif t_2 <= 0.0: tmp = t - (((t - x) * (y - a)) / z) elif t_2 <= 2e+295: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -1e-271) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); elseif (t_2 <= 2e+295) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -1e-271) tmp = t_2; elseif (t_2 <= 0.0) tmp = t - (((t - x) * (y - a)) / z); elseif (t_2 <= 2e+295) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-271], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+295], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-271}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 2e295 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 50.9%
associate-/l*89.9%
Simplified89.9%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999963e-272 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2e295Initial program 97.5%
if -9.99999999999999963e-272 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 8.5%
+-commutative8.5%
*-commutative8.5%
associate-/l*8.5%
fma-define8.5%
Simplified8.5%
Taylor expanded in z around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_1 -1e-271)
(+ x (/ (- t x) (/ (- a z) (- y z))))
(if (<= t_1 0.0)
(- t (/ (* (- t x) (- y a)) z))
(fma (- t x) (/ (- y z) (- a z)) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_1 <= -1e-271) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else if (t_1 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = fma((t - x), ((y - z) / (a - z)), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_1 <= -1e-271) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); elseif (t_1 <= 0.0) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); else tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-271], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-271}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999963e-272Initial program 79.5%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in y around 0 76.9%
mul-1-neg76.9%
associate-/l*82.7%
distribute-lft-neg-out82.7%
+-commutative82.7%
div-sub84.5%
distribute-rgt-out88.8%
sub-neg88.8%
associate-/r/93.8%
Simplified93.8%
if -9.99999999999999963e-272 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 8.5%
+-commutative8.5%
*-commutative8.5%
associate-/l*8.5%
fma-define8.5%
Simplified8.5%
Taylor expanded in z around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 77.2%
+-commutative77.2%
*-commutative77.2%
associate-/l*94.4%
fma-define94.5%
Simplified94.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -1e-271) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(- t (/ (* (- t x) (- y a)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -1e-271) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) * (t - x)) / (a - z))
if ((t_1 <= (-1d-271)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t - (((t - x) * (y - a)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -1e-271) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if (t_1 <= -1e-271) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -1e-271) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if ((t_1 <= -1e-271) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t - (((t - x) * (y - a)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-271], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-271} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999963e-272 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 78.4%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in y around 0 76.9%
mul-1-neg76.9%
associate-/l*85.0%
distribute-lft-neg-out85.0%
+-commutative85.0%
div-sub85.9%
distribute-rgt-out88.8%
sub-neg88.8%
associate-/r/94.2%
Simplified94.2%
if -9.99999999999999963e-272 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 8.5%
+-commutative8.5%
*-commutative8.5%
associate-/l*8.5%
fma-define8.5%
Simplified8.5%
Taylor expanded in z around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification94.6%
(FPCore (x y z t a)
:precision binary64
(if (<= y -7e+73)
(+ x (* y (/ (- t x) a)))
(if (<= y -43.0)
(/ (* y (- x t)) z)
(if (<= y 6.8e+58) (- x (* t (/ z (- a z)))) (+ x (/ (- t x) (/ a y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7e+73) {
tmp = x + (y * ((t - x) / a));
} else if (y <= -43.0) {
tmp = (y * (x - t)) / z;
} else if (y <= 6.8e+58) {
tmp = x - (t * (z / (a - z)));
} else {
tmp = x + ((t - x) / (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 (y <= (-7d+73)) then
tmp = x + (y * ((t - x) / a))
else if (y <= (-43.0d0)) then
tmp = (y * (x - t)) / z
else if (y <= 6.8d+58) then
tmp = x - (t * (z / (a - z)))
else
tmp = x + ((t - x) / (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 (y <= -7e+73) {
tmp = x + (y * ((t - x) / a));
} else if (y <= -43.0) {
tmp = (y * (x - t)) / z;
} else if (y <= 6.8e+58) {
tmp = x - (t * (z / (a - z)));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -7e+73: tmp = x + (y * ((t - x) / a)) elif y <= -43.0: tmp = (y * (x - t)) / z elif y <= 6.8e+58: tmp = x - (t * (z / (a - z))) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -7e+73) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (y <= -43.0) tmp = Float64(Float64(y * Float64(x - t)) / z); elseif (y <= 6.8e+58) tmp = Float64(x - Float64(t * Float64(z / Float64(a - z)))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -7e+73) tmp = x + (y * ((t - x) / a)); elseif (y <= -43.0) tmp = (y * (x - t)) / z; elseif (y <= 6.8e+58) tmp = x - (t * (z / (a - z))); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -7e+73], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -43.0], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 6.8e+58], N[(x - N[(t * N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+73}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;y \leq -43:\\
\;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+58}:\\
\;\;\;\;x - t \cdot \frac{z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if y < -7.00000000000000004e73Initial program 83.5%
associate-/l*95.8%
Simplified95.8%
Taylor expanded in z around 0 67.3%
associate-/l*71.6%
Simplified71.6%
if -7.00000000000000004e73 < y < -43Initial program 72.9%
+-commutative72.9%
*-commutative72.9%
associate-/l*73.1%
fma-define73.1%
Simplified73.1%
Taylor expanded in y around inf 73.6%
Taylor expanded in a around 0 65.8%
distribute-lft-out--65.8%
div-sub74.9%
associate-*r/74.9%
neg-mul-174.9%
Simplified74.9%
Taylor expanded in y around 0 75.0%
if -43 < y < 6.8000000000000001e58Initial program 69.5%
associate-/l*74.6%
Simplified74.6%
Taylor expanded in t around inf 69.7%
associate-/l*78.2%
Simplified78.2%
Taylor expanded in y around 0 62.4%
mul-1-neg62.4%
unsub-neg62.4%
associate-/l*71.0%
Simplified71.0%
if 6.8000000000000001e58 < y Initial program 72.6%
associate-/l*92.8%
Simplified92.8%
Taylor expanded in y around 0 77.0%
mul-1-neg77.0%
associate-/l*83.7%
distribute-lft-neg-out83.7%
+-commutative83.7%
div-sub87.4%
distribute-rgt-out92.8%
sub-neg92.8%
associate-/r/97.9%
Simplified97.9%
Taylor expanded in z around 0 64.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.4e-137) (not (<= a 5.2e-159))) (+ x (* (- y z) (/ (- t x) (- a z)))) (- t (/ (* (- t x) (- y a)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.4e-137) || !(a <= 5.2e-159)) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-6.4d-137)) .or. (.not. (a <= 5.2d-159))) then
tmp = x + ((y - z) * ((t - x) / (a - z)))
else
tmp = t - (((t - x) * (y - a)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.4e-137) || !(a <= 5.2e-159)) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6.4e-137) or not (a <= 5.2e-159): tmp = x + ((y - z) * ((t - x) / (a - z))) else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6.4e-137) || !(a <= 5.2e-159)) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6.4e-137) || ~((a <= 5.2e-159))) tmp = x + ((y - z) * ((t - x) / (a - z))); else tmp = t - (((t - x) * (y - a)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.4e-137], N[Not[LessEqual[a, 5.2e-159]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.4 \cdot 10^{-137} \lor \neg \left(a \leq 5.2 \cdot 10^{-159}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if a < -6.40000000000000043e-137 or 5.1999999999999997e-159 < a Initial program 75.1%
associate-/l*87.9%
Simplified87.9%
if -6.40000000000000043e-137 < a < 5.1999999999999997e-159Initial program 67.5%
+-commutative67.5%
*-commutative67.5%
associate-/l*75.1%
fma-define75.3%
Simplified75.3%
Taylor expanded in z around inf 89.4%
associate--l+89.4%
associate-*r/89.4%
associate-*r/89.4%
mul-1-neg89.4%
div-sub89.4%
mul-1-neg89.4%
distribute-lft-out--89.4%
associate-*r/89.4%
mul-1-neg89.4%
unsub-neg89.4%
distribute-rgt-out--89.4%
Simplified89.4%
Final simplification88.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.95e+19) (not (<= a 1.05e-105))) (+ x (* t (/ (- y z) (- a z)))) (- t (/ (* (- t x) (- y a)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.95e+19) || !(a <= 1.05e-105)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.95d+19)) .or. (.not. (a <= 1.05d-105))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t - (((t - x) * (y - a)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.95e+19) || !(a <= 1.05e-105)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.95e+19) or not (a <= 1.05e-105): tmp = x + (t * ((y - z) / (a - z))) else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.95e+19) || !(a <= 1.05e-105)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.95e+19) || ~((a <= 1.05e-105))) tmp = x + (t * ((y - z) / (a - z))); else tmp = t - (((t - x) * (y - a)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.95e+19], N[Not[LessEqual[a, 1.05e-105]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.95 \cdot 10^{+19} \lor \neg \left(a \leq 1.05 \cdot 10^{-105}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if a < -1.95e19 or 1.05e-105 < a Initial program 75.0%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in t around inf 72.5%
associate-/l*82.7%
Simplified82.7%
if -1.95e19 < a < 1.05e-105Initial program 70.4%
+-commutative70.4%
*-commutative70.4%
associate-/l*77.6%
fma-define77.7%
Simplified77.7%
Taylor expanded in z around inf 77.6%
associate--l+77.6%
associate-*r/77.6%
associate-*r/77.6%
mul-1-neg77.6%
div-sub80.2%
mul-1-neg80.2%
distribute-lft-out--80.2%
associate-*r/80.2%
mul-1-neg80.2%
unsub-neg80.2%
distribute-rgt-out--80.2%
Simplified80.2%
Final simplification81.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -235000000000.0) (not (<= y 7e+58))) (+ x (* y (/ (- t x) (- a z)))) (+ x (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -235000000000.0) || !(y <= 7e+58)) {
tmp = x + (y * ((t - x) / (a - z)));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-235000000000.0d0)) .or. (.not. (y <= 7d+58))) then
tmp = x + (y * ((t - x) / (a - z)))
else
tmp = x + (t * ((y - z) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -235000000000.0) || !(y <= 7e+58)) {
tmp = x + (y * ((t - x) / (a - z)));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -235000000000.0) or not (y <= 7e+58): tmp = x + (y * ((t - x) / (a - z))) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -235000000000.0) || !(y <= 7e+58)) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / Float64(a - z)))); else tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -235000000000.0) || ~((y <= 7e+58))) tmp = x + (y * ((t - x) / (a - z))); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -235000000000.0], N[Not[LessEqual[y, 7e+58]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -235000000000 \lor \neg \left(y \leq 7 \cdot 10^{+58}\right):\\
\;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if y < -2.35e11 or 6.9999999999999995e58 < y Initial program 77.4%
associate-/l*92.8%
Simplified92.8%
Taylor expanded in y around inf 73.0%
associate-*r/84.2%
Simplified84.2%
if -2.35e11 < y < 6.9999999999999995e58Initial program 69.5%
associate-/l*74.5%
Simplified74.5%
Taylor expanded in t around inf 69.6%
associate-/l*78.0%
Simplified78.0%
Final simplification80.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.42e+19) (not (<= a 6.3e-139))) (+ x (* t (/ (- y z) (- a z)))) (+ t (/ (* y (- x t)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.42e+19) || !(a <= 6.3e-139)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t + ((y * (x - 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 ((a <= (-1.42d+19)) .or. (.not. (a <= 6.3d-139))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t + ((y * (x - 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 ((a <= -1.42e+19) || !(a <= 6.3e-139)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t + ((y * (x - t)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.42e+19) or not (a <= 6.3e-139): tmp = x + (t * ((y - z) / (a - z))) else: tmp = t + ((y * (x - t)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.42e+19) || !(a <= 6.3e-139)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.42e+19) || ~((a <= 6.3e-139))) tmp = x + (t * ((y - z) / (a - z))); else tmp = t + ((y * (x - t)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.42e+19], N[Not[LessEqual[a, 6.3e-139]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.42 \cdot 10^{+19} \lor \neg \left(a \leq 6.3 \cdot 10^{-139}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\end{array}
\end{array}
if a < -1.42e19 or 6.2999999999999999e-139 < a Initial program 74.9%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in t around inf 71.1%
associate-/l*80.9%
Simplified80.9%
if -1.42e19 < a < 6.2999999999999999e-139Initial program 70.2%
+-commutative70.2%
*-commutative70.2%
associate-/l*77.9%
fma-define78.0%
Simplified78.0%
Taylor expanded in z around -inf 66.9%
Taylor expanded in a around 0 78.6%
associate-*r/78.6%
associate-*r*78.6%
mul-1-neg78.6%
Simplified78.6%
Final simplification79.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -34.0) (not (<= y 3e+56))) (* y (/ -1.0 (/ (- a z) (- x t)))) (- x (* t (/ z (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -34.0) || !(y <= 3e+56)) {
tmp = y * (-1.0 / ((a - z) / (x - t)));
} else {
tmp = x - (t * (z / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-34.0d0)) .or. (.not. (y <= 3d+56))) then
tmp = y * ((-1.0d0) / ((a - z) / (x - t)))
else
tmp = x - (t * (z / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -34.0) || !(y <= 3e+56)) {
tmp = y * (-1.0 / ((a - z) / (x - t)));
} else {
tmp = x - (t * (z / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -34.0) or not (y <= 3e+56): tmp = y * (-1.0 / ((a - z) / (x - t))) else: tmp = x - (t * (z / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -34.0) || !(y <= 3e+56)) tmp = Float64(y * Float64(-1.0 / Float64(Float64(a - z) / Float64(x - t)))); else tmp = Float64(x - Float64(t * Float64(z / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -34.0) || ~((y <= 3e+56))) tmp = y * (-1.0 / ((a - z) / (x - t))); else tmp = x - (t * (z / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -34.0], N[Not[LessEqual[y, 3e+56]], $MachinePrecision]], N[(y * N[(-1.0 / N[(N[(a - z), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -34 \lor \neg \left(y \leq 3 \cdot 10^{+56}\right):\\
\;\;\;\;y \cdot \frac{-1}{\frac{a - z}{x - t}}\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \frac{z}{a - z}\\
\end{array}
\end{array}
if y < -34 or 3.00000000000000006e56 < y Initial program 77.3%
+-commutative77.3%
*-commutative77.3%
associate-/l*93.8%
fma-define93.8%
Simplified93.8%
Taylor expanded in y around inf 75.7%
sub-div78.3%
clear-num78.4%
Applied egg-rr78.4%
if -34 < y < 3.00000000000000006e56Initial program 69.3%
associate-/l*74.4%
Simplified74.4%
Taylor expanded in t around inf 69.5%
associate-/l*78.0%
Simplified78.0%
Taylor expanded in y around 0 62.8%
mul-1-neg62.8%
unsub-neg62.8%
associate-/l*71.4%
Simplified71.4%
Final simplification74.5%
(FPCore (x y z t a)
:precision binary64
(if (<= y -235000.0)
(+ x (* y (/ (- t x) (- a z))))
(if (<= y 9.6e+51)
(+ x (* t (/ (- y z) (- a z))))
(+ x (/ (- t x) (/ (- a z) y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -235000.0) {
tmp = x + (y * ((t - x) / (a - z)));
} else if (y <= 9.6e+51) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + ((t - x) / ((a - z) / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-235000.0d0)) then
tmp = x + (y * ((t - x) / (a - z)))
else if (y <= 9.6d+51) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = x + ((t - x) / ((a - z) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -235000.0) {
tmp = x + (y * ((t - x) / (a - z)));
} else if (y <= 9.6e+51) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + ((t - x) / ((a - z) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -235000.0: tmp = x + (y * ((t - x) / (a - z))) elif y <= 9.6e+51: tmp = x + (t * ((y - z) / (a - z))) else: tmp = x + ((t - x) / ((a - z) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -235000.0) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / Float64(a - z)))); elseif (y <= 9.6e+51) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -235000.0) tmp = x + (y * ((t - x) / (a - z))); elseif (y <= 9.6e+51) tmp = x + (t * ((y - z) / (a - z))); else tmp = x + ((t - x) / ((a - z) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -235000.0], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e+51], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -235000:\\
\;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{+51}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\
\end{array}
\end{array}
if y < -235000Initial program 82.2%
associate-/l*92.8%
Simplified92.8%
Taylor expanded in y around inf 79.3%
associate-*r/84.6%
Simplified84.6%
if -235000 < y < 9.5999999999999994e51Initial program 69.7%
associate-/l*74.8%
Simplified74.8%
Taylor expanded in t around inf 69.8%
associate-/l*78.3%
Simplified78.3%
if 9.5999999999999994e51 < y Initial program 71.8%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in y around 0 76.1%
mul-1-neg76.1%
associate-/l*82.6%
distribute-lft-neg-out82.6%
+-commutative82.6%
div-sub86.1%
distribute-rgt-out91.4%
sub-neg91.4%
associate-/r/96.3%
Simplified96.3%
Taylor expanded in y around inf 86.0%
(FPCore (x y z t a)
:precision binary64
(if (<= y -100000000.0)
(+ x (* y (/ (- t x) (- a z))))
(if (<= y 1.5e+56)
(+ x (* t (/ (- y z) (- a z))))
(+ x (/ y (/ (- a z) (- t x)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -100000000.0) {
tmp = x + (y * ((t - x) / (a - z)));
} else if (y <= 1.5e+56) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + (y / ((a - z) / (t - 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 (y <= (-100000000.0d0)) then
tmp = x + (y * ((t - x) / (a - z)))
else if (y <= 1.5d+56) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = x + (y / ((a - z) / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -100000000.0) {
tmp = x + (y * ((t - x) / (a - z)));
} else if (y <= 1.5e+56) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + (y / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -100000000.0: tmp = x + (y * ((t - x) / (a - z))) elif y <= 1.5e+56: tmp = x + (t * ((y - z) / (a - z))) else: tmp = x + (y / ((a - z) / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -100000000.0) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / Float64(a - z)))); elseif (y <= 1.5e+56) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - z) / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -100000000.0) tmp = x + (y * ((t - x) / (a - z))); elseif (y <= 1.5e+56) tmp = x + (t * ((y - z) / (a - z))); else tmp = x + (y / ((a - z) / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -100000000.0], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+56], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -100000000:\\
\;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+56}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if y < -1e8Initial program 82.2%
associate-/l*92.8%
Simplified92.8%
Taylor expanded in y around inf 79.3%
associate-*r/84.6%
Simplified84.6%
if -1e8 < y < 1.50000000000000003e56Initial program 69.3%
associate-/l*74.3%
Simplified74.3%
Taylor expanded in t around inf 69.4%
associate-/l*77.8%
Simplified77.8%
if 1.50000000000000003e56 < y Initial program 73.1%
associate-/l*92.9%
Simplified92.9%
clear-num93.0%
un-div-inv93.0%
Applied egg-rr93.0%
Taylor expanded in y around inf 84.1%
(FPCore (x y z t a) :precision binary64 (if (<= y -9.5e+264) (* y (/ t (- a z))) (if (<= y -25.0) (/ x (/ z y)) (if (<= y 2.4e+64) (+ x t) (* x (/ y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9.5e+264) {
tmp = y * (t / (a - z));
} else if (y <= -25.0) {
tmp = x / (z / y);
} else if (y <= 2.4e+64) {
tmp = x + t;
} else {
tmp = x * (y / 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 (y <= (-9.5d+264)) then
tmp = y * (t / (a - z))
else if (y <= (-25.0d0)) then
tmp = x / (z / y)
else if (y <= 2.4d+64) then
tmp = x + t
else
tmp = x * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9.5e+264) {
tmp = y * (t / (a - z));
} else if (y <= -25.0) {
tmp = x / (z / y);
} else if (y <= 2.4e+64) {
tmp = x + t;
} else {
tmp = x * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -9.5e+264: tmp = y * (t / (a - z)) elif y <= -25.0: tmp = x / (z / y) elif y <= 2.4e+64: tmp = x + t else: tmp = x * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -9.5e+264) tmp = Float64(y * Float64(t / Float64(a - z))); elseif (y <= -25.0) tmp = Float64(x / Float64(z / y)); elseif (y <= 2.4e+64) tmp = Float64(x + t); else tmp = Float64(x * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -9.5e+264) tmp = y * (t / (a - z)); elseif (y <= -25.0) tmp = x / (z / y); elseif (y <= 2.4e+64) tmp = x + t; else tmp = x * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -9.5e+264], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -25.0], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+64], N[(x + t), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+264}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;y \leq -25:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+64}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -9.50000000000000036e264Initial program 100.0%
+-commutative100.0%
*-commutative100.0%
associate-/l*99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in y around inf 99.8%
Taylor expanded in t around inf 75.7%
if -9.50000000000000036e264 < y < -25Initial program 78.5%
+-commutative78.5%
*-commutative78.5%
associate-/l*88.2%
fma-define88.2%
Simplified88.2%
Taylor expanded in y around inf 74.8%
Taylor expanded in a around 0 51.1%
distribute-lft-out--51.1%
div-sub53.1%
associate-*r/53.1%
neg-mul-153.1%
Simplified53.1%
Taylor expanded in t around 0 42.0%
associate-/l*46.6%
Simplified46.6%
clear-num46.6%
un-div-inv46.6%
Applied egg-rr46.6%
if -25 < y < 2.39999999999999999e64Initial program 70.0%
associate-/l*75.0%
Simplified75.0%
Taylor expanded in t around inf 69.4%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in z around inf 47.8%
if 2.39999999999999999e64 < y Initial program 71.5%
+-commutative71.5%
*-commutative71.5%
associate-/l*97.8%
fma-define97.8%
Simplified97.8%
Taylor expanded in y around inf 73.3%
Taylor expanded in a around 0 47.9%
distribute-lft-out--47.9%
div-sub51.7%
associate-*r/51.7%
neg-mul-151.7%
Simplified51.7%
Taylor expanded in t around 0 30.6%
associate-/l*37.6%
Simplified37.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.5e+19) (+ x (/ (* (- y z) t) a)) (if (<= a 3e-41) (+ t (/ (* y (- x t)) z)) (+ x (/ (- t x) (/ a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.5e+19) {
tmp = x + (((y - z) * t) / a);
} else if (a <= 3e-41) {
tmp = t + ((y * (x - t)) / z);
} else {
tmp = x + ((t - x) / (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 (a <= (-1.5d+19)) then
tmp = x + (((y - z) * t) / a)
else if (a <= 3d-41) then
tmp = t + ((y * (x - t)) / z)
else
tmp = x + ((t - x) / (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 (a <= -1.5e+19) {
tmp = x + (((y - z) * t) / a);
} else if (a <= 3e-41) {
tmp = t + ((y * (x - t)) / z);
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.5e+19: tmp = x + (((y - z) * t) / a) elif a <= 3e-41: tmp = t + ((y * (x - t)) / z) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.5e+19) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / a)); elseif (a <= 3e-41) tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.5e+19) tmp = x + (((y - z) * t) / a); elseif (a <= 3e-41) tmp = t + ((y * (x - t)) / z); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.5e+19], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3e-41], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{+19}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a}\\
\mathbf{elif}\;a \leq 3 \cdot 10^{-41}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if a < -1.5e19Initial program 75.1%
associate-/l*90.7%
Simplified90.7%
Taylor expanded in t around inf 78.5%
associate-/l*84.6%
Simplified84.6%
Taylor expanded in a around inf 77.0%
if -1.5e19 < a < 2.99999999999999989e-41Initial program 71.4%
+-commutative71.4%
*-commutative71.4%
associate-/l*79.9%
fma-define80.0%
Simplified80.0%
Taylor expanded in z around -inf 62.5%
Taylor expanded in a around 0 74.0%
associate-*r/74.0%
associate-*r*74.0%
mul-1-neg74.0%
Simplified74.0%
if 2.99999999999999989e-41 < a Initial program 73.8%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in y around 0 79.8%
mul-1-neg79.8%
associate-/l*90.9%
distribute-lft-neg-out90.9%
+-commutative90.9%
div-sub90.9%
distribute-rgt-out90.9%
sub-neg90.9%
associate-/r/95.0%
Simplified95.0%
Taylor expanded in z around 0 67.9%
Final simplification73.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -65.0) t (if (<= z 2.05e+62) (+ x (/ (- t x) (/ a y))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -65.0) {
tmp = t;
} else if (z <= 2.05e+62) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = 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 <= (-65.0d0)) then
tmp = t
else if (z <= 2.05d+62) then
tmp = x + ((t - x) / (a / y))
else
tmp = 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 <= -65.0) {
tmp = t;
} else if (z <= 2.05e+62) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -65.0: tmp = t elif z <= 2.05e+62: tmp = x + ((t - x) / (a / y)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -65.0) tmp = t; elseif (z <= 2.05e+62) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -65.0) tmp = t; elseif (z <= 2.05e+62) tmp = x + ((t - x) / (a / y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -65.0], t, If[LessEqual[z, 2.05e+62], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -65:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+62}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -65 or 2.04999999999999992e62 < z Initial program 46.6%
+-commutative46.6%
*-commutative46.6%
associate-/l*75.8%
fma-define75.8%
Simplified75.8%
Taylor expanded in z around -inf 56.7%
Taylor expanded in z around inf 48.6%
if -65 < z < 2.04999999999999992e62Initial program 91.8%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in y around 0 87.8%
mul-1-neg87.8%
associate-/l*83.9%
distribute-lft-neg-out83.9%
+-commutative83.9%
div-sub85.4%
distribute-rgt-out90.1%
sub-neg90.1%
associate-/r/95.8%
Simplified95.8%
Taylor expanded in z around 0 72.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -190.0) t (if (<= z 9.5e+66) (+ x (* y (/ (- t x) a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -190.0) {
tmp = t;
} else if (z <= 9.5e+66) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = 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 <= (-190.0d0)) then
tmp = t
else if (z <= 9.5d+66) then
tmp = x + (y * ((t - x) / a))
else
tmp = 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 <= -190.0) {
tmp = t;
} else if (z <= 9.5e+66) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -190.0: tmp = t elif z <= 9.5e+66: tmp = x + (y * ((t - x) / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -190.0) tmp = t; elseif (z <= 9.5e+66) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -190.0) tmp = t; elseif (z <= 9.5e+66) tmp = x + (y * ((t - x) / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -190.0], t, If[LessEqual[z, 9.5e+66], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -190:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+66}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -190 or 9.50000000000000051e66 < z Initial program 46.6%
+-commutative46.6%
*-commutative46.6%
associate-/l*75.8%
fma-define75.8%
Simplified75.8%
Taylor expanded in z around -inf 56.7%
Taylor expanded in z around inf 48.6%
if -190 < z < 9.50000000000000051e66Initial program 91.8%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in z around 0 68.8%
associate-/l*70.6%
Simplified70.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -260.0) t (if (<= z 2.1e+67) (+ x (* t (/ y (- a z)))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -260.0) {
tmp = t;
} else if (z <= 2.1e+67) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = 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 <= (-260.0d0)) then
tmp = t
else if (z <= 2.1d+67) then
tmp = x + (t * (y / (a - z)))
else
tmp = 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 <= -260.0) {
tmp = t;
} else if (z <= 2.1e+67) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -260.0: tmp = t elif z <= 2.1e+67: tmp = x + (t * (y / (a - z))) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -260.0) tmp = t; elseif (z <= 2.1e+67) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -260.0) tmp = t; elseif (z <= 2.1e+67) tmp = x + (t * (y / (a - z))); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -260.0], t, If[LessEqual[z, 2.1e+67], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -260:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+67}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -260 or 2.1000000000000001e67 < z Initial program 46.6%
+-commutative46.6%
*-commutative46.6%
associate-/l*75.8%
fma-define75.8%
Simplified75.8%
Taylor expanded in z around -inf 56.7%
Taylor expanded in z around inf 48.6%
if -260 < z < 2.1000000000000001e67Initial program 91.8%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in y around inf 79.9%
associate-*r/80.5%
Simplified80.5%
Taylor expanded in t around inf 57.8%
associate-/l*60.3%
Simplified60.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.6e+116) (not (<= y 6.8e+58))) (* y (/ (- t x) a)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.6e+116) || !(y <= 6.8e+58)) {
tmp = y * ((t - x) / a);
} else {
tmp = x + 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 ((y <= (-1.6d+116)) .or. (.not. (y <= 6.8d+58))) then
tmp = y * ((t - x) / a)
else
tmp = x + t
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.6e+116) || !(y <= 6.8e+58)) {
tmp = y * ((t - x) / a);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.6e+116) or not (y <= 6.8e+58): tmp = y * ((t - x) / a) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.6e+116) || !(y <= 6.8e+58)) tmp = Float64(y * Float64(Float64(t - x) / a)); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.6e+116) || ~((y <= 6.8e+58))) tmp = y * ((t - x) / a); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.6e+116], N[Not[LessEqual[y, 6.8e+58]], $MachinePrecision]], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+116} \lor \neg \left(y \leq 6.8 \cdot 10^{+58}\right):\\
\;\;\;\;y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -1.6e116 or 6.8000000000000001e58 < y Initial program 82.0%
+-commutative82.0%
*-commutative82.0%
associate-/l*98.6%
fma-define98.6%
Simplified98.6%
Taylor expanded in y around inf 80.7%
Taylor expanded in a around inf 58.2%
if -1.6e116 < y < 6.8000000000000001e58Initial program 68.1%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in t around inf 65.5%
associate-/l*73.9%
Simplified73.9%
Taylor expanded in z around inf 45.3%
Final simplification49.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -92.0) t (if (<= z 5.5e+61) (- x (* x (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -92.0) {
tmp = t;
} else if (z <= 5.5e+61) {
tmp = x - (x * (y / a));
} else {
tmp = 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 <= (-92.0d0)) then
tmp = t
else if (z <= 5.5d+61) then
tmp = x - (x * (y / a))
else
tmp = 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 <= -92.0) {
tmp = t;
} else if (z <= 5.5e+61) {
tmp = x - (x * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -92.0: tmp = t elif z <= 5.5e+61: tmp = x - (x * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -92.0) tmp = t; elseif (z <= 5.5e+61) tmp = Float64(x - Float64(x * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -92.0) tmp = t; elseif (z <= 5.5e+61) tmp = x - (x * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -92.0], t, If[LessEqual[z, 5.5e+61], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -92:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+61}:\\
\;\;\;\;x - x \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -92 or 5.50000000000000036e61 < z Initial program 46.6%
+-commutative46.6%
*-commutative46.6%
associate-/l*75.8%
fma-define75.8%
Simplified75.8%
Taylor expanded in z around -inf 56.7%
Taylor expanded in z around inf 48.6%
if -92 < z < 5.50000000000000036e61Initial program 91.8%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in y around inf 79.9%
associate-*r/80.5%
Simplified80.5%
Taylor expanded in t around 0 59.2%
associate-*r/59.2%
associate-*r*59.2%
mul-1-neg59.2%
Simplified59.2%
Taylor expanded in a around inf 54.0%
mul-1-neg54.0%
unsub-neg54.0%
associate-/l*56.5%
Simplified56.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -65.0) t (if (<= z 1.5e-19) (+ x (/ (* y t) a)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -65.0) {
tmp = t;
} else if (z <= 1.5e-19) {
tmp = x + ((y * t) / a);
} else {
tmp = 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 <= (-65.0d0)) then
tmp = t
else if (z <= 1.5d-19) then
tmp = x + ((y * t) / a)
else
tmp = 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 <= -65.0) {
tmp = t;
} else if (z <= 1.5e-19) {
tmp = x + ((y * t) / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -65.0: tmp = t elif z <= 1.5e-19: tmp = x + ((y * t) / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -65.0) tmp = t; elseif (z <= 1.5e-19) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -65.0) tmp = t; elseif (z <= 1.5e-19) tmp = x + ((y * t) / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -65.0], t, If[LessEqual[z, 1.5e-19], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -65:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -65 or 1.49999999999999996e-19 < z Initial program 52.3%
+-commutative52.3%
*-commutative52.3%
associate-/l*77.9%
fma-define77.9%
Simplified77.9%
Taylor expanded in z around -inf 54.6%
Taylor expanded in z around inf 46.4%
if -65 < z < 1.49999999999999996e-19Initial program 92.9%
associate-/l*90.8%
Simplified90.8%
Taylor expanded in t around inf 70.1%
associate-/l*73.0%
Simplified73.0%
Taylor expanded in z around 0 57.9%
Final simplification52.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -3.6e+116) (* y (/ (- t x) a)) (if (<= y 6.8e+58) (+ x t) (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.6e+116) {
tmp = y * ((t - x) / a);
} else if (y <= 6.8e+58) {
tmp = x + t;
} else {
tmp = (t - x) * (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 (y <= (-3.6d+116)) then
tmp = y * ((t - x) / a)
else if (y <= 6.8d+58) then
tmp = x + t
else
tmp = (t - x) * (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 (y <= -3.6e+116) {
tmp = y * ((t - x) / a);
} else if (y <= 6.8e+58) {
tmp = x + t;
} else {
tmp = (t - x) * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -3.6e+116: tmp = y * ((t - x) / a) elif y <= 6.8e+58: tmp = x + t else: tmp = (t - x) * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -3.6e+116) tmp = Float64(y * Float64(Float64(t - x) / a)); elseif (y <= 6.8e+58) tmp = Float64(x + t); else tmp = Float64(Float64(t - x) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -3.6e+116) tmp = y * ((t - x) / a); elseif (y <= 6.8e+58) tmp = x + t; else tmp = (t - x) * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -3.6e+116], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+58], N[(x + t), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+116}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+58}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -3.59999999999999971e116Initial program 97.2%
+-commutative97.2%
*-commutative97.2%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in y around inf 94.0%
Taylor expanded in a around inf 72.2%
if -3.59999999999999971e116 < y < 6.8000000000000001e58Initial program 68.1%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in t around inf 65.5%
associate-/l*73.9%
Simplified73.9%
Taylor expanded in z around inf 45.3%
if 6.8000000000000001e58 < y Initial program 72.6%
+-commutative72.6%
*-commutative72.6%
associate-/l*97.9%
fma-define97.8%
Simplified97.8%
Taylor expanded in y around inf 72.5%
Taylor expanded in a around inf 49.6%
Taylor expanded in t around 0 37.4%
+-commutative37.4%
associate-/l*42.3%
mul-1-neg42.3%
associate-*r/42.0%
distribute-lft-neg-in42.0%
distribute-rgt-out52.9%
sub-neg52.9%
Simplified52.9%
Final simplification50.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -42.0) (not (<= y 9.2e+64))) (* x (/ y z)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -42.0) || !(y <= 9.2e+64)) {
tmp = x * (y / z);
} else {
tmp = x + 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 ((y <= (-42.0d0)) .or. (.not. (y <= 9.2d+64))) then
tmp = x * (y / z)
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -42.0) || !(y <= 9.2e+64)) {
tmp = x * (y / z);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -42.0) or not (y <= 9.2e+64): tmp = x * (y / z) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -42.0) || !(y <= 9.2e+64)) tmp = Float64(x * Float64(y / z)); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -42.0) || ~((y <= 9.2e+64))) tmp = x * (y / z); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -42.0], N[Not[LessEqual[y, 9.2e+64]], $MachinePrecision]], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -42 \lor \neg \left(y \leq 9.2 \cdot 10^{+64}\right):\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -42 or 9.2e64 < y Initial program 76.7%
+-commutative76.7%
*-commutative76.7%
associate-/l*93.6%
fma-define93.6%
Simplified93.6%
Taylor expanded in y around inf 75.9%
Taylor expanded in a around 0 50.4%
distribute-lft-out--50.4%
div-sub53.1%
associate-*r/53.1%
neg-mul-153.1%
Simplified53.1%
Taylor expanded in t around 0 35.4%
associate-/l*40.8%
Simplified40.8%
if -42 < y < 9.2e64Initial program 70.0%
associate-/l*75.0%
Simplified75.0%
Taylor expanded in t around inf 69.4%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in z around inf 47.8%
Final simplification44.7%
(FPCore (x y z t a) :precision binary64 (if (<= y -43.0) (/ x (/ z y)) (if (<= y 1e+64) (+ x t) (* x (/ y z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -43.0) {
tmp = x / (z / y);
} else if (y <= 1e+64) {
tmp = x + t;
} else {
tmp = x * (y / 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 (y <= (-43.0d0)) then
tmp = x / (z / y)
else if (y <= 1d+64) then
tmp = x + t
else
tmp = x * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -43.0) {
tmp = x / (z / y);
} else if (y <= 1e+64) {
tmp = x + t;
} else {
tmp = x * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -43.0: tmp = x / (z / y) elif y <= 1e+64: tmp = x + t else: tmp = x * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -43.0) tmp = Float64(x / Float64(z / y)); elseif (y <= 1e+64) tmp = Float64(x + t); else tmp = Float64(x * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -43.0) tmp = x / (z / y); elseif (y <= 1e+64) tmp = x + t; else tmp = x * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -43.0], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+64], N[(x + t), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -43:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 10^{+64}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -43Initial program 81.5%
+-commutative81.5%
*-commutative81.5%
associate-/l*89.8%
fma-define89.8%
Simplified89.8%
Taylor expanded in y around inf 78.3%
Taylor expanded in a around 0 52.6%
distribute-lft-out--52.6%
div-sub54.4%
associate-*r/54.4%
neg-mul-154.4%
Simplified54.4%
Taylor expanded in t around 0 39.8%
associate-/l*43.7%
Simplified43.7%
clear-num43.7%
un-div-inv43.7%
Applied egg-rr43.7%
if -43 < y < 1.00000000000000002e64Initial program 70.0%
associate-/l*75.0%
Simplified75.0%
Taylor expanded in t around inf 69.4%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in z around inf 47.8%
if 1.00000000000000002e64 < y Initial program 71.5%
+-commutative71.5%
*-commutative71.5%
associate-/l*97.8%
fma-define97.8%
Simplified97.8%
Taylor expanded in y around inf 73.3%
Taylor expanded in a around 0 47.9%
distribute-lft-out--47.9%
div-sub51.7%
associate-*r/51.7%
neg-mul-151.7%
Simplified51.7%
Taylor expanded in t around 0 30.6%
associate-/l*37.6%
Simplified37.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.5e+48) x (if (<= a 7e-41) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.5e+48) {
tmp = x;
} else if (a <= 7e-41) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.5d+48)) then
tmp = x
else if (a <= 7d-41) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.5e+48) {
tmp = x;
} else if (a <= 7e-41) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.5e+48: tmp = x elif a <= 7e-41: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.5e+48) tmp = x; elseif (a <= 7e-41) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.5e+48) tmp = x; elseif (a <= 7e-41) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.5e+48], x, If[LessEqual[a, 7e-41], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{+48}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-41}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.4999999999999997e48 or 6.9999999999999999e-41 < a Initial program 74.4%
+-commutative74.4%
*-commutative74.4%
associate-/l*95.6%
fma-define95.6%
Simplified95.6%
Taylor expanded in a around inf 50.9%
if -3.4999999999999997e48 < a < 6.9999999999999999e-41Initial program 71.7%
+-commutative71.7%
*-commutative71.7%
associate-/l*80.4%
fma-define80.4%
Simplified80.4%
Taylor expanded in z around -inf 61.8%
Taylor expanded in z around inf 38.8%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return 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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 72.9%
+-commutative72.9%
*-commutative72.9%
associate-/l*87.3%
fma-define87.3%
Simplified87.3%
Taylor expanded in z around -inf 37.3%
Taylor expanded in z around inf 26.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} 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 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
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 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024144
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))