
(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 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -5e-282)
(+ x (/ (- t x) (/ (- a z) (- y z))))
(if (<= t_1 0.0)
(+ t (/ (* (- t x) (- a y)) z))
(fma (- t x) (/ (- y z) (- a z)) 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 <= -5e-282) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = fma((t - x), ((y - z) / (a - z)), 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 <= -5e-282) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); else tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-282], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $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 -5 \cdot 10^{-282}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.0000000000000001e-282Initial program 91.2%
Taylor expanded in y around 0 77.3%
+-commutative77.3%
div-sub80.1%
mul-1-neg80.1%
associate-/l*86.7%
distribute-lft-neg-out86.7%
distribute-rgt-out91.2%
sub-neg91.2%
associate-/r/96.2%
Simplified96.2%
if -5.0000000000000001e-282 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 4.5%
+-commutative4.5%
remove-double-neg4.5%
unsub-neg4.5%
*-commutative4.5%
associate-*l/6.8%
associate-/l*7.4%
fma-neg7.4%
remove-double-neg7.4%
Simplified7.4%
Taylor expanded in z around inf 88.2%
associate--l+88.2%
associate-*r/88.2%
associate-*r/88.2%
mul-1-neg88.2%
div-sub88.2%
mul-1-neg88.2%
distribute-lft-out--88.2%
associate-*r/88.2%
mul-1-neg88.2%
unsub-neg88.2%
distribute-rgt-out--88.4%
Simplified88.4%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.4%
+-commutative90.4%
remove-double-neg90.4%
unsub-neg90.4%
*-commutative90.4%
associate-*l/79.2%
associate-/l*96.0%
fma-neg96.1%
remove-double-neg96.1%
Simplified96.1%
Final simplification95.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-282) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (/ (* (- t x) (- a y)) 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 <= -5e-282) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - y)) / 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 <= (-5d-282)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + (((t - x) * (a - y)) / 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 <= -5e-282) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -5e-282) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -5e-282) || !(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(a - y)) / 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 <= -5e-282) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-282], 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[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-282} \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(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.0000000000000001e-282 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.8%
Taylor expanded in y around 0 78.6%
+-commutative78.6%
div-sub79.9%
mul-1-neg79.9%
associate-/l*87.7%
distribute-lft-neg-out87.7%
distribute-rgt-out90.8%
sub-neg90.8%
associate-/r/96.1%
Simplified96.1%
if -5.0000000000000001e-282 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 4.5%
+-commutative4.5%
remove-double-neg4.5%
unsub-neg4.5%
*-commutative4.5%
associate-*l/6.8%
associate-/l*7.4%
fma-neg7.4%
remove-double-neg7.4%
Simplified7.4%
Taylor expanded in z around inf 88.2%
associate--l+88.2%
associate-*r/88.2%
associate-*r/88.2%
mul-1-neg88.2%
div-sub88.2%
mul-1-neg88.2%
distribute-lft-out--88.2%
associate-*r/88.2%
mul-1-neg88.2%
unsub-neg88.2%
distribute-rgt-out--88.4%
Simplified88.4%
Final simplification95.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-282) (not (<= t_1 1e-213)))
t_1
(+ t (/ (* (- t x) (- a y)) 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 <= -5e-282) || !(t_1 <= 1e-213)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / 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 <= (-5d-282)) .or. (.not. (t_1 <= 1d-213))) then
tmp = t_1
else
tmp = t + (((t - x) * (a - y)) / 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 <= -5e-282) || !(t_1 <= 1e-213)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -5e-282) or not (t_1 <= 1e-213): tmp = t_1 else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -5e-282) || !(t_1 <= 1e-213)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / 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 <= -5e-282) || ~((t_1 <= 1e-213))) tmp = t_1; else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-282], N[Not[LessEqual[t$95$1, 1e-213]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-282} \lor \neg \left(t\_1 \leq 10^{-213}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.0000000000000001e-282 or 9.9999999999999995e-214 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.9%
if -5.0000000000000001e-282 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.9999999999999995e-214Initial program 4.5%
+-commutative4.5%
remove-double-neg4.5%
unsub-neg4.5%
*-commutative4.5%
associate-*l/16.7%
associate-/l*17.3%
fma-neg17.3%
remove-double-neg17.3%
Simplified17.3%
Taylor expanded in z around inf 86.0%
associate--l+86.0%
associate-*r/86.0%
associate-*r/86.0%
mul-1-neg86.0%
div-sub86.0%
mul-1-neg86.0%
distribute-lft-out--86.0%
associate-*r/86.0%
mul-1-neg86.0%
unsub-neg86.0%
distribute-rgt-out--86.2%
Simplified86.2%
Final simplification91.3%
(FPCore (x y z t a)
:precision binary64
(if (<= y -5.8e+73)
(+ x (* y (/ (- t x) a)))
(if (<= y -43.0)
(/ (* y (- x t)) z)
(if (<= y 6.8e+58) (+ x (* t (/ z (- z a)))) (+ x (/ (- t x) (/ a y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.8e+73) {
tmp = x + (y * ((t - x) / a));
} else if (y <= -43.0) {
tmp = (y * (x - t)) / z;
} else if (y <= 6.8e+58) {
tmp = x + (t * (z / (z - a)));
} else {
tmp = x + ((t - x) / (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) :: tmp
if (y <= (-5.8d+73)) then
tmp = x + (y * ((t - x) / a))
else if (y <= (-43.0d0)) then
tmp = (y * (x - t)) / z
else if (y <= 6.8d+58) then
tmp = x + (t * (z / (z - a)))
else
tmp = x + ((t - x) / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.8e+73) {
tmp = x + (y * ((t - x) / a));
} else if (y <= -43.0) {
tmp = (y * (x - t)) / z;
} else if (y <= 6.8e+58) {
tmp = x + (t * (z / (z - a)));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.8e+73: tmp = x + (y * ((t - x) / a)) elif y <= -43.0: tmp = (y * (x - t)) / z elif y <= 6.8e+58: tmp = x + (t * (z / (z - a))) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.8e+73) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (y <= -43.0) tmp = Float64(Float64(y * Float64(x - t)) / z); elseif (y <= 6.8e+58) tmp = Float64(x + Float64(t * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.8e+73) tmp = x + (y * ((t - x) / a)); elseif (y <= -43.0) tmp = (y * (x - t)) / z; elseif (y <= 6.8e+58) tmp = x + (t * (z / (z - a))); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.8e+73], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -43.0], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 6.8e+58], N[(x + N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+73}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;y \leq -43:\\
\;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+58}:\\
\;\;\;\;x + t \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if y < -5.8000000000000005e73Initial program 95.8%
Taylor expanded in z around 0 67.3%
associate-/l*71.6%
Simplified71.6%
if -5.8000000000000005e73 < y < -43Initial program 73.6%
+-commutative73.6%
remove-double-neg73.6%
unsub-neg73.6%
*-commutative73.6%
associate-*l/72.9%
associate-/l*73.1%
fma-neg73.1%
remove-double-neg73.1%
Simplified73.1%
Taylor expanded in y around inf 73.6%
Taylor expanded in a around 0 65.8%
distribute-lft-out--65.8%
div-sub74.9%
associate-*r/74.9%
neg-mul-174.9%
Simplified74.9%
Taylor expanded in y around 0 75.0%
if -43 < y < 6.8000000000000001e58Initial program 74.6%
Taylor expanded in t around inf 69.7%
associate-/l*78.2%
Simplified78.2%
Taylor expanded in y around 0 62.4%
mul-1-neg62.4%
unsub-neg62.4%
associate-/l*71.0%
Simplified71.0%
if 6.8000000000000001e58 < y Initial program 92.8%
Taylor expanded in y around 0 77.0%
+-commutative77.0%
div-sub80.6%
mul-1-neg80.6%
associate-/l*87.4%
distribute-lft-neg-out87.4%
distribute-rgt-out92.8%
sub-neg92.8%
associate-/r/97.9%
Simplified97.9%
Taylor expanded in z around 0 64.4%
Final simplification69.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.95e+19) (not (<= a 5e-108))) (+ x (* t (/ (- y z) (- a z)))) (+ t (/ (* (- t x) (- a y)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.95e+19) || !(a <= 5e-108)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / 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.95d+19)) .or. (.not. (a <= 5d-108))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t + (((t - x) * (a - y)) / 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.95e+19) || !(a <= 5e-108)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.95e+19) or not (a <= 5e-108): tmp = x + (t * ((y - z) / (a - z))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.95e+19) || !(a <= 5e-108)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.95e+19) || ~((a <= 5e-108))) tmp = x + (t * ((y - z) / (a - z))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.95e+19], N[Not[LessEqual[a, 5e-108]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.95 \cdot 10^{+19} \lor \neg \left(a \leq 5 \cdot 10^{-108}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if a < -1.95e19 or 5e-108 < a Initial program 91.0%
Taylor expanded in t around inf 72.5%
associate-/l*82.7%
Simplified82.7%
if -1.95e19 < a < 5e-108Initial program 72.2%
+-commutative72.2%
remove-double-neg72.2%
unsub-neg72.2%
*-commutative72.2%
associate-*l/70.4%
associate-/l*77.6%
fma-neg77.7%
remove-double-neg77.7%
Simplified77.7%
Taylor expanded in z around inf 77.6%
associate--l+77.6%
associate-*r/77.6%
associate-*r/77.6%
mul-1-neg77.6%
div-sub80.2%
mul-1-neg80.2%
distribute-lft-out--80.2%
associate-*r/80.2%
mul-1-neg80.2%
unsub-neg80.2%
distribute-rgt-out--80.2%
Simplified80.2%
Final simplification81.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -100000000.0) (not (<= y 6.8e+58))) (+ x (* y (/ (- t x) (- a z)))) (+ x (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -100000000.0) || !(y <= 6.8e+58)) {
tmp = x + (y * ((t - x) / (a - z)));
} else {
tmp = x + (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 ((y <= (-100000000.0d0)) .or. (.not. (y <= 6.8d+58))) then
tmp = x + (y * ((t - x) / (a - z)))
else
tmp = x + (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 ((y <= -100000000.0) || !(y <= 6.8e+58)) {
tmp = x + (y * ((t - x) / (a - z)));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -100000000.0) or not (y <= 6.8e+58): tmp = x + (y * ((t - x) / (a - z))) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -100000000.0) || !(y <= 6.8e+58)) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / Float64(a - z)))); else tmp = Float64(x + 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 ((y <= -100000000.0) || ~((y <= 6.8e+58))) tmp = x + (y * ((t - x) / (a - z))); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -100000000.0], N[Not[LessEqual[y, 6.8e+58]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -100000000 \lor \neg \left(y \leq 6.8 \cdot 10^{+58}\right):\\
\;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if y < -1e8 or 6.8000000000000001e58 < y Initial program 92.8%
Taylor expanded in y around inf 84.2%
if -1e8 < y < 6.8000000000000001e58Initial program 74.5%
Taylor expanded in t around inf 69.6%
associate-/l*78.0%
Simplified78.0%
Final simplification80.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -9.5e+18) (not (<= a 6.6e-139))) (+ x (* t (/ (- y z) (- a z)))) (+ t (/ (* y (- x t)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9.5e+18) || !(a <= 6.6e-139)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t + ((y * (x - t)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-9.5d+18)) .or. (.not. (a <= 6.6d-139))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t + ((y * (x - t)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9.5e+18) || !(a <= 6.6e-139)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t + ((y * (x - t)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -9.5e+18) or not (a <= 6.6e-139): tmp = x + (t * ((y - z) / (a - z))) else: tmp = t + ((y * (x - t)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -9.5e+18) || !(a <= 6.6e-139)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -9.5e+18) || ~((a <= 6.6e-139))) tmp = x + (t * ((y - z) / (a - z))); else tmp = t + ((y * (x - t)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -9.5e+18], N[Not[LessEqual[a, 6.6e-139]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{+18} \lor \neg \left(a \leq 6.6 \cdot 10^{-139}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\end{array}
\end{array}
if a < -9.5e18 or 6.5999999999999999e-139 < a Initial program 89.5%
Taylor expanded in t around inf 71.1%
associate-/l*80.9%
Simplified80.9%
if -9.5e18 < a < 6.5999999999999999e-139Initial program 73.0%
+-commutative73.0%
remove-double-neg73.0%
unsub-neg73.0%
*-commutative73.0%
associate-*l/70.2%
associate-/l*77.9%
fma-neg78.0%
remove-double-neg78.0%
Simplified78.0%
Taylor expanded in z around -inf 66.9%
Taylor expanded in a around 0 78.6%
associate-*r/78.6%
associate-*r*78.6%
mul-1-neg78.6%
Simplified78.6%
Final simplification79.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -18.5) (not (<= y 3.5e+55))) (* y (/ 1.0 (/ (- a z) (- t x)))) (+ x (* t (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -18.5) || !(y <= 3.5e+55)) {
tmp = y * (1.0 / ((a - z) / (t - x)));
} else {
tmp = x + (t * (z / (z - 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 ((y <= (-18.5d0)) .or. (.not. (y <= 3.5d+55))) then
tmp = y * (1.0d0 / ((a - z) / (t - x)))
else
tmp = x + (t * (z / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -18.5) || !(y <= 3.5e+55)) {
tmp = y * (1.0 / ((a - z) / (t - x)));
} else {
tmp = x + (t * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -18.5) or not (y <= 3.5e+55): tmp = y * (1.0 / ((a - z) / (t - x))) else: tmp = x + (t * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -18.5) || !(y <= 3.5e+55)) tmp = Float64(y * Float64(1.0 / Float64(Float64(a - z) / Float64(t - x)))); else tmp = Float64(x + Float64(t * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -18.5) || ~((y <= 3.5e+55))) tmp = y * (1.0 / ((a - z) / (t - x))); else tmp = x + (t * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -18.5], N[Not[LessEqual[y, 3.5e+55]], $MachinePrecision]], N[(y * N[(1.0 / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -18.5 \lor \neg \left(y \leq 3.5 \cdot 10^{+55}\right):\\
\;\;\;\;y \cdot \frac{1}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if y < -18.5 or 3.5000000000000001e55 < y Initial program 92.2%
+-commutative92.2%
remove-double-neg92.2%
unsub-neg92.2%
*-commutative92.2%
associate-*l/77.3%
associate-/l*93.8%
fma-neg93.8%
remove-double-neg93.8%
Simplified93.8%
Taylor expanded in y around inf 75.7%
sub-div78.3%
clear-num78.4%
Applied egg-rr78.4%
if -18.5 < y < 3.5000000000000001e55Initial program 74.4%
Taylor expanded in t around inf 69.5%
associate-/l*78.0%
Simplified78.0%
Taylor expanded in y around 0 62.8%
mul-1-neg62.8%
unsub-neg62.8%
associate-/l*71.4%
Simplified71.4%
Final simplification74.5%
(FPCore (x y z t a)
:precision binary64
(if (<= y -5.2e+14)
(+ x (* y (/ (- t x) (- a z))))
(if (<= y 7.5e+53)
(+ x (* t (/ (- y z) (- a z))))
(+ x (/ (- t x) (/ (- a z) y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.2e+14) {
tmp = x + (y * ((t - x) / (a - z)));
} else if (y <= 7.5e+53) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + ((t - x) / ((a - z) / 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) :: tmp
if (y <= (-5.2d+14)) then
tmp = x + (y * ((t - x) / (a - z)))
else if (y <= 7.5d+53) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = x + ((t - x) / ((a - z) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.2e+14) {
tmp = x + (y * ((t - x) / (a - z)));
} else if (y <= 7.5e+53) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + ((t - x) / ((a - z) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.2e+14: tmp = x + (y * ((t - x) / (a - z))) elif y <= 7.5e+53: tmp = x + (t * ((y - z) / (a - z))) else: tmp = x + ((t - x) / ((a - z) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.2e+14) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / Float64(a - z)))); elseif (y <= 7.5e+53) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.2e+14) tmp = x + (y * ((t - x) / (a - z))); elseif (y <= 7.5e+53) tmp = x + (t * ((y - z) / (a - z))); else tmp = x + ((t - x) / ((a - z) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.2e+14], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+53], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+14}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+53}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\
\end{array}
\end{array}
if y < -5.2e14Initial program 92.8%
Taylor expanded in y around inf 84.6%
if -5.2e14 < y < 7.4999999999999997e53Initial program 74.8%
Taylor expanded in t around inf 69.8%
associate-/l*78.3%
Simplified78.3%
if 7.4999999999999997e53 < y Initial program 91.4%
Taylor expanded in y around 0 76.1%
+-commutative76.1%
div-sub79.6%
mul-1-neg79.6%
associate-/l*86.1%
distribute-lft-neg-out86.1%
distribute-rgt-out91.4%
sub-neg91.4%
associate-/r/96.3%
Simplified96.3%
Taylor expanded in y around inf 86.0%
(FPCore (x y z t a)
:precision binary64
(if (<= y -235000.0)
(+ x (* y (/ (- t x) (- a z))))
(if (<= y 3.8e+55)
(+ x (* t (/ (- y z) (- a z))))
(+ x (/ y (/ (- a z) (- t x)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -235000.0) {
tmp = x + (y * ((t - x) / (a - z)));
} else if (y <= 3.8e+55) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + (y / ((a - z) / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-235000.0d0)) then
tmp = x + (y * ((t - x) / (a - z)))
else if (y <= 3.8d+55) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = x + (y / ((a - z) / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -235000.0) {
tmp = x + (y * ((t - x) / (a - z)));
} else if (y <= 3.8e+55) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + (y / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -235000.0: tmp = x + (y * ((t - x) / (a - z))) elif y <= 3.8e+55: tmp = x + (t * ((y - z) / (a - z))) else: tmp = x + (y / ((a - z) / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -235000.0) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / Float64(a - z)))); elseif (y <= 3.8e+55) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - z) / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -235000.0) tmp = x + (y * ((t - x) / (a - z))); elseif (y <= 3.8e+55) tmp = x + (t * ((y - z) / (a - z))); else tmp = x + (y / ((a - z) / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -235000.0], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+55], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -235000:\\
\;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+55}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if y < -235000Initial program 92.8%
Taylor expanded in y around inf 84.6%
if -235000 < y < 3.8e55Initial program 74.3%
Taylor expanded in t around inf 69.4%
associate-/l*77.8%
Simplified77.8%
if 3.8e55 < y Initial program 92.9%
clear-num93.0%
un-div-inv93.0%
Applied egg-rr93.0%
Taylor expanded in y around inf 84.1%
(FPCore (x y z t a) :precision binary64 (if (<= y -5.2e+259) (* y (/ t (- a z))) (if (<= y -43.0) (/ x (/ z y)) (if (<= y 3.3e+63) (+ x t) (* x (/ y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.2e+259) {
tmp = y * (t / (a - z));
} else if (y <= -43.0) {
tmp = x / (z / y);
} else if (y <= 3.3e+63) {
tmp = x + t;
} else {
tmp = x * (y / 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 (y <= (-5.2d+259)) then
tmp = y * (t / (a - z))
else if (y <= (-43.0d0)) then
tmp = x / (z / y)
else if (y <= 3.3d+63) then
tmp = x + t
else
tmp = x * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.2e+259) {
tmp = y * (t / (a - z));
} else if (y <= -43.0) {
tmp = x / (z / y);
} else if (y <= 3.3e+63) {
tmp = x + t;
} else {
tmp = x * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.2e+259: tmp = y * (t / (a - z)) elif y <= -43.0: tmp = x / (z / y) elif y <= 3.3e+63: tmp = x + t else: tmp = x * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.2e+259) tmp = Float64(y * Float64(t / Float64(a - z))); elseif (y <= -43.0) tmp = Float64(x / Float64(z / y)); elseif (y <= 3.3e+63) tmp = Float64(x + t); else tmp = Float64(x * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.2e+259) tmp = y * (t / (a - z)); elseif (y <= -43.0) tmp = x / (z / y); elseif (y <= 3.3e+63) tmp = x + t; else tmp = x * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.2e+259], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -43.0], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+63], N[(x + t), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+259}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;y \leq -43:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+63}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -5.20000000000000004e259Initial program 99.8%
+-commutative99.8%
remove-double-neg99.8%
unsub-neg99.8%
*-commutative99.8%
associate-*l/100.0%
associate-/l*99.6%
fma-neg99.6%
remove-double-neg99.6%
Simplified99.6%
Taylor expanded in y around inf 99.8%
Taylor expanded in t around inf 75.7%
if -5.20000000000000004e259 < y < -43Initial program 90.2%
+-commutative90.2%
remove-double-neg90.2%
unsub-neg90.2%
*-commutative90.2%
associate-*l/78.5%
associate-/l*88.2%
fma-neg88.2%
remove-double-neg88.2%
Simplified88.2%
Taylor expanded in y around inf 74.8%
Taylor expanded in a around 0 51.1%
distribute-lft-out--51.1%
div-sub53.1%
associate-*r/53.1%
neg-mul-153.1%
Simplified53.1%
Taylor expanded in t around 0 42.0%
associate-/l*46.6%
Simplified46.6%
clear-num46.6%
un-div-inv46.6%
Applied egg-rr46.6%
if -43 < y < 3.3000000000000002e63Initial program 75.0%
Taylor expanded in t around inf 69.4%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in z around inf 47.8%
if 3.3000000000000002e63 < y Initial program 92.6%
+-commutative92.6%
remove-double-neg92.6%
unsub-neg92.6%
*-commutative92.6%
associate-*l/71.5%
associate-/l*97.8%
fma-neg97.8%
remove-double-neg97.8%
Simplified97.8%
Taylor expanded in y around inf 73.3%
Taylor expanded in a around 0 47.9%
distribute-lft-out--47.9%
div-sub51.7%
associate-*r/51.7%
neg-mul-151.7%
Simplified51.7%
Taylor expanded in t around 0 30.6%
associate-/l*37.6%
Simplified37.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.05e+19) (+ x (/ (* (- y z) t) a)) (if (<= a 5e-44) (+ t (/ (* y (- x t)) z)) (+ x (/ (- t x) (/ a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.05e+19) {
tmp = x + (((y - z) * t) / a);
} else if (a <= 5e-44) {
tmp = t + ((y * (x - t)) / z);
} else {
tmp = x + ((t - x) / (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) :: tmp
if (a <= (-2.05d+19)) then
tmp = x + (((y - z) * t) / a)
else if (a <= 5d-44) then
tmp = t + ((y * (x - t)) / z)
else
tmp = x + ((t - x) / (a / y))
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.05e+19) {
tmp = x + (((y - z) * t) / a);
} else if (a <= 5e-44) {
tmp = t + ((y * (x - t)) / z);
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.05e+19: tmp = x + (((y - z) * t) / a) elif a <= 5e-44: tmp = t + ((y * (x - t)) / z) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.05e+19) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / a)); elseif (a <= 5e-44) tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.05e+19) tmp = x + (((y - z) * t) / a); elseif (a <= 5e-44) tmp = t + ((y * (x - t)) / z); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.05e+19], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5e-44], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.05 \cdot 10^{+19}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a}\\
\mathbf{elif}\;a \leq 5 \cdot 10^{-44}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if a < -2.05e19Initial program 90.7%
Taylor expanded in t around inf 78.5%
associate-/l*84.6%
Simplified84.6%
Taylor expanded in a around inf 77.0%
if -2.05e19 < a < 5.00000000000000039e-44Initial program 74.4%
+-commutative74.4%
remove-double-neg74.4%
unsub-neg74.4%
*-commutative74.4%
associate-*l/71.4%
associate-/l*79.9%
fma-neg80.0%
remove-double-neg80.0%
Simplified80.0%
Taylor expanded in z around -inf 62.5%
Taylor expanded in a around 0 74.0%
associate-*r/74.0%
associate-*r*74.0%
mul-1-neg74.0%
Simplified74.0%
if 5.00000000000000039e-44 < a Initial program 90.9%
Taylor expanded in y around 0 79.8%
+-commutative79.8%
div-sub79.8%
mul-1-neg79.8%
associate-/l*90.9%
distribute-lft-neg-out90.9%
distribute-rgt-out90.9%
sub-neg90.9%
associate-/r/95.0%
Simplified95.0%
Taylor expanded in z around 0 67.9%
Final simplification73.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -260.0) t (if (<= z 1.25e+66) (+ x (/ (- t x) (/ a y))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -260.0) {
tmp = t;
} else if (z <= 1.25e+66) {
tmp = x + ((t - x) / (a / y));
} 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 <= (-260.0d0)) then
tmp = t
else if (z <= 1.25d+66) then
tmp = x + ((t - x) / (a / y))
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 <= -260.0) {
tmp = t;
} else if (z <= 1.25e+66) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -260.0: tmp = t elif z <= 1.25e+66: tmp = x + ((t - x) / (a / y)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -260.0) tmp = t; elseif (z <= 1.25e+66) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -260.0) tmp = t; elseif (z <= 1.25e+66) tmp = x + ((t - x) / (a / y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -260.0], t, If[LessEqual[z, 1.25e+66], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -260:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+66}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -260 or 1.24999999999999998e66 < z Initial program 71.6%
+-commutative71.6%
remove-double-neg71.6%
unsub-neg71.6%
*-commutative71.6%
associate-*l/46.6%
associate-/l*75.8%
fma-neg75.8%
remove-double-neg75.8%
Simplified75.8%
Taylor expanded in z around -inf 56.7%
Taylor expanded in z around inf 48.6%
if -260 < z < 1.24999999999999998e66Initial program 90.1%
Taylor expanded in y around 0 87.8%
+-commutative87.8%
div-sub89.9%
mul-1-neg89.9%
associate-/l*85.4%
distribute-lft-neg-out85.4%
distribute-rgt-out90.1%
sub-neg90.1%
associate-/r/95.8%
Simplified95.8%
Taylor expanded in z around 0 72.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -95.0) t (if (<= z 1.22e+66) (+ x (* y (/ (- t x) a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -95.0) {
tmp = t;
} else if (z <= 1.22e+66) {
tmp = x + (y * ((t - x) / 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 <= (-95.0d0)) then
tmp = t
else if (z <= 1.22d+66) then
tmp = x + (y * ((t - x) / 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 <= -95.0) {
tmp = t;
} else if (z <= 1.22e+66) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -95.0: tmp = t elif z <= 1.22e+66: tmp = x + (y * ((t - x) / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -95.0) tmp = t; elseif (z <= 1.22e+66) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -95.0) tmp = t; elseif (z <= 1.22e+66) tmp = x + (y * ((t - x) / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -95.0], t, If[LessEqual[z, 1.22e+66], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -95:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{+66}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -95 or 1.21999999999999993e66 < z Initial program 71.6%
+-commutative71.6%
remove-double-neg71.6%
unsub-neg71.6%
*-commutative71.6%
associate-*l/46.6%
associate-/l*75.8%
fma-neg75.8%
remove-double-neg75.8%
Simplified75.8%
Taylor expanded in z around -inf 56.7%
Taylor expanded in z around inf 48.6%
if -95 < z < 1.21999999999999993e66Initial program 90.1%
Taylor expanded in z around 0 68.8%
associate-/l*70.6%
Simplified70.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -260.0) t (if (<= z 1.8e+67) (+ x (* t (/ y (- a z)))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -260.0) {
tmp = t;
} else if (z <= 1.8e+67) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-260.0d0)) then
tmp = t
else if (z <= 1.8d+67) then
tmp = x + (t * (y / (a - z)))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -260.0) {
tmp = t;
} else if (z <= 1.8e+67) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -260.0: tmp = t elif z <= 1.8e+67: tmp = x + (t * (y / (a - z))) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -260.0) tmp = t; elseif (z <= 1.8e+67) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -260.0) tmp = t; elseif (z <= 1.8e+67) tmp = x + (t * (y / (a - z))); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -260.0], t, If[LessEqual[z, 1.8e+67], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -260:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+67}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -260 or 1.7999999999999999e67 < z Initial program 71.6%
+-commutative71.6%
remove-double-neg71.6%
unsub-neg71.6%
*-commutative71.6%
associate-*l/46.6%
associate-/l*75.8%
fma-neg75.8%
remove-double-neg75.8%
Simplified75.8%
Taylor expanded in z around -inf 56.7%
Taylor expanded in z around inf 48.6%
if -260 < z < 1.7999999999999999e67Initial program 90.1%
Taylor expanded in y around inf 80.5%
Taylor expanded in t around inf 57.8%
associate-/l*60.3%
Simplified60.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.25e+116) (not (<= y 7.4e+58))) (* y (/ (- t x) a)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.25e+116) || !(y <= 7.4e+58)) {
tmp = y * ((t - x) / a);
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.25d+116)) .or. (.not. (y <= 7.4d+58))) then
tmp = y * ((t - x) / a)
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.25e+116) || !(y <= 7.4e+58)) {
tmp = y * ((t - x) / a);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.25e+116) or not (y <= 7.4e+58): tmp = y * ((t - x) / a) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.25e+116) || !(y <= 7.4e+58)) tmp = Float64(y * Float64(Float64(t - x) / a)); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.25e+116) || ~((y <= 7.4e+58))) tmp = y * ((t - x) / a); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.25e+116], N[Not[LessEqual[y, 7.4e+58]], $MachinePrecision]], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+116} \lor \neg \left(y \leq 7.4 \cdot 10^{+58}\right):\\
\;\;\;\;y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -1.25000000000000006e116 or 7.4000000000000004e58 < y Initial program 95.5%
+-commutative95.5%
remove-double-neg95.5%
unsub-neg95.5%
*-commutative95.5%
associate-*l/82.0%
associate-/l*98.6%
fma-neg98.6%
remove-double-neg98.6%
Simplified98.6%
Taylor expanded in y around inf 80.7%
Taylor expanded in a around inf 58.2%
if -1.25000000000000006e116 < y < 7.4000000000000004e58Initial program 75.4%
Taylor expanded in t around inf 65.5%
associate-/l*73.9%
Simplified73.9%
Taylor expanded in z around inf 45.3%
Final simplification49.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -260.0) t (if (<= z 6.2e+66) (- x (* x (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -260.0) {
tmp = t;
} else if (z <= 6.2e+66) {
tmp = x - (x * (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 <= (-260.0d0)) then
tmp = t
else if (z <= 6.2d+66) then
tmp = x - (x * (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 <= -260.0) {
tmp = t;
} else if (z <= 6.2e+66) {
tmp = x - (x * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -260.0: tmp = t elif z <= 6.2e+66: tmp = x - (x * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -260.0) tmp = t; elseif (z <= 6.2e+66) tmp = Float64(x - Float64(x * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -260.0) tmp = t; elseif (z <= 6.2e+66) tmp = x - (x * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -260.0], t, If[LessEqual[z, 6.2e+66], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -260:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+66}:\\
\;\;\;\;x - x \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -260 or 6.20000000000000037e66 < z Initial program 71.6%
+-commutative71.6%
remove-double-neg71.6%
unsub-neg71.6%
*-commutative71.6%
associate-*l/46.6%
associate-/l*75.8%
fma-neg75.8%
remove-double-neg75.8%
Simplified75.8%
Taylor expanded in z around -inf 56.7%
Taylor expanded in z around inf 48.6%
if -260 < z < 6.20000000000000037e66Initial program 90.1%
Taylor expanded in y around inf 80.5%
Taylor expanded in t around 0 59.2%
associate-*r/59.2%
associate-*r*59.2%
mul-1-neg59.2%
Simplified59.2%
Taylor expanded in a around inf 54.0%
mul-1-neg54.0%
unsub-neg54.0%
associate-/l*56.5%
Simplified56.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -200.0) t (if (<= z 1.6e-20) (+ x (/ (* y t) a)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -200.0) {
tmp = t;
} else if (z <= 1.6e-20) {
tmp = x + ((y * t) / 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 <= (-200.0d0)) then
tmp = t
else if (z <= 1.6d-20) then
tmp = x + ((y * t) / 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 <= -200.0) {
tmp = t;
} else if (z <= 1.6e-20) {
tmp = x + ((y * t) / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -200.0: tmp = t elif z <= 1.6e-20: tmp = x + ((y * t) / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -200.0) tmp = t; elseif (z <= 1.6e-20) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -200.0) tmp = t; elseif (z <= 1.6e-20) tmp = x + ((y * t) / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -200.0], t, If[LessEqual[z, 1.6e-20], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -200:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-20}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -200 or 1.59999999999999985e-20 < z Initial program 73.7%
+-commutative73.7%
remove-double-neg73.7%
unsub-neg73.7%
*-commutative73.7%
associate-*l/52.3%
associate-/l*77.9%
fma-neg77.9%
remove-double-neg77.9%
Simplified77.9%
Taylor expanded in z around -inf 54.6%
Taylor expanded in z around inf 46.4%
if -200 < z < 1.59999999999999985e-20Initial program 90.8%
Taylor expanded in t around inf 70.1%
associate-/l*73.0%
Simplified73.0%
Taylor expanded in z around 0 57.9%
Final simplification52.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.6e+116) (* y (/ (- t x) a)) (if (<= y 7e+58) (+ x t) (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.6e+116) {
tmp = y * ((t - x) / a);
} else if (y <= 7e+58) {
tmp = x + t;
} else {
tmp = (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 (y <= (-1.6d+116)) then
tmp = y * ((t - x) / a)
else if (y <= 7d+58) then
tmp = x + t
else
tmp = (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 (y <= -1.6e+116) {
tmp = y * ((t - x) / a);
} else if (y <= 7e+58) {
tmp = x + t;
} else {
tmp = (t - x) * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.6e+116: tmp = y * ((t - x) / a) elif y <= 7e+58: tmp = x + t else: tmp = (t - x) * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.6e+116) tmp = Float64(y * Float64(Float64(t - x) / a)); elseif (y <= 7e+58) tmp = Float64(x + t); else tmp = Float64(Float64(t - x) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.6e+116) tmp = y * ((t - x) / a); elseif (y <= 7e+58) tmp = x + t; else tmp = (t - x) * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.6e+116], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+58], N[(x + t), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+116}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+58}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -1.6e116Initial program 99.8%
+-commutative99.8%
remove-double-neg99.8%
unsub-neg99.8%
*-commutative99.8%
associate-*l/97.2%
associate-/l*99.7%
fma-neg99.7%
remove-double-neg99.7%
Simplified99.7%
Taylor expanded in y around inf 94.0%
Taylor expanded in a around inf 72.2%
if -1.6e116 < y < 6.9999999999999995e58Initial program 75.4%
Taylor expanded in t around inf 65.5%
associate-/l*73.9%
Simplified73.9%
Taylor expanded in z around inf 45.3%
if 6.9999999999999995e58 < y Initial program 92.8%
+-commutative92.8%
remove-double-neg92.8%
unsub-neg92.8%
*-commutative92.8%
associate-*l/72.6%
associate-/l*97.9%
fma-neg97.8%
remove-double-neg97.8%
Simplified97.8%
Taylor expanded in y around inf 72.5%
Taylor expanded in a around inf 49.6%
Taylor expanded in t around 0 37.4%
+-commutative37.4%
associate-/l*42.3%
mul-1-neg42.3%
associate-*r/42.0%
distribute-lft-neg-in42.0%
distribute-rgt-out52.9%
sub-neg52.9%
Simplified52.9%
Final simplification50.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -40.0) (not (<= y 7e+64))) (* x (/ y z)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -40.0) || !(y <= 7e+64)) {
tmp = x * (y / z);
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-40.0d0)) .or. (.not. (y <= 7d+64))) then
tmp = x * (y / z)
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -40.0) || !(y <= 7e+64)) {
tmp = x * (y / z);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -40.0) or not (y <= 7e+64): tmp = x * (y / z) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -40.0) || !(y <= 7e+64)) tmp = Float64(x * Float64(y / z)); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -40.0) || ~((y <= 7e+64))) tmp = x * (y / z); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -40.0], N[Not[LessEqual[y, 7e+64]], $MachinePrecision]], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -40 \lor \neg \left(y \leq 7 \cdot 10^{+64}\right):\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -40 or 6.9999999999999997e64 < y Initial program 92.0%
+-commutative92.0%
remove-double-neg92.0%
unsub-neg92.0%
*-commutative92.0%
associate-*l/76.7%
associate-/l*93.6%
fma-neg93.6%
remove-double-neg93.6%
Simplified93.6%
Taylor expanded in y around inf 75.9%
Taylor expanded in a around 0 50.4%
distribute-lft-out--50.4%
div-sub53.1%
associate-*r/53.1%
neg-mul-153.1%
Simplified53.1%
Taylor expanded in t around 0 35.4%
associate-/l*40.8%
Simplified40.8%
if -40 < y < 6.9999999999999997e64Initial program 75.0%
Taylor expanded in t around inf 69.4%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in z around inf 47.8%
Final simplification44.7%
(FPCore (x y z t a) :precision binary64 (if (<= y -28.0) (/ x (/ z y)) (if (<= y 8.2e+63) (+ x t) (* x (/ y z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -28.0) {
tmp = x / (z / y);
} else if (y <= 8.2e+63) {
tmp = x + t;
} else {
tmp = x * (y / 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 (y <= (-28.0d0)) then
tmp = x / (z / y)
else if (y <= 8.2d+63) then
tmp = x + t
else
tmp = x * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -28.0) {
tmp = x / (z / y);
} else if (y <= 8.2e+63) {
tmp = x + t;
} else {
tmp = x * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -28.0: tmp = x / (z / y) elif y <= 8.2e+63: tmp = x + t else: tmp = x * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -28.0) tmp = Float64(x / Float64(z / y)); elseif (y <= 8.2e+63) tmp = Float64(x + t); else tmp = Float64(x * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -28.0) tmp = x / (z / y); elseif (y <= 8.2e+63) tmp = x + t; else tmp = x * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -28.0], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e+63], N[(x + t), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -28:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+63}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -28Initial program 91.6%
+-commutative91.6%
remove-double-neg91.6%
unsub-neg91.6%
*-commutative91.6%
associate-*l/81.5%
associate-/l*89.8%
fma-neg89.8%
remove-double-neg89.8%
Simplified89.8%
Taylor expanded in y around inf 78.3%
Taylor expanded in a around 0 52.6%
distribute-lft-out--52.6%
div-sub54.4%
associate-*r/54.4%
neg-mul-154.4%
Simplified54.4%
Taylor expanded in t around 0 39.8%
associate-/l*43.7%
Simplified43.7%
clear-num43.7%
un-div-inv43.7%
Applied egg-rr43.7%
if -28 < y < 8.19999999999999985e63Initial program 75.0%
Taylor expanded in t around inf 69.4%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in z around inf 47.8%
if 8.19999999999999985e63 < y Initial program 92.6%
+-commutative92.6%
remove-double-neg92.6%
unsub-neg92.6%
*-commutative92.6%
associate-*l/71.5%
associate-/l*97.8%
fma-neg97.8%
remove-double-neg97.8%
Simplified97.8%
Taylor expanded in y around inf 73.3%
Taylor expanded in a around 0 47.9%
distribute-lft-out--47.9%
div-sub51.7%
associate-*r/51.7%
neg-mul-151.7%
Simplified51.7%
Taylor expanded in t around 0 30.6%
associate-/l*37.6%
Simplified37.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.8e+48) x (if (<= a 4.6e-41) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e+48) {
tmp = x;
} else if (a <= 4.6e-41) {
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+48)) then
tmp = x
else if (a <= 4.6d-41) 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+48) {
tmp = x;
} else if (a <= 4.6e-41) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.8e+48: tmp = x elif a <= 4.6e-41: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.8e+48) tmp = x; elseif (a <= 4.6e-41) 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+48) tmp = x; elseif (a <= 4.6e-41) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.8e+48], x, If[LessEqual[a, 4.6e-41], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{+48}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{-41}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.8e48 or 4.6000000000000002e-41 < a Initial program 91.1%
+-commutative91.1%
remove-double-neg91.1%
unsub-neg91.1%
*-commutative91.1%
associate-*l/74.4%
associate-/l*95.6%
fma-neg95.6%
remove-double-neg95.6%
Simplified95.6%
Taylor expanded in a around inf 50.9%
if -3.8e48 < a < 4.6000000000000002e-41Initial program 75.2%
+-commutative75.2%
remove-double-neg75.2%
unsub-neg75.2%
*-commutative75.2%
associate-*l/71.7%
associate-/l*80.4%
fma-neg80.4%
remove-double-neg80.4%
Simplified80.4%
Taylor expanded in z around -inf 61.8%
Taylor expanded in z around inf 38.8%
(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 82.4%
+-commutative82.4%
remove-double-neg82.4%
unsub-neg82.4%
*-commutative82.4%
associate-*l/72.9%
associate-/l*87.3%
fma-neg87.3%
remove-double-neg87.3%
Simplified87.3%
Taylor expanded in z around -inf 37.3%
Taylor expanded in z around inf 26.3%
herbie shell --seed 2024144
(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)))))