
(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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -2e-276)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= t_1 0.0)
(+ t (* (- y a) (/ x z)))
(+ x (/ (- t x) (/ (- a z) (- y 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 <= -2e-276) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (t_1 <= 0.0) {
tmp = t + ((y - a) * (x / z));
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= -2e-276) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(y - a) * Float64(x / z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); end return 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]}, If[LessEqual[t$95$1, -2e-276], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-276}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-276Initial program 84.6%
+-commutative84.6%
remove-double-neg84.6%
unsub-neg84.6%
*-commutative84.6%
associate-*l/72.0%
associate-/l*93.3%
fma-neg93.3%
remove-double-neg93.3%
Simplified93.3%
if -2e-276 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.8%
Taylor expanded in z around inf 90.0%
associate--l+90.0%
distribute-lft-out--90.0%
div-sub90.0%
mul-1-neg90.0%
unsub-neg90.0%
div-sub90.0%
associate-/l*96.5%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
associate-*r/99.8%
neg-mul-199.8%
Simplified99.8%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.2%
*-commutative90.2%
associate-*l/79.9%
associate-*r/95.9%
clear-num95.9%
un-div-inv96.0%
Applied egg-rr96.0%
Final simplification95.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 (- INFINITY))
(+ x (/ (- t x) (/ (- a z) y)))
(if (or (<= t_1 -1e-220) (not (<= t_1 1e-308)))
t_1
(+ t (* (- y a) (/ x 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 <= -((double) INFINITY)) {
tmp = x + ((t - x) / ((a - z) / y));
} else if ((t_1 <= -1e-220) || !(t_1 <= 1e-308)) {
tmp = t_1;
} else {
tmp = t + ((y - a) * (x / z));
}
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 tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x + ((t - x) / ((a - z) / y));
} else if ((t_1 <= -1e-220) || !(t_1 <= 1e-308)) {
tmp = t_1;
} else {
tmp = t + ((y - a) * (x / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_1 <= -math.inf: tmp = x + ((t - x) / ((a - z) / y)) elif (t_1 <= -1e-220) or not (t_1 <= 1e-308): tmp = t_1 else: tmp = t + ((y - a) * (x / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))); elseif ((t_1 <= -1e-220) || !(t_1 <= 1e-308)) tmp = t_1; else tmp = Float64(t + Float64(Float64(y - a) * Float64(x / 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 <= -Inf) tmp = x + ((t - x) / ((a - z) / y)); elseif ((t_1 <= -1e-220) || ~((t_1 <= 1e-308))) tmp = t_1; else tmp = t + ((y - a) * (x / z)); 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, -1e-220], N[Not[LessEqual[t$95$1, 1e-308]], $MachinePrecision]], t$95$1, N[(t + N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-220} \lor \neg \left(t\_1 \leq 10^{-308}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -inf.0Initial program 55.7%
*-commutative55.7%
associate-*l/90.4%
associate-*r/90.7%
clear-num90.6%
un-div-inv90.7%
Applied egg-rr90.7%
Taylor expanded in y around inf 81.5%
if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.99999999999999992e-221 or 9.9999999999999991e-309 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.7%
if -9.99999999999999992e-221 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.9999999999999991e-309Initial program 4.0%
Taylor expanded in z around inf 90.9%
associate--l+90.9%
distribute-lft-out--90.9%
div-sub90.9%
mul-1-neg90.9%
unsub-neg90.9%
div-sub90.9%
associate-/l*93.9%
associate-/l*96.9%
distribute-rgt-out--96.9%
Simplified96.9%
Taylor expanded in t around 0 96.9%
associate-*r/96.9%
neg-mul-196.9%
Simplified96.9%
Final simplification91.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-276) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (* (- y a) (/ x 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 <= -2e-276) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + ((y - a) * (x / 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 <= (-2d-276)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + ((y - a) * (x / 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 <= -2e-276) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + ((y - a) * (x / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-276) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + ((y - a) * (x / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-276) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t + Float64(Float64(y - a) * Float64(x / 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 <= -2e-276) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + ((y - a) * (x / z)); 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]}, If[Or[LessEqual[t$95$1, -2e-276], 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[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-276} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-276 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 87.2%
*-commutative87.2%
associate-*l/75.7%
associate-*r/94.5%
clear-num94.5%
un-div-inv94.5%
Applied egg-rr94.5%
if -2e-276 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.8%
Taylor expanded in z around inf 90.0%
associate--l+90.0%
distribute-lft-out--90.0%
div-sub90.0%
mul-1-neg90.0%
unsub-neg90.0%
div-sub90.0%
associate-/l*96.5%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
associate-*r/99.8%
neg-mul-199.8%
Simplified99.8%
Final simplification95.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ (- y a) z))))
(if (<= z -2e+115)
t
(if (<= z -8.5e+66)
t_1
(if (<= z -5.8e-128)
(* x (- 1.0 (/ y a)))
(if (<= z 1.1e+90)
(+ x (* t (/ y a)))
(if (<= z 2.8e+190)
(+ t (/ (* t a) z))
(if (<= z 2.25e+239) t_1 t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * ((y - a) / z);
double tmp;
if (z <= -2e+115) {
tmp = t;
} else if (z <= -8.5e+66) {
tmp = t_1;
} else if (z <= -5.8e-128) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.1e+90) {
tmp = x + (t * (y / a));
} else if (z <= 2.8e+190) {
tmp = t + ((t * a) / z);
} else if (z <= 2.25e+239) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * ((y - a) / z)
if (z <= (-2d+115)) then
tmp = t
else if (z <= (-8.5d+66)) then
tmp = t_1
else if (z <= (-5.8d-128)) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1.1d+90) then
tmp = x + (t * (y / a))
else if (z <= 2.8d+190) then
tmp = t + ((t * a) / z)
else if (z <= 2.25d+239) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * ((y - a) / z);
double tmp;
if (z <= -2e+115) {
tmp = t;
} else if (z <= -8.5e+66) {
tmp = t_1;
} else if (z <= -5.8e-128) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.1e+90) {
tmp = x + (t * (y / a));
} else if (z <= 2.8e+190) {
tmp = t + ((t * a) / z);
} else if (z <= 2.25e+239) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * ((y - a) / z) tmp = 0 if z <= -2e+115: tmp = t elif z <= -8.5e+66: tmp = t_1 elif z <= -5.8e-128: tmp = x * (1.0 - (y / a)) elif z <= 1.1e+90: tmp = x + (t * (y / a)) elif z <= 2.8e+190: tmp = t + ((t * a) / z) elif z <= 2.25e+239: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(Float64(y - a) / z)) tmp = 0.0 if (z <= -2e+115) tmp = t; elseif (z <= -8.5e+66) tmp = t_1; elseif (z <= -5.8e-128) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1.1e+90) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 2.8e+190) tmp = Float64(t + Float64(Float64(t * a) / z)); elseif (z <= 2.25e+239) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * ((y - a) / z); tmp = 0.0; if (z <= -2e+115) tmp = t; elseif (z <= -8.5e+66) tmp = t_1; elseif (z <= -5.8e-128) tmp = x * (1.0 - (y / a)); elseif (z <= 1.1e+90) tmp = x + (t * (y / a)); elseif (z <= 2.8e+190) tmp = t + ((t * a) / z); elseif (z <= 2.25e+239) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+115], t, If[LessEqual[z, -8.5e+66], t$95$1, If[LessEqual[z, -5.8e-128], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+90], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+190], N[(t + N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+239], t$95$1, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y - a}{z}\\
\mathbf{if}\;z \leq -2 \cdot 10^{+115}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{-128}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+90}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+190}:\\
\;\;\;\;t + \frac{t \cdot a}{z}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+239}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2e115 or 2.2499999999999999e239 < z Initial program 60.4%
Taylor expanded in z around inf 56.8%
if -2e115 < z < -8.5000000000000004e66 or 2.79999999999999997e190 < z < 2.2499999999999999e239Initial program 53.5%
Taylor expanded in z around inf 60.4%
associate--l+60.4%
distribute-lft-out--60.4%
div-sub60.4%
mul-1-neg60.4%
unsub-neg60.4%
div-sub60.4%
associate-/l*69.2%
associate-/l*74.1%
distribute-rgt-out--74.0%
Simplified74.0%
Taylor expanded in t around 0 46.8%
associate-/l*60.1%
Simplified60.1%
if -8.5000000000000004e66 < z < -5.8000000000000001e-128Initial program 89.0%
Taylor expanded in z around 0 43.1%
associate-/l*51.2%
Simplified51.2%
Taylor expanded in x around inf 47.8%
mul-1-neg47.8%
unsub-neg47.8%
Simplified47.8%
if -5.8000000000000001e-128 < z < 1.09999999999999995e90Initial program 83.6%
Taylor expanded in z around 0 65.0%
associate-/l*66.6%
Simplified66.6%
Taylor expanded in t around inf 60.9%
associate-/l*63.5%
Simplified63.5%
if 1.09999999999999995e90 < z < 2.79999999999999997e190Initial program 91.7%
Taylor expanded in z around -inf 59.0%
Taylor expanded in y around 0 50.7%
Taylor expanded in t around inf 50.6%
Final simplification57.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.8e+115)
t
(if (<= z -4.3e+67)
(/ (* x (- y a)) z)
(if (<= z -1.1e-128)
(* x (- 1.0 (/ y a)))
(if (<= z 1.4e+91)
(+ x (* t (/ y a)))
(if (<= z 2.1e+190)
(+ t (/ (* t a) z))
(if (<= z 2.25e+239) (* x (/ (- y a) z)) t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+115) {
tmp = t;
} else if (z <= -4.3e+67) {
tmp = (x * (y - a)) / z;
} else if (z <= -1.1e-128) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.4e+91) {
tmp = x + (t * (y / a));
} else if (z <= 2.1e+190) {
tmp = t + ((t * a) / z);
} else if (z <= 2.25e+239) {
tmp = x * ((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 <= (-1.8d+115)) then
tmp = t
else if (z <= (-4.3d+67)) then
tmp = (x * (y - a)) / z
else if (z <= (-1.1d-128)) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1.4d+91) then
tmp = x + (t * (y / a))
else if (z <= 2.1d+190) then
tmp = t + ((t * a) / z)
else if (z <= 2.25d+239) then
tmp = x * ((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 <= -1.8e+115) {
tmp = t;
} else if (z <= -4.3e+67) {
tmp = (x * (y - a)) / z;
} else if (z <= -1.1e-128) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.4e+91) {
tmp = x + (t * (y / a));
} else if (z <= 2.1e+190) {
tmp = t + ((t * a) / z);
} else if (z <= 2.25e+239) {
tmp = x * ((y - a) / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.8e+115: tmp = t elif z <= -4.3e+67: tmp = (x * (y - a)) / z elif z <= -1.1e-128: tmp = x * (1.0 - (y / a)) elif z <= 1.4e+91: tmp = x + (t * (y / a)) elif z <= 2.1e+190: tmp = t + ((t * a) / z) elif z <= 2.25e+239: tmp = x * ((y - a) / z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.8e+115) tmp = t; elseif (z <= -4.3e+67) tmp = Float64(Float64(x * Float64(y - a)) / z); elseif (z <= -1.1e-128) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1.4e+91) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 2.1e+190) tmp = Float64(t + Float64(Float64(t * a) / z)); elseif (z <= 2.25e+239) tmp = Float64(x * Float64(Float64(y - a) / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.8e+115) tmp = t; elseif (z <= -4.3e+67) tmp = (x * (y - a)) / z; elseif (z <= -1.1e-128) tmp = x * (1.0 - (y / a)); elseif (z <= 1.4e+91) tmp = x + (t * (y / a)); elseif (z <= 2.1e+190) tmp = t + ((t * a) / z); elseif (z <= 2.25e+239) tmp = x * ((y - a) / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e+115], t, If[LessEqual[z, -4.3e+67], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -1.1e-128], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+91], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+190], N[(t + N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+239], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+115}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{+67}:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-128}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+91}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+190}:\\
\;\;\;\;t + \frac{t \cdot a}{z}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+239}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.8e115 or 2.2499999999999999e239 < z Initial program 60.4%
Taylor expanded in z around inf 56.8%
if -1.8e115 < z < -4.3000000000000001e67Initial program 62.2%
Taylor expanded in z around inf 57.8%
associate--l+57.8%
distribute-lft-out--57.8%
div-sub57.8%
mul-1-neg57.8%
unsub-neg57.8%
div-sub57.8%
associate-/l*57.9%
associate-/l*65.6%
distribute-rgt-out--65.6%
Simplified65.6%
Taylor expanded in t around 0 50.8%
if -4.3000000000000001e67 < z < -1.10000000000000005e-128Initial program 89.0%
Taylor expanded in z around 0 43.1%
associate-/l*51.2%
Simplified51.2%
Taylor expanded in x around inf 47.8%
mul-1-neg47.8%
unsub-neg47.8%
Simplified47.8%
if -1.10000000000000005e-128 < z < 1.3999999999999999e91Initial program 83.6%
Taylor expanded in z around 0 65.0%
associate-/l*66.6%
Simplified66.6%
Taylor expanded in t around inf 60.9%
associate-/l*63.5%
Simplified63.5%
if 1.3999999999999999e91 < z < 2.1000000000000001e190Initial program 91.7%
Taylor expanded in z around -inf 59.0%
Taylor expanded in y around 0 50.7%
Taylor expanded in t around inf 50.6%
if 2.1000000000000001e190 < z < 2.2499999999999999e239Initial program 39.4%
Taylor expanded in z around inf 64.6%
associate--l+64.6%
distribute-lft-out--64.6%
div-sub64.8%
mul-1-neg64.8%
unsub-neg64.8%
div-sub64.6%
associate-/l*87.7%
associate-/l*88.0%
distribute-rgt-out--87.8%
Simplified87.8%
Taylor expanded in t around 0 40.2%
associate-/l*75.2%
Simplified75.2%
Final simplification57.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ (- y a) z))))
(if (<= z -6.5e+118)
t
(if (<= z -1.35e+63)
t_1
(if (<= z 8e+90)
(* x (- 1.0 (/ y a)))
(if (<= z 3.8e+190)
(+ t (/ (* t a) z))
(if (<= z 2.25e+239) t_1 t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * ((y - a) / z);
double tmp;
if (z <= -6.5e+118) {
tmp = t;
} else if (z <= -1.35e+63) {
tmp = t_1;
} else if (z <= 8e+90) {
tmp = x * (1.0 - (y / a));
} else if (z <= 3.8e+190) {
tmp = t + ((t * a) / z);
} else if (z <= 2.25e+239) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * ((y - a) / z)
if (z <= (-6.5d+118)) then
tmp = t
else if (z <= (-1.35d+63)) then
tmp = t_1
else if (z <= 8d+90) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 3.8d+190) then
tmp = t + ((t * a) / z)
else if (z <= 2.25d+239) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * ((y - a) / z);
double tmp;
if (z <= -6.5e+118) {
tmp = t;
} else if (z <= -1.35e+63) {
tmp = t_1;
} else if (z <= 8e+90) {
tmp = x * (1.0 - (y / a));
} else if (z <= 3.8e+190) {
tmp = t + ((t * a) / z);
} else if (z <= 2.25e+239) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * ((y - a) / z) tmp = 0 if z <= -6.5e+118: tmp = t elif z <= -1.35e+63: tmp = t_1 elif z <= 8e+90: tmp = x * (1.0 - (y / a)) elif z <= 3.8e+190: tmp = t + ((t * a) / z) elif z <= 2.25e+239: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(Float64(y - a) / z)) tmp = 0.0 if (z <= -6.5e+118) tmp = t; elseif (z <= -1.35e+63) tmp = t_1; elseif (z <= 8e+90) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 3.8e+190) tmp = Float64(t + Float64(Float64(t * a) / z)); elseif (z <= 2.25e+239) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * ((y - a) / z); tmp = 0.0; if (z <= -6.5e+118) tmp = t; elseif (z <= -1.35e+63) tmp = t_1; elseif (z <= 8e+90) tmp = x * (1.0 - (y / a)); elseif (z <= 3.8e+190) tmp = t + ((t * a) / z); elseif (z <= 2.25e+239) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+118], t, If[LessEqual[z, -1.35e+63], t$95$1, If[LessEqual[z, 8e+90], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+190], N[(t + N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+239], t$95$1, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y - a}{z}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+118}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+90}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+190}:\\
\;\;\;\;t + \frac{t \cdot a}{z}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+239}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.5e118 or 2.2499999999999999e239 < z Initial program 60.4%
Taylor expanded in z around inf 56.8%
if -6.5e118 < z < -1.35000000000000009e63 or 3.79999999999999964e190 < z < 2.2499999999999999e239Initial program 53.5%
Taylor expanded in z around inf 60.4%
associate--l+60.4%
distribute-lft-out--60.4%
div-sub60.4%
mul-1-neg60.4%
unsub-neg60.4%
div-sub60.4%
associate-/l*69.2%
associate-/l*74.1%
distribute-rgt-out--74.0%
Simplified74.0%
Taylor expanded in t around 0 46.8%
associate-/l*60.1%
Simplified60.1%
if -1.35000000000000009e63 < z < 7.99999999999999973e90Initial program 85.1%
Taylor expanded in z around 0 58.8%
associate-/l*62.2%
Simplified62.2%
Taylor expanded in x around inf 52.7%
mul-1-neg52.7%
unsub-neg52.7%
Simplified52.7%
if 7.99999999999999973e90 < z < 3.79999999999999964e190Initial program 91.7%
Taylor expanded in z around -inf 59.0%
Taylor expanded in y around 0 50.7%
Taylor expanded in t around inf 50.6%
Final simplification54.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* t (/ y a)))))
(if (<= a -6.5e+106)
t_2
(if (<= a -3.4e-273)
t_1
(if (<= a -2e-297) (* y (/ (- x t) z)) (if (<= a 4.2e+46) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x + (t * (y / a));
double tmp;
if (a <= -6.5e+106) {
tmp = t_2;
} else if (a <= -3.4e-273) {
tmp = t_1;
} else if (a <= -2e-297) {
tmp = y * ((x - t) / z);
} else if (a <= 4.2e+46) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x + (t * (y / a))
if (a <= (-6.5d+106)) then
tmp = t_2
else if (a <= (-3.4d-273)) then
tmp = t_1
else if (a <= (-2d-297)) then
tmp = y * ((x - t) / z)
else if (a <= 4.2d+46) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x + (t * (y / a));
double tmp;
if (a <= -6.5e+106) {
tmp = t_2;
} else if (a <= -3.4e-273) {
tmp = t_1;
} else if (a <= -2e-297) {
tmp = y * ((x - t) / z);
} else if (a <= 4.2e+46) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x + (t * (y / a)) tmp = 0 if a <= -6.5e+106: tmp = t_2 elif a <= -3.4e-273: tmp = t_1 elif a <= -2e-297: tmp = y * ((x - t) / z) elif a <= 4.2e+46: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (a <= -6.5e+106) tmp = t_2; elseif (a <= -3.4e-273) tmp = t_1; elseif (a <= -2e-297) tmp = Float64(y * Float64(Float64(x - t) / z)); elseif (a <= 4.2e+46) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x + (t * (y / a)); tmp = 0.0; if (a <= -6.5e+106) tmp = t_2; elseif (a <= -3.4e-273) tmp = t_1; elseif (a <= -2e-297) tmp = y * ((x - t) / z); elseif (a <= 4.2e+46) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.5e+106], t$95$2, If[LessEqual[a, -3.4e-273], t$95$1, If[LessEqual[a, -2e-297], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e+46], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -6.5 \cdot 10^{+106}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2 \cdot 10^{-297}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -6.5000000000000003e106 or 4.2e46 < a Initial program 90.3%
Taylor expanded in z around 0 60.0%
associate-/l*72.8%
Simplified72.8%
Taylor expanded in t around inf 57.0%
associate-/l*65.0%
Simplified65.0%
if -6.5000000000000003e106 < a < -3.39999999999999991e-273 or -2.00000000000000008e-297 < a < 4.2e46Initial program 70.3%
Taylor expanded in x around 0 51.0%
associate-/l*64.1%
Simplified64.1%
if -3.39999999999999991e-273 < a < -2.00000000000000008e-297Initial program 41.8%
Taylor expanded in z around inf 73.0%
associate--l+73.0%
distribute-lft-out--73.0%
div-sub73.0%
mul-1-neg73.0%
unsub-neg73.0%
div-sub73.0%
associate-/l*85.7%
associate-/l*85.1%
distribute-rgt-out--85.7%
Simplified85.7%
Taylor expanded in y around inf 74.3%
div-sub74.3%
Simplified74.3%
Final simplification64.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* y (/ (- t x) a)))))
(if (<= a -2.5e+111)
t_2
(if (<= a -1.65e-273)
t_1
(if (<= a -5.8e-306) (* y (/ (- x t) z)) (if (<= a 12.5) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x + (y * ((t - x) / a));
double tmp;
if (a <= -2.5e+111) {
tmp = t_2;
} else if (a <= -1.65e-273) {
tmp = t_1;
} else if (a <= -5.8e-306) {
tmp = y * ((x - t) / z);
} else if (a <= 12.5) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x + (y * ((t - x) / a))
if (a <= (-2.5d+111)) then
tmp = t_2
else if (a <= (-1.65d-273)) then
tmp = t_1
else if (a <= (-5.8d-306)) then
tmp = y * ((x - t) / z)
else if (a <= 12.5d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x + (y * ((t - x) / a));
double tmp;
if (a <= -2.5e+111) {
tmp = t_2;
} else if (a <= -1.65e-273) {
tmp = t_1;
} else if (a <= -5.8e-306) {
tmp = y * ((x - t) / z);
} else if (a <= 12.5) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x + (y * ((t - x) / a)) tmp = 0 if a <= -2.5e+111: tmp = t_2 elif a <= -1.65e-273: tmp = t_1 elif a <= -5.8e-306: tmp = y * ((x - t) / z) elif a <= 12.5: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x + Float64(y * Float64(Float64(t - x) / a))) tmp = 0.0 if (a <= -2.5e+111) tmp = t_2; elseif (a <= -1.65e-273) tmp = t_1; elseif (a <= -5.8e-306) tmp = Float64(y * Float64(Float64(x - t) / z)); elseif (a <= 12.5) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x + (y * ((t - x) / a)); tmp = 0.0; if (a <= -2.5e+111) tmp = t_2; elseif (a <= -1.65e-273) tmp = t_1; elseif (a <= -5.8e-306) tmp = y * ((x - t) / z); elseif (a <= 12.5) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.5e+111], t$95$2, If[LessEqual[a, -1.65e-273], t$95$1, If[LessEqual[a, -5.8e-306], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 12.5], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x + y \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.65 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{-306}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{elif}\;a \leq 12.5:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.4999999999999998e111 or 12.5 < a Initial program 91.7%
Taylor expanded in z around 0 61.8%
associate-/l*74.1%
Simplified74.1%
if -2.4999999999999998e111 < a < -1.64999999999999995e-273 or -5.7999999999999998e-306 < a < 12.5Initial program 68.5%
Taylor expanded in x around 0 52.0%
associate-/l*64.2%
Simplified64.2%
if -1.64999999999999995e-273 < a < -5.7999999999999998e-306Initial program 41.8%
Taylor expanded in z around inf 73.0%
associate--l+73.0%
distribute-lft-out--73.0%
div-sub73.0%
mul-1-neg73.0%
unsub-neg73.0%
div-sub73.0%
associate-/l*85.7%
associate-/l*85.1%
distribute-rgt-out--85.7%
Simplified85.7%
Taylor expanded in y around inf 74.3%
div-sub74.3%
Simplified74.3%
Final simplification68.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))) (t_2 (+ x (* t (/ y a)))))
(if (<= a -5.9e+106)
t_2
(if (<= a -1.12e-271)
t_1
(if (<= a -6e-300) (* y (/ (- x t) z)) (if (<= a 1.55e+25) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double t_2 = x + (t * (y / a));
double tmp;
if (a <= -5.9e+106) {
tmp = t_2;
} else if (a <= -1.12e-271) {
tmp = t_1;
} else if (a <= -6e-300) {
tmp = y * ((x - t) / z);
} else if (a <= 1.55e+25) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (1.0d0 - (y / z))
t_2 = x + (t * (y / a))
if (a <= (-5.9d+106)) then
tmp = t_2
else if (a <= (-1.12d-271)) then
tmp = t_1
else if (a <= (-6d-300)) then
tmp = y * ((x - t) / z)
else if (a <= 1.55d+25) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double t_2 = x + (t * (y / a));
double tmp;
if (a <= -5.9e+106) {
tmp = t_2;
} else if (a <= -1.12e-271) {
tmp = t_1;
} else if (a <= -6e-300) {
tmp = y * ((x - t) / z);
} else if (a <= 1.55e+25) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) t_2 = x + (t * (y / a)) tmp = 0 if a <= -5.9e+106: tmp = t_2 elif a <= -1.12e-271: tmp = t_1 elif a <= -6e-300: tmp = y * ((x - t) / z) elif a <= 1.55e+25: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) t_2 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (a <= -5.9e+106) tmp = t_2; elseif (a <= -1.12e-271) tmp = t_1; elseif (a <= -6e-300) tmp = Float64(y * Float64(Float64(x - t) / z)); elseif (a <= 1.55e+25) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); t_2 = x + (t * (y / a)); tmp = 0.0; if (a <= -5.9e+106) tmp = t_2; elseif (a <= -1.12e-271) tmp = t_1; elseif (a <= -6e-300) tmp = y * ((x - t) / z); elseif (a <= 1.55e+25) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.9e+106], t$95$2, If[LessEqual[a, -1.12e-271], t$95$1, If[LessEqual[a, -6e-300], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e+25], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
t_2 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -5.9 \cdot 10^{+106}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.12 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -6 \cdot 10^{-300}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -5.90000000000000027e106 or 1.5499999999999999e25 < a Initial program 90.7%
Taylor expanded in z around 0 60.0%
associate-/l*72.3%
Simplified72.3%
Taylor expanded in t around inf 56.3%
associate-/l*64.0%
Simplified64.0%
if -5.90000000000000027e106 < a < -1.11999999999999997e-271 or -6.00000000000000048e-300 < a < 1.5499999999999999e25Initial program 69.3%
Taylor expanded in x around 0 51.9%
Taylor expanded in a around 0 43.0%
mul-1-neg43.0%
associate-/l*55.3%
distribute-lft-neg-in55.3%
div-sub55.3%
*-inverses55.3%
Simplified55.3%
if -1.11999999999999997e-271 < a < -6.00000000000000048e-300Initial program 41.8%
Taylor expanded in z around inf 73.0%
associate--l+73.0%
distribute-lft-out--73.0%
div-sub73.0%
mul-1-neg73.0%
unsub-neg73.0%
div-sub73.0%
associate-/l*85.7%
associate-/l*85.1%
distribute-rgt-out--85.7%
Simplified85.7%
Taylor expanded in y around inf 74.3%
div-sub74.3%
Simplified74.3%
Final simplification59.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -8.5e+110)
x
(if (<= a -1.15e-288)
t
(if (<= a 1.5e-224) (* t (/ y (- a z))) (if (<= a 1.1e+47) t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.5e+110) {
tmp = x;
} else if (a <= -1.15e-288) {
tmp = t;
} else if (a <= 1.5e-224) {
tmp = t * (y / (a - z));
} else if (a <= 1.1e+47) {
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 <= (-8.5d+110)) then
tmp = x
else if (a <= (-1.15d-288)) then
tmp = t
else if (a <= 1.5d-224) then
tmp = t * (y / (a - z))
else if (a <= 1.1d+47) 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 <= -8.5e+110) {
tmp = x;
} else if (a <= -1.15e-288) {
tmp = t;
} else if (a <= 1.5e-224) {
tmp = t * (y / (a - z));
} else if (a <= 1.1e+47) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8.5e+110: tmp = x elif a <= -1.15e-288: tmp = t elif a <= 1.5e-224: tmp = t * (y / (a - z)) elif a <= 1.1e+47: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8.5e+110) tmp = x; elseif (a <= -1.15e-288) tmp = t; elseif (a <= 1.5e-224) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (a <= 1.1e+47) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -8.5e+110) tmp = x; elseif (a <= -1.15e-288) tmp = t; elseif (a <= 1.5e-224) tmp = t * (y / (a - z)); elseif (a <= 1.1e+47) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.5e+110], x, If[LessEqual[a, -1.15e-288], t, If[LessEqual[a, 1.5e-224], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e+47], t, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{+110}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.15 \cdot 10^{-288}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-224}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{+47}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -8.5000000000000004e110 or 1.1e47 < a Initial program 91.0%
Taylor expanded in a around inf 54.6%
if -8.5000000000000004e110 < a < -1.15e-288 or 1.49999999999999991e-224 < a < 1.1e47Initial program 72.0%
Taylor expanded in z around inf 38.4%
if -1.15e-288 < a < 1.49999999999999991e-224Initial program 52.4%
Taylor expanded in x around 0 55.8%
Taylor expanded in y around inf 39.8%
associate-/l*47.6%
Simplified47.6%
Final simplification45.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.4e+119)
t
(if (<= z -1.25e+68)
(* x (/ (- y a) z))
(if (<= z 2.5e+91) (* x (- 1.0 (/ y a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.4e+119) {
tmp = t;
} else if (z <= -1.25e+68) {
tmp = x * ((y - a) / z);
} else if (z <= 2.5e+91) {
tmp = x * (1.0 - (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 <= (-6.4d+119)) then
tmp = t
else if (z <= (-1.25d+68)) then
tmp = x * ((y - a) / z)
else if (z <= 2.5d+91) then
tmp = x * (1.0d0 - (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 <= -6.4e+119) {
tmp = t;
} else if (z <= -1.25e+68) {
tmp = x * ((y - a) / z);
} else if (z <= 2.5e+91) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.4e+119: tmp = t elif z <= -1.25e+68: tmp = x * ((y - a) / z) elif z <= 2.5e+91: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.4e+119) tmp = t; elseif (z <= -1.25e+68) tmp = Float64(x * Float64(Float64(y - a) / z)); elseif (z <= 2.5e+91) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.4e+119) tmp = t; elseif (z <= -1.25e+68) tmp = x * ((y - a) / z); elseif (z <= 2.5e+91) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.4e+119], t, If[LessEqual[z, -1.25e+68], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+91], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{+119}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{+68}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+91}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.39999999999999979e119 or 2.5000000000000001e91 < z Initial program 67.0%
Taylor expanded in z around inf 51.0%
if -6.39999999999999979e119 < z < -1.2500000000000001e68Initial program 62.2%
Taylor expanded in z around inf 57.8%
associate--l+57.8%
distribute-lft-out--57.8%
div-sub57.8%
mul-1-neg57.8%
unsub-neg57.8%
div-sub57.8%
associate-/l*57.9%
associate-/l*65.6%
distribute-rgt-out--65.6%
Simplified65.6%
Taylor expanded in t around 0 50.8%
associate-/l*50.7%
Simplified50.7%
if -1.2500000000000001e68 < z < 2.5000000000000001e91Initial program 85.1%
Taylor expanded in z around 0 58.8%
associate-/l*62.2%
Simplified62.2%
Taylor expanded in x around inf 52.7%
mul-1-neg52.7%
unsub-neg52.7%
Simplified52.7%
Final simplification52.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.5e-18) (not (<= a 15.0))) (+ x (* (- t x) (/ (- y z) a))) (- t (* (- t x) (/ y z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.5e-18) || !(a <= 15.0)) {
tmp = x + ((t - x) * ((y - z) / a));
} else {
tmp = t - ((t - 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 ((a <= (-1.5d-18)) .or. (.not. (a <= 15.0d0))) then
tmp = x + ((t - x) * ((y - z) / a))
else
tmp = t - ((t - 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 ((a <= -1.5e-18) || !(a <= 15.0)) {
tmp = x + ((t - x) * ((y - z) / a));
} else {
tmp = t - ((t - x) * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.5e-18) or not (a <= 15.0): tmp = x + ((t - x) * ((y - z) / a)) else: tmp = t - ((t - x) * (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.5e-18) || !(a <= 15.0)) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a))); else tmp = Float64(t - Float64(Float64(t - x) * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.5e-18) || ~((a <= 15.0))) tmp = x + ((t - x) * ((y - z) / a)); else tmp = t - ((t - x) * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.5e-18], N[Not[LessEqual[a, 15.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(t - x), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{-18} \lor \neg \left(a \leq 15\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t - \left(t - x\right) \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -1.49999999999999991e-18 or 15 < a Initial program 89.1%
Taylor expanded in a around inf 64.6%
associate-/l*79.6%
Simplified79.6%
if -1.49999999999999991e-18 < a < 15Initial program 65.2%
Taylor expanded in z around inf 77.0%
associate--l+77.0%
distribute-lft-out--77.0%
div-sub77.9%
mul-1-neg77.9%
unsub-neg77.9%
div-sub77.0%
associate-/l*77.5%
associate-/l*74.9%
distribute-rgt-out--78.4%
Simplified78.4%
Taylor expanded in y around inf 72.5%
*-commutative72.5%
associate-/l*78.6%
Simplified78.6%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.6e-35) (+ x (/ (- t x) (/ (- a z) y))) (if (<= a 13.5) (- t (* (- t x) (/ y z))) (+ x (* (- t x) (/ (- y z) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.6e-35) {
tmp = x + ((t - x) / ((a - z) / y));
} else if (a <= 13.5) {
tmp = t - ((t - x) * (y / z));
} else {
tmp = x + ((t - x) * ((y - z) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-6.6d-35)) then
tmp = x + ((t - x) / ((a - z) / y))
else if (a <= 13.5d0) then
tmp = t - ((t - x) * (y / z))
else
tmp = x + ((t - x) * ((y - z) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.6e-35) {
tmp = x + ((t - x) / ((a - z) / y));
} else if (a <= 13.5) {
tmp = t - ((t - x) * (y / z));
} else {
tmp = x + ((t - x) * ((y - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.6e-35: tmp = x + ((t - x) / ((a - z) / y)) elif a <= 13.5: tmp = t - ((t - x) * (y / z)) else: tmp = x + ((t - x) * ((y - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.6e-35) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))); elseif (a <= 13.5) tmp = Float64(t - Float64(Float64(t - x) * Float64(y / z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.6e-35) tmp = x + ((t - x) / ((a - z) / y)); elseif (a <= 13.5) tmp = t - ((t - x) * (y / z)); else tmp = x + ((t - x) * ((y - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.6e-35], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 13.5], N[(t - N[(N[(t - x), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{-35}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\
\mathbf{elif}\;a \leq 13.5:\\
\;\;\;\;t - \left(t - x\right) \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\
\end{array}
\end{array}
if a < -6.6000000000000001e-35Initial program 89.4%
*-commutative89.4%
associate-*l/74.1%
associate-*r/95.9%
clear-num95.9%
un-div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in y around inf 75.8%
if -6.6000000000000001e-35 < a < 13.5Initial program 63.5%
Taylor expanded in z around inf 78.4%
associate--l+78.4%
distribute-lft-out--78.4%
div-sub79.2%
mul-1-neg79.2%
unsub-neg79.2%
div-sub78.4%
associate-/l*78.1%
associate-/l*75.3%
distribute-rgt-out--79.0%
Simplified79.0%
Taylor expanded in y around inf 73.5%
*-commutative73.5%
associate-/l*79.2%
Simplified79.2%
if 13.5 < a Initial program 89.8%
Taylor expanded in a around inf 67.7%
associate-/l*83.7%
Simplified83.7%
Final simplification79.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.2e+110) (not (<= a 15.0))) (+ x (* y (/ (- t x) a))) (- t (* (- t x) (/ y z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.2e+110) || !(a <= 15.0)) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t - ((t - 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 ((a <= (-8.2d+110)) .or. (.not. (a <= 15.0d0))) then
tmp = x + (y * ((t - x) / a))
else
tmp = t - ((t - 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 ((a <= -8.2e+110) || !(a <= 15.0)) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t - ((t - x) * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8.2e+110) or not (a <= 15.0): tmp = x + (y * ((t - x) / a)) else: tmp = t - ((t - x) * (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8.2e+110) || !(a <= 15.0)) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = Float64(t - Float64(Float64(t - x) * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -8.2e+110) || ~((a <= 15.0))) tmp = x + (y * ((t - x) / a)); else tmp = t - ((t - x) * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8.2e+110], N[Not[LessEqual[a, 15.0]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(t - x), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.2 \cdot 10^{+110} \lor \neg \left(a \leq 15\right):\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t - \left(t - x\right) \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -8.1999999999999997e110 or 15 < a Initial program 91.7%
Taylor expanded in z around 0 61.8%
associate-/l*74.1%
Simplified74.1%
if -8.1999999999999997e110 < a < 15Initial program 67.3%
Taylor expanded in z around inf 70.9%
associate--l+70.9%
distribute-lft-out--70.9%
div-sub71.6%
mul-1-neg71.6%
unsub-neg71.6%
div-sub70.9%
associate-/l*71.9%
associate-/l*71.1%
distribute-rgt-out--74.0%
Simplified74.0%
Taylor expanded in y around inf 67.4%
*-commutative67.4%
associate-/l*73.9%
Simplified73.9%
Final simplification74.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.5e+67) t (if (<= z 4.2e+88) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+67) {
tmp = t;
} else if (z <= 4.2e+88) {
tmp = x * (1.0 - (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 <= (-3.5d+67)) then
tmp = t
else if (z <= 4.2d+88) then
tmp = x * (1.0d0 - (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 <= -3.5e+67) {
tmp = t;
} else if (z <= 4.2e+88) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e+67: tmp = t elif z <= 4.2e+88: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e+67) tmp = t; elseif (z <= 4.2e+88) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.5e+67) tmp = t; elseif (z <= 4.2e+88) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e+67], t, If[LessEqual[z, 4.2e+88], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+67}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+88}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.5e67 or 4.2e88 < z Initial program 66.4%
Taylor expanded in z around inf 46.7%
if -3.5e67 < z < 4.2e88Initial program 85.1%
Taylor expanded in z around 0 58.8%
associate-/l*62.2%
Simplified62.2%
Taylor expanded in x around inf 52.7%
mul-1-neg52.7%
unsub-neg52.7%
Simplified52.7%
Final simplification50.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -7.5e+110) x (if (<= a 1.02e+48) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.5e+110) {
tmp = x;
} else if (a <= 1.02e+48) {
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 <= (-7.5d+110)) then
tmp = x
else if (a <= 1.02d+48) 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 <= -7.5e+110) {
tmp = x;
} else if (a <= 1.02e+48) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.5e+110: tmp = x elif a <= 1.02e+48: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.5e+110) tmp = x; elseif (a <= 1.02e+48) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7.5e+110) tmp = x; elseif (a <= 1.02e+48) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.5e+110], x, If[LessEqual[a, 1.02e+48], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{+110}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.02 \cdot 10^{+48}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -7.5e110 or 1.02e48 < a Initial program 91.0%
Taylor expanded in a around inf 54.6%
if -7.5e110 < a < 1.02e48Initial program 69.0%
Taylor expanded in z around inf 36.1%
Final simplification43.5%
(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 77.7%
Taylor expanded in z around inf 24.2%
Final simplification24.2%
herbie shell --seed 2024073
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))