
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-292) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(- t (/ (- (* (- t x) (- y a)) (* a (* (- t x) (/ (- a y) z)))) 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-292) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t - ((((t - x) * (y - a)) - (a * ((t - x) * ((a - y) / z)))) / 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-292) || !(t_1 <= 0.0)) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t - Float64(Float64(Float64(Float64(t - x) * Float64(y - a)) - Float64(a * Float64(Float64(t - x) * Float64(Float64(a - y) / z)))) / z)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-292], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-292} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right) - a \cdot \left(\left(t - x\right) \cdot \frac{a - y}{z}\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.0000000000000001e-292 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.4%
+-commutative90.4%
remove-double-neg90.4%
unsub-neg90.4%
*-commutative90.4%
associate-*l/78.8%
associate-/l*93.9%
fma-neg93.9%
remove-double-neg93.9%
Simplified93.9%
if -2.0000000000000001e-292 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.3%
Taylor expanded in z around inf 3.3%
Taylor expanded in z around -inf 79.1%
mul-1-neg79.1%
unsub-neg79.1%
Simplified89.6%
Final simplification93.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -2e-292)
t_1
(if (<= t_1 1e-285)
(- t (/ (- (* (- t x) (- y a)) (* a (* (- t x) (/ (- a y) z)))) 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-292) {
tmp = t_1;
} else if (t_1 <= 1e-285) {
tmp = t - ((((t - x) * (y - a)) - (a * ((t - x) * ((a - y) / z)))) / 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-292)) then
tmp = t_1
else if (t_1 <= 1d-285) then
tmp = t - ((((t - x) * (y - a)) - (a * ((t - x) * ((a - y) / z)))) / 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-292) {
tmp = t_1;
} else if (t_1 <= 1e-285) {
tmp = t - ((((t - x) * (y - a)) - (a * ((t - x) * ((a - y) / z)))) / 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-292: tmp = t_1 elif t_1 <= 1e-285: tmp = t - ((((t - x) * (y - a)) - (a * ((t - x) * ((a - y) / z)))) / 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-292) tmp = t_1; elseif (t_1 <= 1e-285) tmp = Float64(t - Float64(Float64(Float64(Float64(t - x) * Float64(y - a)) - Float64(a * Float64(Float64(t - x) * Float64(Float64(a - y) / z)))) / 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-292) tmp = t_1; elseif (t_1 <= 1e-285) tmp = t - ((((t - x) * (y - a)) - (a * ((t - x) * ((a - y) / z)))) / 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-292], t$95$1, If[LessEqual[t$95$1, 1e-285], N[(t - N[(N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $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^{-292}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{-285}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right) - a \cdot \left(\left(t - x\right) \cdot \frac{a - y}{z}\right)}{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)))) < -2.0000000000000001e-292Initial program 90.9%
if -2.0000000000000001e-292 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.00000000000000007e-285Initial program 3.4%
Taylor expanded in z around inf 3.4%
Taylor expanded in z around -inf 79.8%
mul-1-neg79.8%
unsub-neg79.8%
Simplified90.0%
if 1.00000000000000007e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.7%
clear-num90.6%
un-div-inv90.7%
Applied egg-rr90.7%
Final simplification90.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-292) (not (<= t_1 1e-285)))
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-292) || !(t_1 <= 1e-285)) {
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-292)) .or. (.not. (t_1 <= 1d-285))) 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-292) || !(t_1 <= 1e-285)) {
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-292) or not (t_1 <= 1e-285): 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-292) || !(t_1 <= 1e-285)) tmp = t_1; else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -2e-292) || ~((t_1 <= 1e-285))) 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-292], N[Not[LessEqual[t$95$1, 1e-285]], $MachinePrecision]], t$95$1, N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-292} \lor \neg \left(t\_1 \leq 10^{-285}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.0000000000000001e-292 or 1.00000000000000007e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.8%
if -2.0000000000000001e-292 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.00000000000000007e-285Initial program 3.4%
Taylor expanded in z around inf 90.0%
associate--l+90.0%
associate-*r/90.0%
associate-*r/90.0%
mul-1-neg90.0%
div-sub90.0%
mul-1-neg90.0%
distribute-lft-out--90.0%
associate-*r/90.0%
mul-1-neg90.0%
unsub-neg90.0%
distribute-rgt-out--90.0%
Simplified90.0%
Final simplification90.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -2e-292)
t_1
(if (<= t_1 1e-285)
(- 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-292) {
tmp = t_1;
} else if (t_1 <= 1e-285) {
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-292)) then
tmp = t_1
else if (t_1 <= 1d-285) 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-292) {
tmp = t_1;
} else if (t_1 <= 1e-285) {
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-292: tmp = t_1 elif t_1 <= 1e-285: 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-292) tmp = t_1; elseif (t_1 <= 1e-285) tmp = Float64(t - Float64(Float64(Float64(t - x) * 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-292) tmp = t_1; elseif (t_1 <= 1e-285) 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-292], t$95$1, If[LessEqual[t$95$1, 1e-285], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $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^{-292}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{-285}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{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)))) < -2.0000000000000001e-292Initial program 90.9%
if -2.0000000000000001e-292 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.00000000000000007e-285Initial program 3.4%
Taylor expanded in z around inf 90.0%
associate--l+90.0%
associate-*r/90.0%
associate-*r/90.0%
mul-1-neg90.0%
div-sub90.0%
mul-1-neg90.0%
distribute-lft-out--90.0%
associate-*r/90.0%
mul-1-neg90.0%
unsub-neg90.0%
distribute-rgt-out--90.0%
Simplified90.0%
if 1.00000000000000007e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.7%
clear-num90.6%
un-div-inv90.7%
Applied egg-rr90.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.8e+139)
t
(if (<= z -1.15e-107)
(* (/ y z) (- x t))
(if (<= z 2.25e+70)
(+ x (* t (/ y a)))
(if (<= z 6e+170) (/ (* x (- y a)) z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e+139) {
tmp = t;
} else if (z <= -1.15e-107) {
tmp = (y / z) * (x - t);
} else if (z <= 2.25e+70) {
tmp = x + (t * (y / a));
} else if (z <= 6e+170) {
tmp = (x * (y - a)) / z;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.8d+139)) then
tmp = t
else if (z <= (-1.15d-107)) then
tmp = (y / z) * (x - t)
else if (z <= 2.25d+70) then
tmp = x + (t * (y / a))
else if (z <= 6d+170) then
tmp = (x * (y - a)) / z
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e+139) {
tmp = t;
} else if (z <= -1.15e-107) {
tmp = (y / z) * (x - t);
} else if (z <= 2.25e+70) {
tmp = x + (t * (y / a));
} else if (z <= 6e+170) {
tmp = (x * (y - a)) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.8e+139: tmp = t elif z <= -1.15e-107: tmp = (y / z) * (x - t) elif z <= 2.25e+70: tmp = x + (t * (y / a)) elif z <= 6e+170: tmp = (x * (y - a)) / z else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.8e+139) tmp = t; elseif (z <= -1.15e-107) tmp = Float64(Float64(y / z) * Float64(x - t)); elseif (z <= 2.25e+70) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 6e+170) tmp = Float64(Float64(x * Float64(y - a)) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.8e+139) tmp = t; elseif (z <= -1.15e-107) tmp = (y / z) * (x - t); elseif (z <= 2.25e+70) tmp = x + (t * (y / a)); elseif (z <= 6e+170) tmp = (x * (y - a)) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.8e+139], t, If[LessEqual[z, -1.15e-107], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+70], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+170], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+139}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-107}:\\
\;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+70}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+170}:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -8.7999999999999998e139 or 5.99999999999999994e170 < z Initial program 54.7%
Taylor expanded in z around inf 60.3%
if -8.7999999999999998e139 < z < -1.15000000000000002e-107Initial program 82.4%
Taylor expanded in z around inf 56.1%
associate--l+56.1%
associate-*r/56.1%
associate-*r/56.1%
mul-1-neg56.1%
div-sub58.4%
mul-1-neg58.4%
distribute-lft-out--58.4%
associate-*r/58.4%
mul-1-neg58.4%
unsub-neg58.4%
distribute-rgt-out--60.6%
Simplified60.6%
Taylor expanded in y around -inf 40.0%
associate-*r/40.0%
neg-mul-140.0%
distribute-rgt-neg-in40.0%
Simplified40.0%
Taylor expanded in y around 0 40.0%
sub-neg40.0%
+-commutative40.0%
neg-sub040.0%
associate--r-40.0%
sub0-neg40.0%
distribute-rgt-neg-in40.0%
distribute-frac-neg40.0%
*-commutative40.0%
associate-*r/46.1%
*-commutative46.1%
distribute-rgt-neg-in46.1%
sub0-neg46.1%
associate--r-46.1%
neg-sub046.1%
+-commutative46.1%
sub-neg46.1%
Simplified46.1%
if -1.15000000000000002e-107 < z < 2.25e70Initial program 93.4%
Taylor expanded in z around 0 69.9%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in t around inf 54.2%
associate-/l*59.1%
Simplified59.1%
if 2.25e70 < z < 5.99999999999999994e170Initial program 65.9%
Taylor expanded in z around inf 81.7%
associate--l+81.7%
associate-*r/81.7%
associate-*r/81.7%
mul-1-neg81.7%
div-sub81.7%
mul-1-neg81.7%
distribute-lft-out--81.7%
associate-*r/81.7%
mul-1-neg81.7%
unsub-neg81.7%
distribute-rgt-out--81.7%
Simplified81.7%
Taylor expanded in t around 0 57.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.88e+142)
t
(if (<= z -2.08e-106)
(* (/ y z) (- x t))
(if (<= z 3.1e+69)
(+ x (* t (/ y a)))
(if (<= z 3e+166) (* x (/ (- y a) z)) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.88e+142) {
tmp = t;
} else if (z <= -2.08e-106) {
tmp = (y / z) * (x - t);
} else if (z <= 3.1e+69) {
tmp = x + (t * (y / a));
} else if (z <= 3e+166) {
tmp = x * ((y - a) / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.88d+142)) then
tmp = t
else if (z <= (-2.08d-106)) then
tmp = (y / z) * (x - t)
else if (z <= 3.1d+69) then
tmp = x + (t * (y / a))
else if (z <= 3d+166) then
tmp = x * ((y - a) / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.88e+142) {
tmp = t;
} else if (z <= -2.08e-106) {
tmp = (y / z) * (x - t);
} else if (z <= 3.1e+69) {
tmp = x + (t * (y / a));
} else if (z <= 3e+166) {
tmp = x * ((y - a) / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.88e+142: tmp = t elif z <= -2.08e-106: tmp = (y / z) * (x - t) elif z <= 3.1e+69: tmp = x + (t * (y / a)) elif z <= 3e+166: tmp = x * ((y - a) / z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.88e+142) tmp = t; elseif (z <= -2.08e-106) tmp = Float64(Float64(y / z) * Float64(x - t)); elseif (z <= 3.1e+69) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 3e+166) tmp = Float64(x * Float64(Float64(y - a) / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.88e+142) tmp = t; elseif (z <= -2.08e-106) tmp = (y / z) * (x - t); elseif (z <= 3.1e+69) tmp = x + (t * (y / a)); elseif (z <= 3e+166) tmp = x * ((y - a) / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.88e+142], t, If[LessEqual[z, -2.08e-106], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e+69], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+166], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.88 \cdot 10^{+142}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.08 \cdot 10^{-106}:\\
\;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+69}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+166}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.87999999999999992e142 or 2.99999999999999998e166 < z Initial program 54.7%
Taylor expanded in z around inf 60.3%
if -1.87999999999999992e142 < z < -2.0800000000000001e-106Initial program 82.4%
Taylor expanded in z around inf 56.1%
associate--l+56.1%
associate-*r/56.1%
associate-*r/56.1%
mul-1-neg56.1%
div-sub58.4%
mul-1-neg58.4%
distribute-lft-out--58.4%
associate-*r/58.4%
mul-1-neg58.4%
unsub-neg58.4%
distribute-rgt-out--60.6%
Simplified60.6%
Taylor expanded in y around -inf 40.0%
associate-*r/40.0%
neg-mul-140.0%
distribute-rgt-neg-in40.0%
Simplified40.0%
Taylor expanded in y around 0 40.0%
sub-neg40.0%
+-commutative40.0%
neg-sub040.0%
associate--r-40.0%
sub0-neg40.0%
distribute-rgt-neg-in40.0%
distribute-frac-neg40.0%
*-commutative40.0%
associate-*r/46.1%
*-commutative46.1%
distribute-rgt-neg-in46.1%
sub0-neg46.1%
associate--r-46.1%
neg-sub046.1%
+-commutative46.1%
sub-neg46.1%
Simplified46.1%
if -2.0800000000000001e-106 < z < 3.0999999999999998e69Initial program 93.4%
Taylor expanded in z around 0 69.9%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in t around inf 54.2%
associate-/l*59.1%
Simplified59.1%
if 3.0999999999999998e69 < z < 2.99999999999999998e166Initial program 65.9%
Taylor expanded in z around inf 81.7%
associate--l+81.7%
associate-*r/81.7%
associate-*r/81.7%
mul-1-neg81.7%
div-sub81.7%
mul-1-neg81.7%
distribute-lft-out--81.7%
associate-*r/81.7%
mul-1-neg81.7%
unsub-neg81.7%
distribute-rgt-out--81.7%
Simplified81.7%
Taylor expanded in t around 0 57.2%
associate-/l*52.8%
Simplified52.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ z (- z a)))))
(if (<= z -1.22e+69)
t_1
(if (<= z -2.08e-106)
(* (/ y z) (- x t))
(if (<= z 2.6e+27) (+ x (* t (/ y a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (z / (z - a));
double tmp;
if (z <= -1.22e+69) {
tmp = t_1;
} else if (z <= -2.08e-106) {
tmp = (y / z) * (x - t);
} else if (z <= 2.6e+27) {
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 * (z / (z - a))
if (z <= (-1.22d+69)) then
tmp = t_1
else if (z <= (-2.08d-106)) then
tmp = (y / z) * (x - t)
else if (z <= 2.6d+27) 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 * (z / (z - a));
double tmp;
if (z <= -1.22e+69) {
tmp = t_1;
} else if (z <= -2.08e-106) {
tmp = (y / z) * (x - t);
} else if (z <= 2.6e+27) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (z / (z - a)) tmp = 0 if z <= -1.22e+69: tmp = t_1 elif z <= -2.08e-106: tmp = (y / z) * (x - t) elif z <= 2.6e+27: tmp = x + (t * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(z / Float64(z - a))) tmp = 0.0 if (z <= -1.22e+69) tmp = t_1; elseif (z <= -2.08e-106) tmp = Float64(Float64(y / z) * Float64(x - t)); elseif (z <= 2.6e+27) 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 * (z / (z - a)); tmp = 0.0; if (z <= -1.22e+69) tmp = t_1; elseif (z <= -2.08e-106) tmp = (y / z) * (x - t); elseif (z <= 2.6e+27) 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[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.22e+69], t$95$1, If[LessEqual[z, -2.08e-106], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+27], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.08 \cdot 10^{-106}:\\
\;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+27}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.22e69 or 2.60000000000000009e27 < z Initial program 64.7%
Taylor expanded in x around 0 48.9%
associate-/l*69.5%
Simplified69.5%
Taylor expanded in y around 0 57.2%
neg-mul-157.2%
distribute-neg-frac57.2%
Simplified57.2%
if -1.22e69 < z < -2.0800000000000001e-106Initial program 85.6%
Taylor expanded in z around inf 57.0%
associate--l+57.0%
associate-*r/57.0%
associate-*r/57.0%
mul-1-neg57.0%
div-sub60.7%
mul-1-neg60.7%
distribute-lft-out--60.7%
associate-*r/60.7%
mul-1-neg60.7%
unsub-neg60.7%
distribute-rgt-out--60.7%
Simplified60.7%
Taylor expanded in y around -inf 48.5%
associate-*r/48.5%
neg-mul-148.5%
distribute-rgt-neg-in48.5%
Simplified48.5%
Taylor expanded in y around 0 48.5%
sub-neg48.5%
+-commutative48.5%
neg-sub048.5%
associate--r-48.5%
sub0-neg48.5%
distribute-rgt-neg-in48.5%
distribute-frac-neg48.5%
*-commutative48.5%
associate-*r/51.7%
*-commutative51.7%
distribute-rgt-neg-in51.7%
sub0-neg51.7%
associate--r-51.7%
neg-sub051.7%
+-commutative51.7%
sub-neg51.7%
Simplified51.7%
if -2.0800000000000001e-106 < z < 2.60000000000000009e27Initial program 93.6%
Taylor expanded in z around 0 74.7%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in t around inf 57.6%
associate-/l*62.2%
Simplified62.2%
Final simplification59.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6e+140)
t
(if (<= z -2.05e-106)
(* (/ y z) (- x t))
(if (<= z 2.3e+30) (* x (- 1.0 (/ y a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+140) {
tmp = t;
} else if (z <= -2.05e-106) {
tmp = (y / z) * (x - t);
} else if (z <= 2.3e+30) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6d+140)) then
tmp = t
else if (z <= (-2.05d-106)) then
tmp = (y / z) * (x - t)
else if (z <= 2.3d+30) then
tmp = x * (1.0d0 - (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+140) {
tmp = t;
} else if (z <= -2.05e-106) {
tmp = (y / z) * (x - t);
} else if (z <= 2.3e+30) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6e+140: tmp = t elif z <= -2.05e-106: tmp = (y / z) * (x - t) elif z <= 2.3e+30: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e+140) tmp = t; elseif (z <= -2.05e-106) tmp = Float64(Float64(y / z) * Float64(x - t)); elseif (z <= 2.3e+30) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6e+140) tmp = t; elseif (z <= -2.05e-106) tmp = (y / z) * (x - t); elseif (z <= 2.3e+30) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e+140], t, If[LessEqual[z, -2.05e-106], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+30], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+140}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.05 \cdot 10^{-106}:\\
\;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.99999999999999993e140 or 2.3e30 < z Initial program 62.5%
Taylor expanded in z around inf 49.9%
if -5.99999999999999993e140 < z < -2.05e-106Initial program 82.4%
Taylor expanded in z around inf 56.1%
associate--l+56.1%
associate-*r/56.1%
associate-*r/56.1%
mul-1-neg56.1%
div-sub58.4%
mul-1-neg58.4%
distribute-lft-out--58.4%
associate-*r/58.4%
mul-1-neg58.4%
unsub-neg58.4%
distribute-rgt-out--60.6%
Simplified60.6%
Taylor expanded in y around -inf 40.0%
associate-*r/40.0%
neg-mul-140.0%
distribute-rgt-neg-in40.0%
Simplified40.0%
Taylor expanded in y around 0 40.0%
sub-neg40.0%
+-commutative40.0%
neg-sub040.0%
associate--r-40.0%
sub0-neg40.0%
distribute-rgt-neg-in40.0%
distribute-frac-neg40.0%
*-commutative40.0%
associate-*r/46.1%
*-commutative46.1%
distribute-rgt-neg-in46.1%
sub0-neg46.1%
associate--r-46.1%
neg-sub046.1%
+-commutative46.1%
sub-neg46.1%
Simplified46.1%
if -2.05e-106 < z < 2.3e30Initial program 92.9%
Taylor expanded in z around 0 73.6%
associate-/l*79.3%
Simplified79.3%
Taylor expanded in x around inf 59.4%
mul-1-neg59.4%
unsub-neg59.4%
Simplified59.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.25e-38) (not (<= a 1.72e-71))) (+ x (/ (- y z) (/ a (- t x)))) (- t (/ (* (- t x) (- y a)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.25e-38) || !(a <= 1.72e-71)) {
tmp = x + ((y - z) / (a / (t - x)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.25d-38)) .or. (.not. (a <= 1.72d-71))) then
tmp = x + ((y - z) / (a / (t - x)))
else
tmp = t - (((t - x) * (y - a)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.25e-38) || !(a <= 1.72e-71)) {
tmp = x + ((y - z) / (a / (t - x)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.25e-38) or not (a <= 1.72e-71): tmp = x + ((y - z) / (a / (t - x))) else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.25e-38) || !(a <= 1.72e-71)) tmp = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x)))); else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.25e-38) || ~((a <= 1.72e-71))) tmp = x + ((y - z) / (a / (t - x))); else tmp = t - (((t - x) * (y - a)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.25e-38], N[Not[LessEqual[a, 1.72e-71]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{-38} \lor \neg \left(a \leq 1.72 \cdot 10^{-71}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if a < -1.25000000000000008e-38 or 1.72e-71 < a Initial program 84.4%
clear-num83.7%
un-div-inv83.8%
Applied egg-rr83.8%
Taylor expanded in a around inf 73.2%
if -1.25000000000000008e-38 < a < 1.72e-71Initial program 75.2%
Taylor expanded in z around inf 78.3%
associate--l+78.3%
associate-*r/78.3%
associate-*r/78.3%
mul-1-neg78.3%
div-sub78.3%
mul-1-neg78.3%
distribute-lft-out--78.3%
associate-*r/78.3%
mul-1-neg78.3%
unsub-neg78.3%
distribute-rgt-out--78.3%
Simplified78.3%
Final simplification75.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.08e-106) (not (<= z 0.036))) (* t (/ (- y z) (- a z))) (+ x (/ (- y z) (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.08e-106) || !(z <= 0.036)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((y - z) / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.08d-106)) .or. (.not. (z <= 0.036d0))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((y - z) / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.08e-106) || !(z <= 0.036)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((y - z) / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.08e-106) or not (z <= 0.036): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((y - z) / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.08e-106) || !(z <= 0.036)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.08e-106) || ~((z <= 0.036))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((y - z) / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.08e-106], N[Not[LessEqual[z, 0.036]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.08 \cdot 10^{-106} \lor \neg \left(z \leq 0.036\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -2.0800000000000001e-106 or 0.0359999999999999973 < z Initial program 68.9%
Taylor expanded in x around 0 50.0%
associate-/l*67.0%
Simplified67.0%
if -2.0800000000000001e-106 < z < 0.0359999999999999973Initial program 94.9%
clear-num94.8%
un-div-inv95.0%
Applied egg-rr95.0%
Taylor expanded in a around inf 83.4%
Final simplification74.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.95e-106) (not (<= z 0.084))) (* t (/ (- y z) (- a z))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.95e-106) || !(z <= 0.084)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.95d-106)) .or. (.not. (z <= 0.084d0))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.95e-106) || !(z <= 0.084)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.95e-106) or not (z <= 0.084): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.95e-106) || !(z <= 0.084)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.95e-106) || ~((z <= 0.084))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.95e-106], N[Not[LessEqual[z, 0.084]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-106} \lor \neg \left(z \leq 0.084\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -1.95000000000000005e-106 or 0.0840000000000000052 < z Initial program 68.9%
Taylor expanded in x around 0 50.0%
associate-/l*67.0%
Simplified67.0%
if -1.95000000000000005e-106 < z < 0.0840000000000000052Initial program 94.9%
Taylor expanded in z around 0 75.9%
associate-/l*81.2%
clear-num81.2%
div-inv81.3%
add-cube-cbrt80.9%
*-un-lft-identity80.9%
times-frac80.9%
pow280.9%
Applied egg-rr80.9%
times-frac80.9%
unpow280.9%
rem-3cbrt-lft81.3%
*-lft-identity81.3%
Simplified81.3%
Final simplification73.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.08e-106) (not (<= z 0.04))) (* t (/ (- y z) (- a z))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.08e-106) || !(z <= 0.04)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / 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 <= (-2.08d-106)) .or. (.not. (z <= 0.04d0))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y * ((t - x) / 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 <= -2.08e-106) || !(z <= 0.04)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.08e-106) or not (z <= 0.04): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.08e-106) || !(z <= 0.04)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.08e-106) || ~((z <= 0.04))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.08e-106], N[Not[LessEqual[z, 0.04]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.08 \cdot 10^{-106} \lor \neg \left(z \leq 0.04\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -2.0800000000000001e-106 or 0.0400000000000000008 < z Initial program 68.9%
Taylor expanded in x around 0 50.0%
associate-/l*67.0%
Simplified67.0%
if -2.0800000000000001e-106 < z < 0.0400000000000000008Initial program 94.9%
Taylor expanded in z around 0 75.9%
associate-/l*81.2%
Simplified81.2%
Final simplification73.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -5e+168) (not (<= x 7.5e+26))) (* x (- 1.0 (/ y a))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5e+168) || !(x <= 7.5e+26)) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-5d+168)) .or. (.not. (x <= 7.5d+26))) then
tmp = x * (1.0d0 - (y / a))
else
tmp = t * ((y - z) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5e+168) || !(x <= 7.5e+26)) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -5e+168) or not (x <= 7.5e+26): tmp = x * (1.0 - (y / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -5e+168) || !(x <= 7.5e+26)) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -5e+168) || ~((x <= 7.5e+26))) tmp = x * (1.0 - (y / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -5e+168], N[Not[LessEqual[x, 7.5e+26]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+168} \lor \neg \left(x \leq 7.5 \cdot 10^{+26}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -4.99999999999999967e168 or 7.49999999999999941e26 < x Initial program 76.3%
Taylor expanded in z around 0 52.8%
associate-/l*60.1%
Simplified60.1%
Taylor expanded in x around inf 60.3%
mul-1-neg60.3%
unsub-neg60.3%
Simplified60.3%
if -4.99999999999999967e168 < x < 7.49999999999999941e26Initial program 83.3%
Taylor expanded in x around 0 59.7%
associate-/l*72.0%
Simplified72.0%
Final simplification68.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.7e+85) t (if (<= z 2.5e+30) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.7e+85) {
tmp = t;
} else if (z <= 2.5e+30) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.7d+85)) then
tmp = t
else if (z <= 2.5d+30) then
tmp = x * (1.0d0 - (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.7e+85) {
tmp = t;
} else if (z <= 2.5e+30) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.7e+85: tmp = t elif z <= 2.5e+30: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.7e+85) tmp = t; elseif (z <= 2.5e+30) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.7e+85) tmp = t; elseif (z <= 2.5e+30) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.7e+85], t, If[LessEqual[z, 2.5e+30], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+85}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.7000000000000002e85 or 2.4999999999999999e30 < z Initial program 64.1%
Taylor expanded in z around inf 48.0%
if -3.7000000000000002e85 < z < 2.4999999999999999e30Initial program 91.3%
Taylor expanded in z around 0 66.6%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in x around inf 52.5%
mul-1-neg52.5%
unsub-neg52.5%
Simplified52.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.4e+85) t (if (<= z -5e-109) (/ (* y (- t)) z) (if (<= z 9e-5) x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.4e+85) {
tmp = t;
} else if (z <= -5e-109) {
tmp = (y * -t) / z;
} else if (z <= 9e-5) {
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 <= (-3.4d+85)) then
tmp = t
else if (z <= (-5d-109)) then
tmp = (y * -t) / z
else if (z <= 9d-5) 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 <= -3.4e+85) {
tmp = t;
} else if (z <= -5e-109) {
tmp = (y * -t) / z;
} else if (z <= 9e-5) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.4e+85: tmp = t elif z <= -5e-109: tmp = (y * -t) / z elif z <= 9e-5: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.4e+85) tmp = t; elseif (z <= -5e-109) tmp = Float64(Float64(y * Float64(-t)) / z); elseif (z <= 9e-5) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.4e+85) tmp = t; elseif (z <= -5e-109) tmp = (y * -t) / z; elseif (z <= 9e-5) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.4e+85], t, If[LessEqual[z, -5e-109], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 9e-5], x, t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+85}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-109}:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.4000000000000003e85 or 9.00000000000000057e-5 < z Initial program 64.8%
Taylor expanded in z around inf 44.8%
if -3.4000000000000003e85 < z < -5.0000000000000002e-109Initial program 84.8%
Taylor expanded in z around inf 54.4%
associate--l+54.4%
associate-*r/54.4%
associate-*r/54.4%
mul-1-neg54.4%
div-sub57.5%
mul-1-neg57.5%
distribute-lft-out--57.5%
associate-*r/57.5%
mul-1-neg57.5%
unsub-neg57.5%
distribute-rgt-out--60.7%
Simplified60.7%
Taylor expanded in y around -inf 47.3%
associate-*r/47.3%
neg-mul-147.3%
distribute-rgt-neg-in47.3%
Simplified47.3%
Taylor expanded in t around inf 32.9%
associate-*r/32.9%
mul-1-neg32.9%
*-commutative32.9%
distribute-lft-neg-in32.9%
Simplified32.9%
if -5.0000000000000002e-109 < z < 9.00000000000000057e-5Initial program 94.8%
Taylor expanded in a around inf 37.8%
Final simplification40.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.9e+61) t (if (<= z 3.5e-5) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e+61) {
tmp = t;
} else if (z <= 3.5e-5) {
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 <= (-1.9d+61)) then
tmp = t
else if (z <= 3.5d-5) 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 <= -1.9e+61) {
tmp = t;
} else if (z <= 3.5e-5) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.9e+61: tmp = t elif z <= 3.5e-5: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.9e+61) tmp = t; elseif (z <= 3.5e-5) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.9e+61) tmp = t; elseif (z <= 3.5e-5) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.9e+61], t, If[LessEqual[z, 3.5e-5], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+61}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.89999999999999998e61 or 3.4999999999999997e-5 < z Initial program 65.8%
Taylor expanded in z around inf 42.6%
if -1.89999999999999998e61 < z < 3.4999999999999997e-5Initial program 93.0%
Taylor expanded in a around inf 33.6%
(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 80.9%
Taylor expanded in z around inf 22.8%
herbie shell --seed 2024137
(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)))))