
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- t x) (- a z)))
(t_2 (fma (- y z) t_1 x))
(t_3 (+ x (* (- y z) t_1))))
(if (<= t_3 -2e-275)
t_2
(if (<= t_3 0.0)
(+ t (* (/ (- t x) z) (- a y)))
(if (<= t_3 2e+306)
t_2
(+ x (* (/ -1.0 (- z a)) (* (- y z) (- t x)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) / (a - z);
double t_2 = fma((y - z), t_1, x);
double t_3 = x + ((y - z) * t_1);
double tmp;
if (t_3 <= -2e-275) {
tmp = t_2;
} else if (t_3 <= 0.0) {
tmp = t + (((t - x) / z) * (a - y));
} else if (t_3 <= 2e+306) {
tmp = t_2;
} else {
tmp = x + ((-1.0 / (z - a)) * ((y - z) * (t - x)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) / Float64(a - z)) t_2 = fma(Float64(y - z), t_1, x) t_3 = Float64(x + Float64(Float64(y - z) * t_1)) tmp = 0.0 if (t_3 <= -2e-275) tmp = t_2; elseif (t_3 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); elseif (t_3 <= 2e+306) tmp = t_2; else tmp = Float64(x + Float64(Float64(-1.0 / Float64(z - a)) * Float64(Float64(y - z) * Float64(t - x)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - z), $MachinePrecision] * t$95$1 + x), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(y - z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -2e-275], t$95$2, If[LessEqual[t$95$3, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+306], t$95$2, N[(x + N[(N[(-1.0 / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - x}{a - z}\\
t_2 := \mathsf{fma}\left(y - z, t\_1, x\right)\\
t_3 := x + \left(y - z\right) \cdot t\_1\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-1}{z - a} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999987e-275 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.00000000000000003e306Initial program 90.5%
+-commutative90.5%
fma-define90.5%
Simplified90.5%
if -1.99999999999999987e-275 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.2%
+-commutative3.2%
fma-define4.7%
Simplified4.7%
Taylor expanded in z around inf 86.8%
associate--l+86.8%
distribute-lft-out--86.8%
div-sub86.8%
mul-1-neg86.8%
unsub-neg86.8%
div-sub86.8%
associate-/l*90.0%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 2.00000000000000003e306 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 77.8%
associate-*r/99.9%
clear-num99.9%
Applied egg-rr99.9%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Final simplification92.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -2e-275)
(+ x (/ (- y z) (/ (- a z) (- t x))))
(if (<= t_1 0.0)
(+ t (* (/ (- t x) z) (- a y)))
(if (<= t_1 2e+306)
t_1
(+ x (* (/ -1.0 (- z a)) (* (- y 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-275) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) / z) * (a - y));
} else if (t_1 <= 2e+306) {
tmp = t_1;
} else {
tmp = x + ((-1.0 / (z - a)) * ((y - 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-275)) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else if (t_1 <= 0.0d0) then
tmp = t + (((t - x) / z) * (a - y))
else if (t_1 <= 2d+306) then
tmp = t_1
else
tmp = x + (((-1.0d0) / (z - a)) * ((y - 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-275) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) / z) * (a - y));
} else if (t_1 <= 2e+306) {
tmp = t_1;
} else {
tmp = x + ((-1.0 / (z - a)) * ((y - 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-275: tmp = x + ((y - z) / ((a - z) / (t - x))) elif t_1 <= 0.0: tmp = t + (((t - x) / z) * (a - y)) elif t_1 <= 2e+306: tmp = t_1 else: tmp = x + ((-1.0 / (z - a)) * ((y - 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-275) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); elseif (t_1 <= 2e+306) tmp = t_1; else tmp = Float64(x + Float64(Float64(-1.0 / Float64(z - a)) * Float64(Float64(y - 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-275) tmp = x + ((y - z) / ((a - z) / (t - x))); elseif (t_1 <= 0.0) tmp = t + (((t - x) / z) * (a - y)); elseif (t_1 <= 2e+306) tmp = t_1; else tmp = x + ((-1.0 / (z - a)) * ((y - 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-275], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+306], t$95$1, N[(x + N[(N[(-1.0 / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(N[(y - 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^{-275}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-1}{z - a} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999987e-275Initial program 88.4%
clear-num88.1%
un-div-inv88.4%
Applied egg-rr88.4%
if -1.99999999999999987e-275 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.2%
+-commutative3.2%
fma-define4.7%
Simplified4.7%
Taylor expanded in z around inf 86.8%
associate--l+86.8%
distribute-lft-out--86.8%
div-sub86.8%
mul-1-neg86.8%
unsub-neg86.8%
div-sub86.8%
associate-/l*90.0%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.00000000000000003e306Initial program 92.9%
if 2.00000000000000003e306 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 77.8%
associate-*r/99.9%
clear-num99.9%
Applied egg-rr99.9%
associate-/r/99.9%
*-commutative99.9%
Simplified99.9%
Final simplification92.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-275) (not (<= t_1 0.0)))
t_1
(+ t (* (/ (- t x) z) (- a y))))))
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-275) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) / z) * (a - y));
}
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-275)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = t + (((t - x) / z) * (a - y))
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-275) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-275) or not (t_1 <= 0.0): tmp = t_1 else: tmp = t + (((t - x) / z) * (a - y)) 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-275) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); 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-275) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = t + (((t - x) / z) * (a - y)); 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-275], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $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^{-275} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999987e-275 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.1%
if -1.99999999999999987e-275 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.2%
+-commutative3.2%
fma-define4.7%
Simplified4.7%
Taylor expanded in z around inf 86.8%
associate--l+86.8%
distribute-lft-out--86.8%
div-sub86.8%
mul-1-neg86.8%
unsub-neg86.8%
div-sub86.8%
associate-/l*90.0%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification90.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -2e-275)
(+ x (/ (- y z) (/ (- a z) (- t x))))
(if (<= t_1 0.0) (+ t (* (/ (- t x) z) (- a y))) t_1))))
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-275) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) / z) * (a - y));
} 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 = x + ((y - z) * ((t - x) / (a - z)))
if (t_1 <= (-2d-275)) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else if (t_1 <= 0.0d0) then
tmp = t + (((t - x) / z) * (a - y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -2e-275) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_1 <= -2e-275: tmp = x + ((y - z) / ((a - z) / (t - x))) elif t_1 <= 0.0: tmp = t + (((t - x) / z) * (a - y)) else: tmp = t_1 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-275) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); else tmp = t_1; 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-275) tmp = x + ((y - z) / ((a - z) / (t - x))); elseif (t_1 <= 0.0) tmp = t + (((t - x) / z) * (a - y)); else tmp = t_1; 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-275], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\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^{-275}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999987e-275Initial program 88.4%
clear-num88.1%
un-div-inv88.4%
Applied egg-rr88.4%
if -1.99999999999999987e-275 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.2%
+-commutative3.2%
fma-define4.7%
Simplified4.7%
Taylor expanded in z around inf 86.8%
associate--l+86.8%
distribute-lft-out--86.8%
div-sub86.8%
mul-1-neg86.8%
unsub-neg86.8%
div-sub86.8%
associate-/l*90.0%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.7%
Final simplification90.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* a (/ (- t x) z)))) (t_2 (* y (- t x))))
(if (<= z -8.7e+167)
t_1
(if (<= z -1.55e-109)
(+ x (/ (- y z) (/ (- a z) t)))
(if (<= z 5.2e-87)
(+ x (/ t_2 (- a z)))
(if (<= z 2.7e+25)
(- t (/ t_2 z))
(if (<= z 5.2e+226) (+ x (* t (/ (- y z) (- a z)))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (a * ((t - x) / z));
double t_2 = y * (t - x);
double tmp;
if (z <= -8.7e+167) {
tmp = t_1;
} else if (z <= -1.55e-109) {
tmp = x + ((y - z) / ((a - z) / t));
} else if (z <= 5.2e-87) {
tmp = x + (t_2 / (a - z));
} else if (z <= 2.7e+25) {
tmp = t - (t_2 / z);
} else if (z <= 5.2e+226) {
tmp = x + (t * ((y - z) / (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) :: t_2
real(8) :: tmp
t_1 = t + (a * ((t - x) / z))
t_2 = y * (t - x)
if (z <= (-8.7d+167)) then
tmp = t_1
else if (z <= (-1.55d-109)) then
tmp = x + ((y - z) / ((a - z) / t))
else if (z <= 5.2d-87) then
tmp = x + (t_2 / (a - z))
else if (z <= 2.7d+25) then
tmp = t - (t_2 / z)
else if (z <= 5.2d+226) then
tmp = x + (t * ((y - z) / (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 + (a * ((t - x) / z));
double t_2 = y * (t - x);
double tmp;
if (z <= -8.7e+167) {
tmp = t_1;
} else if (z <= -1.55e-109) {
tmp = x + ((y - z) / ((a - z) / t));
} else if (z <= 5.2e-87) {
tmp = x + (t_2 / (a - z));
} else if (z <= 2.7e+25) {
tmp = t - (t_2 / z);
} else if (z <= 5.2e+226) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (a * ((t - x) / z)) t_2 = y * (t - x) tmp = 0 if z <= -8.7e+167: tmp = t_1 elif z <= -1.55e-109: tmp = x + ((y - z) / ((a - z) / t)) elif z <= 5.2e-87: tmp = x + (t_2 / (a - z)) elif z <= 2.7e+25: tmp = t - (t_2 / z) elif z <= 5.2e+226: tmp = x + (t * ((y - z) / (a - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(a * Float64(Float64(t - x) / z))) t_2 = Float64(y * Float64(t - x)) tmp = 0.0 if (z <= -8.7e+167) tmp = t_1; elseif (z <= -1.55e-109) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); elseif (z <= 5.2e-87) tmp = Float64(x + Float64(t_2 / Float64(a - z))); elseif (z <= 2.7e+25) tmp = Float64(t - Float64(t_2 / z)); elseif (z <= 5.2e+226) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (a * ((t - x) / z)); t_2 = y * (t - x); tmp = 0.0; if (z <= -8.7e+167) tmp = t_1; elseif (z <= -1.55e-109) tmp = x + ((y - z) / ((a - z) / t)); elseif (z <= 5.2e-87) tmp = x + (t_2 / (a - z)); elseif (z <= 2.7e+25) tmp = t - (t_2 / z); elseif (z <= 5.2e+226) tmp = x + (t * ((y - z) / (a - z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.7e+167], t$95$1, If[LessEqual[z, -1.55e-109], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-87], N[(x + N[(t$95$2 / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+25], N[(t - N[(t$95$2 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+226], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + a \cdot \frac{t - x}{z}\\
t_2 := y \cdot \left(t - x\right)\\
\mathbf{if}\;z \leq -8.7 \cdot 10^{+167}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-109}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{t\_2}{a - z}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+25}:\\
\;\;\;\;t - \frac{t\_2}{z}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+226}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.6999999999999998e167 or 5.2000000000000005e226 < z Initial program 60.0%
+-commutative60.0%
fma-define60.5%
Simplified60.5%
Taylor expanded in z around -inf 77.0%
Taylor expanded in y around 0 75.1%
associate-/l*85.0%
Simplified85.0%
if -8.6999999999999998e167 < z < -1.55e-109Initial program 89.1%
clear-num88.9%
un-div-inv88.8%
Applied egg-rr88.8%
Taylor expanded in t around inf 74.4%
if -1.55e-109 < z < 5.20000000000000005e-87Initial program 88.2%
Taylor expanded in y around inf 87.0%
*-commutative87.0%
Simplified87.0%
if 5.20000000000000005e-87 < z < 2.7e25Initial program 73.7%
+-commutative73.7%
fma-define73.9%
Simplified73.9%
Taylor expanded in z around inf 82.4%
associate--l+82.4%
distribute-lft-out--82.4%
div-sub82.4%
mul-1-neg82.4%
unsub-neg82.4%
div-sub82.4%
associate-/l*82.2%
associate-/l*82.3%
distribute-rgt-out--82.3%
Simplified82.3%
Taylor expanded in y around inf 77.8%
*-commutative77.8%
Simplified77.8%
if 2.7e25 < z < 5.2000000000000005e226Initial program 70.4%
Taylor expanded in t around inf 53.8%
associate-/l*66.3%
Simplified66.3%
Final simplification80.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* a (/ (- t x) z)))))
(if (<= z -1.8e+127)
t_1
(if (<= z -3e-215)
(+ x (* t (/ (- y z) a)))
(if (<= z 5.2e-87)
(+ x (/ (* y (- t x)) a))
(if (<= z 2900000000.0) (* y (/ (- x t) z)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (a * ((t - x) / z));
double tmp;
if (z <= -1.8e+127) {
tmp = t_1;
} else if (z <= -3e-215) {
tmp = x + (t * ((y - z) / a));
} else if (z <= 5.2e-87) {
tmp = x + ((y * (t - x)) / a);
} else if (z <= 2900000000.0) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (a * ((t - x) / z))
if (z <= (-1.8d+127)) then
tmp = t_1
else if (z <= (-3d-215)) then
tmp = x + (t * ((y - z) / a))
else if (z <= 5.2d-87) then
tmp = x + ((y * (t - x)) / a)
else if (z <= 2900000000.0d0) then
tmp = y * ((x - t) / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (a * ((t - x) / z));
double tmp;
if (z <= -1.8e+127) {
tmp = t_1;
} else if (z <= -3e-215) {
tmp = x + (t * ((y - z) / a));
} else if (z <= 5.2e-87) {
tmp = x + ((y * (t - x)) / a);
} else if (z <= 2900000000.0) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (a * ((t - x) / z)) tmp = 0 if z <= -1.8e+127: tmp = t_1 elif z <= -3e-215: tmp = x + (t * ((y - z) / a)) elif z <= 5.2e-87: tmp = x + ((y * (t - x)) / a) elif z <= 2900000000.0: tmp = y * ((x - t) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(a * Float64(Float64(t - x) / z))) tmp = 0.0 if (z <= -1.8e+127) tmp = t_1; elseif (z <= -3e-215) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); elseif (z <= 5.2e-87) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); elseif (z <= 2900000000.0) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (a * ((t - x) / z)); tmp = 0.0; if (z <= -1.8e+127) tmp = t_1; elseif (z <= -3e-215) tmp = x + (t * ((y - z) / a)); elseif (z <= 5.2e-87) tmp = x + ((y * (t - x)) / a); elseif (z <= 2900000000.0) tmp = y * ((x - t) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+127], t$95$1, If[LessEqual[z, -3e-215], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-87], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2900000000.0], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + a \cdot \frac{t - x}{z}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-215}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{elif}\;z \leq 2900000000:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.79999999999999989e127 or 2.9e9 < z Initial program 65.0%
+-commutative65.0%
fma-define65.3%
Simplified65.3%
Taylor expanded in z around -inf 68.9%
Taylor expanded in y around 0 60.2%
associate-/l*66.2%
Simplified66.2%
if -1.79999999999999989e127 < z < -3.00000000000000025e-215Initial program 87.8%
Taylor expanded in t around inf 75.4%
Taylor expanded in a around inf 53.6%
associate-/l*58.9%
Simplified58.9%
if -3.00000000000000025e-215 < z < 5.20000000000000005e-87Initial program 89.5%
Taylor expanded in z around 0 80.8%
if 5.20000000000000005e-87 < z < 2.9e9Initial program 81.4%
+-commutative81.4%
fma-define81.6%
Simplified81.6%
Taylor expanded in z around inf 83.9%
associate--l+83.9%
distribute-lft-out--83.9%
div-sub83.9%
mul-1-neg83.9%
unsub-neg83.9%
div-sub83.9%
associate-/l*83.6%
associate-/l*83.7%
distribute-rgt-out--83.7%
Simplified83.7%
Taylor expanded in y around inf 56.2%
div-sub56.2%
Simplified56.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* a (/ (- t x) z)))))
(if (<= z -1.8e+127)
t_1
(if (<= z -5.2e-197)
(+ x (* t (/ (- y z) a)))
(if (<= z 5.2e-87)
(+ x (* y (/ (- t x) a)))
(if (<= z 3100000000.0) (* y (/ (- x t) z)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (a * ((t - x) / z));
double tmp;
if (z <= -1.8e+127) {
tmp = t_1;
} else if (z <= -5.2e-197) {
tmp = x + (t * ((y - z) / a));
} else if (z <= 5.2e-87) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 3100000000.0) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (a * ((t - x) / z))
if (z <= (-1.8d+127)) then
tmp = t_1
else if (z <= (-5.2d-197)) then
tmp = x + (t * ((y - z) / a))
else if (z <= 5.2d-87) then
tmp = x + (y * ((t - x) / a))
else if (z <= 3100000000.0d0) then
tmp = y * ((x - t) / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (a * ((t - x) / z));
double tmp;
if (z <= -1.8e+127) {
tmp = t_1;
} else if (z <= -5.2e-197) {
tmp = x + (t * ((y - z) / a));
} else if (z <= 5.2e-87) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 3100000000.0) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (a * ((t - x) / z)) tmp = 0 if z <= -1.8e+127: tmp = t_1 elif z <= -5.2e-197: tmp = x + (t * ((y - z) / a)) elif z <= 5.2e-87: tmp = x + (y * ((t - x) / a)) elif z <= 3100000000.0: tmp = y * ((x - t) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(a * Float64(Float64(t - x) / z))) tmp = 0.0 if (z <= -1.8e+127) tmp = t_1; elseif (z <= -5.2e-197) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); elseif (z <= 5.2e-87) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (z <= 3100000000.0) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (a * ((t - x) / z)); tmp = 0.0; if (z <= -1.8e+127) tmp = t_1; elseif (z <= -5.2e-197) tmp = x + (t * ((y - z) / a)); elseif (z <= 5.2e-87) tmp = x + (y * ((t - x) / a)); elseif (z <= 3100000000.0) tmp = y * ((x - t) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+127], t$95$1, If[LessEqual[z, -5.2e-197], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-87], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3100000000.0], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + a \cdot \frac{t - x}{z}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-197}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-87}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 3100000000:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.79999999999999989e127 or 3.1e9 < z Initial program 65.0%
+-commutative65.0%
fma-define65.3%
Simplified65.3%
Taylor expanded in z around -inf 68.9%
Taylor expanded in y around 0 60.2%
associate-/l*66.2%
Simplified66.2%
if -1.79999999999999989e127 < z < -5.2000000000000003e-197Initial program 87.1%
Taylor expanded in t around inf 76.8%
Taylor expanded in a around inf 53.6%
associate-/l*57.8%
Simplified57.8%
if -5.2000000000000003e-197 < z < 5.20000000000000005e-87Initial program 90.1%
Taylor expanded in z around 0 79.4%
associate-/l*79.9%
Simplified79.9%
if 5.20000000000000005e-87 < z < 3.1e9Initial program 81.4%
+-commutative81.4%
fma-define81.6%
Simplified81.6%
Taylor expanded in z around inf 83.9%
associate--l+83.9%
distribute-lft-out--83.9%
div-sub83.9%
mul-1-neg83.9%
unsub-neg83.9%
div-sub83.9%
associate-/l*83.6%
associate-/l*83.7%
distribute-rgt-out--83.7%
Simplified83.7%
Taylor expanded in y around inf 56.2%
div-sub56.2%
Simplified56.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* a (/ (- t x) z)))))
(if (<= z -1.8e+127)
t_1
(if (<= z -2.3e-232)
(+ x (* t (/ y a)))
(if (<= z 7e-88)
(* x (- 1.0 (/ y a)))
(if (<= z 1650000000.0) (* y (/ (- x t) z)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (a * ((t - x) / z));
double tmp;
if (z <= -1.8e+127) {
tmp = t_1;
} else if (z <= -2.3e-232) {
tmp = x + (t * (y / a));
} else if (z <= 7e-88) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1650000000.0) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (a * ((t - x) / z))
if (z <= (-1.8d+127)) then
tmp = t_1
else if (z <= (-2.3d-232)) then
tmp = x + (t * (y / a))
else if (z <= 7d-88) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1650000000.0d0) then
tmp = y * ((x - t) / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (a * ((t - x) / z));
double tmp;
if (z <= -1.8e+127) {
tmp = t_1;
} else if (z <= -2.3e-232) {
tmp = x + (t * (y / a));
} else if (z <= 7e-88) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1650000000.0) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (a * ((t - x) / z)) tmp = 0 if z <= -1.8e+127: tmp = t_1 elif z <= -2.3e-232: tmp = x + (t * (y / a)) elif z <= 7e-88: tmp = x * (1.0 - (y / a)) elif z <= 1650000000.0: tmp = y * ((x - t) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(a * Float64(Float64(t - x) / z))) tmp = 0.0 if (z <= -1.8e+127) tmp = t_1; elseif (z <= -2.3e-232) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 7e-88) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1650000000.0) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (a * ((t - x) / z)); tmp = 0.0; if (z <= -1.8e+127) tmp = t_1; elseif (z <= -2.3e-232) tmp = x + (t * (y / a)); elseif (z <= 7e-88) tmp = x * (1.0 - (y / a)); elseif (z <= 1650000000.0) tmp = y * ((x - t) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+127], t$95$1, If[LessEqual[z, -2.3e-232], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-88], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1650000000.0], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + a \cdot \frac{t - x}{z}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-232}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-88}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1650000000:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.79999999999999989e127 or 1.65e9 < z Initial program 65.0%
+-commutative65.0%
fma-define65.3%
Simplified65.3%
Taylor expanded in z around -inf 68.9%
Taylor expanded in y around 0 60.2%
associate-/l*66.2%
Simplified66.2%
if -1.79999999999999989e127 < z < -2.3e-232Initial program 86.7%
Taylor expanded in z around 0 52.2%
associate-/l*54.9%
Simplified54.9%
Taylor expanded in t around inf 44.2%
associate-/l*50.3%
Simplified50.3%
if -2.3e-232 < z < 7.0000000000000002e-88Initial program 90.9%
+-commutative90.9%
fma-define91.1%
Simplified91.1%
Taylor expanded in t around 0 64.3%
mul-1-neg64.3%
*-rgt-identity64.3%
associate-/l*71.3%
distribute-rgt-neg-in71.3%
mul-1-neg71.3%
distribute-lft-in71.3%
mul-1-neg71.3%
unsub-neg71.3%
Simplified71.3%
Taylor expanded in z around 0 66.9%
if 7.0000000000000002e-88 < z < 1.65e9Initial program 81.4%
+-commutative81.4%
fma-define81.6%
Simplified81.6%
Taylor expanded in z around inf 83.9%
associate--l+83.9%
distribute-lft-out--83.9%
div-sub83.9%
mul-1-neg83.9%
unsub-neg83.9%
div-sub83.9%
associate-/l*83.6%
associate-/l*83.7%
distribute-rgt-out--83.7%
Simplified83.7%
Taylor expanded in y around inf 56.2%
div-sub56.2%
Simplified56.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.9e+127)
t
(if (<= z -7.7e-233)
(+ x (* t (/ y a)))
(if (<= z 4.8e-87)
(* x (- 1.0 (/ y a)))
(if (<= z 2400000000.0) (* y (/ (- x t) z)) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e+127) {
tmp = t;
} else if (z <= -7.7e-233) {
tmp = x + (t * (y / a));
} else if (z <= 4.8e-87) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2400000000.0) {
tmp = y * ((x - t) / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.9d+127)) then
tmp = t
else if (z <= (-7.7d-233)) then
tmp = x + (t * (y / a))
else if (z <= 4.8d-87) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 2400000000.0d0) then
tmp = y * ((x - t) / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e+127) {
tmp = t;
} else if (z <= -7.7e-233) {
tmp = x + (t * (y / a));
} else if (z <= 4.8e-87) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2400000000.0) {
tmp = y * ((x - t) / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.9e+127: tmp = t elif z <= -7.7e-233: tmp = x + (t * (y / a)) elif z <= 4.8e-87: tmp = x * (1.0 - (y / a)) elif z <= 2400000000.0: tmp = y * ((x - t) / z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.9e+127) tmp = t; elseif (z <= -7.7e-233) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 4.8e-87) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 2400000000.0) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.9e+127) tmp = t; elseif (z <= -7.7e-233) tmp = x + (t * (y / a)); elseif (z <= 4.8e-87) tmp = x * (1.0 - (y / a)); elseif (z <= 2400000000.0) tmp = y * ((x - t) / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.9e+127], t, If[LessEqual[z, -7.7e-233], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e-87], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2400000000.0], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+127}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -7.7 \cdot 10^{-233}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-87}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 2400000000:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.8999999999999999e127 or 2.4e9 < z Initial program 65.0%
clear-num63.2%
un-div-inv63.1%
Applied egg-rr63.1%
Taylor expanded in z around inf 54.5%
if -1.8999999999999999e127 < z < -7.70000000000000007e-233Initial program 86.7%
Taylor expanded in z around 0 52.2%
associate-/l*54.9%
Simplified54.9%
Taylor expanded in t around inf 44.2%
associate-/l*50.3%
Simplified50.3%
if -7.70000000000000007e-233 < z < 4.7999999999999999e-87Initial program 90.9%
+-commutative90.9%
fma-define91.1%
Simplified91.1%
Taylor expanded in t around 0 64.3%
mul-1-neg64.3%
*-rgt-identity64.3%
associate-/l*71.3%
distribute-rgt-neg-in71.3%
mul-1-neg71.3%
distribute-lft-in71.3%
mul-1-neg71.3%
unsub-neg71.3%
Simplified71.3%
Taylor expanded in z around 0 66.9%
if 4.7999999999999999e-87 < z < 2.4e9Initial program 81.4%
+-commutative81.4%
fma-define81.6%
Simplified81.6%
Taylor expanded in z around inf 83.9%
associate--l+83.9%
distribute-lft-out--83.9%
div-sub83.9%
mul-1-neg83.9%
unsub-neg83.9%
div-sub83.9%
associate-/l*83.6%
associate-/l*83.7%
distribute-rgt-out--83.7%
Simplified83.7%
Taylor expanded in y around inf 56.2%
div-sub56.2%
Simplified56.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- x t) z))))
(if (<= z -6e+170)
t
(if (<= z -4e-119)
t_1
(if (<= z 2.3e-87)
(* x (- 1.0 (/ y a)))
(if (<= z 1550000000.0) t_1 t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((x - t) / z);
double tmp;
if (z <= -6e+170) {
tmp = t;
} else if (z <= -4e-119) {
tmp = t_1;
} else if (z <= 2.3e-87) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1550000000.0) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = y * ((x - t) / z)
if (z <= (-6d+170)) then
tmp = t
else if (z <= (-4d-119)) then
tmp = t_1
else if (z <= 2.3d-87) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1550000000.0d0) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((x - t) / z);
double tmp;
if (z <= -6e+170) {
tmp = t;
} else if (z <= -4e-119) {
tmp = t_1;
} else if (z <= 2.3e-87) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1550000000.0) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((x - t) / z) tmp = 0 if z <= -6e+170: tmp = t elif z <= -4e-119: tmp = t_1 elif z <= 2.3e-87: tmp = x * (1.0 - (y / a)) elif z <= 1550000000.0: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(x - t) / z)) tmp = 0.0 if (z <= -6e+170) tmp = t; elseif (z <= -4e-119) tmp = t_1; elseif (z <= 2.3e-87) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1550000000.0) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((x - t) / z); tmp = 0.0; if (z <= -6e+170) tmp = t; elseif (z <= -4e-119) tmp = t_1; elseif (z <= 2.3e-87) tmp = x * (1.0 - (y / a)); elseif (z <= 1550000000.0) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+170], t, If[LessEqual[z, -4e-119], t$95$1, If[LessEqual[z, 2.3e-87], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1550000000.0], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x - t}{z}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+170}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-87}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1550000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.99999999999999994e170 or 1.55e9 < z Initial program 64.1%
clear-num62.1%
un-div-inv62.0%
Applied egg-rr62.0%
Taylor expanded in z around inf 57.9%
if -5.99999999999999994e170 < z < -4.00000000000000005e-119 or 2.3000000000000001e-87 < z < 1.55e9Initial program 86.3%
+-commutative86.3%
fma-define86.5%
Simplified86.5%
Taylor expanded in z around inf 55.8%
associate--l+55.8%
distribute-lft-out--55.8%
div-sub55.8%
mul-1-neg55.8%
unsub-neg55.8%
div-sub55.8%
associate-/l*58.2%
associate-/l*56.8%
distribute-rgt-out--58.2%
Simplified58.2%
Taylor expanded in y around inf 42.6%
div-sub42.6%
Simplified42.6%
if -4.00000000000000005e-119 < z < 2.3000000000000001e-87Initial program 87.9%
+-commutative87.9%
fma-define88.1%
Simplified88.1%
Taylor expanded in t around 0 60.0%
mul-1-neg60.0%
*-rgt-identity60.0%
associate-/l*62.1%
distribute-rgt-neg-in62.1%
mul-1-neg62.1%
distribute-lft-in62.1%
mul-1-neg62.1%
unsub-neg62.1%
Simplified62.1%
Taylor expanded in z around 0 60.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (/ (- t x) z) (- a y)))))
(if (<= z -4.4e+87)
t_1
(if (<= z -1.5e-111)
(+ x (/ (- y z) (/ (- a z) t)))
(if (<= z 5.2e-87) (+ x (/ (* y (- t x)) (- a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (((t - x) / z) * (a - y));
double tmp;
if (z <= -4.4e+87) {
tmp = t_1;
} else if (z <= -1.5e-111) {
tmp = x + ((y - z) / ((a - z) / t));
} else if (z <= 5.2e-87) {
tmp = x + ((y * (t - x)) / (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 + (((t - x) / z) * (a - y))
if (z <= (-4.4d+87)) then
tmp = t_1
else if (z <= (-1.5d-111)) then
tmp = x + ((y - z) / ((a - z) / t))
else if (z <= 5.2d-87) then
tmp = x + ((y * (t - x)) / (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 + (((t - x) / z) * (a - y));
double tmp;
if (z <= -4.4e+87) {
tmp = t_1;
} else if (z <= -1.5e-111) {
tmp = x + ((y - z) / ((a - z) / t));
} else if (z <= 5.2e-87) {
tmp = x + ((y * (t - x)) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (((t - x) / z) * (a - y)) tmp = 0 if z <= -4.4e+87: tmp = t_1 elif z <= -1.5e-111: tmp = x + ((y - z) / ((a - z) / t)) elif z <= 5.2e-87: tmp = x + ((y * (t - x)) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))) tmp = 0.0 if (z <= -4.4e+87) tmp = t_1; elseif (z <= -1.5e-111) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); elseif (z <= 5.2e-87) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (((t - x) / z) * (a - y)); tmp = 0.0; if (z <= -4.4e+87) tmp = t_1; elseif (z <= -1.5e-111) tmp = x + ((y - z) / ((a - z) / t)); elseif (z <= 5.2e-87) tmp = x + ((y * (t - x)) / (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[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e+87], t$95$1, If[LessEqual[z, -1.5e-111], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-87], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-111}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.4000000000000002e87 or 5.20000000000000005e-87 < z Initial program 68.1%
+-commutative68.1%
fma-define68.3%
Simplified68.3%
Taylor expanded in z around inf 70.8%
associate--l+70.8%
distribute-lft-out--70.8%
div-sub70.8%
mul-1-neg70.8%
unsub-neg70.8%
div-sub70.8%
associate-/l*75.4%
associate-/l*81.0%
distribute-rgt-out--81.0%
Simplified81.0%
if -4.4000000000000002e87 < z < -1.50000000000000004e-111Initial program 90.7%
clear-num90.5%
un-div-inv90.4%
Applied egg-rr90.4%
Taylor expanded in t around inf 81.4%
if -1.50000000000000004e-111 < z < 5.20000000000000005e-87Initial program 88.2%
Taylor expanded in y around inf 87.0%
*-commutative87.0%
Simplified87.0%
Final simplification83.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* a (/ (- t x) z)))))
(if (<= z -1.8e+127)
t_1
(if (<= z 5.2e-87)
(+ x (* t (/ (- y z) a)))
(if (<= z 2900000000.0) (* y (/ (- x t) z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (a * ((t - x) / z));
double tmp;
if (z <= -1.8e+127) {
tmp = t_1;
} else if (z <= 5.2e-87) {
tmp = x + (t * ((y - z) / a));
} else if (z <= 2900000000.0) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (a * ((t - x) / z))
if (z <= (-1.8d+127)) then
tmp = t_1
else if (z <= 5.2d-87) then
tmp = x + (t * ((y - z) / a))
else if (z <= 2900000000.0d0) then
tmp = y * ((x - t) / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (a * ((t - x) / z));
double tmp;
if (z <= -1.8e+127) {
tmp = t_1;
} else if (z <= 5.2e-87) {
tmp = x + (t * ((y - z) / a));
} else if (z <= 2900000000.0) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (a * ((t - x) / z)) tmp = 0 if z <= -1.8e+127: tmp = t_1 elif z <= 5.2e-87: tmp = x + (t * ((y - z) / a)) elif z <= 2900000000.0: tmp = y * ((x - t) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(a * Float64(Float64(t - x) / z))) tmp = 0.0 if (z <= -1.8e+127) tmp = t_1; elseif (z <= 5.2e-87) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); elseif (z <= 2900000000.0) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (a * ((t - x) / z)); tmp = 0.0; if (z <= -1.8e+127) tmp = t_1; elseif (z <= 5.2e-87) tmp = x + (t * ((y - z) / a)); elseif (z <= 2900000000.0) tmp = y * ((x - t) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+127], t$95$1, If[LessEqual[z, 5.2e-87], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2900000000.0], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + a \cdot \frac{t - x}{z}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-87}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq 2900000000:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.79999999999999989e127 or 2.9e9 < z Initial program 65.0%
+-commutative65.0%
fma-define65.3%
Simplified65.3%
Taylor expanded in z around -inf 68.9%
Taylor expanded in y around 0 60.2%
associate-/l*66.2%
Simplified66.2%
if -1.79999999999999989e127 < z < 5.20000000000000005e-87Initial program 88.6%
Taylor expanded in t around inf 69.7%
Taylor expanded in a around inf 55.9%
associate-/l*59.9%
Simplified59.9%
if 5.20000000000000005e-87 < z < 2.9e9Initial program 81.4%
+-commutative81.4%
fma-define81.6%
Simplified81.6%
Taylor expanded in z around inf 83.9%
associate--l+83.9%
distribute-lft-out--83.9%
div-sub83.9%
mul-1-neg83.9%
unsub-neg83.9%
div-sub83.9%
associate-/l*83.6%
associate-/l*83.7%
distribute-rgt-out--83.7%
Simplified83.7%
Taylor expanded in y around inf 56.2%
div-sub56.2%
Simplified56.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.25e-58) (not (<= t 3.8e-61))) (+ x (* t (/ (- y z) (- a z)))) (+ x (/ (* y (- t x)) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.25e-58) || !(t <= 3.8e-61)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + ((y * (t - x)) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2.25d-58)) .or. (.not. (t <= 3.8d-61))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = x + ((y * (t - x)) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.25e-58) || !(t <= 3.8e-61)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + ((y * (t - x)) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.25e-58) or not (t <= 3.8e-61): tmp = x + (t * ((y - z) / (a - z))) else: tmp = x + ((y * (t - x)) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.25e-58) || !(t <= 3.8e-61)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.25e-58) || ~((t <= 3.8e-61))) tmp = x + (t * ((y - z) / (a - z))); else tmp = x + ((y * (t - x)) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.25e-58], N[Not[LessEqual[t, 3.8e-61]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.25 \cdot 10^{-58} \lor \neg \left(t \leq 3.8 \cdot 10^{-61}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\
\end{array}
\end{array}
if t < -2.2500000000000001e-58 or 3.7999999999999998e-61 < t Initial program 88.0%
Taylor expanded in t around inf 64.8%
associate-/l*84.0%
Simplified84.0%
if -2.2500000000000001e-58 < t < 3.7999999999999998e-61Initial program 65.8%
Taylor expanded in y around inf 62.5%
*-commutative62.5%
Simplified62.5%
Final simplification75.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.4e-68) (not (<= a 6e-24))) (+ x (* t (/ (- y z) (- a z)))) (- t (/ (* y (- t x)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.4e-68) || !(a <= 6e-24)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t - ((y * (t - x)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.4d-68)) .or. (.not. (a <= 6d-24))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t - ((y * (t - x)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.4e-68) || !(a <= 6e-24)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t - ((y * (t - x)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.4e-68) or not (a <= 6e-24): tmp = x + (t * ((y - z) / (a - z))) else: tmp = t - ((y * (t - x)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.4e-68) || !(a <= 6e-24)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t - Float64(Float64(y * Float64(t - x)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.4e-68) || ~((a <= 6e-24))) tmp = x + (t * ((y - z) / (a - z))); else tmp = t - ((y * (t - x)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.4e-68], N[Not[LessEqual[a, 6e-24]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{-68} \lor \neg \left(a \leq 6 \cdot 10^{-24}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\
\end{array}
\end{array}
if a < -2.39999999999999991e-68 or 5.99999999999999991e-24 < a Initial program 83.4%
Taylor expanded in t around inf 62.5%
associate-/l*73.4%
Simplified73.4%
if -2.39999999999999991e-68 < a < 5.99999999999999991e-24Initial program 73.8%
+-commutative73.8%
fma-define74.2%
Simplified74.2%
Taylor expanded in z around inf 76.3%
associate--l+76.3%
distribute-lft-out--76.3%
div-sub77.3%
mul-1-neg77.3%
unsub-neg77.3%
div-sub76.3%
associate-/l*78.8%
associate-/l*76.1%
distribute-rgt-out--79.6%
Simplified79.6%
Taylor expanded in y around inf 76.1%
*-commutative76.1%
Simplified76.1%
Final simplification74.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.1e-36) (not (<= a 8.2))) (+ x (* t (/ (- y z) a))) (- t (/ (* y (- t x)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.1e-36) || !(a <= 8.2)) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t - ((y * (t - x)) / 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 <= (-5.1d-36)) .or. (.not. (a <= 8.2d0))) then
tmp = x + (t * ((y - z) / a))
else
tmp = t - ((y * (t - x)) / 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 <= -5.1e-36) || !(a <= 8.2)) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t - ((y * (t - x)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.1e-36) or not (a <= 8.2): tmp = x + (t * ((y - z) / a)) else: tmp = t - ((y * (t - x)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.1e-36) || !(a <= 8.2)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); else tmp = Float64(t - Float64(Float64(y * Float64(t - x)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.1e-36) || ~((a <= 8.2))) tmp = x + (t * ((y - z) / a)); else tmp = t - ((y * (t - x)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.1e-36], N[Not[LessEqual[a, 8.2]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.1 \cdot 10^{-36} \lor \neg \left(a \leq 8.2\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\
\end{array}
\end{array}
if a < -5.09999999999999973e-36 or 8.1999999999999993 < a Initial program 85.0%
Taylor expanded in t around inf 64.3%
Taylor expanded in a around inf 60.0%
associate-/l*65.2%
Simplified65.2%
if -5.09999999999999973e-36 < a < 8.1999999999999993Initial program 73.6%
+-commutative73.6%
fma-define73.9%
Simplified73.9%
Taylor expanded in z around inf 75.0%
associate--l+75.0%
distribute-lft-out--75.0%
div-sub75.8%
mul-1-neg75.8%
unsub-neg75.8%
div-sub75.0%
associate-/l*77.8%
associate-/l*75.5%
distribute-rgt-out--78.5%
Simplified78.5%
Taylor expanded in y around inf 72.0%
*-commutative72.0%
Simplified72.0%
Final simplification68.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -2e+127) t (if (<= z 2050000000.0) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2e+127) {
tmp = t;
} else if (z <= 2050000000.0) {
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 <= (-2d+127)) then
tmp = t
else if (z <= 2050000000.0d0) 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 <= -2e+127) {
tmp = t;
} else if (z <= 2050000000.0) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2e+127: tmp = t elif z <= 2050000000.0: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2e+127) tmp = t; elseif (z <= 2050000000.0) 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 <= -2e+127) tmp = t; elseif (z <= 2050000000.0) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2e+127], t, If[LessEqual[z, 2050000000.0], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+127}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2050000000:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.99999999999999991e127 or 2.05e9 < z Initial program 65.0%
clear-num63.2%
un-div-inv63.1%
Applied egg-rr63.1%
Taylor expanded in z around inf 54.5%
if -1.99999999999999991e127 < z < 2.05e9Initial program 87.8%
+-commutative87.8%
fma-define88.0%
Simplified88.0%
Taylor expanded in t around 0 49.9%
mul-1-neg49.9%
*-rgt-identity49.9%
associate-/l*52.4%
distribute-rgt-neg-in52.4%
mul-1-neg52.4%
distribute-lft-in52.4%
mul-1-neg52.4%
unsub-neg52.4%
Simplified52.4%
Taylor expanded in z around 0 47.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.2e-180) (* x (+ (/ t x) 1.0)) (if (<= a 3.9e-177) (* x (/ y z)) (if (<= a 480.0) t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.2e-180) {
tmp = x * ((t / x) + 1.0);
} else if (a <= 3.9e-177) {
tmp = x * (y / z);
} else if (a <= 480.0) {
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 <= (-5.2d-180)) then
tmp = x * ((t / x) + 1.0d0)
else if (a <= 3.9d-177) then
tmp = x * (y / z)
else if (a <= 480.0d0) 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 <= -5.2e-180) {
tmp = x * ((t / x) + 1.0);
} else if (a <= 3.9e-177) {
tmp = x * (y / z);
} else if (a <= 480.0) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.2e-180: tmp = x * ((t / x) + 1.0) elif a <= 3.9e-177: tmp = x * (y / z) elif a <= 480.0: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.2e-180) tmp = Float64(x * Float64(Float64(t / x) + 1.0)); elseif (a <= 3.9e-177) tmp = Float64(x * Float64(y / z)); elseif (a <= 480.0) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.2e-180) tmp = x * ((t / x) + 1.0); elseif (a <= 3.9e-177) tmp = x * (y / z); elseif (a <= 480.0) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.2e-180], N[(x * N[(N[(t / x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.9e-177], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 480.0], t, x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{-180}:\\
\;\;\;\;x \cdot \left(\frac{t}{x} + 1\right)\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-177}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 480:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.1999999999999998e-180Initial program 79.1%
Taylor expanded in t around inf 54.7%
Taylor expanded in z around inf 34.4%
Taylor expanded in x around inf 34.5%
if -5.1999999999999998e-180 < a < 3.90000000000000014e-177Initial program 68.2%
+-commutative68.2%
fma-define68.6%
Simplified68.6%
Taylor expanded in t around 0 28.4%
mul-1-neg28.4%
*-rgt-identity28.4%
associate-/l*32.5%
distribute-rgt-neg-in32.5%
mul-1-neg32.5%
distribute-lft-in32.5%
mul-1-neg32.5%
unsub-neg32.5%
Simplified32.5%
Taylor expanded in a around 0 50.8%
if 3.90000000000000014e-177 < a < 480Initial program 76.2%
clear-num76.1%
un-div-inv76.6%
Applied egg-rr76.6%
Taylor expanded in z around inf 45.5%
if 480 < a Initial program 90.8%
+-commutative90.8%
fma-define90.8%
Simplified90.8%
Taylor expanded in a around inf 47.8%
Final simplification42.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.8e-181) (+ x t) (if (<= a 1.75e-180) (* x (/ y z)) (if (<= a 0.38) t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e-181) {
tmp = x + t;
} else if (a <= 1.75e-180) {
tmp = x * (y / z);
} else if (a <= 0.38) {
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.8d-181)) then
tmp = x + t
else if (a <= 1.75d-180) then
tmp = x * (y / z)
else if (a <= 0.38d0) 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.8e-181) {
tmp = x + t;
} else if (a <= 1.75e-180) {
tmp = x * (y / z);
} else if (a <= 0.38) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.8e-181: tmp = x + t elif a <= 1.75e-180: tmp = x * (y / z) elif a <= 0.38: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.8e-181) tmp = Float64(x + t); elseif (a <= 1.75e-180) tmp = Float64(x * Float64(y / z)); elseif (a <= 0.38) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.8e-181) tmp = x + t; elseif (a <= 1.75e-180) tmp = x * (y / z); elseif (a <= 0.38) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.8e-181], N[(x + t), $MachinePrecision], If[LessEqual[a, 1.75e-180], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.38], t, x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-181}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-180}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 0.38:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.7999999999999998e-181Initial program 79.1%
Taylor expanded in t around inf 54.7%
Taylor expanded in z around inf 34.4%
if -3.7999999999999998e-181 < a < 1.75e-180Initial program 68.2%
+-commutative68.2%
fma-define68.6%
Simplified68.6%
Taylor expanded in t around 0 28.4%
mul-1-neg28.4%
*-rgt-identity28.4%
associate-/l*32.5%
distribute-rgt-neg-in32.5%
mul-1-neg32.5%
distribute-lft-in32.5%
mul-1-neg32.5%
unsub-neg32.5%
Simplified32.5%
Taylor expanded in a around 0 50.8%
if 1.75e-180 < a < 0.38Initial program 76.2%
clear-num76.1%
un-div-inv76.6%
Applied egg-rr76.6%
Taylor expanded in z around inf 45.5%
if 0.38 < a Initial program 90.8%
+-commutative90.8%
fma-define90.8%
Simplified90.8%
Taylor expanded in a around inf 47.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.8e+127) t (if (<= z 5.2e-17) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+127) {
tmp = t;
} else if (z <= 5.2e-17) {
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.8d+127)) then
tmp = t
else if (z <= 5.2d-17) 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.8e+127) {
tmp = t;
} else if (z <= 5.2e-17) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.8e+127: tmp = t elif z <= 5.2e-17: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.8e+127) tmp = t; elseif (z <= 5.2e-17) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.8e+127) tmp = t; elseif (z <= 5.2e-17) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e+127], t, If[LessEqual[z, 5.2e-17], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+127}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-17}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.79999999999999989e127 or 5.20000000000000006e-17 < z Initial program 65.8%
clear-num64.0%
un-div-inv64.0%
Applied egg-rr64.0%
Taylor expanded in z around inf 52.9%
if -1.79999999999999989e127 < z < 5.20000000000000006e-17Initial program 88.0%
+-commutative88.0%
fma-define88.2%
Simplified88.2%
Taylor expanded in a around inf 29.9%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 79.0%
clear-num78.1%
un-div-inv78.2%
Applied egg-rr78.2%
Taylor expanded in z around inf 26.0%
herbie shell --seed 2024180
(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)))))