
(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 20 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 -2e-204)
(fma (- y z) t_1 x)
(if (<= t_2 2e-257)
(- t (* (- t x) (/ (- y a) z)))
(+ x (/ (- y z) (/ (- a z) (- t 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 <= -2e-204) {
tmp = fma((y - z), t_1, x);
} else if (t_2 <= 2e-257) {
tmp = t - ((t - x) * ((y - a) / z));
} else {
tmp = x + ((y - z) / ((a - z) / (t - 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 <= -2e-204) tmp = fma(Float64(y - z), t_1, x); elseif (t_2 <= 2e-257) tmp = Float64(t - Float64(Float64(t - x) * Float64(Float64(y - a) / z))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - 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, -2e-204], N[(N[(y - z), $MachinePrecision] * t$95$1 + x), $MachinePrecision], If[LessEqual[t$95$2, 2e-257], N[(t - N[(N[(t - x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -2 \cdot 10^{-204}:\\
\;\;\;\;\mathsf{fma}\left(y - z, t\_1, x\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-257}:\\
\;\;\;\;t - \left(t - x\right) \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-204Initial program 93.8%
+-commutative93.8%
fma-define93.9%
Simplified93.9%
if -2e-204 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e-257Initial program 10.6%
Taylor expanded in z around inf 77.1%
associate--l+77.1%
distribute-lft-out--77.1%
div-sub77.1%
mul-1-neg77.1%
unsub-neg77.1%
distribute-rgt-out--77.1%
associate-/l*90.8%
Simplified90.8%
if 2e-257 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.2%
clear-num92.0%
un-div-inv92.3%
Applied egg-rr92.3%
Final simplification92.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-204) (not (<= t_1 2e-257)))
t_1
(- t (* (- t x) (/ (- y a) z))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-204) || !(t_1 <= 2e-257)) {
tmp = t_1;
} else {
tmp = t - ((t - x) * ((y - a) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-204)) .or. (.not. (t_1 <= 2d-257))) then
tmp = t_1
else
tmp = t - ((t - x) * ((y - a) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-204) || !(t_1 <= 2e-257)) {
tmp = t_1;
} else {
tmp = t - ((t - x) * ((y - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-204) or not (t_1 <= 2e-257): tmp = t_1 else: tmp = t - ((t - x) * ((y - a) / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-204) || !(t_1 <= 2e-257)) tmp = t_1; else tmp = Float64(t - Float64(Float64(t - x) * Float64(Float64(y - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -2e-204) || ~((t_1 <= 2e-257))) tmp = t_1; else tmp = t - ((t - x) * ((y - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-204], N[Not[LessEqual[t$95$1, 2e-257]], $MachinePrecision]], t$95$1, N[(t - N[(N[(t - x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-204} \lor \neg \left(t\_1 \leq 2 \cdot 10^{-257}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t - \left(t - x\right) \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-204 or 2e-257 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 93.0%
if -2e-204 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e-257Initial program 10.6%
Taylor expanded in z around inf 77.1%
associate--l+77.1%
distribute-lft-out--77.1%
div-sub77.1%
mul-1-neg77.1%
unsub-neg77.1%
distribute-rgt-out--77.1%
associate-/l*90.8%
Simplified90.8%
Final simplification92.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -2e-204)
t_1
(if (<= t_1 2e-257)
(- t (* (- t x) (/ (- y a) z)))
(+ x (/ (- y z) (/ (- a z) (- t x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -2e-204) {
tmp = t_1;
} else if (t_1 <= 2e-257) {
tmp = t - ((t - x) * ((y - a) / z));
} else {
tmp = x + ((y - z) / ((a - z) / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if (t_1 <= (-2d-204)) then
tmp = t_1
else if (t_1 <= 2d-257) then
tmp = t - ((t - x) * ((y - a) / z))
else
tmp = x + ((y - z) / ((a - z) / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -2e-204) {
tmp = t_1;
} else if (t_1 <= 2e-257) {
tmp = t - ((t - x) * ((y - a) / z));
} else {
tmp = x + ((y - z) / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_1 <= -2e-204: tmp = t_1 elif t_1 <= 2e-257: tmp = t - ((t - x) * ((y - a) / z)) else: tmp = x + ((y - z) / ((a - z) / (t - x))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= -2e-204) tmp = t_1; elseif (t_1 <= 2e-257) tmp = Float64(t - Float64(Float64(t - x) * Float64(Float64(y - a) / z))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if (t_1 <= -2e-204) tmp = t_1; elseif (t_1 <= 2e-257) tmp = t - ((t - x) * ((y - a) / z)); else tmp = x + ((y - z) / ((a - z) / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-204], t$95$1, If[LessEqual[t$95$1, 2e-257], N[(t - N[(N[(t - x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-257}:\\
\;\;\;\;t - \left(t - x\right) \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-204Initial program 93.8%
if -2e-204 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e-257Initial program 10.6%
Taylor expanded in z around inf 77.1%
associate--l+77.1%
distribute-lft-out--77.1%
div-sub77.1%
mul-1-neg77.1%
unsub-neg77.1%
distribute-rgt-out--77.1%
associate-/l*90.8%
Simplified90.8%
if 2e-257 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.2%
clear-num92.0%
un-div-inv92.3%
Applied egg-rr92.3%
Final simplification92.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y (- z)))))
(if (<= y -5.2e+181)
t_1
(if (<= y -2.6e+84)
(* x (/ y z))
(if (<= y 2.5e+35)
(+ x t)
(if (<= y 1.7e+154) (* t (/ y a)) (if (<= y 9e+181) (+ x t) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / -z);
double tmp;
if (y <= -5.2e+181) {
tmp = t_1;
} else if (y <= -2.6e+84) {
tmp = x * (y / z);
} else if (y <= 2.5e+35) {
tmp = x + t;
} else if (y <= 1.7e+154) {
tmp = t * (y / a);
} else if (y <= 9e+181) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * (y / -z)
if (y <= (-5.2d+181)) then
tmp = t_1
else if (y <= (-2.6d+84)) then
tmp = x * (y / z)
else if (y <= 2.5d+35) then
tmp = x + t
else if (y <= 1.7d+154) then
tmp = t * (y / a)
else if (y <= 9d+181) then
tmp = x + t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / -z);
double tmp;
if (y <= -5.2e+181) {
tmp = t_1;
} else if (y <= -2.6e+84) {
tmp = x * (y / z);
} else if (y <= 2.5e+35) {
tmp = x + t;
} else if (y <= 1.7e+154) {
tmp = t * (y / a);
} else if (y <= 9e+181) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / -z) tmp = 0 if y <= -5.2e+181: tmp = t_1 elif y <= -2.6e+84: tmp = x * (y / z) elif y <= 2.5e+35: tmp = x + t elif y <= 1.7e+154: tmp = t * (y / a) elif y <= 9e+181: tmp = x + t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / Float64(-z))) tmp = 0.0 if (y <= -5.2e+181) tmp = t_1; elseif (y <= -2.6e+84) tmp = Float64(x * Float64(y / z)); elseif (y <= 2.5e+35) tmp = Float64(x + t); elseif (y <= 1.7e+154) tmp = Float64(t * Float64(y / a)); elseif (y <= 9e+181) tmp = Float64(x + t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / -z); tmp = 0.0; if (y <= -5.2e+181) tmp = t_1; elseif (y <= -2.6e+84) tmp = x * (y / z); elseif (y <= 2.5e+35) tmp = x + t; elseif (y <= 1.7e+154) tmp = t * (y / a); elseif (y <= 9e+181) tmp = x + t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.2e+181], t$95$1, If[LessEqual[y, -2.6e+84], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+35], N[(x + t), $MachinePrecision], If[LessEqual[y, 1.7e+154], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+181], N[(x + t), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{-z}\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{+181}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{+84}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+35}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+154}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+181}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.2e181 or 9e181 < y Initial program 87.9%
Taylor expanded in x around 0 60.8%
*-commutative60.8%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in a around 0 46.4%
associate-*r/46.4%
*-commutative46.4%
neg-mul-146.4%
distribute-lft-neg-in46.4%
*-commutative46.4%
Simplified46.4%
Taylor expanded in y around inf 46.2%
mul-1-neg46.2%
associate-/l*55.5%
distribute-rgt-neg-in55.5%
Simplified55.5%
if -5.2e181 < y < -2.6000000000000001e84Initial program 83.9%
Taylor expanded in y around -inf 62.8%
Taylor expanded in t around 0 46.7%
associate-*r/46.7%
mul-1-neg46.7%
distribute-lft-neg-out46.7%
*-commutative46.7%
Simplified46.7%
Taylor expanded in a around 0 40.4%
associate-/l*48.4%
Simplified48.4%
if -2.6000000000000001e84 < y < 2.50000000000000011e35 or 1.69999999999999987e154 < y < 9e181Initial program 75.1%
clear-num74.8%
un-div-inv75.1%
Applied egg-rr75.1%
Taylor expanded in t around inf 67.5%
Taylor expanded in z around inf 51.9%
if 2.50000000000000011e35 < y < 1.69999999999999987e154Initial program 89.4%
Taylor expanded in x around 0 54.4%
*-commutative54.4%
associate-/l*59.3%
Simplified59.3%
Taylor expanded in z around 0 38.9%
associate-/l*44.2%
Simplified44.2%
Final simplification51.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (- t x) (/ (- y a) z))))
(t_2 (+ x (/ (- y z) (/ (- a z) t)))))
(if (<= a -7.2e+131)
t_2
(if (<= a -9.2e+53)
t_1
(if (<= a -1.95e-17)
(+ x (* (- y z) (/ (- t x) a)))
(if (<= a 1.48e-61) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((t - x) * ((y - a) / z));
double t_2 = x + ((y - z) / ((a - z) / t));
double tmp;
if (a <= -7.2e+131) {
tmp = t_2;
} else if (a <= -9.2e+53) {
tmp = t_1;
} else if (a <= -1.95e-17) {
tmp = x + ((y - z) * ((t - x) / a));
} else if (a <= 1.48e-61) {
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 - ((t - x) * ((y - a) / z))
t_2 = x + ((y - z) / ((a - z) / t))
if (a <= (-7.2d+131)) then
tmp = t_2
else if (a <= (-9.2d+53)) then
tmp = t_1
else if (a <= (-1.95d-17)) then
tmp = x + ((y - z) * ((t - x) / a))
else if (a <= 1.48d-61) 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 - ((t - x) * ((y - a) / z));
double t_2 = x + ((y - z) / ((a - z) / t));
double tmp;
if (a <= -7.2e+131) {
tmp = t_2;
} else if (a <= -9.2e+53) {
tmp = t_1;
} else if (a <= -1.95e-17) {
tmp = x + ((y - z) * ((t - x) / a));
} else if (a <= 1.48e-61) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((t - x) * ((y - a) / z)) t_2 = x + ((y - z) / ((a - z) / t)) tmp = 0 if a <= -7.2e+131: tmp = t_2 elif a <= -9.2e+53: tmp = t_1 elif a <= -1.95e-17: tmp = x + ((y - z) * ((t - x) / a)) elif a <= 1.48e-61: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(t - x) * Float64(Float64(y - a) / z))) t_2 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))) tmp = 0.0 if (a <= -7.2e+131) tmp = t_2; elseif (a <= -9.2e+53) tmp = t_1; elseif (a <= -1.95e-17) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a))); elseif (a <= 1.48e-61) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((t - x) * ((y - a) / z)); t_2 = x + ((y - z) / ((a - z) / t)); tmp = 0.0; if (a <= -7.2e+131) tmp = t_2; elseif (a <= -9.2e+53) tmp = t_1; elseif (a <= -1.95e-17) tmp = x + ((y - z) * ((t - x) / a)); elseif (a <= 1.48e-61) 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[(t - x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.2e+131], t$95$2, If[LessEqual[a, -9.2e+53], t$95$1, If[LessEqual[a, -1.95e-17], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.48e-61], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \left(t - x\right) \cdot \frac{y - a}{z}\\
t_2 := x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{if}\;a \leq -7.2 \cdot 10^{+131}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -9.2 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.95 \cdot 10^{-17}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\
\mathbf{elif}\;a \leq 1.48 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -7.20000000000000063e131 or 1.4799999999999999e-61 < a Initial program 87.6%
clear-num86.7%
un-div-inv86.8%
Applied egg-rr86.8%
Taylor expanded in t around inf 80.4%
if -7.20000000000000063e131 < a < -9.20000000000000079e53 or -1.94999999999999995e-17 < a < 1.4799999999999999e-61Initial program 71.7%
Taylor expanded in z around inf 80.9%
associate--l+80.9%
distribute-lft-out--80.9%
div-sub81.6%
mul-1-neg81.6%
unsub-neg81.6%
distribute-rgt-out--81.6%
associate-/l*87.8%
Simplified87.8%
if -9.20000000000000079e53 < a < -1.94999999999999995e-17Initial program 93.6%
Taylor expanded in a around inf 82.7%
*-commutative82.7%
associate-/l*82.5%
Simplified82.5%
Final simplification84.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ y z))) (t_2 (* t (/ y a))))
(if (<= y -6.8e+181)
t_2
(if (<= y -3.2e+85)
t_1
(if (<= y 2.5e+35)
(+ x t)
(if (<= y 3.8e+153) t_2 (if (<= y 1.6e+180) (+ x t) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (y / z);
double t_2 = t * (y / a);
double tmp;
if (y <= -6.8e+181) {
tmp = t_2;
} else if (y <= -3.2e+85) {
tmp = t_1;
} else if (y <= 2.5e+35) {
tmp = x + t;
} else if (y <= 3.8e+153) {
tmp = t_2;
} else if (y <= 1.6e+180) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (y / z)
t_2 = t * (y / a)
if (y <= (-6.8d+181)) then
tmp = t_2
else if (y <= (-3.2d+85)) then
tmp = t_1
else if (y <= 2.5d+35) then
tmp = x + t
else if (y <= 3.8d+153) then
tmp = t_2
else if (y <= 1.6d+180) then
tmp = x + t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (y / z);
double t_2 = t * (y / a);
double tmp;
if (y <= -6.8e+181) {
tmp = t_2;
} else if (y <= -3.2e+85) {
tmp = t_1;
} else if (y <= 2.5e+35) {
tmp = x + t;
} else if (y <= 3.8e+153) {
tmp = t_2;
} else if (y <= 1.6e+180) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (y / z) t_2 = t * (y / a) tmp = 0 if y <= -6.8e+181: tmp = t_2 elif y <= -3.2e+85: tmp = t_1 elif y <= 2.5e+35: tmp = x + t elif y <= 3.8e+153: tmp = t_2 elif y <= 1.6e+180: tmp = x + t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(y / z)) t_2 = Float64(t * Float64(y / a)) tmp = 0.0 if (y <= -6.8e+181) tmp = t_2; elseif (y <= -3.2e+85) tmp = t_1; elseif (y <= 2.5e+35) tmp = Float64(x + t); elseif (y <= 3.8e+153) tmp = t_2; elseif (y <= 1.6e+180) tmp = Float64(x + t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (y / z); t_2 = t * (y / a); tmp = 0.0; if (y <= -6.8e+181) tmp = t_2; elseif (y <= -3.2e+85) tmp = t_1; elseif (y <= 2.5e+35) tmp = x + t; elseif (y <= 3.8e+153) tmp = t_2; elseif (y <= 1.6e+180) tmp = x + t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.8e+181], t$95$2, If[LessEqual[y, -3.2e+85], t$95$1, If[LessEqual[y, 2.5e+35], N[(x + t), $MachinePrecision], If[LessEqual[y, 3.8e+153], t$95$2, If[LessEqual[y, 1.6e+180], N[(x + t), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
t_2 := t \cdot \frac{y}{a}\\
\mathbf{if}\;y \leq -6.8 \cdot 10^{+181}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+35}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+153}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+180}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.80000000000000062e181 or 2.50000000000000011e35 < y < 3.79999999999999966e153Initial program 93.2%
Taylor expanded in x around 0 58.7%
*-commutative58.7%
associate-/l*64.8%
Simplified64.8%
Taylor expanded in z around 0 40.7%
associate-/l*49.4%
Simplified49.4%
if -6.80000000000000062e181 < y < -3.20000000000000018e85 or 1.59999999999999997e180 < y Initial program 81.7%
Taylor expanded in y around -inf 67.3%
Taylor expanded in t around 0 34.9%
associate-*r/34.9%
mul-1-neg34.9%
distribute-lft-neg-out34.9%
*-commutative34.9%
Simplified34.9%
Taylor expanded in a around 0 34.1%
associate-/l*45.8%
Simplified45.8%
if -3.20000000000000018e85 < y < 2.50000000000000011e35 or 3.79999999999999966e153 < y < 1.59999999999999997e180Initial program 75.1%
clear-num74.8%
un-div-inv75.1%
Applied egg-rr75.1%
Taylor expanded in t around inf 67.5%
Taylor expanded in z around inf 51.9%
Final simplification50.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t x) (- a z)))))
(if (<= y -5.8e+82)
t_1
(if (<= y -1.35e+57)
(+ x t)
(if (<= y -2.8e-17)
(+ x (* t (/ y a)))
(if (<= y 6.2e-71) (+ x t) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double tmp;
if (y <= -5.8e+82) {
tmp = t_1;
} else if (y <= -1.35e+57) {
tmp = x + t;
} else if (y <= -2.8e-17) {
tmp = x + (t * (y / a));
} else if (y <= 6.2e-71) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((t - x) / (a - z))
if (y <= (-5.8d+82)) then
tmp = t_1
else if (y <= (-1.35d+57)) then
tmp = x + t
else if (y <= (-2.8d-17)) then
tmp = x + (t * (y / a))
else if (y <= 6.2d-71) then
tmp = x + t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double tmp;
if (y <= -5.8e+82) {
tmp = t_1;
} else if (y <= -1.35e+57) {
tmp = x + t;
} else if (y <= -2.8e-17) {
tmp = x + (t * (y / a));
} else if (y <= 6.2e-71) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / (a - z)) tmp = 0 if y <= -5.8e+82: tmp = t_1 elif y <= -1.35e+57: tmp = x + t elif y <= -2.8e-17: tmp = x + (t * (y / a)) elif y <= 6.2e-71: tmp = x + t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z))) tmp = 0.0 if (y <= -5.8e+82) tmp = t_1; elseif (y <= -1.35e+57) tmp = Float64(x + t); elseif (y <= -2.8e-17) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (y <= 6.2e-71) tmp = Float64(x + t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / (a - z)); tmp = 0.0; if (y <= -5.8e+82) tmp = t_1; elseif (y <= -1.35e+57) tmp = x + t; elseif (y <= -2.8e-17) tmp = x + (t * (y / a)); elseif (y <= 6.2e-71) tmp = x + t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.8e+82], t$95$1, If[LessEqual[y, -1.35e+57], N[(x + t), $MachinePrecision], If[LessEqual[y, -2.8e-17], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-71], N[(x + t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{+57}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-17}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-71}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.8000000000000003e82 or 6.20000000000000004e-71 < y Initial program 83.5%
Taylor expanded in y around inf 74.1%
div-sub74.1%
Simplified74.1%
if -5.8000000000000003e82 < y < -1.3499999999999999e57 or -2.7999999999999999e-17 < y < 6.20000000000000004e-71Initial program 75.7%
clear-num75.5%
un-div-inv75.9%
Applied egg-rr75.9%
Taylor expanded in t around inf 72.0%
Taylor expanded in z around inf 60.3%
if -1.3499999999999999e57 < y < -2.7999999999999999e-17Initial program 75.6%
clear-num75.4%
un-div-inv75.9%
Applied egg-rr75.9%
Taylor expanded in t around inf 67.8%
Taylor expanded in z around 0 60.8%
+-commutative60.8%
associate-/l*60.8%
Simplified60.8%
Final simplification67.0%
(FPCore (x y z t a)
:precision binary64
(if (or (<= z -350000000.0)
(and (not (<= z 3.8e-87)) (or (<= z 225000000.0) (not (<= z 6e+45)))))
(* t (- 1.0 (/ y z)))
(+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -350000000.0) || (!(z <= 3.8e-87) && ((z <= 225000000.0) || !(z <= 6e+45)))) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (t * (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 <= (-350000000.0d0)) .or. (.not. (z <= 3.8d-87)) .and. (z <= 225000000.0d0) .or. (.not. (z <= 6d+45))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x + (t * (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 <= -350000000.0) || (!(z <= 3.8e-87) && ((z <= 225000000.0) || !(z <= 6e+45)))) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -350000000.0) or (not (z <= 3.8e-87) and ((z <= 225000000.0) or not (z <= 6e+45))): tmp = t * (1.0 - (y / z)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -350000000.0) || (!(z <= 3.8e-87) && ((z <= 225000000.0) || !(z <= 6e+45)))) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -350000000.0) || (~((z <= 3.8e-87)) && ((z <= 225000000.0) || ~((z <= 6e+45))))) tmp = t * (1.0 - (y / z)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -350000000.0], And[N[Not[LessEqual[z, 3.8e-87]], $MachinePrecision], Or[LessEqual[z, 225000000.0], N[Not[LessEqual[z, 6e+45]], $MachinePrecision]]]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -350000000 \lor \neg \left(z \leq 3.8 \cdot 10^{-87}\right) \land \left(z \leq 225000000 \lor \neg \left(z \leq 6 \cdot 10^{+45}\right)\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -3.5e8 or 3.8e-87 < z < 2.25e8 or 6.00000000000000021e45 < z Initial program 67.0%
Taylor expanded in t around inf 61.8%
Taylor expanded in a around 0 57.6%
mul-1-neg57.6%
unsub-neg57.6%
Simplified57.6%
if -3.5e8 < z < 3.8e-87 or 2.25e8 < z < 6.00000000000000021e45Initial program 94.9%
clear-num94.1%
un-div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in t around inf 74.7%
Taylor expanded in z around 0 63.1%
+-commutative63.1%
associate-/l*69.0%
Simplified69.0%
Final simplification62.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= a -1.7e+131)
x
(if (<= a -4.6e+91)
t_1
(if (<= a -0.03) x (if (<= a 3.2e+101) t_1 (+ x t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (a <= -1.7e+131) {
tmp = x;
} else if (a <= -4.6e+91) {
tmp = t_1;
} else if (a <= -0.03) {
tmp = x;
} else if (a <= 3.2e+101) {
tmp = t_1;
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (y / z))
if (a <= (-1.7d+131)) then
tmp = x
else if (a <= (-4.6d+91)) then
tmp = t_1
else if (a <= (-0.03d0)) then
tmp = x
else if (a <= 3.2d+101) then
tmp = t_1
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (a <= -1.7e+131) {
tmp = x;
} else if (a <= -4.6e+91) {
tmp = t_1;
} else if (a <= -0.03) {
tmp = x;
} else if (a <= 3.2e+101) {
tmp = t_1;
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if a <= -1.7e+131: tmp = x elif a <= -4.6e+91: tmp = t_1 elif a <= -0.03: tmp = x elif a <= 3.2e+101: tmp = t_1 else: tmp = x + t return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (a <= -1.7e+131) tmp = x; elseif (a <= -4.6e+91) tmp = t_1; elseif (a <= -0.03) tmp = x; elseif (a <= 3.2e+101) tmp = t_1; else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (a <= -1.7e+131) tmp = x; elseif (a <= -4.6e+91) tmp = t_1; elseif (a <= -0.03) tmp = x; elseif (a <= 3.2e+101) tmp = t_1; else tmp = x + t; 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[a, -1.7e+131], x, If[LessEqual[a, -4.6e+91], t$95$1, If[LessEqual[a, -0.03], x, If[LessEqual[a, 3.2e+101], t$95$1, N[(x + t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;a \leq -1.7 \cdot 10^{+131}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -4.6 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -0.03:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if a < -1.69999999999999993e131 or -4.59999999999999982e91 < a < -0.029999999999999999Initial program 90.7%
Taylor expanded in a around inf 55.9%
if -1.69999999999999993e131 < a < -4.59999999999999982e91 or -0.029999999999999999 < a < 3.20000000000000005e101Initial program 74.7%
Taylor expanded in t around inf 64.7%
Taylor expanded in a around 0 56.2%
mul-1-neg56.2%
unsub-neg56.2%
Simplified56.2%
if 3.20000000000000005e101 < a Initial program 86.3%
clear-num83.6%
un-div-inv83.8%
Applied egg-rr83.8%
Taylor expanded in t around inf 84.1%
Taylor expanded in z around inf 56.7%
Final simplification56.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -8e+131)
x
(if (<= a -1.3e+40)
(* x (/ (- y a) z))
(if (<= a -7.2e-15)
(* y (/ (- t x) a))
(if (<= a 2.15e+101) (* t (- 1.0 (/ y z))) (+ x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8e+131) {
tmp = x;
} else if (a <= -1.3e+40) {
tmp = x * ((y - a) / z);
} else if (a <= -7.2e-15) {
tmp = y * ((t - x) / a);
} else if (a <= 2.15e+101) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-8d+131)) then
tmp = x
else if (a <= (-1.3d+40)) then
tmp = x * ((y - a) / z)
else if (a <= (-7.2d-15)) then
tmp = y * ((t - x) / a)
else if (a <= 2.15d+101) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8e+131) {
tmp = x;
} else if (a <= -1.3e+40) {
tmp = x * ((y - a) / z);
} else if (a <= -7.2e-15) {
tmp = y * ((t - x) / a);
} else if (a <= 2.15e+101) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8e+131: tmp = x elif a <= -1.3e+40: tmp = x * ((y - a) / z) elif a <= -7.2e-15: tmp = y * ((t - x) / a) elif a <= 2.15e+101: tmp = t * (1.0 - (y / z)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8e+131) tmp = x; elseif (a <= -1.3e+40) tmp = Float64(x * Float64(Float64(y - a) / z)); elseif (a <= -7.2e-15) tmp = Float64(y * Float64(Float64(t - x) / a)); elseif (a <= 2.15e+101) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -8e+131) tmp = x; elseif (a <= -1.3e+40) tmp = x * ((y - a) / z); elseif (a <= -7.2e-15) tmp = y * ((t - x) / a); elseif (a <= 2.15e+101) tmp = t * (1.0 - (y / z)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8e+131], x, If[LessEqual[a, -1.3e+40], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7.2e-15], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.15e+101], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{+131}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.3 \cdot 10^{+40}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{elif}\;a \leq -7.2 \cdot 10^{-15}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;a \leq 2.15 \cdot 10^{+101}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if a < -7.9999999999999993e131Initial program 94.5%
Taylor expanded in a around inf 61.9%
if -7.9999999999999993e131 < a < -1.3e40Initial program 59.0%
Taylor expanded in z around inf 55.0%
associate--l+55.0%
distribute-lft-out--55.0%
div-sub55.0%
mul-1-neg55.0%
unsub-neg55.0%
distribute-rgt-out--55.0%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in t around 0 35.5%
associate-*r/47.4%
Simplified47.4%
if -1.3e40 < a < -7.2000000000000002e-15Initial program 92.7%
Taylor expanded in y around -inf 56.2%
associate-/l*62.5%
clear-num62.4%
div-inv62.6%
add-cube-cbrt62.0%
*-un-lft-identity62.0%
times-frac62.1%
pow262.1%
Applied egg-rr62.1%
/-rgt-identity62.1%
associate-*r/62.0%
unpow262.0%
rem-3cbrt-lft62.6%
Simplified62.6%
Taylor expanded in a around inf 49.4%
associate-/l*49.3%
Simplified49.3%
if -7.2000000000000002e-15 < a < 2.15e101Initial program 75.2%
Taylor expanded in t around inf 65.1%
Taylor expanded in a around 0 56.4%
mul-1-neg56.4%
unsub-neg56.4%
Simplified56.4%
if 2.15e101 < a Initial program 86.3%
clear-num83.6%
un-div-inv83.8%
Applied egg-rr83.8%
Taylor expanded in t around inf 84.1%
Taylor expanded in z around inf 56.7%
Final simplification56.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))) (t_2 (* t (- 1.0 (/ y z)))))
(if (<= z -120000000.0)
t_2
(if (<= z 3.8e-87)
t_1
(if (<= z 6500000000.0)
(/ (* t (- z y)) z)
(if (<= z 1.05e+46) 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 <= -120000000.0) {
tmp = t_2;
} else if (z <= 3.8e-87) {
tmp = t_1;
} else if (z <= 6500000000.0) {
tmp = (t * (z - y)) / z;
} else if (z <= 1.05e+46) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (t * (y / a))
t_2 = t * (1.0d0 - (y / z))
if (z <= (-120000000.0d0)) then
tmp = t_2
else if (z <= 3.8d-87) then
tmp = t_1
else if (z <= 6500000000.0d0) then
tmp = (t * (z - y)) / z
else if (z <= 1.05d+46) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double t_2 = t * (1.0 - (y / z));
double tmp;
if (z <= -120000000.0) {
tmp = t_2;
} else if (z <= 3.8e-87) {
tmp = t_1;
} else if (z <= 6500000000.0) {
tmp = (t * (z - y)) / z;
} else if (z <= 1.05e+46) {
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 <= -120000000.0: tmp = t_2 elif z <= 3.8e-87: tmp = t_1 elif z <= 6500000000.0: tmp = (t * (z - y)) / z elif z <= 1.05e+46: 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 <= -120000000.0) tmp = t_2; elseif (z <= 3.8e-87) tmp = t_1; elseif (z <= 6500000000.0) tmp = Float64(Float64(t * Float64(z - y)) / z); elseif (z <= 1.05e+46) 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 <= -120000000.0) tmp = t_2; elseif (z <= 3.8e-87) tmp = t_1; elseif (z <= 6500000000.0) tmp = (t * (z - y)) / z; elseif (z <= 1.05e+46) 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, -120000000.0], t$95$2, If[LessEqual[z, 3.8e-87], t$95$1, If[LessEqual[z, 6500000000.0], N[(N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.05e+46], 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 -120000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6500000000:\\
\;\;\;\;\frac{t \cdot \left(z - y\right)}{z}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.2e8 or 1.05e46 < z Initial program 64.5%
Taylor expanded in t around inf 63.1%
Taylor expanded in a around 0 58.2%
mul-1-neg58.2%
unsub-neg58.2%
Simplified58.2%
if -1.2e8 < z < 3.8e-87 or 6.5e9 < z < 1.05e46Initial program 94.9%
clear-num94.1%
un-div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in t around inf 74.7%
Taylor expanded in z around 0 63.1%
+-commutative63.1%
associate-/l*69.0%
Simplified69.0%
if 3.8e-87 < z < 6.5e9Initial program 81.5%
Taylor expanded in x around 0 54.1%
*-commutative54.1%
associate-/l*54.0%
Simplified54.0%
Taylor expanded in a around 0 54.1%
associate-*r/54.1%
*-commutative54.1%
neg-mul-154.1%
distribute-lft-neg-in54.1%
*-commutative54.1%
Simplified54.1%
Taylor expanded in t around 0 54.1%
Final simplification62.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))) (t_2 (* t (- 1.0 (/ y z)))))
(if (<= z -650000000.0)
t_2
(if (<= z 3.3e-87)
t_1
(if (<= z 115000000000.0)
(/ y (/ z (- x t)))
(if (<= z 4.4e+45) 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 <= -650000000.0) {
tmp = t_2;
} else if (z <= 3.3e-87) {
tmp = t_1;
} else if (z <= 115000000000.0) {
tmp = y / (z / (x - t));
} else if (z <= 4.4e+45) {
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 <= (-650000000.0d0)) then
tmp = t_2
else if (z <= 3.3d-87) then
tmp = t_1
else if (z <= 115000000000.0d0) then
tmp = y / (z / (x - t))
else if (z <= 4.4d+45) 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 <= -650000000.0) {
tmp = t_2;
} else if (z <= 3.3e-87) {
tmp = t_1;
} else if (z <= 115000000000.0) {
tmp = y / (z / (x - t));
} else if (z <= 4.4e+45) {
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 <= -650000000.0: tmp = t_2 elif z <= 3.3e-87: tmp = t_1 elif z <= 115000000000.0: tmp = y / (z / (x - t)) elif z <= 4.4e+45: 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 <= -650000000.0) tmp = t_2; elseif (z <= 3.3e-87) tmp = t_1; elseif (z <= 115000000000.0) tmp = Float64(y / Float64(z / Float64(x - t))); elseif (z <= 4.4e+45) 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 <= -650000000.0) tmp = t_2; elseif (z <= 3.3e-87) tmp = t_1; elseif (z <= 115000000000.0) tmp = y / (z / (x - t)); elseif (z <= 4.4e+45) 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, -650000000.0], t$95$2, If[LessEqual[z, 3.3e-87], t$95$1, If[LessEqual[z, 115000000000.0], N[(y / N[(z / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+45], 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 -650000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 115000000000:\\
\;\;\;\;\frac{y}{\frac{z}{x - t}}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.5e8 or 4.4000000000000001e45 < z Initial program 64.5%
Taylor expanded in t around inf 63.1%
Taylor expanded in a around 0 58.2%
mul-1-neg58.2%
unsub-neg58.2%
Simplified58.2%
if -6.5e8 < z < 3.3e-87 or 1.15e11 < z < 4.4000000000000001e45Initial program 94.9%
clear-num94.1%
un-div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in t around inf 74.7%
Taylor expanded in z around 0 63.1%
+-commutative63.1%
associate-/l*69.0%
Simplified69.0%
if 3.3e-87 < z < 1.15e11Initial program 81.5%
Taylor expanded in y around -inf 68.3%
associate-/l*72.4%
clear-num72.4%
div-inv72.5%
add-cube-cbrt71.6%
*-un-lft-identity71.6%
times-frac71.6%
pow271.6%
Applied egg-rr71.6%
/-rgt-identity71.6%
associate-*r/71.6%
unpow271.6%
rem-3cbrt-lft72.5%
Simplified72.5%
Taylor expanded in a around 0 63.6%
neg-mul-163.6%
distribute-neg-frac63.6%
Simplified63.6%
Final simplification63.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t x) (- a z)))))
(if (<= y -1.65e+82)
t_1
(if (<= y -7.8e-91)
(* (- y z) (/ t (- a z)))
(if (<= y 6.4e-71) (+ x t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double tmp;
if (y <= -1.65e+82) {
tmp = t_1;
} else if (y <= -7.8e-91) {
tmp = (y - z) * (t / (a - z));
} else if (y <= 6.4e-71) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((t - x) / (a - z))
if (y <= (-1.65d+82)) then
tmp = t_1
else if (y <= (-7.8d-91)) then
tmp = (y - z) * (t / (a - z))
else if (y <= 6.4d-71) then
tmp = x + t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double tmp;
if (y <= -1.65e+82) {
tmp = t_1;
} else if (y <= -7.8e-91) {
tmp = (y - z) * (t / (a - z));
} else if (y <= 6.4e-71) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / (a - z)) tmp = 0 if y <= -1.65e+82: tmp = t_1 elif y <= -7.8e-91: tmp = (y - z) * (t / (a - z)) elif y <= 6.4e-71: tmp = x + t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z))) tmp = 0.0 if (y <= -1.65e+82) tmp = t_1; elseif (y <= -7.8e-91) tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z))); elseif (y <= 6.4e-71) tmp = Float64(x + t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / (a - z)); tmp = 0.0; if (y <= -1.65e+82) tmp = t_1; elseif (y <= -7.8e-91) tmp = (y - z) * (t / (a - z)); elseif (y <= 6.4e-71) tmp = x + t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+82], t$95$1, If[LessEqual[y, -7.8e-91], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e-71], N[(x + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.8 \cdot 10^{-91}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-71}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.6499999999999999e82 or 6.3999999999999998e-71 < y Initial program 83.5%
Taylor expanded in y around inf 74.1%
div-sub74.1%
Simplified74.1%
if -1.6499999999999999e82 < y < -7.79999999999999987e-91Initial program 78.7%
Taylor expanded in x around 0 37.6%
*-commutative37.6%
associate-/l*54.4%
Simplified54.4%
if -7.79999999999999987e-91 < y < 6.3999999999999998e-71Initial program 74.6%
clear-num74.4%
un-div-inv74.5%
Applied egg-rr74.5%
Taylor expanded in t around inf 72.1%
Taylor expanded in z around inf 60.8%
Final simplification66.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.6e-17) (not (<= a 2.15e+84))) (+ x (* (- y z) (/ (- t x) a))) (+ t (* y (/ (- x t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.6e-17) || !(a <= 2.15e+84)) {
tmp = x + ((y - z) * ((t - x) / a));
} else {
tmp = t + (y * ((x - t) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.6d-17)) .or. (.not. (a <= 2.15d+84))) then
tmp = x + ((y - z) * ((t - x) / a))
else
tmp = t + (y * ((x - t) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.6e-17) || !(a <= 2.15e+84)) {
tmp = x + ((y - z) * ((t - x) / a));
} else {
tmp = t + (y * ((x - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.6e-17) or not (a <= 2.15e+84): tmp = x + ((y - z) * ((t - x) / a)) else: tmp = t + (y * ((x - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.6e-17) || !(a <= 2.15e+84)) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a))); else tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.6e-17) || ~((a <= 2.15e+84))) tmp = x + ((y - z) * ((t - x) / a)); else tmp = t + (y * ((x - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.6e-17], N[Not[LessEqual[a, 2.15e+84]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{-17} \lor \neg \left(a \leq 2.15 \cdot 10^{+84}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if a < -2.60000000000000003e-17 or 2.1499999999999998e84 < a Initial program 86.6%
Taylor expanded in a around inf 61.4%
*-commutative61.4%
associate-/l*70.9%
Simplified70.9%
if -2.60000000000000003e-17 < a < 2.1499999999999998e84Initial program 74.5%
Taylor expanded in z around inf 77.6%
associate--l+77.6%
distribute-lft-out--77.6%
div-sub78.3%
mul-1-neg78.3%
unsub-neg78.3%
distribute-rgt-out--78.3%
associate-/l*83.9%
Simplified83.9%
Taylor expanded in y around inf 75.8%
associate-/l*78.6%
Simplified78.6%
Final simplification75.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.8e-40) (not (<= a 3.7e-62))) (+ x (/ (- y z) (/ (- a z) t))) (+ t (* y (/ (- x t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.8e-40) || !(a <= 3.7e-62)) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = t + (y * ((x - t) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.8d-40)) .or. (.not. (a <= 3.7d-62))) then
tmp = x + ((y - z) / ((a - z) / t))
else
tmp = t + (y * ((x - t) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.8e-40) || !(a <= 3.7e-62)) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = t + (y * ((x - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.8e-40) or not (a <= 3.7e-62): tmp = x + ((y - z) / ((a - z) / t)) else: tmp = t + (y * ((x - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.8e-40) || !(a <= 3.7e-62)) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); else tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.8e-40) || ~((a <= 3.7e-62))) tmp = x + ((y - z) / ((a - z) / t)); else tmp = t + (y * ((x - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.8e-40], N[Not[LessEqual[a, 3.7e-62]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.8 \cdot 10^{-40} \lor \neg \left(a \leq 3.7 \cdot 10^{-62}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if a < -2.8e-40 or 3.6999999999999998e-62 < a Initial program 84.8%
clear-num84.0%
un-div-inv84.0%
Applied egg-rr84.0%
Taylor expanded in t around inf 75.2%
if -2.8e-40 < a < 3.6999999999999998e-62Initial program 73.2%
Taylor expanded in z around inf 85.1%
associate--l+85.1%
distribute-lft-out--85.1%
div-sub86.0%
mul-1-neg86.0%
unsub-neg86.0%
distribute-rgt-out--86.0%
associate-/l*89.2%
Simplified89.2%
Taylor expanded in y around inf 83.6%
associate-/l*84.8%
Simplified84.8%
Final simplification79.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.1e-17) (not (<= a 2.2e+86))) (+ x (* (- t x) (/ y a))) (+ t (* y (/ (- x t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.1e-17) || !(a <= 2.2e+86)) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t + (y * ((x - t) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.1d-17)) .or. (.not. (a <= 2.2d+86))) then
tmp = x + ((t - x) * (y / a))
else
tmp = t + (y * ((x - t) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.1e-17) || !(a <= 2.2e+86)) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t + (y * ((x - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.1e-17) or not (a <= 2.2e+86): tmp = x + ((t - x) * (y / a)) else: tmp = t + (y * ((x - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.1e-17) || !(a <= 2.2e+86)) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); else tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.1e-17) || ~((a <= 2.2e+86))) tmp = x + ((t - x) * (y / a)); else tmp = t + (y * ((x - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.1e-17], N[Not[LessEqual[a, 2.2e+86]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{-17} \lor \neg \left(a \leq 2.2 \cdot 10^{+86}\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if a < -2.09999999999999992e-17 or 2.20000000000000003e86 < a Initial program 86.6%
Taylor expanded in z around 0 60.8%
*-commutative60.8%
associate-/l*67.3%
Simplified67.3%
if -2.09999999999999992e-17 < a < 2.20000000000000003e86Initial program 74.5%
Taylor expanded in z around inf 77.6%
associate--l+77.6%
distribute-lft-out--77.6%
div-sub78.3%
mul-1-neg78.3%
unsub-neg78.3%
distribute-rgt-out--78.3%
associate-/l*83.9%
Simplified83.9%
Taylor expanded in y around inf 75.8%
associate-/l*78.6%
Simplified78.6%
Final simplification74.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.4e+172) x (if (or (<= a -7.6e-80) (not (<= a 2.6e-63))) (+ x t) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.4e+172) {
tmp = x;
} else if ((a <= -7.6e-80) || !(a <= 2.6e-63)) {
tmp = x + t;
} 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 (a <= (-2.4d+172)) then
tmp = x
else if ((a <= (-7.6d-80)) .or. (.not. (a <= 2.6d-63))) then
tmp = x + t
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 (a <= -2.4e+172) {
tmp = x;
} else if ((a <= -7.6e-80) || !(a <= 2.6e-63)) {
tmp = x + t;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.4e+172: tmp = x elif (a <= -7.6e-80) or not (a <= 2.6e-63): tmp = x + t else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.4e+172) tmp = x; elseif ((a <= -7.6e-80) || !(a <= 2.6e-63)) tmp = Float64(x + t); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.4e+172) tmp = x; elseif ((a <= -7.6e-80) || ~((a <= 2.6e-63))) tmp = x + t; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.4e+172], x, If[Or[LessEqual[a, -7.6e-80], N[Not[LessEqual[a, 2.6e-63]], $MachinePrecision]], N[(x + t), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{+172}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -7.6 \cdot 10^{-80} \lor \neg \left(a \leq 2.6 \cdot 10^{-63}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if a < -2.4000000000000001e172Initial program 95.8%
Taylor expanded in a around inf 67.8%
if -2.4000000000000001e172 < a < -7.59999999999999933e-80 or 2.6000000000000001e-63 < a Initial program 82.2%
clear-num81.2%
un-div-inv81.2%
Applied egg-rr81.2%
Taylor expanded in t around inf 69.0%
Taylor expanded in z around inf 43.0%
if -7.59999999999999933e-80 < a < 2.6000000000000001e-63Initial program 72.8%
Taylor expanded in z around inf 42.1%
Final simplification44.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.02e+100) (not (<= y 2.3e+35))) (* t (/ y a)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.02e+100) || !(y <= 2.3e+35)) {
tmp = t * (y / a);
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.02d+100)) .or. (.not. (y <= 2.3d+35))) then
tmp = t * (y / a)
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.02e+100) || !(y <= 2.3e+35)) {
tmp = t * (y / a);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.02e+100) or not (y <= 2.3e+35): tmp = t * (y / a) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.02e+100) || !(y <= 2.3e+35)) tmp = Float64(t * Float64(y / a)); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.02e+100) || ~((y <= 2.3e+35))) tmp = t * (y / a); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.02e+100], N[Not[LessEqual[y, 2.3e+35]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+100} \lor \neg \left(y \leq 2.3 \cdot 10^{+35}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -1.0199999999999999e100 or 2.2999999999999998e35 < y Initial program 86.8%
Taylor expanded in x around 0 48.9%
*-commutative48.9%
associate-/l*55.3%
Simplified55.3%
Taylor expanded in z around 0 29.0%
associate-/l*35.9%
Simplified35.9%
if -1.0199999999999999e100 < y < 2.2999999999999998e35Initial program 75.0%
clear-num74.6%
un-div-inv75.0%
Applied egg-rr75.0%
Taylor expanded in t around inf 66.7%
Taylor expanded in z around inf 51.8%
Final simplification45.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.6e-32) x (if (<= a 2.4e+86) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.6e-32) {
tmp = x;
} else if (a <= 2.4e+86) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.6d-32)) then
tmp = x
else if (a <= 2.4d+86) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.6e-32) {
tmp = x;
} else if (a <= 2.4e+86) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.6e-32: tmp = x elif a <= 2.4e+86: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.6e-32) tmp = x; elseif (a <= 2.4e+86) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.6e-32) tmp = x; elseif (a <= 2.4e+86) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.6e-32], x, If[LessEqual[a, 2.4e+86], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.6 \cdot 10^{-32}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{+86}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.59999999999999993e-32 or 2.4e86 < a Initial program 86.0%
Taylor expanded in a around inf 45.3%
if -3.59999999999999993e-32 < a < 2.4e86Initial program 74.7%
Taylor expanded in z around inf 38.7%
Final simplification41.5%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 79.5%
Taylor expanded in z around inf 28.7%
Final simplification28.7%
herbie shell --seed 2024095
(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)))))