
(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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y z) (- a z))) (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 -2e-305)
(fma (- t x) t_1 x)
(if (<= t_2 0.0) (- t (/ (* (- t x) (- y a)) z)) (+ x (* (- t x) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) / (a - z);
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -2e-305) {
tmp = fma((t - x), t_1, x);
} else if (t_2 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = x + ((t - x) * t_1);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(y - z) / Float64(a - z)) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= -2e-305) tmp = fma(Float64(t - x), t_1, x); elseif (t_2 <= 0.0) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); else tmp = Float64(x + Float64(Float64(t - x) * t_1)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-305], N[(N[(t - x), $MachinePrecision] * t$95$1 + x), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - z}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-305}:\\
\;\;\;\;\mathsf{fma}\left(t - x, t\_1, x\right)\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999999e-305Initial program 77.3%
+-commutative77.3%
*-commutative77.3%
associate-/l*90.1%
fma-define90.2%
Simplified90.2%
if -1.99999999999999999e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.6%
associate-/l*4.5%
Simplified4.5%
Taylor expanded in z around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 78.7%
+-commutative78.7%
*-commutative78.7%
associate-/l*88.3%
fma-define88.3%
Simplified88.3%
fma-undefine88.3%
Applied egg-rr88.3%
Final simplification90.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -2e-305) (not (<= t_1 0.0)))
(+ x (* (- t x) (/ (- y z) (- a z))))
(- 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-305) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} 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-305)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) * ((y - z) / (a - z)))
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-305) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} 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-305) or not (t_1 <= 0.0): tmp = x + ((t - x) * ((y - z) / (a - z))) else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -2e-305) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(a - z)))); 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-305) || ~((t_1 <= 0.0))) tmp = x + ((t - x) * ((y - z) / (a - z))); 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-305], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $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}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-305} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999999e-305 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 78.0%
+-commutative78.0%
*-commutative78.0%
associate-/l*89.2%
fma-define89.3%
Simplified89.3%
fma-undefine89.2%
Applied egg-rr89.2%
if -1.99999999999999999e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.6%
associate-/l*4.5%
Simplified4.5%
Taylor expanded in z around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification90.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -2e-305) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(- 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-305) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} 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-305)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
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-305) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} 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-305) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -2e-305) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); 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-305) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-305], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-305} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999999e-305 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 78.0%
associate-/l*85.2%
Simplified85.2%
*-commutative85.2%
associate-*l/78.0%
associate-*r/89.2%
clear-num89.1%
un-div-inv89.2%
Applied egg-rr89.2%
if -1.99999999999999999e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.6%
associate-/l*4.5%
Simplified4.5%
Taylor expanded in z around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification90.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_1 -2e-305)
(+ x (* (- t x) (* (- y z) (/ -1.0 (- z a)))))
(if (<= t_1 0.0)
(- t (/ (* (- t x) (- y a)) z))
(+ x (* (- t x) (/ (- y z) (- 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-305) {
tmp = x + ((t - x) * ((y - z) * (-1.0 / (z - a))));
} else if (t_1 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = x + ((t - x) * ((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) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) * (t - x)) / (a - z))
if (t_1 <= (-2d-305)) then
tmp = x + ((t - x) * ((y - z) * ((-1.0d0) / (z - a))))
else if (t_1 <= 0.0d0) then
tmp = t - (((t - x) * (y - a)) / z)
else
tmp = x + ((t - x) * ((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 t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_1 <= -2e-305) {
tmp = x + ((t - x) * ((y - z) * (-1.0 / (z - a))));
} else if (t_1 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = x + ((t - x) * ((y - z) / (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-305: tmp = x + ((t - x) * ((y - z) * (-1.0 / (z - a)))) elif t_1 <= 0.0: tmp = t - (((t - x) * (y - a)) / z) else: tmp = x + ((t - x) * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_1 <= -2e-305) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) * Float64(-1.0 / Float64(z - a))))); elseif (t_1 <= 0.0) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); else tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(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-305) tmp = x + ((t - x) * ((y - z) * (-1.0 / (z - a)))); elseif (t_1 <= 0.0) tmp = t - (((t - x) * (y - a)) / z); else tmp = x + ((t - x) * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-305], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] * N[(-1.0 / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-305}:\\
\;\;\;\;x + \left(t - x\right) \cdot \left(\left(y - z\right) \cdot \frac{-1}{z - a}\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999999e-305Initial program 77.3%
+-commutative77.3%
*-commutative77.3%
associate-/l*90.1%
fma-define90.2%
Simplified90.2%
fma-undefine90.1%
Applied egg-rr90.1%
clear-num90.1%
associate-/r/90.1%
Applied egg-rr90.1%
if -1.99999999999999999e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.6%
associate-/l*4.5%
Simplified4.5%
Taylor expanded in z around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 78.7%
+-commutative78.7%
*-commutative78.7%
associate-/l*88.3%
fma-define88.3%
Simplified88.3%
fma-undefine88.3%
Applied egg-rr88.3%
Final simplification90.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (* x (- 1.0 (/ y a)))))
(if (<= a -5.8e+69)
t_2
(if (<= a -2.3e+32)
t_1
(if (<= a -2.5e-21)
t_2
(if (<= a -3.6e-137)
t_1
(if (<= a -6.5e-204)
(/ (* x (- y a)) z)
(if (<= a 2.7e+95) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -5.8e+69) {
tmp = t_2;
} else if (a <= -2.3e+32) {
tmp = t_1;
} else if (a <= -2.5e-21) {
tmp = t_2;
} else if (a <= -3.6e-137) {
tmp = t_1;
} else if (a <= -6.5e-204) {
tmp = (x * (y - a)) / z;
} else if (a <= 2.7e+95) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x * (1.0d0 - (y / a))
if (a <= (-5.8d+69)) then
tmp = t_2
else if (a <= (-2.3d+32)) then
tmp = t_1
else if (a <= (-2.5d-21)) then
tmp = t_2
else if (a <= (-3.6d-137)) then
tmp = t_1
else if (a <= (-6.5d-204)) then
tmp = (x * (y - a)) / z
else if (a <= 2.7d+95) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -5.8e+69) {
tmp = t_2;
} else if (a <= -2.3e+32) {
tmp = t_1;
} else if (a <= -2.5e-21) {
tmp = t_2;
} else if (a <= -3.6e-137) {
tmp = t_1;
} else if (a <= -6.5e-204) {
tmp = (x * (y - a)) / z;
} else if (a <= 2.7e+95) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x * (1.0 - (y / a)) tmp = 0 if a <= -5.8e+69: tmp = t_2 elif a <= -2.3e+32: tmp = t_1 elif a <= -2.5e-21: tmp = t_2 elif a <= -3.6e-137: tmp = t_1 elif a <= -6.5e-204: tmp = (x * (y - a)) / z elif a <= 2.7e+95: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (a <= -5.8e+69) tmp = t_2; elseif (a <= -2.3e+32) tmp = t_1; elseif (a <= -2.5e-21) tmp = t_2; elseif (a <= -3.6e-137) tmp = t_1; elseif (a <= -6.5e-204) tmp = Float64(Float64(x * Float64(y - a)) / z); elseif (a <= 2.7e+95) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x * (1.0 - (y / a)); tmp = 0.0; if (a <= -5.8e+69) tmp = t_2; elseif (a <= -2.3e+32) tmp = t_1; elseif (a <= -2.5e-21) tmp = t_2; elseif (a <= -3.6e-137) tmp = t_1; elseif (a <= -6.5e-204) tmp = (x * (y - a)) / z; elseif (a <= 2.7e+95) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.8e+69], t$95$2, If[LessEqual[a, -2.3e+32], t$95$1, If[LessEqual[a, -2.5e-21], t$95$2, If[LessEqual[a, -3.6e-137], t$95$1, If[LessEqual[a, -6.5e-204], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 2.7e+95], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;a \leq -5.8 \cdot 10^{+69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.5 \cdot 10^{-21}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -3.6 \cdot 10^{-137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{-204}:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -5.7999999999999997e69 or -2.3e32 < a < -2.49999999999999986e-21 or 2.7e95 < a Initial program 83.1%
associate-/l*92.1%
Simplified92.1%
Taylor expanded in x around inf 71.5%
mul-1-neg71.5%
unsub-neg71.5%
Simplified71.5%
Taylor expanded in z around 0 68.8%
if -5.7999999999999997e69 < a < -2.3e32 or -2.49999999999999986e-21 < a < -3.60000000000000006e-137 or -6.49999999999999939e-204 < a < 2.7e95Initial program 62.9%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in x around 0 60.5%
associate-/l*73.2%
Simplified73.2%
if -3.60000000000000006e-137 < a < -6.49999999999999939e-204Initial program 62.4%
associate-/l*51.8%
Simplified51.8%
Taylor expanded in x around inf 40.9%
mul-1-neg40.9%
unsub-neg40.9%
Simplified40.9%
Taylor expanded in z around inf 63.4%
associate-*r/63.4%
associate-*r*63.4%
neg-mul-163.4%
mul-1-neg63.4%
sub-neg63.4%
Simplified63.4%
Final simplification70.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.3e+130)
x
(if (<= a -2.3e+16)
(* t (/ (- y z) a))
(if (<= a -1.25e-52)
(* t (/ y (- z)))
(if (<= a -5.5e-134)
t
(if (<= a -1.3e-222) (* x (/ y z)) (if (<= a 1.2e+95) t x)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.3e+130) {
tmp = x;
} else if (a <= -2.3e+16) {
tmp = t * ((y - z) / a);
} else if (a <= -1.25e-52) {
tmp = t * (y / -z);
} else if (a <= -5.5e-134) {
tmp = t;
} else if (a <= -1.3e-222) {
tmp = x * (y / z);
} else if (a <= 1.2e+95) {
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.3d+130)) then
tmp = x
else if (a <= (-2.3d+16)) then
tmp = t * ((y - z) / a)
else if (a <= (-1.25d-52)) then
tmp = t * (y / -z)
else if (a <= (-5.5d-134)) then
tmp = t
else if (a <= (-1.3d-222)) then
tmp = x * (y / z)
else if (a <= 1.2d+95) 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.3e+130) {
tmp = x;
} else if (a <= -2.3e+16) {
tmp = t * ((y - z) / a);
} else if (a <= -1.25e-52) {
tmp = t * (y / -z);
} else if (a <= -5.5e-134) {
tmp = t;
} else if (a <= -1.3e-222) {
tmp = x * (y / z);
} else if (a <= 1.2e+95) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.3e+130: tmp = x elif a <= -2.3e+16: tmp = t * ((y - z) / a) elif a <= -1.25e-52: tmp = t * (y / -z) elif a <= -5.5e-134: tmp = t elif a <= -1.3e-222: tmp = x * (y / z) elif a <= 1.2e+95: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.3e+130) tmp = x; elseif (a <= -2.3e+16) tmp = Float64(t * Float64(Float64(y - z) / a)); elseif (a <= -1.25e-52) tmp = Float64(t * Float64(y / Float64(-z))); elseif (a <= -5.5e-134) tmp = t; elseif (a <= -1.3e-222) tmp = Float64(x * Float64(y / z)); elseif (a <= 1.2e+95) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.3e+130) tmp = x; elseif (a <= -2.3e+16) tmp = t * ((y - z) / a); elseif (a <= -1.25e-52) tmp = t * (y / -z); elseif (a <= -5.5e-134) tmp = t; elseif (a <= -1.3e-222) tmp = x * (y / z); elseif (a <= 1.2e+95) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.3e+130], x, If[LessEqual[a, -2.3e+16], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.25e-52], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.5e-134], t, If[LessEqual[a, -1.3e-222], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e+95], t, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{+130}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{+16}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;a \leq -1.25 \cdot 10^{-52}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{elif}\;a \leq -5.5 \cdot 10^{-134}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq -1.3 \cdot 10^{-222}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{+95}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.3e130 or 1.2e95 < a Initial program 81.3%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in a around inf 67.2%
if -3.3e130 < a < -2.3e16Initial program 95.4%
associate-/l*90.7%
Simplified90.7%
Taylor expanded in x around 0 54.0%
Taylor expanded in a around inf 44.6%
associate-/l*49.0%
Simplified49.0%
if -2.3e16 < a < -1.25e-52Initial program 77.6%
associate-/l*88.3%
Simplified88.3%
Taylor expanded in x around 0 31.9%
Taylor expanded in a around 0 37.0%
mul-1-neg37.0%
associate-/l*47.9%
distribute-rgt-neg-in47.9%
Simplified47.9%
Taylor expanded in y around inf 35.4%
mul-1-neg35.4%
associate-/l*40.7%
distribute-rgt-neg-in40.7%
distribute-frac-neg240.7%
Simplified40.7%
if -1.25e-52 < a < -5.5000000000000002e-134 or -1.2999999999999999e-222 < a < 1.2e95Initial program 63.3%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in z around inf 40.7%
if -5.5000000000000002e-134 < a < -1.2999999999999999e-222Initial program 49.7%
associate-/l*45.4%
Simplified45.4%
Taylor expanded in x around inf 33.0%
mul-1-neg33.0%
unsub-neg33.0%
Simplified33.0%
Taylor expanded in a around 0 58.2%
associate-/l*58.3%
Simplified58.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* a (/ t z)))))
(if (<= z -2.9e+163)
t_1
(if (<= z 2e+52)
(* x (- 1.0 (/ y a)))
(if (<= z 1.9e+109) (* t (/ y (- z))) (if (<= z 2.22e+111) x t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (a * (t / z));
double tmp;
if (z <= -2.9e+163) {
tmp = t_1;
} else if (z <= 2e+52) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.9e+109) {
tmp = t * (y / -z);
} else if (z <= 2.22e+111) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (a * (t / z))
if (z <= (-2.9d+163)) then
tmp = t_1
else if (z <= 2d+52) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1.9d+109) then
tmp = t * (y / -z)
else if (z <= 2.22d+111) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (a * (t / z));
double tmp;
if (z <= -2.9e+163) {
tmp = t_1;
} else if (z <= 2e+52) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.9e+109) {
tmp = t * (y / -z);
} else if (z <= 2.22e+111) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (a * (t / z)) tmp = 0 if z <= -2.9e+163: tmp = t_1 elif z <= 2e+52: tmp = x * (1.0 - (y / a)) elif z <= 1.9e+109: tmp = t * (y / -z) elif z <= 2.22e+111: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(a * Float64(t / z))) tmp = 0.0 if (z <= -2.9e+163) tmp = t_1; elseif (z <= 2e+52) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1.9e+109) tmp = Float64(t * Float64(y / Float64(-z))); elseif (z <= 2.22e+111) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (a * (t / z)); tmp = 0.0; if (z <= -2.9e+163) tmp = t_1; elseif (z <= 2e+52) tmp = x * (1.0 - (y / a)); elseif (z <= 1.9e+109) tmp = t * (y / -z); elseif (z <= 2.22e+111) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+163], t$95$1, If[LessEqual[z, 2e+52], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+109], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.22e+111], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + a \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+163}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+52}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+109}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{elif}\;z \leq 2.22 \cdot 10^{+111}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.89999999999999998e163 or 2.22e111 < z Initial program 29.5%
associate-/l*48.9%
Simplified48.9%
Taylor expanded in x around 0 46.1%
Taylor expanded in y around 0 44.0%
associate-*r/44.0%
mul-1-neg44.0%
distribute-rgt-neg-out44.0%
Simplified44.0%
Taylor expanded in z around inf 58.0%
associate-/l*60.7%
Simplified60.7%
if -2.89999999999999998e163 < z < 2e52Initial program 87.6%
associate-/l*89.8%
Simplified89.8%
Taylor expanded in x around inf 59.3%
mul-1-neg59.3%
unsub-neg59.3%
Simplified59.3%
Taylor expanded in z around 0 53.4%
if 2e52 < z < 1.90000000000000019e109Initial program 58.2%
associate-/l*57.8%
Simplified57.8%
Taylor expanded in x around 0 52.8%
Taylor expanded in a around 0 52.8%
mul-1-neg52.8%
associate-/l*65.9%
distribute-rgt-neg-in65.9%
Simplified65.9%
Taylor expanded in y around inf 52.4%
mul-1-neg52.4%
associate-/l*65.4%
distribute-rgt-neg-in65.4%
distribute-frac-neg265.4%
Simplified65.4%
if 1.90000000000000019e109 < z < 2.22e111Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in a around inf 100.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.4e+130)
(- t (/ (* (- t x) (- y a)) z))
(if (<= z -4.5e-120)
(+ x (* (- y z) (/ t (- a z))))
(if (<= z 560.0)
(+ x (* (- t x) (/ y (- a z))))
(* t (/ (- y z) (- a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e+130) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (z <= -4.5e-120) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 560.0) {
tmp = x + ((t - x) * (y / (a - z)));
} 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 (z <= (-1.4d+130)) then
tmp = t - (((t - x) * (y - a)) / z)
else if (z <= (-4.5d-120)) then
tmp = x + ((y - z) * (t / (a - z)))
else if (z <= 560.0d0) then
tmp = x + ((t - x) * (y / (a - z)))
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 (z <= -1.4e+130) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (z <= -4.5e-120) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 560.0) {
tmp = x + ((t - x) * (y / (a - z)));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.4e+130: tmp = t - (((t - x) * (y - a)) / z) elif z <= -4.5e-120: tmp = x + ((y - z) * (t / (a - z))) elif z <= 560.0: tmp = x + ((t - x) * (y / (a - z))) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.4e+130) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); elseif (z <= -4.5e-120) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (z <= 560.0) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); 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 (z <= -1.4e+130) tmp = t - (((t - x) * (y - a)) / z); elseif (z <= -4.5e-120) tmp = x + ((y - z) * (t / (a - z))); elseif (z <= 560.0) tmp = x + ((t - x) * (y / (a - z))); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.4e+130], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.5e-120], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 560.0], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+130}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-120}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 560:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if z < -1.3999999999999999e130Initial program 32.9%
associate-/l*49.4%
Simplified49.4%
Taylor expanded in z around inf 73.5%
associate--l+73.5%
associate-*r/73.5%
associate-*r/73.5%
mul-1-neg73.5%
div-sub73.5%
mul-1-neg73.5%
distribute-lft-out--73.5%
associate-*r/73.5%
mul-1-neg73.5%
unsub-neg73.5%
distribute-rgt-out--73.8%
Simplified73.8%
if -1.3999999999999999e130 < z < -4.5e-120Initial program 82.1%
associate-/l*90.0%
Simplified90.0%
Taylor expanded in t around inf 78.7%
if -4.5e-120 < z < 560Initial program 92.9%
+-commutative92.9%
*-commutative92.9%
associate-/l*96.5%
fma-define96.5%
Simplified96.5%
fma-undefine96.5%
Applied egg-rr96.5%
Taylor expanded in y around inf 91.2%
if 560 < z Initial program 49.4%
associate-/l*58.7%
Simplified58.7%
Taylor expanded in x around 0 53.4%
associate-/l*70.4%
Simplified70.4%
Final simplification81.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -6e+160)
t_1
(if (<= z -3.8e-120)
(+ x (* (- y z) (/ t (- a z))))
(if (<= z 20000.0) (+ x (* (- t x) (/ y (- a z)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -6e+160) {
tmp = t_1;
} else if (z <= -3.8e-120) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 20000.0) {
tmp = x + ((t - x) * (y / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
if (z <= (-6d+160)) then
tmp = t_1
else if (z <= (-3.8d-120)) then
tmp = x + ((y - z) * (t / (a - z)))
else if (z <= 20000.0d0) then
tmp = x + ((t - x) * (y / (a - z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -6e+160) {
tmp = t_1;
} else if (z <= -3.8e-120) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 20000.0) {
tmp = x + ((t - x) * (y / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -6e+160: tmp = t_1 elif z <= -3.8e-120: tmp = x + ((y - z) * (t / (a - z))) elif z <= 20000.0: tmp = x + ((t - x) * (y / (a - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -6e+160) tmp = t_1; elseif (z <= -3.8e-120) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (z <= 20000.0) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -6e+160) tmp = t_1; elseif (z <= -3.8e-120) tmp = x + ((y - z) * (t / (a - z))); elseif (z <= 20000.0) tmp = x + ((t - x) * (y / (a - z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+160], t$95$1, If[LessEqual[z, -3.8e-120], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 20000.0], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-120}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 20000:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.9999999999999997e160 or 2e4 < z Initial program 41.1%
associate-/l*55.4%
Simplified55.4%
Taylor expanded in x around 0 49.7%
associate-/l*69.5%
Simplified69.5%
if -5.9999999999999997e160 < z < -3.7999999999999997e-120Initial program 79.0%
associate-/l*84.3%
Simplified84.3%
Taylor expanded in t around inf 74.5%
if -3.7999999999999997e-120 < z < 2e4Initial program 92.9%
+-commutative92.9%
*-commutative92.9%
associate-/l*96.5%
fma-define96.5%
Simplified96.5%
fma-undefine96.5%
Applied egg-rr96.5%
Taylor expanded in y around inf 91.2%
Final simplification79.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -1e+160)
t_1
(if (<= z -1.85e-124)
(+ x (* (- y z) (/ t (- a z))))
(if (<= z 3.1e-11) (+ x (* (- t x) (/ y a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1e+160) {
tmp = t_1;
} else if (z <= -1.85e-124) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 3.1e-11) {
tmp = x + ((t - x) * (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 * ((y - z) / (a - z))
if (z <= (-1d+160)) then
tmp = t_1
else if (z <= (-1.85d-124)) then
tmp = x + ((y - z) * (t / (a - z)))
else if (z <= 3.1d-11) then
tmp = x + ((t - x) * (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 * ((y - z) / (a - z));
double tmp;
if (z <= -1e+160) {
tmp = t_1;
} else if (z <= -1.85e-124) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 3.1e-11) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -1e+160: tmp = t_1 elif z <= -1.85e-124: tmp = x + ((y - z) * (t / (a - z))) elif z <= 3.1e-11: tmp = x + ((t - x) * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -1e+160) tmp = t_1; elseif (z <= -1.85e-124) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (z <= 3.1e-11) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -1e+160) tmp = t_1; elseif (z <= -1.85e-124) tmp = x + ((y - z) * (t / (a - z))); elseif (z <= 3.1e-11) tmp = x + ((t - x) * (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+160], t$95$1, If[LessEqual[z, -1.85e-124], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e-11], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-124}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-11}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.00000000000000001e160 or 3.10000000000000028e-11 < z Initial program 41.9%
associate-/l*55.8%
Simplified55.8%
Taylor expanded in x around 0 49.9%
associate-/l*69.0%
Simplified69.0%
if -1.00000000000000001e160 < z < -1.84999999999999995e-124Initial program 79.0%
associate-/l*84.3%
Simplified84.3%
Taylor expanded in t around inf 74.5%
if -1.84999999999999995e-124 < z < 3.10000000000000028e-11Initial program 93.6%
+-commutative93.6%
*-commutative93.6%
associate-/l*97.2%
fma-define97.3%
Simplified97.3%
fma-undefine97.2%
Applied egg-rr97.2%
Taylor expanded in z around 0 84.9%
Final simplification76.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -5.5e+174)
t_1
(if (<= z -7.2e-86)
(+ x (/ (- z y) (/ z t)))
(if (<= z 6.2e-12) (+ x (* (- t x) (/ y a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -5.5e+174) {
tmp = t_1;
} else if (z <= -7.2e-86) {
tmp = x + ((z - y) / (z / t));
} else if (z <= 6.2e-12) {
tmp = x + ((t - x) * (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 * ((y - z) / (a - z))
if (z <= (-5.5d+174)) then
tmp = t_1
else if (z <= (-7.2d-86)) then
tmp = x + ((z - y) / (z / t))
else if (z <= 6.2d-12) then
tmp = x + ((t - x) * (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 * ((y - z) / (a - z));
double tmp;
if (z <= -5.5e+174) {
tmp = t_1;
} else if (z <= -7.2e-86) {
tmp = x + ((z - y) / (z / t));
} else if (z <= 6.2e-12) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -5.5e+174: tmp = t_1 elif z <= -7.2e-86: tmp = x + ((z - y) / (z / t)) elif z <= 6.2e-12: tmp = x + ((t - x) * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -5.5e+174) tmp = t_1; elseif (z <= -7.2e-86) tmp = Float64(x + Float64(Float64(z - y) / Float64(z / t))); elseif (z <= 6.2e-12) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -5.5e+174) tmp = t_1; elseif (z <= -7.2e-86) tmp = x + ((z - y) / (z / t)); elseif (z <= 6.2e-12) tmp = x + ((t - x) * (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e+174], t$95$1, If[LessEqual[z, -7.2e-86], N[(x + N[(N[(z - y), $MachinePrecision] / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e-12], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-86}:\\
\;\;\;\;x + \frac{z - y}{\frac{z}{t}}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-12}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.4999999999999998e174 or 6.2000000000000002e-12 < z Initial program 40.7%
associate-/l*54.9%
Simplified54.9%
Taylor expanded in x around 0 48.8%
associate-/l*68.4%
Simplified68.4%
if -5.4999999999999998e174 < z < -7.19999999999999932e-86Initial program 77.0%
associate-/l*82.8%
Simplified82.8%
clear-num82.7%
un-div-inv82.8%
Applied egg-rr82.8%
Taylor expanded in t around inf 71.9%
Taylor expanded in a around 0 60.7%
neg-mul-160.7%
distribute-neg-frac60.7%
Simplified60.7%
if -7.19999999999999932e-86 < z < 6.2000000000000002e-12Initial program 94.0%
+-commutative94.0%
*-commutative94.0%
associate-/l*96.6%
fma-define96.6%
Simplified96.6%
fma-undefine96.6%
Applied egg-rr96.6%
Taylor expanded in z around 0 84.1%
Final simplification73.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.7e-131) (not (<= a 2.7e-107))) (+ x (* (- y z) (/ (- t x) (- a z)))) (- t (/ (* (- t x) (- y a)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.7e-131) || !(a <= 2.7e-107)) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} 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.7d-131)) .or. (.not. (a <= 2.7d-107))) then
tmp = x + ((y - z) * ((t - x) / (a - z)))
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.7e-131) || !(a <= 2.7e-107)) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.7e-131) or not (a <= 2.7e-107): tmp = x + ((y - z) * ((t - x) / (a - z))) else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.7e-131) || !(a <= 2.7e-107)) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); 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.7e-131) || ~((a <= 2.7e-107))) tmp = x + ((y - z) * ((t - x) / (a - z))); else tmp = t - (((t - x) * (y - a)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.7e-131], N[Not[LessEqual[a, 2.7e-107]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $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.7 \cdot 10^{-131} \lor \neg \left(a \leq 2.7 \cdot 10^{-107}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if a < -1.69999999999999998e-131 or 2.7e-107 < a Initial program 78.1%
associate-/l*87.9%
Simplified87.9%
if -1.69999999999999998e-131 < a < 2.7e-107Initial program 55.8%
associate-/l*54.7%
Simplified54.7%
Taylor expanded in z around inf 85.8%
associate--l+85.8%
associate-*r/85.8%
associate-*r/85.8%
mul-1-neg85.8%
div-sub85.8%
mul-1-neg85.8%
distribute-lft-out--85.8%
associate-*r/85.8%
mul-1-neg85.8%
unsub-neg85.8%
distribute-rgt-out--85.8%
Simplified85.8%
Final simplification87.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4e+158)
t
(if (<= z 2e+52)
(* x (- 1.0 (/ y a)))
(if (<= z 3.6e+109) (* t (/ y (- z))) (if (<= z 1.22e+113) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+158) {
tmp = t;
} else if (z <= 2e+52) {
tmp = x * (1.0 - (y / a));
} else if (z <= 3.6e+109) {
tmp = t * (y / -z);
} else if (z <= 1.22e+113) {
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 <= (-4d+158)) then
tmp = t
else if (z <= 2d+52) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 3.6d+109) then
tmp = t * (y / -z)
else if (z <= 1.22d+113) 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 <= -4e+158) {
tmp = t;
} else if (z <= 2e+52) {
tmp = x * (1.0 - (y / a));
} else if (z <= 3.6e+109) {
tmp = t * (y / -z);
} else if (z <= 1.22e+113) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4e+158: tmp = t elif z <= 2e+52: tmp = x * (1.0 - (y / a)) elif z <= 3.6e+109: tmp = t * (y / -z) elif z <= 1.22e+113: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+158) tmp = t; elseif (z <= 2e+52) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 3.6e+109) tmp = Float64(t * Float64(y / Float64(-z))); elseif (z <= 1.22e+113) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4e+158) tmp = t; elseif (z <= 2e+52) tmp = x * (1.0 - (y / a)); elseif (z <= 3.6e+109) tmp = t * (y / -z); elseif (z <= 1.22e+113) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+158], t, If[LessEqual[z, 2e+52], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+109], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.22e+113], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+158}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+52}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+109}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{+113}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.99999999999999981e158 or 1.2199999999999999e113 < z Initial program 29.5%
associate-/l*48.9%
Simplified48.9%
Taylor expanded in z around inf 60.0%
if -3.99999999999999981e158 < z < 2e52Initial program 87.6%
associate-/l*89.8%
Simplified89.8%
Taylor expanded in x around inf 59.3%
mul-1-neg59.3%
unsub-neg59.3%
Simplified59.3%
Taylor expanded in z around 0 53.4%
if 2e52 < z < 3.6e109Initial program 58.2%
associate-/l*57.8%
Simplified57.8%
Taylor expanded in x around 0 52.8%
Taylor expanded in a around 0 52.8%
mul-1-neg52.8%
associate-/l*65.9%
distribute-rgt-neg-in65.9%
Simplified65.9%
Taylor expanded in y around inf 52.4%
mul-1-neg52.4%
associate-/l*65.4%
distribute-rgt-neg-in65.4%
distribute-frac-neg265.4%
Simplified65.4%
if 3.6e109 < z < 1.2199999999999999e113Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in a around inf 100.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2e-21)
x
(if (<= a -6.5e-137)
t
(if (<= a -7.6e-222) (* x (/ y z)) (if (<= a 1e+95) t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e-21) {
tmp = x;
} else if (a <= -6.5e-137) {
tmp = t;
} else if (a <= -7.6e-222) {
tmp = x * (y / z);
} else if (a <= 1e+95) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2d-21)) then
tmp = x
else if (a <= (-6.5d-137)) then
tmp = t
else if (a <= (-7.6d-222)) then
tmp = x * (y / z)
else if (a <= 1d+95) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e-21) {
tmp = x;
} else if (a <= -6.5e-137) {
tmp = t;
} else if (a <= -7.6e-222) {
tmp = x * (y / z);
} else if (a <= 1e+95) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2e-21: tmp = x elif a <= -6.5e-137: tmp = t elif a <= -7.6e-222: tmp = x * (y / z) elif a <= 1e+95: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2e-21) tmp = x; elseif (a <= -6.5e-137) tmp = t; elseif (a <= -7.6e-222) tmp = Float64(x * Float64(y / z)); elseif (a <= 1e+95) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2e-21) tmp = x; elseif (a <= -6.5e-137) tmp = t; elseif (a <= -7.6e-222) tmp = x * (y / z); elseif (a <= 1e+95) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2e-21], x, If[LessEqual[a, -6.5e-137], t, If[LessEqual[a, -7.6e-222], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e+95], t, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-21}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{-137}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq -7.6 \cdot 10^{-222}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 10^{+95}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.99999999999999982e-21 or 1.00000000000000002e95 < a Initial program 84.1%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in a around inf 57.4%
if -1.99999999999999982e-21 < a < -6.49999999999999991e-137 or -7.59999999999999993e-222 < a < 1.00000000000000002e95Initial program 63.2%
associate-/l*71.0%
Simplified71.0%
Taylor expanded in z around inf 40.2%
if -6.49999999999999991e-137 < a < -7.59999999999999993e-222Initial program 49.7%
associate-/l*45.4%
Simplified45.4%
Taylor expanded in x around inf 33.0%
mul-1-neg33.0%
unsub-neg33.0%
Simplified33.0%
Taylor expanded in a around 0 58.2%
associate-/l*58.3%
Simplified58.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.55e-69) (not (<= z 1.05e-17))) (* t (/ (- y z) (- a z))) (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.55e-69) || !(z <= 1.05e-17)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.55d-69)) .or. (.not. (z <= 1.05d-17))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((t - x) * (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 <= -1.55e-69) || !(z <= 1.05e-17)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.55e-69) or not (z <= 1.05e-17): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.55e-69) || !(z <= 1.05e-17)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.55e-69) || ~((z <= 1.05e-17))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.55e-69], N[Not[LessEqual[z, 1.05e-17]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-69} \lor \neg \left(z \leq 1.05 \cdot 10^{-17}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.55e-69 or 1.04999999999999996e-17 < z Initial program 52.4%
associate-/l*64.1%
Simplified64.1%
Taylor expanded in x around 0 47.6%
associate-/l*62.0%
Simplified62.0%
if -1.55e-69 < z < 1.04999999999999996e-17Initial program 93.5%
+-commutative93.5%
*-commutative93.5%
associate-/l*95.9%
fma-define95.9%
Simplified95.9%
fma-undefine95.9%
Applied egg-rr95.9%
Taylor expanded in z around 0 83.4%
Final simplification72.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7e-79) (not (<= z 2.9e-19))) (* 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 <= -7e-79) || !(z <= 2.9e-19)) {
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 <= (-7d-79)) .or. (.not. (z <= 2.9d-19))) 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 <= -7e-79) || !(z <= 2.9e-19)) {
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 <= -7e-79) or not (z <= 2.9e-19): 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 <= -7e-79) || !(z <= 2.9e-19)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7e-79) || ~((z <= 2.9e-19))) 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, -7e-79], N[Not[LessEqual[z, 2.9e-19]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-79} \lor \neg \left(z \leq 2.9 \cdot 10^{-19}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\end{array}
\end{array}
if z < -7.00000000000000059e-79 or 2.9e-19 < z Initial program 52.4%
associate-/l*64.1%
Simplified64.1%
Taylor expanded in x around 0 47.6%
associate-/l*62.0%
Simplified62.0%
if -7.00000000000000059e-79 < z < 2.9e-19Initial program 93.5%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in z around 0 80.9%
Final simplification70.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.9e-69) (not (<= z 6.5e-71))) (- t (* t (/ y z))) (* x (- 1.0 (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e-69) || !(z <= 6.5e-71)) {
tmp = t - (t * (y / z));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.9d-69)) .or. (.not. (z <= 6.5d-71))) then
tmp = t - (t * (y / z))
else
tmp = x * (1.0d0 - (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e-69) || !(z <= 6.5e-71)) {
tmp = t - (t * (y / z));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.9e-69) or not (z <= 6.5e-71): tmp = t - (t * (y / z)) else: tmp = x * (1.0 - (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.9e-69) || !(z <= 6.5e-71)) tmp = Float64(t - Float64(t * Float64(y / z))); else tmp = Float64(x * Float64(1.0 - Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.9e-69) || ~((z <= 6.5e-71))) tmp = t - (t * (y / z)); else tmp = x * (1.0 - (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.9e-69], N[Not[LessEqual[z, 6.5e-71]], $MachinePrecision]], N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-69} \lor \neg \left(z \leq 6.5 \cdot 10^{-71}\right):\\
\;\;\;\;t - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\end{array}
\end{array}
if z < -1.8999999999999999e-69 or 6.50000000000000005e-71 < z Initial program 53.7%
associate-/l*65.4%
Simplified65.4%
Taylor expanded in x around 0 47.8%
Taylor expanded in a around 0 41.7%
mul-1-neg41.7%
associate-/l*54.7%
distribute-rgt-neg-in54.7%
Simplified54.7%
Taylor expanded in y around 0 49.9%
mul-1-neg49.9%
unsub-neg49.9%
associate-/l*54.7%
Simplified54.7%
if -1.8999999999999999e-69 < z < 6.50000000000000005e-71Initial program 94.7%
associate-/l*94.8%
Simplified94.8%
Taylor expanded in x around inf 71.0%
mul-1-neg71.0%
unsub-neg71.0%
Simplified71.0%
Taylor expanded in z around 0 65.9%
Final simplification59.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -2e-21) x (if (<= a 1.05e+95) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e-21) {
tmp = x;
} else if (a <= 1.05e+95) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2d-21)) then
tmp = x
else if (a <= 1.05d+95) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e-21) {
tmp = x;
} else if (a <= 1.05e+95) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2e-21: tmp = x elif a <= 1.05e+95: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2e-21) tmp = x; elseif (a <= 1.05e+95) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2e-21) tmp = x; elseif (a <= 1.05e+95) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2e-21], x, If[LessEqual[a, 1.05e+95], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-21}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{+95}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.99999999999999982e-21 or 1.05e95 < a Initial program 84.1%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in a around inf 57.4%
if -1.99999999999999982e-21 < a < 1.05e95Initial program 61.0%
associate-/l*66.8%
Simplified66.8%
Taylor expanded in z around inf 38.9%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 71.6%
associate-/l*78.3%
Simplified78.3%
Taylor expanded in z around inf 25.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024091
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))
(+ x (/ (* (- y z) (- t x)) (- a z))))