
(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 22 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 (cbrt (- a z)))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z)))))
(t_3 (/ z (- t x))))
(if (<= t_2 -2e-272)
(fma (/ (- y z) (pow t_1 2.0)) (/ (- t x) t_1) x)
(if (<= t_2 0.0)
(+ (- t (/ y t_3)) (/ a t_3))
(+ x (/ (- t x) (/ (- a z) (- y z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = cbrt((a - z));
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double t_3 = z / (t - x);
double tmp;
if (t_2 <= -2e-272) {
tmp = fma(((y - z) / pow(t_1, 2.0)), ((t - x) / t_1), x);
} else if (t_2 <= 0.0) {
tmp = (t - (y / t_3)) + (a / t_3);
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = cbrt(Float64(a - z)) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) t_3 = Float64(z / Float64(t - x)) tmp = 0.0 if (t_2 <= -2e-272) tmp = fma(Float64(Float64(y - z) / (t_1 ^ 2.0)), Float64(Float64(t - x) / t_1), x); elseif (t_2 <= 0.0) tmp = Float64(Float64(t - Float64(y / t_3)) + Float64(a / t_3)); 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[Power[N[(a - z), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-272], N[(N[(N[(y - z), $MachinePrecision] / N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / t$95$1), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(t - N[(y / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$3), $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 := \sqrt[3]{a - z}\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_3 := \frac{z}{t - x}\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{-272}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{{t_1}^{2}}, \frac{t - x}{t_1}, x\right)\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;\left(t - \frac{y}{t_3}\right) + \frac{a}{t_3}\\
\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)))) < -1.99999999999999986e-272Initial program 93.2%
+-commutative93.2%
associate-*r/79.8%
add-cube-cbrt78.9%
times-frac96.1%
fma-def96.1%
pow296.1%
Applied egg-rr96.1%
if -1.99999999999999986e-272 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.4%
*-commutative3.4%
associate-*l/3.0%
associate-*r/3.4%
clear-num3.4%
un-div-inv3.4%
Applied egg-rr3.4%
Taylor expanded in z around inf 85.3%
sub-neg85.3%
+-commutative85.3%
mul-1-neg85.3%
unsub-neg85.3%
associate-/l*97.0%
mul-1-neg97.0%
remove-double-neg97.0%
associate-/l*99.9%
Simplified99.9%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 88.4%
*-commutative88.4%
associate-*l/76.7%
associate-*r/91.8%
clear-num91.7%
un-div-inv92.7%
Applied egg-rr92.7%
Final simplification95.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))) (t_2 (/ z (- t x))))
(if (<= t_1 -2e-272)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= t_1 0.0)
(+ (- t (/ y t_2)) (/ a t_2))
(+ 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 t_2 = z / (t - x);
double tmp;
if (t_1 <= -2e-272) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (t_1 <= 0.0) {
tmp = (t - (y / t_2)) + (a / t_2);
} 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)))) t_2 = Float64(z / Float64(t - x)) tmp = 0.0 if (t_1 <= -2e-272) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); elseif (t_1 <= 0.0) tmp = Float64(Float64(t - Float64(y / t_2)) + Float64(a / t_2)); 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]}, Block[{t$95$2 = N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-272], 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[(N[(t - N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$2), $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}\\
t_2 := \frac{z}{t - x}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-272}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\
\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)))) < -1.99999999999999986e-272Initial program 93.2%
+-commutative93.2%
associate-*r/79.8%
*-commutative79.8%
associate-*r/95.6%
fma-def95.6%
Simplified95.6%
if -1.99999999999999986e-272 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.4%
*-commutative3.4%
associate-*l/3.0%
associate-*r/3.4%
clear-num3.4%
un-div-inv3.4%
Applied egg-rr3.4%
Taylor expanded in z around inf 85.3%
sub-neg85.3%
+-commutative85.3%
mul-1-neg85.3%
unsub-neg85.3%
associate-/l*97.0%
mul-1-neg97.0%
remove-double-neg97.0%
associate-/l*99.9%
Simplified99.9%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 88.4%
*-commutative88.4%
associate-*l/76.7%
associate-*r/91.8%
clear-num91.7%
un-div-inv92.7%
Applied egg-rr92.7%
Final simplification94.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))) (t_2 (/ z (- t x))))
(if (or (<= t_1 -2e-272) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ (- t (/ y t_2)) (/ a t_2)))))
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 = z / (t - x);
double tmp;
if ((t_1 <= -2e-272) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = (t - (y / t_2)) + (a / t_2);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
t_2 = z / (t - x)
if ((t_1 <= (-2d-272)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = (t - (y / t_2)) + (a / t_2)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = z / (t - x);
double tmp;
if ((t_1 <= -2e-272) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = (t - (y / t_2)) + (a / t_2);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) t_2 = z / (t - x) tmp = 0 if (t_1 <= -2e-272) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = (t - (y / t_2)) + (a / t_2) 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(z / Float64(t - x)) tmp = 0.0 if ((t_1 <= -2e-272) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(Float64(t - Float64(y / t_2)) + Float64(a / t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); t_2 = z / (t - x); tmp = 0.0; if ((t_1 <= -2e-272) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = (t - (y / t_2)) + (a / t_2); 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[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-272], 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[(N[(t - N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$2), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := \frac{z}{t - x}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-272} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999986e-272 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.8%
*-commutative90.8%
associate-*l/78.3%
associate-*r/93.7%
clear-num93.7%
un-div-inv94.1%
Applied egg-rr94.1%
if -1.99999999999999986e-272 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.4%
*-commutative3.4%
associate-*l/3.0%
associate-*r/3.4%
clear-num3.4%
un-div-inv3.4%
Applied egg-rr3.4%
Taylor expanded in z around inf 85.3%
sub-neg85.3%
+-commutative85.3%
mul-1-neg85.3%
unsub-neg85.3%
associate-/l*97.0%
mul-1-neg97.0%
remove-double-neg97.0%
associate-/l*99.9%
Simplified99.9%
Final simplification94.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -1e-168) (not (<= t_1 2e-205)))
t_1
(+ t (/ (* (- t x) (- a 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 <= -1e-168) || !(t_1 <= 2e-205)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - 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) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-1d-168)) .or. (.not. (t_1 <= 2d-205))) then
tmp = t_1
else
tmp = t + (((t - x) * (a - y)) / 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-168) || !(t_1 <= 2e-205)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / 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-168) or not (t_1 <= 2e-205): tmp = t_1 else: tmp = t + (((t - x) * (a - 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 <= -1e-168) || !(t_1 <= 2e-205)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / 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-168) || ~((t_1 <= 2e-205))) tmp = t_1; else tmp = t + (((t - x) * (a - y)) / 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, -1e-168], N[Not[LessEqual[t$95$1, 2e-205]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $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 -1 \cdot 10^{-168} \lor \neg \left(t_1 \leq 2 \cdot 10^{-205}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1e-168 or 2e-205 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.7%
if -1e-168 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e-205Initial program 8.4%
Taylor expanded in z around inf 85.4%
+-commutative85.4%
associate--l+85.4%
associate-*r/85.4%
associate-*r/85.4%
div-sub85.4%
distribute-lft-out--85.4%
mul-1-neg85.4%
distribute-neg-frac85.4%
unsub-neg85.4%
distribute-rgt-out--85.5%
Simplified85.5%
Final simplification91.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-243) (not (<= t_1 2e-205)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (/ (* (- t x) (- a 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 <= -5e-243) || !(t_1 <= 2e-205)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - 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) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-5d-243)) .or. (.not. (t_1 <= 2d-205))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + (((t - x) * (a - y)) / 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 <= -5e-243) || !(t_1 <= 2e-205)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -5e-243) or not (t_1 <= 2e-205): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + (((t - x) * (a - 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 <= -5e-243) || !(t_1 <= 2e-205)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / 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 <= -5e-243) || ~((t_1 <= 2e-205))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + (((t - x) * (a - y)) / 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, -5e-243], N[Not[LessEqual[t$95$1, 2e-205]], $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[(a - y), $MachinePrecision]), $MachinePrecision] / z), $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 -5 \cdot 10^{-243} \lor \neg \left(t_1 \leq 2 \cdot 10^{-205}\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5e-243 or 2e-205 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.0%
*-commutative92.0%
associate-*l/78.0%
associate-*r/93.7%
clear-num93.6%
un-div-inv94.1%
Applied egg-rr94.1%
if -5e-243 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e-205Initial program 3.5%
Taylor expanded in z around inf 86.5%
+-commutative86.5%
associate--l+86.5%
associate-*r/86.5%
associate-*r/86.5%
div-sub86.5%
distribute-lft-out--86.5%
mul-1-neg86.5%
distribute-neg-frac86.5%
unsub-neg86.5%
distribute-rgt-out--86.7%
Simplified86.7%
Final simplification93.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (/ y a)))) (t_2 (+ t (/ a (/ z (- t x))))))
(if (<= z -6.5e+36)
t_2
(if (<= z -3.75)
t_1
(if (<= z -0.041)
t_2
(if (<= z -1.7e-35)
(/ t (/ a (- y z)))
(if (<= z 1.6e-24)
t_1
(if (<= z 2.7e+95)
(* y (/ (- x t) z))
(* t (- 1.0 (/ y z)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * (y / a));
double t_2 = t + (a / (z / (t - x)));
double tmp;
if (z <= -6.5e+36) {
tmp = t_2;
} else if (z <= -3.75) {
tmp = t_1;
} else if (z <= -0.041) {
tmp = t_2;
} else if (z <= -1.7e-35) {
tmp = t / (a / (y - z));
} else if (z <= 1.6e-24) {
tmp = t_1;
} else if (z <= 2.7e+95) {
tmp = y * ((x - t) / z);
} else {
tmp = t * (1.0 - (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((t - x) * (y / a))
t_2 = t + (a / (z / (t - x)))
if (z <= (-6.5d+36)) then
tmp = t_2
else if (z <= (-3.75d0)) then
tmp = t_1
else if (z <= (-0.041d0)) then
tmp = t_2
else if (z <= (-1.7d-35)) then
tmp = t / (a / (y - z))
else if (z <= 1.6d-24) then
tmp = t_1
else if (z <= 2.7d+95) then
tmp = y * ((x - t) / z)
else
tmp = t * (1.0d0 - (y / 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 + ((t - x) * (y / a));
double t_2 = t + (a / (z / (t - x)));
double tmp;
if (z <= -6.5e+36) {
tmp = t_2;
} else if (z <= -3.75) {
tmp = t_1;
} else if (z <= -0.041) {
tmp = t_2;
} else if (z <= -1.7e-35) {
tmp = t / (a / (y - z));
} else if (z <= 1.6e-24) {
tmp = t_1;
} else if (z <= 2.7e+95) {
tmp = y * ((x - t) / z);
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * (y / a)) t_2 = t + (a / (z / (t - x))) tmp = 0 if z <= -6.5e+36: tmp = t_2 elif z <= -3.75: tmp = t_1 elif z <= -0.041: tmp = t_2 elif z <= -1.7e-35: tmp = t / (a / (y - z)) elif z <= 1.6e-24: tmp = t_1 elif z <= 2.7e+95: tmp = y * ((x - t) / z) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a))) t_2 = Float64(t + Float64(a / Float64(z / Float64(t - x)))) tmp = 0.0 if (z <= -6.5e+36) tmp = t_2; elseif (z <= -3.75) tmp = t_1; elseif (z <= -0.041) tmp = t_2; elseif (z <= -1.7e-35) tmp = Float64(t / Float64(a / Float64(y - z))); elseif (z <= 1.6e-24) tmp = t_1; elseif (z <= 2.7e+95) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * (y / a)); t_2 = t + (a / (z / (t - x))); tmp = 0.0; if (z <= -6.5e+36) tmp = t_2; elseif (z <= -3.75) tmp = t_1; elseif (z <= -0.041) tmp = t_2; elseif (z <= -1.7e-35) tmp = t / (a / (y - z)); elseif (z <= 1.6e-24) tmp = t_1; elseif (z <= 2.7e+95) tmp = y * ((x - t) / z); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+36], t$95$2, If[LessEqual[z, -3.75], t$95$1, If[LessEqual[z, -0.041], t$95$2, If[LessEqual[z, -1.7e-35], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-24], t$95$1, If[LessEqual[z, 2.7e+95], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\
t_2 := t + \frac{a}{\frac{z}{t - x}}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+36}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.75:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.041:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-35}:\\
\;\;\;\;\frac{t}{\frac{a}{y - z}}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -6.4999999999999998e36 or -3.75 < z < -0.0410000000000000017Initial program 65.0%
Taylor expanded in z around inf 67.1%
+-commutative67.1%
associate--l+67.1%
associate-*r/67.1%
associate-*r/67.1%
div-sub67.1%
distribute-lft-out--67.1%
mul-1-neg67.1%
distribute-neg-frac67.1%
unsub-neg67.1%
distribute-rgt-out--67.3%
Simplified67.3%
Taylor expanded in y around 0 58.8%
sub-neg58.8%
mul-1-neg58.8%
remove-double-neg58.8%
associate-/l*63.7%
Simplified63.7%
if -6.4999999999999998e36 < z < -3.75 or -1.7000000000000001e-35 < z < 1.60000000000000006e-24Initial program 94.3%
Taylor expanded in z around 0 77.9%
expm1-log1p-u47.2%
expm1-udef35.4%
+-commutative35.4%
associate-/l*37.4%
Applied egg-rr37.4%
expm1-def49.2%
expm1-log1p81.0%
associate-/r/80.7%
Simplified80.7%
if -0.0410000000000000017 < z < -1.7000000000000001e-35Initial program 99.2%
Taylor expanded in x around 0 75.7%
Taylor expanded in a around inf 63.2%
associate-/l*63.6%
Simplified63.6%
if 1.60000000000000006e-24 < z < 2.7e95Initial program 78.9%
Taylor expanded in a around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in y around inf 55.1%
div-sub55.1%
Simplified55.1%
if 2.7e95 < z Initial program 55.1%
Taylor expanded in a around 0 41.5%
associate-*r/41.5%
neg-mul-141.5%
Simplified41.5%
Taylor expanded in t around -inf 62.2%
mul-1-neg62.2%
*-commutative62.2%
sub-neg62.2%
metadata-eval62.2%
Simplified62.2%
Final simplification70.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a (- t x))))) (t_2 (+ t (/ a (/ z (- t x))))))
(if (<= z -1.6e+36)
t_2
(if (<= z -3.5)
t_1
(if (<= z -0.023)
t_2
(if (<= z -1.65e-35)
(/ t (/ a (- y z)))
(if (<= z 1.32e-21)
t_1
(if (<= z 2.5e+95)
(* y (/ (- x t) z))
(* t (- 1.0 (/ y z)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / (t - x)));
double t_2 = t + (a / (z / (t - x)));
double tmp;
if (z <= -1.6e+36) {
tmp = t_2;
} else if (z <= -3.5) {
tmp = t_1;
} else if (z <= -0.023) {
tmp = t_2;
} else if (z <= -1.65e-35) {
tmp = t / (a / (y - z));
} else if (z <= 1.32e-21) {
tmp = t_1;
} else if (z <= 2.5e+95) {
tmp = y * ((x - t) / z);
} else {
tmp = t * (1.0 - (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y / (a / (t - x)))
t_2 = t + (a / (z / (t - x)))
if (z <= (-1.6d+36)) then
tmp = t_2
else if (z <= (-3.5d0)) then
tmp = t_1
else if (z <= (-0.023d0)) then
tmp = t_2
else if (z <= (-1.65d-35)) then
tmp = t / (a / (y - z))
else if (z <= 1.32d-21) then
tmp = t_1
else if (z <= 2.5d+95) then
tmp = y * ((x - t) / z)
else
tmp = t * (1.0d0 - (y / 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 / (a / (t - x)));
double t_2 = t + (a / (z / (t - x)));
double tmp;
if (z <= -1.6e+36) {
tmp = t_2;
} else if (z <= -3.5) {
tmp = t_1;
} else if (z <= -0.023) {
tmp = t_2;
} else if (z <= -1.65e-35) {
tmp = t / (a / (y - z));
} else if (z <= 1.32e-21) {
tmp = t_1;
} else if (z <= 2.5e+95) {
tmp = y * ((x - t) / z);
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / (t - x))) t_2 = t + (a / (z / (t - x))) tmp = 0 if z <= -1.6e+36: tmp = t_2 elif z <= -3.5: tmp = t_1 elif z <= -0.023: tmp = t_2 elif z <= -1.65e-35: tmp = t / (a / (y - z)) elif z <= 1.32e-21: tmp = t_1 elif z <= 2.5e+95: tmp = y * ((x - t) / z) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / Float64(t - x)))) t_2 = Float64(t + Float64(a / Float64(z / Float64(t - x)))) tmp = 0.0 if (z <= -1.6e+36) tmp = t_2; elseif (z <= -3.5) tmp = t_1; elseif (z <= -0.023) tmp = t_2; elseif (z <= -1.65e-35) tmp = Float64(t / Float64(a / Float64(y - z))); elseif (z <= 1.32e-21) tmp = t_1; elseif (z <= 2.5e+95) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / (t - x))); t_2 = t + (a / (z / (t - x))); tmp = 0.0; if (z <= -1.6e+36) tmp = t_2; elseif (z <= -3.5) tmp = t_1; elseif (z <= -0.023) tmp = t_2; elseif (z <= -1.65e-35) tmp = t / (a / (y - z)); elseif (z <= 1.32e-21) tmp = t_1; elseif (z <= 2.5e+95) tmp = y * ((x - t) / z); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+36], t$95$2, If[LessEqual[z, -3.5], t$95$1, If[LessEqual[z, -0.023], t$95$2, If[LessEqual[z, -1.65e-35], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.32e-21], t$95$1, If[LessEqual[z, 2.5e+95], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{t - x}}\\
t_2 := t + \frac{a}{\frac{z}{t - x}}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+36}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.5:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.023:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-35}:\\
\;\;\;\;\frac{t}{\frac{a}{y - z}}\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -1.5999999999999999e36 or -3.5 < z < -0.023Initial program 65.0%
Taylor expanded in z around inf 67.1%
+-commutative67.1%
associate--l+67.1%
associate-*r/67.1%
associate-*r/67.1%
div-sub67.1%
distribute-lft-out--67.1%
mul-1-neg67.1%
distribute-neg-frac67.1%
unsub-neg67.1%
distribute-rgt-out--67.3%
Simplified67.3%
Taylor expanded in y around 0 58.8%
sub-neg58.8%
mul-1-neg58.8%
remove-double-neg58.8%
associate-/l*63.7%
Simplified63.7%
if -1.5999999999999999e36 < z < -3.5 or -1.65e-35 < z < 1.32e-21Initial program 94.3%
Taylor expanded in z around 0 77.9%
+-commutative77.9%
associate-/l*81.0%
Simplified81.0%
if -0.023 < z < -1.65e-35Initial program 99.2%
Taylor expanded in x around 0 75.7%
Taylor expanded in a around inf 63.2%
associate-/l*63.6%
Simplified63.6%
if 1.32e-21 < z < 2.50000000000000012e95Initial program 78.9%
Taylor expanded in a around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in y around inf 55.1%
div-sub55.1%
Simplified55.1%
if 2.50000000000000012e95 < z Initial program 55.1%
Taylor expanded in a around 0 41.5%
associate-*r/41.5%
neg-mul-141.5%
Simplified41.5%
Taylor expanded in t around -inf 62.2%
mul-1-neg62.2%
*-commutative62.2%
sub-neg62.2%
metadata-eval62.2%
Simplified62.2%
Final simplification70.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (/ (* y (- t x)) z))) (t_2 (/ t (/ (- a z) (- y z)))))
(if (<= z -2.05e+207)
(+ t (/ a (/ z (- t x))))
(if (<= z -2.35e+61)
t_1
(if (<= z -7e-58)
t_2
(if (<= z 1.4e-20)
(+ x (/ y (/ a (- t x))))
(if (<= z 8.5e+231) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y * (t - x)) / z);
double t_2 = t / ((a - z) / (y - z));
double tmp;
if (z <= -2.05e+207) {
tmp = t + (a / (z / (t - x)));
} else if (z <= -2.35e+61) {
tmp = t_1;
} else if (z <= -7e-58) {
tmp = t_2;
} else if (z <= 1.4e-20) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 8.5e+231) {
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 * (t - x)) / z)
t_2 = t / ((a - z) / (y - z))
if (z <= (-2.05d+207)) then
tmp = t + (a / (z / (t - x)))
else if (z <= (-2.35d+61)) then
tmp = t_1
else if (z <= (-7d-58)) then
tmp = t_2
else if (z <= 1.4d-20) then
tmp = x + (y / (a / (t - x)))
else if (z <= 8.5d+231) 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 * (t - x)) / z);
double t_2 = t / ((a - z) / (y - z));
double tmp;
if (z <= -2.05e+207) {
tmp = t + (a / (z / (t - x)));
} else if (z <= -2.35e+61) {
tmp = t_1;
} else if (z <= -7e-58) {
tmp = t_2;
} else if (z <= 1.4e-20) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 8.5e+231) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y * (t - x)) / z) t_2 = t / ((a - z) / (y - z)) tmp = 0 if z <= -2.05e+207: tmp = t + (a / (z / (t - x))) elif z <= -2.35e+61: tmp = t_1 elif z <= -7e-58: tmp = t_2 elif z <= 1.4e-20: tmp = x + (y / (a / (t - x))) elif z <= 8.5e+231: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y * Float64(t - x)) / z)) t_2 = Float64(t / Float64(Float64(a - z) / Float64(y - z))) tmp = 0.0 if (z <= -2.05e+207) tmp = Float64(t + Float64(a / Float64(z / Float64(t - x)))); elseif (z <= -2.35e+61) tmp = t_1; elseif (z <= -7e-58) tmp = t_2; elseif (z <= 1.4e-20) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (z <= 8.5e+231) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y * (t - x)) / z); t_2 = t / ((a - z) / (y - z)); tmp = 0.0; if (z <= -2.05e+207) tmp = t + (a / (z / (t - x))); elseif (z <= -2.35e+61) tmp = t_1; elseif (z <= -7e-58) tmp = t_2; elseif (z <= 1.4e-20) tmp = x + (y / (a / (t - x))); elseif (z <= 8.5e+231) 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 * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e+207], N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.35e+61], t$95$1, If[LessEqual[z, -7e-58], t$95$2, If[LessEqual[z, 1.4e-20], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+231], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y \cdot \left(t - x\right)}{z}\\
t_2 := \frac{t}{\frac{a - z}{y - z}}\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{+207}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\
\mathbf{elif}\;z \leq -2.35 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-58}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-20}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+231}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.05e207Initial program 53.9%
Taylor expanded in z around inf 71.1%
+-commutative71.1%
associate--l+71.1%
associate-*r/71.1%
associate-*r/71.1%
div-sub71.1%
distribute-lft-out--71.1%
mul-1-neg71.1%
distribute-neg-frac71.1%
unsub-neg71.1%
distribute-rgt-out--71.6%
Simplified71.6%
Taylor expanded in y around 0 75.1%
sub-neg75.1%
mul-1-neg75.1%
remove-double-neg75.1%
associate-/l*83.4%
Simplified83.4%
if -2.05e207 < z < -2.3499999999999999e61 or 1.4000000000000001e-20 < z < 8.4999999999999994e231Initial program 69.2%
Taylor expanded in z around inf 63.3%
+-commutative63.3%
associate--l+63.3%
associate-*r/63.3%
associate-*r/63.3%
div-sub63.3%
distribute-lft-out--63.3%
mul-1-neg63.3%
distribute-neg-frac63.3%
unsub-neg63.3%
distribute-rgt-out--64.6%
Simplified64.6%
Taylor expanded in y around inf 62.9%
if -2.3499999999999999e61 < z < -6.9999999999999998e-58 or 8.4999999999999994e231 < z Initial program 72.7%
Taylor expanded in x around 0 50.2%
associate-/l*68.7%
Simplified68.7%
if -6.9999999999999998e-58 < z < 1.4000000000000001e-20Initial program 95.5%
Taylor expanded in z around 0 80.1%
+-commutative80.1%
associate-/l*83.5%
Simplified83.5%
Final simplification74.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ t (/ (- a z) (- y z)))))
(if (<= z -3.3e+27)
(- t (/ (* x (- a y)) z))
(if (<= z -1.16e-57)
t_1
(if (<= z -3.2e-126)
(* x (+ (/ (- z y) (- a z)) 1.0))
(if (<= z 1.02e-18)
(+ x (/ y (/ a (- t x))))
(if (<= z 9.5e+231) (- t (/ (* y (- t x)) z)) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t / ((a - z) / (y - z));
double tmp;
if (z <= -3.3e+27) {
tmp = t - ((x * (a - y)) / z);
} else if (z <= -1.16e-57) {
tmp = t_1;
} else if (z <= -3.2e-126) {
tmp = x * (((z - y) / (a - z)) + 1.0);
} else if (z <= 1.02e-18) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 9.5e+231) {
tmp = t - ((y * (t - x)) / z);
} 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 / ((a - z) / (y - z))
if (z <= (-3.3d+27)) then
tmp = t - ((x * (a - y)) / z)
else if (z <= (-1.16d-57)) then
tmp = t_1
else if (z <= (-3.2d-126)) then
tmp = x * (((z - y) / (a - z)) + 1.0d0)
else if (z <= 1.02d-18) then
tmp = x + (y / (a / (t - x)))
else if (z <= 9.5d+231) then
tmp = t - ((y * (t - x)) / z)
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 / ((a - z) / (y - z));
double tmp;
if (z <= -3.3e+27) {
tmp = t - ((x * (a - y)) / z);
} else if (z <= -1.16e-57) {
tmp = t_1;
} else if (z <= -3.2e-126) {
tmp = x * (((z - y) / (a - z)) + 1.0);
} else if (z <= 1.02e-18) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 9.5e+231) {
tmp = t - ((y * (t - x)) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t / ((a - z) / (y - z)) tmp = 0 if z <= -3.3e+27: tmp = t - ((x * (a - y)) / z) elif z <= -1.16e-57: tmp = t_1 elif z <= -3.2e-126: tmp = x * (((z - y) / (a - z)) + 1.0) elif z <= 1.02e-18: tmp = x + (y / (a / (t - x))) elif z <= 9.5e+231: tmp = t - ((y * (t - x)) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t / Float64(Float64(a - z) / Float64(y - z))) tmp = 0.0 if (z <= -3.3e+27) tmp = Float64(t - Float64(Float64(x * Float64(a - y)) / z)); elseif (z <= -1.16e-57) tmp = t_1; elseif (z <= -3.2e-126) tmp = Float64(x * Float64(Float64(Float64(z - y) / Float64(a - z)) + 1.0)); elseif (z <= 1.02e-18) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (z <= 9.5e+231) tmp = Float64(t - Float64(Float64(y * Float64(t - x)) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t / ((a - z) / (y - z)); tmp = 0.0; if (z <= -3.3e+27) tmp = t - ((x * (a - y)) / z); elseif (z <= -1.16e-57) tmp = t_1; elseif (z <= -3.2e-126) tmp = x * (((z - y) / (a - z)) + 1.0); elseif (z <= 1.02e-18) tmp = x + (y / (a / (t - x))); elseif (z <= 9.5e+231) tmp = t - ((y * (t - x)) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+27], N[(t - N[(N[(x * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.16e-57], t$95$1, If[LessEqual[z, -3.2e-126], N[(x * N[(N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e-18], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+231], N[(t - N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a - z}{y - z}}\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+27}:\\
\;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;z \leq -1.16 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-126}:\\
\;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-18}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+231}:\\
\;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.2999999999999998e27Initial program 64.9%
Taylor expanded in z around inf 65.4%
+-commutative65.4%
associate--l+65.4%
associate-*r/65.4%
associate-*r/65.4%
div-sub65.4%
distribute-lft-out--65.4%
mul-1-neg65.4%
distribute-neg-frac65.4%
unsub-neg65.4%
distribute-rgt-out--65.6%
Simplified65.6%
Taylor expanded in t around 0 72.6%
associate-*r/72.6%
mul-1-neg72.6%
*-commutative72.6%
distribute-rgt-neg-in72.6%
Simplified72.6%
if -3.2999999999999998e27 < z < -1.15999999999999996e-57 or 9.5000000000000002e231 < z Initial program 72.4%
Taylor expanded in x around 0 51.4%
associate-/l*71.8%
Simplified71.8%
if -1.15999999999999996e-57 < z < -3.2000000000000001e-126Initial program 99.8%
Taylor expanded in x around inf 86.3%
mul-1-neg86.3%
unsub-neg86.3%
Simplified86.3%
if -3.2000000000000001e-126 < z < 1.02e-18Initial program 95.2%
Taylor expanded in z around 0 80.6%
+-commutative80.6%
associate-/l*84.2%
Simplified84.2%
if 1.02e-18 < z < 9.5000000000000002e231Initial program 67.5%
Taylor expanded in z around inf 63.8%
+-commutative63.8%
associate--l+63.8%
associate-*r/63.8%
associate-*r/63.8%
div-sub63.7%
distribute-lft-out--63.7%
mul-1-neg63.7%
distribute-neg-frac63.7%
unsub-neg63.7%
distribute-rgt-out--65.8%
Simplified65.8%
Taylor expanded in y around inf 61.0%
Final simplification75.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.2e+35)
t
(if (<= z 1.05e-126)
(* x (- 1.0 (/ y a)))
(if (<= z 8e-59)
(/ y (/ a t))
(if (<= z 3.8e-20) x (if (<= z 3.1e+95) (* y (/ (- x t) z)) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e+35) {
tmp = t;
} else if (z <= 1.05e-126) {
tmp = x * (1.0 - (y / a));
} else if (z <= 8e-59) {
tmp = y / (a / t);
} else if (z <= 3.8e-20) {
tmp = x;
} else if (z <= 3.1e+95) {
tmp = y * ((x - t) / 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.2d+35)) then
tmp = t
else if (z <= 1.05d-126) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 8d-59) then
tmp = y / (a / t)
else if (z <= 3.8d-20) then
tmp = x
else if (z <= 3.1d+95) then
tmp = y * ((x - t) / 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.2e+35) {
tmp = t;
} else if (z <= 1.05e-126) {
tmp = x * (1.0 - (y / a));
} else if (z <= 8e-59) {
tmp = y / (a / t);
} else if (z <= 3.8e-20) {
tmp = x;
} else if (z <= 3.1e+95) {
tmp = y * ((x - t) / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2e+35: tmp = t elif z <= 1.05e-126: tmp = x * (1.0 - (y / a)) elif z <= 8e-59: tmp = y / (a / t) elif z <= 3.8e-20: tmp = x elif z <= 3.1e+95: tmp = y * ((x - t) / z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2e+35) tmp = t; elseif (z <= 1.05e-126) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 8e-59) tmp = Float64(y / Float64(a / t)); elseif (z <= 3.8e-20) tmp = x; elseif (z <= 3.1e+95) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.2e+35) tmp = t; elseif (z <= 1.05e-126) tmp = x * (1.0 - (y / a)); elseif (z <= 8e-59) tmp = y / (a / t); elseif (z <= 3.8e-20) tmp = x; elseif (z <= 3.1e+95) tmp = y * ((x - t) / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e+35], t, If[LessEqual[z, 1.05e-126], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-59], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-20], x, If[LessEqual[z, 3.1e+95], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+35}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-126}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-59}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.20000000000000007e35 or 3.1000000000000003e95 < z Initial program 60.2%
Taylor expanded in z around inf 53.3%
if -1.20000000000000007e35 < z < 1.0499999999999999e-126Initial program 93.1%
Taylor expanded in z around 0 73.1%
Taylor expanded in x around inf 50.5%
*-commutative50.5%
mul-1-neg50.5%
unsub-neg50.5%
Simplified50.5%
if 1.0499999999999999e-126 < z < 8.0000000000000002e-59Initial program 100.0%
Taylor expanded in x around 0 70.5%
Taylor expanded in z around 0 62.5%
associate-/l*62.7%
Simplified62.7%
if 8.0000000000000002e-59 < z < 3.7999999999999998e-20Initial program 99.8%
Taylor expanded in a around inf 58.2%
if 3.7999999999999998e-20 < z < 3.1000000000000003e95Initial program 78.9%
Taylor expanded in a around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in y around inf 55.1%
div-sub55.1%
Simplified55.1%
Final simplification52.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (/ (* y (- t x)) z))))
(if (<= z -1.45e+210)
(+ t (/ a (/ z (- t x))))
(if (<= z -5.2e+35)
t_1
(if (<= z 1.28e-24)
(+ x (/ y (/ a (- t x))))
(if (<= z 1e+232) t_1 (* t (- 1.0 (/ y z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y * (t - x)) / z);
double tmp;
if (z <= -1.45e+210) {
tmp = t + (a / (z / (t - x)));
} else if (z <= -5.2e+35) {
tmp = t_1;
} else if (z <= 1.28e-24) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 1e+232) {
tmp = t_1;
} else {
tmp = t * (1.0 - (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) :: t_1
real(8) :: tmp
t_1 = t - ((y * (t - x)) / z)
if (z <= (-1.45d+210)) then
tmp = t + (a / (z / (t - x)))
else if (z <= (-5.2d+35)) then
tmp = t_1
else if (z <= 1.28d-24) then
tmp = x + (y / (a / (t - x)))
else if (z <= 1d+232) then
tmp = t_1
else
tmp = t * (1.0d0 - (y / z))
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 * (t - x)) / z);
double tmp;
if (z <= -1.45e+210) {
tmp = t + (a / (z / (t - x)));
} else if (z <= -5.2e+35) {
tmp = t_1;
} else if (z <= 1.28e-24) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 1e+232) {
tmp = t_1;
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y * (t - x)) / z) tmp = 0 if z <= -1.45e+210: tmp = t + (a / (z / (t - x))) elif z <= -5.2e+35: tmp = t_1 elif z <= 1.28e-24: tmp = x + (y / (a / (t - x))) elif z <= 1e+232: tmp = t_1 else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y * Float64(t - x)) / z)) tmp = 0.0 if (z <= -1.45e+210) tmp = Float64(t + Float64(a / Float64(z / Float64(t - x)))); elseif (z <= -5.2e+35) tmp = t_1; elseif (z <= 1.28e-24) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (z <= 1e+232) tmp = t_1; else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y * (t - x)) / z); tmp = 0.0; if (z <= -1.45e+210) tmp = t + (a / (z / (t - x))); elseif (z <= -5.2e+35) tmp = t_1; elseif (z <= 1.28e-24) tmp = x + (y / (a / (t - x))); elseif (z <= 1e+232) tmp = t_1; else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+210], N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.2e+35], t$95$1, If[LessEqual[z, 1.28e-24], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+232], t$95$1, N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y \cdot \left(t - x\right)}{z}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+210}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.28 \cdot 10^{-24}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 10^{+232}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -1.44999999999999996e210Initial program 53.9%
Taylor expanded in z around inf 71.1%
+-commutative71.1%
associate--l+71.1%
associate-*r/71.1%
associate-*r/71.1%
div-sub71.1%
distribute-lft-out--71.1%
mul-1-neg71.1%
distribute-neg-frac71.1%
unsub-neg71.1%
distribute-rgt-out--71.6%
Simplified71.6%
Taylor expanded in y around 0 75.1%
sub-neg75.1%
mul-1-neg75.1%
remove-double-neg75.1%
associate-/l*83.4%
Simplified83.4%
if -1.44999999999999996e210 < z < -5.20000000000000013e35 or 1.28e-24 < z < 1.00000000000000006e232Initial program 69.2%
Taylor expanded in z around inf 63.5%
+-commutative63.5%
associate--l+63.5%
associate-*r/63.5%
associate-*r/63.5%
div-sub63.5%
distribute-lft-out--63.5%
mul-1-neg63.5%
distribute-neg-frac63.5%
unsub-neg63.5%
distribute-rgt-out--64.8%
Simplified64.8%
Taylor expanded in y around inf 62.3%
if -5.20000000000000013e35 < z < 1.28e-24Initial program 94.0%
Taylor expanded in z around 0 74.1%
+-commutative74.1%
associate-/l*76.9%
Simplified76.9%
if 1.00000000000000006e232 < z Initial program 56.8%
Taylor expanded in a around 0 51.9%
associate-*r/51.9%
neg-mul-151.9%
Simplified51.9%
Taylor expanded in t around -inf 80.6%
mul-1-neg80.6%
*-commutative80.6%
sub-neg80.6%
metadata-eval80.6%
Simplified80.6%
Final simplification73.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.4e+37)
t
(if (<= z 2.7e-127)
(* x (- 1.0 (/ y a)))
(if (<= z 2.1e-53)
(/ y (/ a t))
(if (<= z 5.1e-26) x (if (<= z 2.5e+95) (* x (/ y z)) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+37) {
tmp = t;
} else if (z <= 2.7e-127) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.1e-53) {
tmp = y / (a / t);
} else if (z <= 5.1e-26) {
tmp = x;
} else if (z <= 2.5e+95) {
tmp = x * (y / 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 <= (-2.4d+37)) then
tmp = t
else if (z <= 2.7d-127) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 2.1d-53) then
tmp = y / (a / t)
else if (z <= 5.1d-26) then
tmp = x
else if (z <= 2.5d+95) then
tmp = x * (y / 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 <= -2.4e+37) {
tmp = t;
} else if (z <= 2.7e-127) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.1e-53) {
tmp = y / (a / t);
} else if (z <= 5.1e-26) {
tmp = x;
} else if (z <= 2.5e+95) {
tmp = x * (y / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.4e+37: tmp = t elif z <= 2.7e-127: tmp = x * (1.0 - (y / a)) elif z <= 2.1e-53: tmp = y / (a / t) elif z <= 5.1e-26: tmp = x elif z <= 2.5e+95: tmp = x * (y / z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.4e+37) tmp = t; elseif (z <= 2.7e-127) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 2.1e-53) tmp = Float64(y / Float64(a / t)); elseif (z <= 5.1e-26) tmp = x; elseif (z <= 2.5e+95) tmp = Float64(x * Float64(y / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.4e+37) tmp = t; elseif (z <= 2.7e-127) tmp = x * (1.0 - (y / a)); elseif (z <= 2.1e-53) tmp = y / (a / t); elseif (z <= 5.1e-26) tmp = x; elseif (z <= 2.5e+95) tmp = x * (y / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e+37], t, If[LessEqual[z, 2.7e-127], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-53], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.1e-26], x, If[LessEqual[z, 2.5e+95], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+37}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-127}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-53}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{-26}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.4e37 or 2.50000000000000012e95 < z Initial program 60.2%
Taylor expanded in z around inf 53.3%
if -2.4e37 < z < 2.7e-127Initial program 93.1%
Taylor expanded in z around 0 73.1%
Taylor expanded in x around inf 50.5%
*-commutative50.5%
mul-1-neg50.5%
unsub-neg50.5%
Simplified50.5%
if 2.7e-127 < z < 2.09999999999999977e-53Initial program 100.0%
Taylor expanded in x around 0 70.5%
Taylor expanded in z around 0 62.5%
associate-/l*62.7%
Simplified62.7%
if 2.09999999999999977e-53 < z < 5.09999999999999991e-26Initial program 99.8%
Taylor expanded in a around inf 58.2%
if 5.09999999999999991e-26 < z < 2.50000000000000012e95Initial program 78.9%
Taylor expanded in a around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in x around inf 32.4%
expm1-log1p-u12.2%
expm1-udef5.6%
associate-/l*14.3%
Applied egg-rr14.3%
expm1-def20.8%
expm1-log1p41.9%
associate-/r/42.1%
Simplified42.1%
Final simplification51.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5e+29)
(- t (/ (* x (- a y)) z))
(if (<= z 2.1e-19)
(+ x (/ y (/ a (- t x))))
(if (<= z 8.5e+231)
(- t (/ (* y (- t x)) z))
(/ t (/ (- a z) (- y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e+29) {
tmp = t - ((x * (a - y)) / z);
} else if (z <= 2.1e-19) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 8.5e+231) {
tmp = t - ((y * (t - x)) / z);
} else {
tmp = t / ((a - z) / (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 (z <= (-5d+29)) then
tmp = t - ((x * (a - y)) / z)
else if (z <= 2.1d-19) then
tmp = x + (y / (a / (t - x)))
else if (z <= 8.5d+231) then
tmp = t - ((y * (t - x)) / z)
else
tmp = t / ((a - z) / (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 (z <= -5e+29) {
tmp = t - ((x * (a - y)) / z);
} else if (z <= 2.1e-19) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 8.5e+231) {
tmp = t - ((y * (t - x)) / z);
} else {
tmp = t / ((a - z) / (y - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e+29: tmp = t - ((x * (a - y)) / z) elif z <= 2.1e-19: tmp = x + (y / (a / (t - x))) elif z <= 8.5e+231: tmp = t - ((y * (t - x)) / z) else: tmp = t / ((a - z) / (y - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e+29) tmp = Float64(t - Float64(Float64(x * Float64(a - y)) / z)); elseif (z <= 2.1e-19) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (z <= 8.5e+231) tmp = Float64(t - Float64(Float64(y * Float64(t - x)) / z)); else tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e+29) tmp = t - ((x * (a - y)) / z); elseif (z <= 2.1e-19) tmp = x + (y / (a / (t - x))); elseif (z <= 8.5e+231) tmp = t - ((y * (t - x)) / z); else tmp = t / ((a - z) / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e+29], N[(t - N[(N[(x * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-19], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+231], N[(t - N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+29}:\\
\;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+231}:\\
\;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if z < -5.0000000000000001e29Initial program 64.2%
Taylor expanded in z around inf 66.5%
+-commutative66.5%
associate--l+66.5%
associate-*r/66.5%
associate-*r/66.5%
div-sub66.5%
distribute-lft-out--66.5%
mul-1-neg66.5%
distribute-neg-frac66.5%
unsub-neg66.5%
distribute-rgt-out--66.7%
Simplified66.7%
Taylor expanded in t around 0 73.9%
associate-*r/73.9%
mul-1-neg73.9%
*-commutative73.9%
distribute-rgt-neg-in73.9%
Simplified73.9%
if -5.0000000000000001e29 < z < 2.0999999999999999e-19Initial program 94.0%
Taylor expanded in z around 0 74.1%
+-commutative74.1%
associate-/l*76.9%
Simplified76.9%
if 2.0999999999999999e-19 < z < 8.4999999999999994e231Initial program 67.5%
Taylor expanded in z around inf 63.8%
+-commutative63.8%
associate--l+63.8%
associate-*r/63.8%
associate-*r/63.8%
div-sub63.7%
distribute-lft-out--63.7%
mul-1-neg63.7%
distribute-neg-frac63.7%
unsub-neg63.7%
distribute-rgt-out--65.8%
Simplified65.8%
Taylor expanded in y around inf 61.0%
if 8.4999999999999994e231 < z Initial program 56.8%
Taylor expanded in x around 0 38.1%
associate-/l*80.7%
Simplified80.7%
Final simplification73.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.9e+37)
(- t (/ (* x (- a y)) z))
(if (<= z 2e+95)
(+ x (/ (- t x) (/ (- a z) y)))
(/ t (/ (- a z) (- y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e+37) {
tmp = t - ((x * (a - y)) / z);
} else if (z <= 2e+95) {
tmp = x + ((t - x) / ((a - z) / y));
} else {
tmp = t / ((a - z) / (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 (z <= (-1.9d+37)) then
tmp = t - ((x * (a - y)) / z)
else if (z <= 2d+95) then
tmp = x + ((t - x) / ((a - z) / y))
else
tmp = t / ((a - z) / (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 (z <= -1.9e+37) {
tmp = t - ((x * (a - y)) / z);
} else if (z <= 2e+95) {
tmp = x + ((t - x) / ((a - z) / y));
} else {
tmp = t / ((a - z) / (y - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.9e+37: tmp = t - ((x * (a - y)) / z) elif z <= 2e+95: tmp = x + ((t - x) / ((a - z) / y)) else: tmp = t / ((a - z) / (y - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.9e+37) tmp = Float64(t - Float64(Float64(x * Float64(a - y)) / z)); elseif (z <= 2e+95) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))); else tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.9e+37) tmp = t - ((x * (a - y)) / z); elseif (z <= 2e+95) tmp = x + ((t - x) / ((a - z) / y)); else tmp = t / ((a - z) / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.9e+37], N[(t - N[(N[(x * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+95], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+37}:\\
\;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+95}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if z < -1.89999999999999995e37Initial program 64.2%
Taylor expanded in z around inf 66.5%
+-commutative66.5%
associate--l+66.5%
associate-*r/66.5%
associate-*r/66.5%
div-sub66.5%
distribute-lft-out--66.5%
mul-1-neg66.5%
distribute-neg-frac66.5%
unsub-neg66.5%
distribute-rgt-out--66.7%
Simplified66.7%
Taylor expanded in t around 0 73.9%
associate-*r/73.9%
mul-1-neg73.9%
*-commutative73.9%
distribute-rgt-neg-in73.9%
Simplified73.9%
if -1.89999999999999995e37 < z < 2.00000000000000004e95Initial program 91.4%
*-commutative91.4%
associate-*l/88.4%
associate-*r/93.0%
clear-num92.9%
un-div-inv93.6%
Applied egg-rr93.6%
Taylor expanded in y around inf 83.6%
if 2.00000000000000004e95 < z Initial program 55.1%
Taylor expanded in x around 0 42.8%
associate-/l*66.7%
Simplified66.7%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.2e+37)
t
(if (<= z 6.2e-19)
(+ x (/ (* y t) a))
(if (<= z 2.8e+95) (* y (/ (- x t) z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.2e+37) {
tmp = t;
} else if (z <= 6.2e-19) {
tmp = x + ((y * t) / a);
} else if (z <= 2.8e+95) {
tmp = y * ((x - t) / 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 <= (-2.2d+37)) then
tmp = t
else if (z <= 6.2d-19) then
tmp = x + ((y * t) / a)
else if (z <= 2.8d+95) then
tmp = y * ((x - t) / 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 <= -2.2e+37) {
tmp = t;
} else if (z <= 6.2e-19) {
tmp = x + ((y * t) / a);
} else if (z <= 2.8e+95) {
tmp = y * ((x - t) / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.2e+37: tmp = t elif z <= 6.2e-19: tmp = x + ((y * t) / a) elif z <= 2.8e+95: tmp = y * ((x - t) / z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.2e+37) tmp = t; elseif (z <= 6.2e-19) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 2.8e+95) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.2e+37) tmp = t; elseif (z <= 6.2e-19) tmp = x + ((y * t) / a); elseif (z <= 2.8e+95) tmp = y * ((x - t) / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.2e+37], t, If[LessEqual[z, 6.2e-19], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+95], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+37}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.2000000000000001e37 or 2.7999999999999998e95 < z Initial program 60.2%
Taylor expanded in z around inf 53.3%
if -2.2000000000000001e37 < z < 6.1999999999999998e-19Initial program 94.0%
Taylor expanded in z around 0 74.1%
Taylor expanded in t around inf 62.1%
if 6.1999999999999998e-19 < z < 2.7999999999999998e95Initial program 78.9%
Taylor expanded in a around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in y around inf 55.1%
div-sub55.1%
Simplified55.1%
Final simplification58.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (/ y (/ z t)))))
(if (<= z -5.5e+30)
t_1
(if (<= z 5.8e-22)
(+ x (/ (* y t) a))
(if (<= z 3.2e+95) (* y (/ (- x t) z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (y / (z / t));
double tmp;
if (z <= -5.5e+30) {
tmp = t_1;
} else if (z <= 5.8e-22) {
tmp = x + ((y * t) / a);
} else if (z <= 3.2e+95) {
tmp = y * ((x - t) / z);
} 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))
if (z <= (-5.5d+30)) then
tmp = t_1
else if (z <= 5.8d-22) then
tmp = x + ((y * t) / a)
else if (z <= 3.2d+95) then
tmp = y * ((x - t) / z)
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));
double tmp;
if (z <= -5.5e+30) {
tmp = t_1;
} else if (z <= 5.8e-22) {
tmp = x + ((y * t) / a);
} else if (z <= 3.2e+95) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (y / (z / t)) tmp = 0 if z <= -5.5e+30: tmp = t_1 elif z <= 5.8e-22: tmp = x + ((y * t) / a) elif z <= 3.2e+95: tmp = y * ((x - t) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(y / Float64(z / t))) tmp = 0.0 if (z <= -5.5e+30) tmp = t_1; elseif (z <= 5.8e-22) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 3.2e+95) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (y / (z / t)); tmp = 0.0; if (z <= -5.5e+30) tmp = t_1; elseif (z <= 5.8e-22) tmp = x + ((y * t) / a); elseif (z <= 3.2e+95) tmp = y * ((x - t) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e+30], t$95$1, If[LessEqual[z, 5.8e-22], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+95], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{\frac{z}{t}}\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-22}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.50000000000000025e30 or 3.2000000000000001e95 < z Initial program 60.2%
Taylor expanded in x around 0 39.5%
Taylor expanded in a around 0 36.6%
associate-*r/36.6%
neg-mul-136.6%
distribute-lft-neg-in36.6%
Simplified36.6%
Taylor expanded in y around 0 49.9%
+-commutative49.9%
mul-1-neg49.9%
unsub-neg49.9%
associate-/l*56.9%
Simplified56.9%
if -5.50000000000000025e30 < z < 5.8000000000000003e-22Initial program 94.0%
Taylor expanded in z around 0 74.1%
Taylor expanded in t around inf 62.1%
if 5.8000000000000003e-22 < z < 3.2000000000000001e95Initial program 78.9%
Taylor expanded in a around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in y around inf 55.1%
div-sub55.1%
Simplified55.1%
Final simplification59.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.6e+32)
(- t (/ y (/ z t)))
(if (<= z 4.2e-19)
(+ x (/ (* y t) a))
(if (<= z 2.5e+95) (* y (/ (- x t) z)) (* t (- 1.0 (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.6e+32) {
tmp = t - (y / (z / t));
} else if (z <= 4.2e-19) {
tmp = x + ((y * t) / a);
} else if (z <= 2.5e+95) {
tmp = y * ((x - t) / z);
} else {
tmp = t * (1.0 - (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 (z <= (-5.6d+32)) then
tmp = t - (y / (z / t))
else if (z <= 4.2d-19) then
tmp = x + ((y * t) / a)
else if (z <= 2.5d+95) then
tmp = y * ((x - t) / z)
else
tmp = t * (1.0d0 - (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 (z <= -5.6e+32) {
tmp = t - (y / (z / t));
} else if (z <= 4.2e-19) {
tmp = x + ((y * t) / a);
} else if (z <= 2.5e+95) {
tmp = y * ((x - t) / z);
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.6e+32: tmp = t - (y / (z / t)) elif z <= 4.2e-19: tmp = x + ((y * t) / a) elif z <= 2.5e+95: tmp = y * ((x - t) / z) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.6e+32) tmp = Float64(t - Float64(y / Float64(z / t))); elseif (z <= 4.2e-19) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 2.5e+95) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.6e+32) tmp = t - (y / (z / t)); elseif (z <= 4.2e-19) tmp = x + ((y * t) / a); elseif (z <= 2.5e+95) tmp = y * ((x - t) / z); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.6e+32], N[(t - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-19], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+95], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+32}:\\
\;\;\;\;t - \frac{y}{\frac{z}{t}}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -5.6e32Initial program 64.2%
Taylor expanded in x around 0 37.0%
Taylor expanded in a around 0 35.2%
associate-*r/35.2%
neg-mul-135.2%
distribute-lft-neg-in35.2%
Simplified35.2%
Taylor expanded in y around 0 50.9%
+-commutative50.9%
mul-1-neg50.9%
unsub-neg50.9%
associate-/l*56.1%
Simplified56.1%
if -5.6e32 < z < 4.1999999999999998e-19Initial program 94.0%
Taylor expanded in z around 0 74.1%
Taylor expanded in t around inf 62.1%
if 4.1999999999999998e-19 < z < 2.50000000000000012e95Initial program 78.9%
Taylor expanded in a around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in y around inf 55.1%
div-sub55.1%
Simplified55.1%
if 2.50000000000000012e95 < z Initial program 55.1%
Taylor expanded in a around 0 41.5%
associate-*r/41.5%
neg-mul-141.5%
Simplified41.5%
Taylor expanded in t around -inf 62.2%
mul-1-neg62.2%
*-commutative62.2%
sub-neg62.2%
metadata-eval62.2%
Simplified62.2%
Final simplification60.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5e+32)
(+ t (/ a (/ z (- t x))))
(if (<= z 4.1e-19)
(+ x (/ (* y t) a))
(if (<= z 2.1e+95) (* y (/ (- x t) z)) (* t (- 1.0 (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e+32) {
tmp = t + (a / (z / (t - x)));
} else if (z <= 4.1e-19) {
tmp = x + ((y * t) / a);
} else if (z <= 2.1e+95) {
tmp = y * ((x - t) / z);
} else {
tmp = t * (1.0 - (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 (z <= (-5d+32)) then
tmp = t + (a / (z / (t - x)))
else if (z <= 4.1d-19) then
tmp = x + ((y * t) / a)
else if (z <= 2.1d+95) then
tmp = y * ((x - t) / z)
else
tmp = t * (1.0d0 - (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 (z <= -5e+32) {
tmp = t + (a / (z / (t - x)));
} else if (z <= 4.1e-19) {
tmp = x + ((y * t) / a);
} else if (z <= 2.1e+95) {
tmp = y * ((x - t) / z);
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e+32: tmp = t + (a / (z / (t - x))) elif z <= 4.1e-19: tmp = x + ((y * t) / a) elif z <= 2.1e+95: tmp = y * ((x - t) / z) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e+32) tmp = Float64(t + Float64(a / Float64(z / Float64(t - x)))); elseif (z <= 4.1e-19) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 2.1e+95) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e+32) tmp = t + (a / (z / (t - x))); elseif (z <= 4.1e-19) tmp = x + ((y * t) / a); elseif (z <= 2.1e+95) tmp = y * ((x - t) / z); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e+32], N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e-19], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+95], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+32}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -4.9999999999999997e32Initial program 64.2%
Taylor expanded in z around inf 66.5%
+-commutative66.5%
associate--l+66.5%
associate-*r/66.5%
associate-*r/66.5%
div-sub66.5%
distribute-lft-out--66.5%
mul-1-neg66.5%
distribute-neg-frac66.5%
unsub-neg66.5%
distribute-rgt-out--66.7%
Simplified66.7%
Taylor expanded in y around 0 55.8%
sub-neg55.8%
mul-1-neg55.8%
remove-double-neg55.8%
associate-/l*61.0%
Simplified61.0%
if -4.9999999999999997e32 < z < 4.09999999999999985e-19Initial program 94.0%
Taylor expanded in z around 0 74.1%
Taylor expanded in t around inf 62.1%
if 4.09999999999999985e-19 < z < 2.1e95Initial program 78.9%
Taylor expanded in a around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in y around inf 55.1%
div-sub55.1%
Simplified55.1%
if 2.1e95 < z Initial program 55.1%
Taylor expanded in a around 0 41.5%
associate-*r/41.5%
neg-mul-141.5%
Simplified41.5%
Taylor expanded in t around -inf 62.2%
mul-1-neg62.2%
*-commutative62.2%
sub-neg62.2%
metadata-eval62.2%
Simplified62.2%
Final simplification61.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.4e-58) t (if (<= z 1.2e-19) x (if (<= z 1.9e+95) (* x (/ y z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.4e-58) {
tmp = t;
} else if (z <= 1.2e-19) {
tmp = x;
} else if (z <= 1.9e+95) {
tmp = x * (y / 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 <= (-4.4d-58)) then
tmp = t
else if (z <= 1.2d-19) then
tmp = x
else if (z <= 1.9d+95) then
tmp = x * (y / 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 <= -4.4e-58) {
tmp = t;
} else if (z <= 1.2e-19) {
tmp = x;
} else if (z <= 1.9e+95) {
tmp = x * (y / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.4e-58: tmp = t elif z <= 1.2e-19: tmp = x elif z <= 1.9e+95: tmp = x * (y / z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.4e-58) tmp = t; elseif (z <= 1.2e-19) tmp = x; elseif (z <= 1.9e+95) tmp = Float64(x * Float64(y / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.4e-58) tmp = t; elseif (z <= 1.2e-19) tmp = x; elseif (z <= 1.9e+95) tmp = x * (y / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.4e-58], t, If[LessEqual[z, 1.2e-19], x, If[LessEqual[z, 1.9e+95], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-58}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-19}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.40000000000000011e-58 or 1.9e95 < z Initial program 65.4%
Taylor expanded in z around inf 46.3%
if -4.40000000000000011e-58 < z < 1.20000000000000011e-19Initial program 95.5%
Taylor expanded in a around inf 35.9%
if 1.20000000000000011e-19 < z < 1.9e95Initial program 78.9%
Taylor expanded in a around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in x around inf 32.4%
expm1-log1p-u12.2%
expm1-udef5.6%
associate-/l*14.3%
Applied egg-rr14.3%
expm1-def20.8%
expm1-log1p41.9%
associate-/r/42.1%
Simplified42.1%
Final simplification41.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -0.42) t (if (<= z 5e-31) (/ t (/ a y)) (if (<= z 2.5e+95) (* x (/ y z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.42) {
tmp = t;
} else if (z <= 5e-31) {
tmp = t / (a / y);
} else if (z <= 2.5e+95) {
tmp = x * (y / 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 <= (-0.42d0)) then
tmp = t
else if (z <= 5d-31) then
tmp = t / (a / y)
else if (z <= 2.5d+95) then
tmp = x * (y / 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 <= -0.42) {
tmp = t;
} else if (z <= 5e-31) {
tmp = t / (a / y);
} else if (z <= 2.5e+95) {
tmp = x * (y / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -0.42: tmp = t elif z <= 5e-31: tmp = t / (a / y) elif z <= 2.5e+95: tmp = x * (y / z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.42) tmp = t; elseif (z <= 5e-31) tmp = Float64(t / Float64(a / y)); elseif (z <= 2.5e+95) tmp = Float64(x * Float64(y / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -0.42) tmp = t; elseif (z <= 5e-31) tmp = t / (a / y); elseif (z <= 2.5e+95) tmp = x * (y / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.42], t, If[LessEqual[z, 5e-31], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+95], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.42:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-31}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -0.419999999999999984 or 2.50000000000000012e95 < z Initial program 63.4%
Taylor expanded in z around inf 50.1%
if -0.419999999999999984 < z < 5e-31Initial program 94.2%
Taylor expanded in x around 0 45.5%
Taylor expanded in a around inf 39.4%
associate-/l*40.2%
Simplified40.2%
Taylor expanded in y around inf 34.9%
if 5e-31 < z < 2.50000000000000012e95Initial program 79.7%
Taylor expanded in a around 0 56.0%
associate-*r/56.0%
neg-mul-156.0%
Simplified56.0%
Taylor expanded in x around inf 31.5%
expm1-log1p-u12.0%
expm1-udef5.7%
associate-/l*14.1%
Applied egg-rr14.1%
expm1-def20.4%
expm1-log1p40.8%
associate-/r/40.9%
Simplified40.9%
Final simplification42.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -7.5e+110) x (if (<= a 7.5e+106) 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 <= 7.5e+106) {
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 <= 7.5d+106) 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 <= 7.5e+106) {
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 <= 7.5e+106: 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 <= 7.5e+106) 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 <= 7.5e+106) 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, 7.5e+106], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{+110}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+106}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -7.5e110 or 7.50000000000000058e106 < a Initial program 94.0%
Taylor expanded in a around inf 58.4%
if -7.5e110 < a < 7.50000000000000058e106Initial program 73.1%
Taylor expanded in z around inf 32.1%
Final simplification40.2%
(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 79.5%
Taylor expanded in z around inf 25.3%
Final simplification25.3%
herbie shell --seed 2023224
(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)))))