
(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 19 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 (/ (- t x) (- a z))) (t_2 (+ x (* (- y z) t_1))))
(if (<= t_2 -1e-296)
t_2
(if (<= t_2 1e-284)
(+ t (/ (- x t) (/ z (- y a))))
(fma (- y z) t_1 x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) / (a - z);
double t_2 = x + ((y - z) * t_1);
double tmp;
if (t_2 <= -1e-296) {
tmp = t_2;
} else if (t_2 <= 1e-284) {
tmp = t + ((x - t) / (z / (y - a)));
} else {
tmp = fma((y - z), t_1, x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) / Float64(a - z)) t_2 = Float64(x + Float64(Float64(y - z) * t_1)) tmp = 0.0 if (t_2 <= -1e-296) tmp = t_2; elseif (t_2 <= 1e-284) tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))); else tmp = fma(Float64(y - z), t_1, x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-296], t$95$2, If[LessEqual[t$95$2, 1e-284], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * t$95$1 + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - x}{a - z}\\
t_2 := x + \left(y - z\right) \cdot t\_1\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-296}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 10^{-284}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - z, t\_1, x\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1e-296Initial program 89.5%
if -1e-296 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.00000000000000004e-284Initial program 3.6%
Taylor expanded in z around inf 85.8%
associate--l+85.8%
distribute-lft-out--85.8%
div-sub85.8%
mul-1-neg85.8%
unsub-neg85.8%
distribute-rgt-out--85.8%
associate-/l*97.2%
Simplified97.2%
if 1.00000000000000004e-284 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.4%
+-commutative91.4%
fma-def91.4%
Simplified91.4%
Final simplification91.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -1e-296) (not (<= t_1 1e-284)))
t_1
(+ t (/ (- x t) (/ z (- y a)))))))
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-296) || !(t_1 <= 1e-284)) {
tmp = t_1;
} else {
tmp = t + ((x - t) / (z / (y - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-1d-296)) .or. (.not. (t_1 <= 1d-284))) then
tmp = t_1
else
tmp = t + ((x - t) / (z / (y - a)))
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-296) || !(t_1 <= 1e-284)) {
tmp = t_1;
} else {
tmp = t + ((x - t) / (z / (y - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -1e-296) or not (t_1 <= 1e-284): tmp = t_1 else: tmp = t + ((x - t) / (z / (y - a))) 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-296) || !(t_1 <= 1e-284)) tmp = t_1; else tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))); 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-296) || ~((t_1 <= 1e-284))) tmp = t_1; else tmp = t + ((x - t) / (z / (y - a))); 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-296], N[Not[LessEqual[t$95$1, 1e-284]], $MachinePrecision]], t$95$1, N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $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 -1 \cdot 10^{-296} \lor \neg \left(t\_1 \leq 10^{-284}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1e-296 or 1.00000000000000004e-284 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.4%
if -1e-296 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.00000000000000004e-284Initial program 3.6%
Taylor expanded in z around inf 85.8%
associate--l+85.8%
distribute-lft-out--85.8%
div-sub85.8%
mul-1-neg85.8%
unsub-neg85.8%
distribute-rgt-out--85.8%
associate-/l*97.2%
Simplified97.2%
Final simplification91.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= z -8200000.0)
t_1
(if (<= z -2.9e-238)
(+ x (/ t (/ a y)))
(if (<= z 6.8e-302)
(* x (- 1.0 (/ y a)))
(if (<= z 1.5e-78)
(+ x (/ (* y t) a))
(if (<= z 1.6e-27)
(/ (- y) (/ z (- t x)))
(if (<= z 6.8e+37) (+ x (* t (/ y a))) t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -8200000.0) {
tmp = t_1;
} else if (z <= -2.9e-238) {
tmp = x + (t / (a / y));
} else if (z <= 6.8e-302) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.5e-78) {
tmp = x + ((y * t) / a);
} else if (z <= 1.6e-27) {
tmp = -y / (z / (t - x));
} else if (z <= 6.8e+37) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (y / z))
if (z <= (-8200000.0d0)) then
tmp = t_1
else if (z <= (-2.9d-238)) then
tmp = x + (t / (a / y))
else if (z <= 6.8d-302) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1.5d-78) then
tmp = x + ((y * t) / a)
else if (z <= 1.6d-27) then
tmp = -y / (z / (t - x))
else if (z <= 6.8d+37) then
tmp = x + (t * (y / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -8200000.0) {
tmp = t_1;
} else if (z <= -2.9e-238) {
tmp = x + (t / (a / y));
} else if (z <= 6.8e-302) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.5e-78) {
tmp = x + ((y * t) / a);
} else if (z <= 1.6e-27) {
tmp = -y / (z / (t - x));
} else if (z <= 6.8e+37) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if z <= -8200000.0: tmp = t_1 elif z <= -2.9e-238: tmp = x + (t / (a / y)) elif z <= 6.8e-302: tmp = x * (1.0 - (y / a)) elif z <= 1.5e-78: tmp = x + ((y * t) / a) elif z <= 1.6e-27: tmp = -y / (z / (t - x)) elif z <= 6.8e+37: tmp = x + (t * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -8200000.0) tmp = t_1; elseif (z <= -2.9e-238) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 6.8e-302) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1.5e-78) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 1.6e-27) tmp = Float64(Float64(-y) / Float64(z / Float64(t - x))); elseif (z <= 6.8e+37) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -8200000.0) tmp = t_1; elseif (z <= -2.9e-238) tmp = x + (t / (a / y)); elseif (z <= 6.8e-302) tmp = x * (1.0 - (y / a)); elseif (z <= 1.5e-78) tmp = x + ((y * t) / a); elseif (z <= 1.6e-27) tmp = -y / (z / (t - x)); elseif (z <= 6.8e+37) tmp = x + (t * (y / a)); else tmp = t_1; 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]}, If[LessEqual[z, -8200000.0], t$95$1, If[LessEqual[z, -2.9e-238], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e-302], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-78], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-27], N[((-y) / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+37], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -8200000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-238}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-302}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-78}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-27}:\\
\;\;\;\;\frac{-y}{\frac{z}{t - x}}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+37}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.2e6 or 6.80000000000000011e37 < z Initial program 64.2%
Taylor expanded in t around inf 63.1%
Taylor expanded in a around 0 56.1%
mul-1-neg56.1%
unsub-neg56.1%
Simplified56.1%
if -8.2e6 < z < -2.8999999999999998e-238Initial program 93.0%
Taylor expanded in z around 0 67.6%
associate-/l*75.9%
associate-/r/75.8%
Simplified75.8%
Taylor expanded in t around inf 62.6%
associate-*r/67.4%
Simplified67.4%
clear-num67.3%
un-div-inv67.4%
Applied egg-rr67.4%
if -2.8999999999999998e-238 < z < 6.8e-302Initial program 100.0%
Taylor expanded in z around 0 86.6%
associate-/l*99.9%
associate-/r/93.0%
Simplified93.0%
Taylor expanded in x around inf 93.0%
mul-1-neg93.0%
unsub-neg93.0%
Simplified93.0%
if 6.8e-302 < z < 1.49999999999999994e-78Initial program 85.8%
Taylor expanded in z around 0 81.7%
associate-/l*78.7%
associate-/r/81.7%
Simplified81.7%
Taylor expanded in t around inf 73.5%
if 1.49999999999999994e-78 < z < 1.59999999999999995e-27Initial program 99.4%
Taylor expanded in y around inf 83.3%
Taylor expanded in y around inf 80.3%
div-sub80.3%
associate-*r/80.6%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in a around 0 78.9%
mul-1-neg78.9%
associate-/l*78.9%
distribute-neg-frac78.9%
Simplified78.9%
if 1.59999999999999995e-27 < z < 6.80000000000000011e37Initial program 82.4%
Taylor expanded in z around 0 73.8%
associate-/l*73.8%
associate-/r/73.8%
Simplified73.8%
Taylor expanded in t around inf 70.9%
associate-*r/70.9%
Simplified70.9%
Final simplification65.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* y (- t x)) (- a z)))) (t_2 (+ t (* (- y a) (/ x z)))))
(if (<= z -1200000000000.0)
t_2
(if (<= z -7.5e-157)
t_1
(if (<= z -1.05e-284)
(+ x (/ y (/ a (- t x))))
(if (<= z 9.8e+64) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * (t - x)) / (a - z));
double t_2 = t + ((y - a) * (x / z));
double tmp;
if (z <= -1200000000000.0) {
tmp = t_2;
} else if (z <= -7.5e-157) {
tmp = t_1;
} else if (z <= -1.05e-284) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 9.8e+64) {
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 = x + ((y * (t - x)) / (a - z))
t_2 = t + ((y - a) * (x / z))
if (z <= (-1200000000000.0d0)) then
tmp = t_2
else if (z <= (-7.5d-157)) then
tmp = t_1
else if (z <= (-1.05d-284)) then
tmp = x + (y / (a / (t - x)))
else if (z <= 9.8d+64) 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 = x + ((y * (t - x)) / (a - z));
double t_2 = t + ((y - a) * (x / z));
double tmp;
if (z <= -1200000000000.0) {
tmp = t_2;
} else if (z <= -7.5e-157) {
tmp = t_1;
} else if (z <= -1.05e-284) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 9.8e+64) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y * (t - x)) / (a - z)) t_2 = t + ((y - a) * (x / z)) tmp = 0 if z <= -1200000000000.0: tmp = t_2 elif z <= -7.5e-157: tmp = t_1 elif z <= -1.05e-284: tmp = x + (y / (a / (t - x))) elif z <= 9.8e+64: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y * Float64(t - x)) / Float64(a - z))) t_2 = Float64(t + Float64(Float64(y - a) * Float64(x / z))) tmp = 0.0 if (z <= -1200000000000.0) tmp = t_2; elseif (z <= -7.5e-157) tmp = t_1; elseif (z <= -1.05e-284) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (z <= 9.8e+64) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y * (t - x)) / (a - z)); t_2 = t + ((y - a) * (x / z)); tmp = 0.0; if (z <= -1200000000000.0) tmp = t_2; elseif (z <= -7.5e-157) tmp = t_1; elseif (z <= -1.05e-284) tmp = x + (y / (a / (t - x))); elseif (z <= 9.8e+64) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1200000000000.0], t$95$2, If[LessEqual[z, -7.5e-157], t$95$1, If[LessEqual[z, -1.05e-284], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.8e+64], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot \left(t - x\right)}{a - z}\\
t_2 := t + \left(y - a\right) \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -1200000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-284}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.2e12 or 9.8000000000000005e64 < z Initial program 61.5%
Taylor expanded in z around inf 66.3%
associate--l+66.3%
distribute-lft-out--66.3%
div-sub66.3%
mul-1-neg66.3%
unsub-neg66.3%
distribute-rgt-out--66.5%
associate-/l*79.6%
Simplified79.6%
Taylor expanded in t around 0 68.1%
mul-1-neg68.1%
associate-*l/73.8%
distribute-rgt-neg-in73.8%
Simplified73.8%
if -1.2e12 < z < -7.500000000000001e-157 or -1.04999999999999996e-284 < z < 9.8000000000000005e64Initial program 88.8%
Taylor expanded in y around inf 82.3%
if -7.500000000000001e-157 < z < -1.04999999999999996e-284Initial program 99.8%
Taylor expanded in z around 0 79.8%
associate-/l*96.9%
Simplified96.9%
Final simplification80.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= a -8.8e+28)
(+ x (* t (/ y a)))
(if (<= a 2.2e+55)
t_1
(if (<= a 1.24e+225)
(+ x (/ t (/ a y)))
(if (<= a 4.6e+241) t_1 (- x (* x (/ y a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (a <= -8.8e+28) {
tmp = x + (t * (y / a));
} else if (a <= 2.2e+55) {
tmp = t_1;
} else if (a <= 1.24e+225) {
tmp = x + (t / (a / y));
} else if (a <= 4.6e+241) {
tmp = t_1;
} else {
tmp = x - (x * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
if (a <= (-8.8d+28)) then
tmp = x + (t * (y / a))
else if (a <= 2.2d+55) then
tmp = t_1
else if (a <= 1.24d+225) then
tmp = x + (t / (a / y))
else if (a <= 4.6d+241) then
tmp = t_1
else
tmp = x - (x * (y / a))
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 tmp;
if (a <= -8.8e+28) {
tmp = x + (t * (y / a));
} else if (a <= 2.2e+55) {
tmp = t_1;
} else if (a <= 1.24e+225) {
tmp = x + (t / (a / y));
} else if (a <= 4.6e+241) {
tmp = t_1;
} else {
tmp = x - (x * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if a <= -8.8e+28: tmp = x + (t * (y / a)) elif a <= 2.2e+55: tmp = t_1 elif a <= 1.24e+225: tmp = x + (t / (a / y)) elif a <= 4.6e+241: tmp = t_1 else: tmp = x - (x * (y / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (a <= -8.8e+28) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (a <= 2.2e+55) tmp = t_1; elseif (a <= 1.24e+225) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (a <= 4.6e+241) tmp = t_1; else tmp = Float64(x - Float64(x * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (a <= -8.8e+28) tmp = x + (t * (y / a)); elseif (a <= 2.2e+55) tmp = t_1; elseif (a <= 1.24e+225) tmp = x + (t / (a / y)); elseif (a <= 4.6e+241) tmp = t_1; else tmp = x - (x * (y / a)); 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]}, If[LessEqual[a, -8.8e+28], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.2e+55], t$95$1, If[LessEqual[a, 1.24e+225], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.6e+241], t$95$1, N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;a \leq -8.8 \cdot 10^{+28}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.24 \cdot 10^{+225}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{+241}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -8.79999999999999946e28Initial program 88.2%
Taylor expanded in z around 0 67.1%
associate-/l*74.6%
associate-/r/76.5%
Simplified76.5%
Taylor expanded in t around inf 61.0%
associate-*r/66.4%
Simplified66.4%
if -8.79999999999999946e28 < a < 2.2000000000000001e55 or 1.24e225 < a < 4.5999999999999999e241Initial program 72.6%
Taylor expanded in t around inf 66.2%
Taylor expanded in y around 0 53.7%
+-commutative53.7%
associate-*r/55.5%
associate-*r/55.5%
mul-1-neg55.5%
distribute-rgt-neg-out55.5%
associate-*r/66.2%
distribute-lft-out66.2%
distribute-frac-neg66.2%
sub-neg66.2%
div-sub66.2%
Simplified66.2%
if 2.2000000000000001e55 < a < 1.24e225Initial program 87.0%
Taylor expanded in z around 0 60.8%
associate-/l*66.5%
associate-/r/67.3%
Simplified67.3%
Taylor expanded in t around inf 60.1%
associate-*r/63.2%
Simplified63.2%
clear-num63.3%
un-div-inv63.3%
Applied egg-rr63.3%
if 4.5999999999999999e241 < a Initial program 99.8%
Taylor expanded in z around 0 84.0%
associate-/l*99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 78.7%
associate-*r/78.7%
mul-1-neg78.7%
distribute-lft-neg-out78.7%
associate-*r/94.7%
distribute-lft-neg-out94.7%
distribute-rgt-neg-in94.7%
mul-1-neg94.7%
associate-*r/94.7%
neg-mul-194.7%
Simplified94.7%
Final simplification67.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= z -9.5e-80)
t_2
(if (<= z 2e-56)
t_1
(if (<= z 9.4e-32)
(/ (- y) (/ z (- t x)))
(if (<= z 5e+37) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * (y / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -9.5e-80) {
tmp = t_2;
} else if (z <= 2e-56) {
tmp = t_1;
} else if (z <= 9.4e-32) {
tmp = -y / (z / (t - x));
} else if (z <= 5e+37) {
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 = x + ((t - x) * (y / a))
t_2 = t * ((y - z) / (a - z))
if (z <= (-9.5d-80)) then
tmp = t_2
else if (z <= 2d-56) then
tmp = t_1
else if (z <= 9.4d-32) then
tmp = -y / (z / (t - x))
else if (z <= 5d+37) 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 = x + ((t - x) * (y / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -9.5e-80) {
tmp = t_2;
} else if (z <= 2e-56) {
tmp = t_1;
} else if (z <= 9.4e-32) {
tmp = -y / (z / (t - x));
} else if (z <= 5e+37) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * (y / a)) t_2 = t * ((y - z) / (a - z)) tmp = 0 if z <= -9.5e-80: tmp = t_2 elif z <= 2e-56: tmp = t_1 elif z <= 9.4e-32: tmp = -y / (z / (t - x)) elif z <= 5e+37: tmp = t_1 else: tmp = t_2 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(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -9.5e-80) tmp = t_2; elseif (z <= 2e-56) tmp = t_1; elseif (z <= 9.4e-32) tmp = Float64(Float64(-y) / Float64(z / Float64(t - x))); elseif (z <= 5e+37) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * (y / a)); t_2 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -9.5e-80) tmp = t_2; elseif (z <= 2e-56) tmp = t_1; elseif (z <= 9.4e-32) tmp = -y / (z / (t - x)); elseif (z <= 5e+37) tmp = t_1; else tmp = t_2; 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[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.5e-80], t$95$2, If[LessEqual[z, 2e-56], t$95$1, If[LessEqual[z, 9.4e-32], N[((-y) / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+37], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{-80}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.4 \cdot 10^{-32}:\\
\;\;\;\;\frac{-y}{\frac{z}{t - x}}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -9.5000000000000003e-80 or 4.99999999999999989e37 < z Initial program 67.2%
Taylor expanded in t around inf 61.6%
Taylor expanded in y around 0 39.9%
+-commutative39.9%
associate-*r/40.8%
associate-*r/40.8%
mul-1-neg40.8%
distribute-rgt-neg-out40.8%
associate-*r/61.6%
distribute-lft-out61.6%
distribute-frac-neg61.6%
sub-neg61.6%
div-sub61.6%
Simplified61.6%
if -9.5000000000000003e-80 < z < 2.0000000000000001e-56 or 9.40000000000000039e-32 < z < 4.99999999999999989e37Initial program 90.5%
Taylor expanded in z around 0 80.2%
associate-/l*84.2%
associate-/r/84.6%
Simplified84.6%
if 2.0000000000000001e-56 < z < 9.40000000000000039e-32Initial program 99.1%
Taylor expanded in y around inf 76.1%
Taylor expanded in y around inf 85.5%
div-sub85.5%
associate-*r/85.9%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in a around 0 83.6%
mul-1-neg83.6%
associate-/l*83.8%
distribute-neg-frac83.8%
Simplified83.8%
Final simplification73.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= z -1.05e-80)
t_2
(if (<= z 1.45e-55)
t_1
(if (<= z 7e-28)
(/ y (/ (- a z) (- t x)))
(if (<= z 2.15e+39) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * (y / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1.05e-80) {
tmp = t_2;
} else if (z <= 1.45e-55) {
tmp = t_1;
} else if (z <= 7e-28) {
tmp = y / ((a - z) / (t - x));
} else if (z <= 2.15e+39) {
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 = x + ((t - x) * (y / a))
t_2 = t * ((y - z) / (a - z))
if (z <= (-1.05d-80)) then
tmp = t_2
else if (z <= 1.45d-55) then
tmp = t_1
else if (z <= 7d-28) then
tmp = y / ((a - z) / (t - x))
else if (z <= 2.15d+39) 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 = x + ((t - x) * (y / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1.05e-80) {
tmp = t_2;
} else if (z <= 1.45e-55) {
tmp = t_1;
} else if (z <= 7e-28) {
tmp = y / ((a - z) / (t - x));
} else if (z <= 2.15e+39) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * (y / a)) t_2 = t * ((y - z) / (a - z)) tmp = 0 if z <= -1.05e-80: tmp = t_2 elif z <= 1.45e-55: tmp = t_1 elif z <= 7e-28: tmp = y / ((a - z) / (t - x)) elif z <= 2.15e+39: tmp = t_1 else: tmp = t_2 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(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -1.05e-80) tmp = t_2; elseif (z <= 1.45e-55) tmp = t_1; elseif (z <= 7e-28) tmp = Float64(y / Float64(Float64(a - z) / Float64(t - x))); elseif (z <= 2.15e+39) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * (y / a)); t_2 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -1.05e-80) tmp = t_2; elseif (z <= 1.45e-55) tmp = t_1; elseif (z <= 7e-28) tmp = y / ((a - z) / (t - x)); elseif (z <= 2.15e+39) tmp = t_1; else tmp = t_2; 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[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e-80], t$95$2, If[LessEqual[z, 1.45e-55], t$95$1, If[LessEqual[z, 7e-28], N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+39], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{-80}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-28}:\\
\;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.05000000000000001e-80 or 2.15e39 < z Initial program 67.2%
Taylor expanded in t around inf 61.6%
Taylor expanded in y around 0 39.9%
+-commutative39.9%
associate-*r/40.8%
associate-*r/40.8%
mul-1-neg40.8%
distribute-rgt-neg-out40.8%
associate-*r/61.6%
distribute-lft-out61.6%
distribute-frac-neg61.6%
sub-neg61.6%
div-sub61.6%
Simplified61.6%
if -1.05000000000000001e-80 < z < 1.45e-55 or 6.9999999999999999e-28 < z < 2.15e39Initial program 90.5%
Taylor expanded in z around 0 80.2%
associate-/l*84.2%
associate-/r/84.6%
Simplified84.6%
if 1.45e-55 < z < 6.9999999999999999e-28Initial program 99.1%
Taylor expanded in y around inf 76.1%
Taylor expanded in y around inf 85.5%
div-sub85.5%
associate-*r/85.9%
associate-/l*86.4%
Simplified86.4%
Final simplification73.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -1.1e-79)
t_1
(if (<= z 1.6e-55)
(+ x (* (- t x) (/ y a)))
(if (<= z 5.8e+90)
(/ y (/ (- a z) (- t x)))
(if (<= z 8.8e+160) (+ t (/ a (/ z (- t x)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1.1e-79) {
tmp = t_1;
} else if (z <= 1.6e-55) {
tmp = x + ((t - x) * (y / a));
} else if (z <= 5.8e+90) {
tmp = y / ((a - z) / (t - x));
} else if (z <= 8.8e+160) {
tmp = t + (a / (z / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
if (z <= (-1.1d-79)) then
tmp = t_1
else if (z <= 1.6d-55) then
tmp = x + ((t - x) * (y / a))
else if (z <= 5.8d+90) then
tmp = y / ((a - z) / (t - x))
else if (z <= 8.8d+160) then
tmp = t + (a / (z / (t - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1.1e-79) {
tmp = t_1;
} else if (z <= 1.6e-55) {
tmp = x + ((t - x) * (y / a));
} else if (z <= 5.8e+90) {
tmp = y / ((a - z) / (t - x));
} else if (z <= 8.8e+160) {
tmp = t + (a / (z / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -1.1e-79: tmp = t_1 elif z <= 1.6e-55: tmp = x + ((t - x) * (y / a)) elif z <= 5.8e+90: tmp = y / ((a - z) / (t - x)) elif z <= 8.8e+160: tmp = t + (a / (z / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -1.1e-79) tmp = t_1; elseif (z <= 1.6e-55) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); elseif (z <= 5.8e+90) tmp = Float64(y / Float64(Float64(a - z) / Float64(t - x))); elseif (z <= 8.8e+160) tmp = Float64(t + Float64(a / Float64(z / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -1.1e-79) tmp = t_1; elseif (z <= 1.6e-55) tmp = x + ((t - x) * (y / a)); elseif (z <= 5.8e+90) tmp = y / ((a - z) / (t - x)); elseif (z <= 8.8e+160) tmp = t + (a / (z / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e-79], t$95$1, If[LessEqual[z, 1.6e-55], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+90], N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e+160], N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-55}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+90}:\\
\;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+160}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.0999999999999999e-79 or 8.79999999999999968e160 < z Initial program 68.0%
Taylor expanded in t around inf 64.9%
Taylor expanded in y around 0 42.7%
+-commutative42.7%
associate-*r/43.7%
associate-*r/43.7%
mul-1-neg43.7%
distribute-rgt-neg-out43.7%
associate-*r/64.9%
distribute-lft-out64.9%
distribute-frac-neg64.9%
sub-neg64.9%
div-sub64.9%
Simplified64.9%
if -1.0999999999999999e-79 < z < 1.6000000000000001e-55Initial program 91.3%
Taylor expanded in z around 0 80.8%
associate-/l*85.3%
associate-/r/85.7%
Simplified85.7%
if 1.6000000000000001e-55 < z < 5.8000000000000003e90Initial program 84.0%
Taylor expanded in y around inf 66.6%
Taylor expanded in y around inf 58.7%
div-sub58.7%
associate-*r/58.7%
associate-/l*58.9%
Simplified58.9%
if 5.8000000000000003e90 < z < 8.79999999999999968e160Initial program 48.6%
Taylor expanded in z around inf 78.9%
associate--l+78.9%
distribute-lft-out--78.9%
div-sub78.9%
mul-1-neg78.9%
unsub-neg78.9%
distribute-rgt-out--78.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around 0 57.3%
mul-1-neg57.3%
associate-/l*68.6%
Simplified68.6%
Final simplification73.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (/ y a)))) (t_2 (+ t (* (- y a) (/ x z)))))
(if (<= z -1.35e-38)
t_2
(if (<= z 1.7e-55)
t_1
(if (<= z 1.25e-28)
(/ y (/ (- a z) (- t x)))
(if (<= z 2.3e+37) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * (y / a));
double t_2 = t + ((y - a) * (x / z));
double tmp;
if (z <= -1.35e-38) {
tmp = t_2;
} else if (z <= 1.7e-55) {
tmp = t_1;
} else if (z <= 1.25e-28) {
tmp = y / ((a - z) / (t - x));
} else if (z <= 2.3e+37) {
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 = x + ((t - x) * (y / a))
t_2 = t + ((y - a) * (x / z))
if (z <= (-1.35d-38)) then
tmp = t_2
else if (z <= 1.7d-55) then
tmp = t_1
else if (z <= 1.25d-28) then
tmp = y / ((a - z) / (t - x))
else if (z <= 2.3d+37) 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 = x + ((t - x) * (y / a));
double t_2 = t + ((y - a) * (x / z));
double tmp;
if (z <= -1.35e-38) {
tmp = t_2;
} else if (z <= 1.7e-55) {
tmp = t_1;
} else if (z <= 1.25e-28) {
tmp = y / ((a - z) / (t - x));
} else if (z <= 2.3e+37) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * (y / a)) t_2 = t + ((y - a) * (x / z)) tmp = 0 if z <= -1.35e-38: tmp = t_2 elif z <= 1.7e-55: tmp = t_1 elif z <= 1.25e-28: tmp = y / ((a - z) / (t - x)) elif z <= 2.3e+37: tmp = t_1 else: tmp = t_2 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(Float64(y - a) * Float64(x / z))) tmp = 0.0 if (z <= -1.35e-38) tmp = t_2; elseif (z <= 1.7e-55) tmp = t_1; elseif (z <= 1.25e-28) tmp = Float64(y / Float64(Float64(a - z) / Float64(t - x))); elseif (z <= 2.3e+37) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * (y / a)); t_2 = t + ((y - a) * (x / z)); tmp = 0.0; if (z <= -1.35e-38) tmp = t_2; elseif (z <= 1.7e-55) tmp = t_1; elseif (z <= 1.25e-28) tmp = y / ((a - z) / (t - x)); elseif (z <= 2.3e+37) tmp = t_1; else tmp = t_2; 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[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e-38], t$95$2, If[LessEqual[z, 1.7e-55], t$95$1, If[LessEqual[z, 1.25e-28], N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+37], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\
t_2 := t + \left(y - a\right) \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{-38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-28}:\\
\;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.35000000000000003e-38 or 2.30000000000000002e37 < z Initial program 65.3%
Taylor expanded in z around inf 67.3%
associate--l+67.3%
distribute-lft-out--67.3%
div-sub67.3%
mul-1-neg67.3%
unsub-neg67.3%
distribute-rgt-out--67.4%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in t around 0 64.6%
mul-1-neg64.6%
associate-*l/69.6%
distribute-rgt-neg-in69.6%
Simplified69.6%
if -1.35000000000000003e-38 < z < 1.69999999999999986e-55 or 1.25e-28 < z < 2.30000000000000002e37Initial program 91.1%
Taylor expanded in z around 0 78.2%
associate-/l*82.1%
associate-/r/82.4%
Simplified82.4%
if 1.69999999999999986e-55 < z < 1.25e-28Initial program 99.1%
Taylor expanded in y around inf 76.1%
Taylor expanded in y around inf 85.5%
div-sub85.5%
associate-*r/85.9%
associate-/l*86.4%
Simplified86.4%
Final simplification76.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))) (t_2 (* t (- 1.0 (/ y z)))))
(if (<= z -320000.0)
t_2
(if (<= z -2.15e-238)
t_1
(if (<= z 3.7e-298)
(* x (- 1.0 (/ y a)))
(if (<= z 1.9e+39) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double t_2 = t * (1.0 - (y / z));
double tmp;
if (z <= -320000.0) {
tmp = t_2;
} else if (z <= -2.15e-238) {
tmp = t_1;
} else if (z <= 3.7e-298) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.9e+39) {
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 = x + (t * (y / a))
t_2 = t * (1.0d0 - (y / z))
if (z <= (-320000.0d0)) then
tmp = t_2
else if (z <= (-2.15d-238)) then
tmp = t_1
else if (z <= 3.7d-298) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1.9d+39) 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 = x + (t * (y / a));
double t_2 = t * (1.0 - (y / z));
double tmp;
if (z <= -320000.0) {
tmp = t_2;
} else if (z <= -2.15e-238) {
tmp = t_1;
} else if (z <= 3.7e-298) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.9e+39) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) t_2 = t * (1.0 - (y / z)) tmp = 0 if z <= -320000.0: tmp = t_2 elif z <= -2.15e-238: tmp = t_1 elif z <= 3.7e-298: tmp = x * (1.0 - (y / a)) elif z <= 1.9e+39: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) t_2 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -320000.0) tmp = t_2; elseif (z <= -2.15e-238) tmp = t_1; elseif (z <= 3.7e-298) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1.9e+39) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); t_2 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -320000.0) tmp = t_2; elseif (z <= -2.15e-238) tmp = t_1; elseif (z <= 3.7e-298) tmp = x * (1.0 - (y / a)); elseif (z <= 1.9e+39) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -320000.0], t$95$2, If[LessEqual[z, -2.15e-238], t$95$1, If[LessEqual[z, 3.7e-298], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+39], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -320000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-298}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.2e5 or 1.8999999999999999e39 < z Initial program 64.2%
Taylor expanded in t around inf 63.1%
Taylor expanded in a around 0 56.1%
mul-1-neg56.1%
unsub-neg56.1%
Simplified56.1%
if -3.2e5 < z < -2.14999999999999984e-238 or 3.6999999999999998e-298 < z < 1.8999999999999999e39Initial program 89.7%
Taylor expanded in z around 0 71.2%
associate-/l*73.5%
associate-/r/74.6%
Simplified74.6%
Taylor expanded in t around inf 64.8%
associate-*r/66.8%
Simplified66.8%
if -2.14999999999999984e-238 < z < 3.6999999999999998e-298Initial program 100.0%
Taylor expanded in z around 0 86.6%
associate-/l*99.9%
associate-/r/93.0%
Simplified93.0%
Taylor expanded in x around inf 93.0%
mul-1-neg93.0%
unsub-neg93.0%
Simplified93.0%
Final simplification63.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ t (/ a y)))) (t_2 (* t (- 1.0 (/ y z)))))
(if (<= z -9200000.0)
t_2
(if (<= z -3.6e-238)
t_1
(if (<= z 8.5e-296)
(* x (- 1.0 (/ y a)))
(if (<= z 1.95e+37) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t / (a / y));
double t_2 = t * (1.0 - (y / z));
double tmp;
if (z <= -9200000.0) {
tmp = t_2;
} else if (z <= -3.6e-238) {
tmp = t_1;
} else if (z <= 8.5e-296) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.95e+37) {
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 = x + (t / (a / y))
t_2 = t * (1.0d0 - (y / z))
if (z <= (-9200000.0d0)) then
tmp = t_2
else if (z <= (-3.6d-238)) then
tmp = t_1
else if (z <= 8.5d-296) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1.95d+37) 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 = x + (t / (a / y));
double t_2 = t * (1.0 - (y / z));
double tmp;
if (z <= -9200000.0) {
tmp = t_2;
} else if (z <= -3.6e-238) {
tmp = t_1;
} else if (z <= 8.5e-296) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.95e+37) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t / (a / y)) t_2 = t * (1.0 - (y / z)) tmp = 0 if z <= -9200000.0: tmp = t_2 elif z <= -3.6e-238: tmp = t_1 elif z <= 8.5e-296: tmp = x * (1.0 - (y / a)) elif z <= 1.95e+37: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t / Float64(a / y))) t_2 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -9200000.0) tmp = t_2; elseif (z <= -3.6e-238) tmp = t_1; elseif (z <= 8.5e-296) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1.95e+37) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t / (a / y)); t_2 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -9200000.0) tmp = t_2; elseif (z <= -3.6e-238) tmp = t_1; elseif (z <= 8.5e-296) tmp = x * (1.0 - (y / a)); elseif (z <= 1.95e+37) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9200000.0], t$95$2, If[LessEqual[z, -3.6e-238], t$95$1, If[LessEqual[z, 8.5e-296], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e+37], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t}{\frac{a}{y}}\\
t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -9200000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-296}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -9.2e6 or 1.9499999999999999e37 < z Initial program 64.2%
Taylor expanded in t around inf 63.1%
Taylor expanded in a around 0 56.1%
mul-1-neg56.1%
unsub-neg56.1%
Simplified56.1%
if -9.2e6 < z < -3.6000000000000001e-238 or 8.50000000000000018e-296 < z < 1.9499999999999999e37Initial program 89.7%
Taylor expanded in z around 0 71.2%
associate-/l*73.5%
associate-/r/74.6%
Simplified74.6%
Taylor expanded in t around inf 64.8%
associate-*r/66.8%
Simplified66.8%
clear-num66.8%
un-div-inv66.8%
Applied egg-rr66.8%
if -3.6000000000000001e-238 < z < 8.50000000000000018e-296Initial program 100.0%
Taylor expanded in z around 0 86.6%
associate-/l*99.9%
associate-/r/93.0%
Simplified93.0%
Taylor expanded in x around inf 93.0%
mul-1-neg93.0%
unsub-neg93.0%
Simplified93.0%
Final simplification63.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -8.2e+28)
x
(if (<= a 1.4e-9)
(* t (- 1.0 (/ y z)))
(if (<= a 9.5e+72) (* t (/ (- y z) a)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.2e+28) {
tmp = x;
} else if (a <= 1.4e-9) {
tmp = t * (1.0 - (y / z));
} else if (a <= 9.5e+72) {
tmp = t * ((y - z) / a);
} 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.2d+28)) then
tmp = x
else if (a <= 1.4d-9) then
tmp = t * (1.0d0 - (y / z))
else if (a <= 9.5d+72) then
tmp = t * ((y - z) / a)
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.2e+28) {
tmp = x;
} else if (a <= 1.4e-9) {
tmp = t * (1.0 - (y / z));
} else if (a <= 9.5e+72) {
tmp = t * ((y - z) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8.2e+28: tmp = x elif a <= 1.4e-9: tmp = t * (1.0 - (y / z)) elif a <= 9.5e+72: tmp = t * ((y - z) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8.2e+28) tmp = x; elseif (a <= 1.4e-9) tmp = Float64(t * Float64(1.0 - Float64(y / z))); elseif (a <= 9.5e+72) tmp = Float64(t * Float64(Float64(y - z) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -8.2e+28) tmp = x; elseif (a <= 1.4e-9) tmp = t * (1.0 - (y / z)); elseif (a <= 9.5e+72) tmp = t * ((y - z) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.2e+28], x, If[LessEqual[a, 1.4e-9], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e+72], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.2 \cdot 10^{+28}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-9}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+72}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -8.19999999999999961e28 or 9.50000000000000054e72 < a Initial program 92.1%
Taylor expanded in a around inf 55.1%
if -8.19999999999999961e28 < a < 1.39999999999999992e-9Initial program 70.0%
Taylor expanded in t around inf 66.8%
Taylor expanded in a around 0 56.6%
mul-1-neg56.6%
unsub-neg56.6%
Simplified56.6%
if 1.39999999999999992e-9 < a < 9.50000000000000054e72Initial program 76.4%
Taylor expanded in t around inf 45.5%
Taylor expanded in y around 0 41.3%
+-commutative41.3%
associate-*r/41.3%
associate-*r/41.3%
mul-1-neg41.3%
distribute-rgt-neg-out41.3%
associate-*r/45.5%
distribute-lft-out45.5%
distribute-frac-neg45.5%
sub-neg45.5%
div-sub45.5%
Simplified45.5%
Taylor expanded in a around inf 33.8%
associate-*r/33.8%
Simplified33.8%
Final simplification54.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.7e-39) (not (<= z 2.8e+37))) (+ t (/ (- x t) (/ z (- y a)))) (+ x (/ (* y (- t x)) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.7e-39) || !(z <= 2.8e+37)) {
tmp = t + ((x - t) / (z / (y - a)));
} else {
tmp = x + ((y * (t - x)) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.7d-39)) .or. (.not. (z <= 2.8d+37))) then
tmp = t + ((x - t) / (z / (y - a)))
else
tmp = x + ((y * (t - x)) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.7e-39) || !(z <= 2.8e+37)) {
tmp = t + ((x - t) / (z / (y - a)));
} else {
tmp = x + ((y * (t - x)) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.7e-39) or not (z <= 2.8e+37): tmp = t + ((x - t) / (z / (y - a))) else: tmp = x + ((y * (t - x)) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.7e-39) || !(z <= 2.8e+37)) tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))); else tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.7e-39) || ~((z <= 2.8e+37))) tmp = t + ((x - t) / (z / (y - a))); else tmp = x + ((y * (t - x)) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.7e-39], N[Not[LessEqual[z, 2.8e+37]], $MachinePrecision]], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{-39} \lor \neg \left(z \leq 2.8 \cdot 10^{+37}\right):\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\
\end{array}
\end{array}
if z < -3.70000000000000015e-39 or 2.7999999999999998e37 < z Initial program 65.3%
Taylor expanded in z around inf 67.3%
associate--l+67.3%
distribute-lft-out--67.3%
div-sub67.3%
mul-1-neg67.3%
unsub-neg67.3%
distribute-rgt-out--67.4%
associate-/l*78.6%
Simplified78.6%
if -3.70000000000000015e-39 < z < 2.7999999999999998e37Initial program 91.5%
Taylor expanded in y around inf 84.4%
Final simplification81.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.2e-40) (not (<= z 1.9e+37))) (* t (- 1.0 (/ y z))) (* x (- 1.0 (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.2e-40) || !(z <= 1.9e+37)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-9.2d-40)) .or. (.not. (z <= 1.9d+37))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x * (1.0d0 - (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.2e-40) || !(z <= 1.9e+37)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.2e-40) or not (z <= 1.9e+37): tmp = t * (1.0 - (y / z)) else: tmp = x * (1.0 - (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.2e-40) || !(z <= 1.9e+37)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x * Float64(1.0 - Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.2e-40) || ~((z <= 1.9e+37))) tmp = t * (1.0 - (y / z)); else tmp = x * (1.0 - (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.2e-40], N[Not[LessEqual[z, 1.9e+37]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{-40} \lor \neg \left(z \leq 1.9 \cdot 10^{+37}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\end{array}
\end{array}
if z < -9.2e-40 or 1.89999999999999995e37 < z Initial program 65.3%
Taylor expanded in t around inf 61.9%
Taylor expanded in a around 0 55.4%
mul-1-neg55.4%
unsub-neg55.4%
Simplified55.4%
if -9.2e-40 < z < 1.89999999999999995e37Initial program 91.5%
Taylor expanded in z around 0 75.0%
associate-/l*78.6%
associate-/r/79.0%
Simplified79.0%
Taylor expanded in x around inf 54.9%
mul-1-neg54.9%
unsub-neg54.9%
Simplified54.9%
Final simplification55.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -6e+28) x (if (<= a 6.4e+72) (* t (- 1.0 (/ y z))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6e+28) {
tmp = x;
} else if (a <= 6.4e+72) {
tmp = t * (1.0 - (y / z));
} 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 <= (-6d+28)) then
tmp = x
else if (a <= 6.4d+72) then
tmp = t * (1.0d0 - (y / z))
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 <= -6e+28) {
tmp = x;
} else if (a <= 6.4e+72) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6e+28: tmp = x elif a <= 6.4e+72: tmp = t * (1.0 - (y / z)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6e+28) tmp = x; elseif (a <= 6.4e+72) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6e+28) tmp = x; elseif (a <= 6.4e+72) tmp = t * (1.0 - (y / z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6e+28], x, If[LessEqual[a, 6.4e+72], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{+28}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 6.4 \cdot 10^{+72}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6.0000000000000002e28 or 6.4000000000000003e72 < a Initial program 92.1%
Taylor expanded in a around inf 55.1%
if -6.0000000000000002e28 < a < 6.4000000000000003e72Initial program 70.9%
Taylor expanded in t around inf 63.8%
Taylor expanded in a around 0 50.4%
mul-1-neg50.4%
unsub-neg50.4%
Simplified50.4%
Final simplification52.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -2e+21) x (if (<= a -5.8e-91) (/ x (/ z y)) (if (<= a 1.15e-46) t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e+21) {
tmp = x;
} else if (a <= -5.8e-91) {
tmp = x / (z / y);
} else if (a <= 1.15e-46) {
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 <= (-2d+21)) then
tmp = x
else if (a <= (-5.8d-91)) then
tmp = x / (z / y)
else if (a <= 1.15d-46) 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 <= -2e+21) {
tmp = x;
} else if (a <= -5.8e-91) {
tmp = x / (z / y);
} else if (a <= 1.15e-46) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2e+21: tmp = x elif a <= -5.8e-91: tmp = x / (z / y) elif a <= 1.15e-46: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2e+21) tmp = x; elseif (a <= -5.8e-91) tmp = Float64(x / Float64(z / y)); elseif (a <= 1.15e-46) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2e+21) tmp = x; elseif (a <= -5.8e-91) tmp = x / (z / y); elseif (a <= 1.15e-46) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2e+21], x, If[LessEqual[a, -5.8e-91], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.15e-46], t, x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{+21}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{-91}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-46}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2e21 or 1.15e-46 < a Initial program 88.7%
Taylor expanded in a around inf 45.3%
if -2e21 < a < -5.8000000000000001e-91Initial program 87.1%
Taylor expanded in y around inf 69.8%
Taylor expanded in y around inf 75.6%
div-sub75.6%
associate-*r/72.1%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in a around 0 45.0%
mul-1-neg45.0%
associate-/l*45.0%
distribute-neg-frac45.0%
Simplified45.0%
Taylor expanded in t around 0 38.2%
associate-/l*46.7%
Simplified46.7%
if -5.8000000000000001e-91 < a < 1.15e-46Initial program 64.9%
Taylor expanded in z around inf 42.5%
Final simplification44.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.6e+29) x (if (<= a -1.6e-45) (/ (- x) (/ a y)) (if (<= a 1.75e-46) t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e+29) {
tmp = x;
} else if (a <= -1.6e-45) {
tmp = -x / (a / y);
} else if (a <= 1.75e-46) {
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 <= (-1.6d+29)) then
tmp = x
else if (a <= (-1.6d-45)) then
tmp = -x / (a / y)
else if (a <= 1.75d-46) 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 <= -1.6e+29) {
tmp = x;
} else if (a <= -1.6e-45) {
tmp = -x / (a / y);
} else if (a <= 1.75e-46) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.6e+29: tmp = x elif a <= -1.6e-45: tmp = -x / (a / y) elif a <= 1.75e-46: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e+29) tmp = x; elseif (a <= -1.6e-45) tmp = Float64(Float64(-x) / Float64(a / y)); elseif (a <= 1.75e-46) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.6e+29) tmp = x; elseif (a <= -1.6e-45) tmp = -x / (a / y); elseif (a <= 1.75e-46) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e+29], x, If[LessEqual[a, -1.6e-45], N[((-x) / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.75e-46], t, x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+29}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.6 \cdot 10^{-45}:\\
\;\;\;\;\frac{-x}{\frac{a}{y}}\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-46}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.59999999999999993e29 or 1.7500000000000001e-46 < a Initial program 89.9%
Taylor expanded in a around inf 46.5%
if -1.59999999999999993e29 < a < -1.60000000000000004e-45Initial program 81.1%
Taylor expanded in y around inf 71.8%
Taylor expanded in y around inf 72.8%
div-sub72.8%
associate-*r/68.9%
associate-/l*73.2%
Simplified73.2%
Taylor expanded in a around inf 56.6%
Taylor expanded in t around 0 33.7%
mul-1-neg33.7%
associate-/l*42.6%
distribute-neg-frac42.6%
Simplified42.6%
if -1.60000000000000004e-45 < a < 1.7500000000000001e-46Initial program 66.0%
Taylor expanded in z around inf 42.1%
Final simplification44.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.7e+14) t (if (<= z 3.2e+90) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.7e+14) {
tmp = t;
} else if (z <= 3.2e+90) {
tmp = x;
} 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.7d+14)) then
tmp = t
else if (z <= 3.2d+90) then
tmp = x
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.7e+14) {
tmp = t;
} else if (z <= 3.2e+90) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.7e+14: tmp = t elif z <= 3.2e+90: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.7e+14) tmp = t; elseif (z <= 3.2e+90) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.7e+14) tmp = t; elseif (z <= 3.2e+90) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.7e+14], t, If[LessEqual[z, 3.2e+90], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+14}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+90}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.7e14 or 3.19999999999999998e90 < z Initial program 61.6%
Taylor expanded in z around inf 53.6%
if -2.7e14 < z < 3.19999999999999998e90Initial program 89.9%
Taylor expanded in a around inf 34.7%
Final simplification41.9%
(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.2%
Taylor expanded in z around inf 25.5%
Final simplification25.5%
herbie shell --seed 2024031
(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)))))