
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-243) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(+ 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 <= -2e-243) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} 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 <= -2e-243) || !(t_1 <= 0.0)) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-243], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t + N[(N[(N[(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 -2 \cdot 10^{-243} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999999e-243 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.7%
+-commutative91.7%
remove-double-neg91.7%
unsub-neg91.7%
*-commutative91.7%
associate-*l/78.1%
associate-/l*95.7%
fma-neg95.7%
remove-double-neg95.7%
Simplified95.7%
if -1.99999999999999999e-243 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.6%
+-commutative3.6%
remove-double-neg3.6%
unsub-neg3.6%
*-commutative3.6%
associate-*l/3.0%
associate-/l*3.6%
fma-neg3.6%
remove-double-neg3.6%
Simplified3.6%
Taylor expanded in z around inf 79.0%
associate--l+79.0%
associate-*r/79.0%
associate-*r/79.0%
mul-1-neg79.0%
div-sub79.0%
mul-1-neg79.0%
distribute-lft-out--79.0%
associate-*r/79.0%
mul-1-neg79.0%
unsub-neg79.0%
distribute-rgt-out--79.0%
Simplified79.0%
Final simplification93.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-243) (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 <= -2e-243) || !(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 <= (-2d-243)) .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 <= -2e-243) || !(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 <= -2e-243) 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 <= -2e-243) || !(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 <= -2e-243) || ~((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, -2e-243], 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 -2 \cdot 10^{-243} \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)))) < -1.99999999999999999e-243 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.7%
Taylor expanded in y around 0 78.5%
+-commutative78.5%
div-sub78.9%
mul-1-neg78.9%
associate-/l*88.4%
distribute-lft-neg-out88.4%
distribute-rgt-out91.7%
sub-neg91.7%
associate-/r/95.6%
Simplified95.6%
if -1.99999999999999999e-243 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.6%
+-commutative3.6%
remove-double-neg3.6%
unsub-neg3.6%
*-commutative3.6%
associate-*l/3.0%
associate-/l*3.6%
fma-neg3.6%
remove-double-neg3.6%
Simplified3.6%
Taylor expanded in z around inf 79.0%
associate--l+79.0%
associate-*r/79.0%
associate-*r/79.0%
mul-1-neg79.0%
div-sub79.0%
mul-1-neg79.0%
distribute-lft-out--79.0%
associate-*r/79.0%
mul-1-neg79.0%
unsub-neg79.0%
distribute-rgt-out--79.0%
Simplified79.0%
Final simplification93.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-243) (not (<= t_1 4e-237)))
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 <= -2e-243) || !(t_1 <= 4e-237)) {
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 <= (-2d-243)) .or. (.not. (t_1 <= 4d-237))) 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 <= -2e-243) || !(t_1 <= 4e-237)) {
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 <= -2e-243) or not (t_1 <= 4e-237): 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 <= -2e-243) || !(t_1 <= 4e-237)) 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 <= -2e-243) || ~((t_1 <= 4e-237))) 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, -2e-243], N[Not[LessEqual[t$95$1, 4e-237]], $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 -2 \cdot 10^{-243} \lor \neg \left(t\_1 \leq 4 \cdot 10^{-237}\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)))) < -1.99999999999999999e-243 or 4e-237 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.4%
if -1.99999999999999999e-243 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4e-237Initial program 3.8%
+-commutative3.8%
remove-double-neg3.8%
unsub-neg3.8%
*-commutative3.8%
associate-*l/8.4%
associate-/l*8.9%
fma-neg8.9%
remove-double-neg8.9%
Simplified8.9%
Taylor expanded in z around inf 80.1%
associate--l+80.1%
associate-*r/80.1%
associate-*r/80.1%
mul-1-neg80.1%
div-sub80.1%
mul-1-neg80.1%
distribute-lft-out--80.1%
associate-*r/80.1%
mul-1-neg80.1%
unsub-neg80.1%
distribute-rgt-out--80.1%
Simplified80.1%
Final simplification90.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.25e-31)
t
(if (<= z 5.4e-258)
(* t (/ y (- a z)))
(if (<= z 1.5e+118) (* x (- 1.0 (/ y a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.25e-31) {
tmp = t;
} else if (z <= 5.4e-258) {
tmp = t * (y / (a - z));
} else if (z <= 1.5e+118) {
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 <= (-1.25d-31)) then
tmp = t
else if (z <= 5.4d-258) then
tmp = t * (y / (a - z))
else if (z <= 1.5d+118) 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 <= -1.25e-31) {
tmp = t;
} else if (z <= 5.4e-258) {
tmp = t * (y / (a - z));
} else if (z <= 1.5e+118) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.25e-31: tmp = t elif z <= 5.4e-258: tmp = t * (y / (a - z)) elif z <= 1.5e+118: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.25e-31) tmp = t; elseif (z <= 5.4e-258) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 1.5e+118) 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 <= -1.25e-31) tmp = t; elseif (z <= 5.4e-258) tmp = t * (y / (a - z)); elseif (z <= 1.5e+118) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.25e-31], t, If[LessEqual[z, 5.4e-258], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+118], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{-31}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-258}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+118}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.25e-31 or 1.5e118 < z Initial program 67.9%
+-commutative67.9%
remove-double-neg67.9%
unsub-neg67.9%
*-commutative67.9%
associate-*l/46.1%
associate-/l*72.6%
fma-neg72.6%
remove-double-neg72.6%
Simplified72.6%
Taylor expanded in t around inf 56.6%
Taylor expanded in z around inf 43.6%
if -1.25e-31 < z < 5.39999999999999991e-258Initial program 91.2%
+-commutative91.2%
remove-double-neg91.2%
unsub-neg91.2%
*-commutative91.2%
associate-*l/94.2%
associate-/l*92.9%
fma-neg92.8%
remove-double-neg92.8%
Simplified92.8%
Taylor expanded in t around inf 69.1%
Taylor expanded in y around inf 56.2%
if 5.39999999999999991e-258 < z < 1.5e118Initial program 87.9%
Taylor expanded in z around 0 57.0%
associate-/l*64.5%
Simplified64.5%
Taylor expanded in x around inf 50.6%
mul-1-neg50.6%
unsub-neg50.6%
Simplified50.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.25e+78) (not (<= x 8.5e+123))) (* x (+ (/ (- y z) (- z a)) 1.0)) (+ x (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.25e+78) || !(x <= 8.5e+123)) {
tmp = x * (((y - z) / (z - a)) + 1.0);
} 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 ((x <= (-1.25d+78)) .or. (.not. (x <= 8.5d+123))) then
tmp = x * (((y - z) / (z - a)) + 1.0d0)
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 ((x <= -1.25e+78) || !(x <= 8.5e+123)) {
tmp = x * (((y - z) / (z - a)) + 1.0);
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.25e+78) or not (x <= 8.5e+123): tmp = x * (((y - z) / (z - a)) + 1.0) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.25e+78) || !(x <= 8.5e+123)) tmp = Float64(x * Float64(Float64(Float64(y - z) / Float64(z - a)) + 1.0)); 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 ((x <= -1.25e+78) || ~((x <= 8.5e+123))) tmp = x * (((y - z) / (z - a)) + 1.0); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.25e+78], N[Not[LessEqual[x, 8.5e+123]], $MachinePrecision]], N[(x * N[(N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + 1.0), $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}\;x \leq -1.25 \cdot 10^{+78} \lor \neg \left(x \leq 8.5 \cdot 10^{+123}\right):\\
\;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -1.24999999999999996e78 or 8.5e123 < x Initial program 69.0%
+-commutative69.0%
remove-double-neg69.0%
unsub-neg69.0%
*-commutative69.0%
associate-*l/45.5%
associate-/l*72.5%
fma-neg72.5%
remove-double-neg72.5%
Simplified72.5%
Taylor expanded in t around 0 43.1%
mul-1-neg43.1%
*-rgt-identity43.1%
associate-/l*64.4%
distribute-rgt-neg-in64.4%
mul-1-neg64.4%
distribute-lft-in64.3%
mul-1-neg64.3%
unsub-neg64.3%
Simplified64.3%
if -1.24999999999999996e78 < x < 8.5e123Initial program 84.9%
Taylor expanded in t around inf 72.9%
associate-/l*82.8%
Simplified82.8%
Final simplification77.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -0.0225)
(+ x (* (- t x) (/ y (- a z))))
(if (<= a 1.15e-178)
(+ t (/ (* (- t x) (- a y)) z))
(+ x (* t (/ (- y z) (- a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.0225) {
tmp = x + ((t - x) * (y / (a - z)));
} else if (a <= 1.15e-178) {
tmp = t + (((t - x) * (a - y)) / 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 (a <= (-0.0225d0)) then
tmp = x + ((t - x) * (y / (a - z)))
else if (a <= 1.15d-178) then
tmp = t + (((t - x) * (a - y)) / 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 (a <= -0.0225) {
tmp = x + ((t - x) * (y / (a - z)));
} else if (a <= 1.15e-178) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -0.0225: tmp = x + ((t - x) * (y / (a - z))) elif a <= 1.15e-178: tmp = t + (((t - x) * (a - y)) / z) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.0225) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); elseif (a <= 1.15e-178) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / 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 (a <= -0.0225) tmp = x + ((t - x) * (y / (a - z))); elseif (a <= 1.15e-178) tmp = t + (((t - x) * (a - y)) / z); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.0225], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.15e-178], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $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}\;a \leq -0.0225:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-178}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if a < -0.022499999999999999Initial program 87.0%
Taylor expanded in y around inf 59.8%
*-commutative59.8%
*-lft-identity59.8%
times-frac79.3%
/-rgt-identity79.3%
Simplified79.3%
if -0.022499999999999999 < a < 1.14999999999999997e-178Initial program 66.7%
+-commutative66.7%
remove-double-neg66.7%
unsub-neg66.7%
*-commutative66.7%
associate-*l/61.1%
associate-/l*73.8%
fma-neg73.8%
remove-double-neg73.8%
Simplified73.8%
Taylor expanded in z around inf 79.2%
associate--l+79.2%
associate-*r/79.2%
associate-*r/79.2%
mul-1-neg79.2%
div-sub81.3%
mul-1-neg81.3%
distribute-lft-out--81.3%
associate-*r/81.3%
mul-1-neg81.3%
unsub-neg81.3%
distribute-rgt-out--81.3%
Simplified81.3%
if 1.14999999999999997e-178 < a Initial program 88.3%
Taylor expanded in t around inf 73.2%
associate-/l*81.5%
Simplified81.5%
Final simplification81.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= a -7.5e-7)
(+ x (* (- t x) (/ y (- a z))))
(if (<= a 3e-136) t_1 (+ x t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (a <= -7.5e-7) {
tmp = x + ((t - x) * (y / (a - z)));
} else if (a <= 3e-136) {
tmp = t_1;
} else {
tmp = x + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
if (a <= (-7.5d-7)) then
tmp = x + ((t - x) * (y / (a - z)))
else if (a <= 3d-136) then
tmp = t_1
else
tmp = x + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (a <= -7.5e-7) {
tmp = x + ((t - x) * (y / (a - z)));
} else if (a <= 3e-136) {
tmp = t_1;
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if a <= -7.5e-7: tmp = x + ((t - x) * (y / (a - z))) elif a <= 3e-136: tmp = t_1 else: tmp = x + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (a <= -7.5e-7) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); elseif (a <= 3e-136) tmp = t_1; else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (a <= -7.5e-7) tmp = x + ((t - x) * (y / (a - z))); elseif (a <= 3e-136) tmp = t_1; else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.5e-7], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3e-136], t$95$1, N[(x + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;a \leq -7.5 \cdot 10^{-7}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;a \leq 3 \cdot 10^{-136}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + t\_1\\
\end{array}
\end{array}
if a < -7.5000000000000002e-7Initial program 83.6%
Taylor expanded in y around inf 58.7%
*-commutative58.7%
*-lft-identity58.7%
times-frac77.4%
/-rgt-identity77.4%
Simplified77.4%
if -7.5000000000000002e-7 < a < 2.9999999999999998e-136Initial program 69.0%
+-commutative69.0%
remove-double-neg69.0%
unsub-neg69.0%
*-commutative69.0%
associate-*l/62.8%
associate-/l*75.6%
fma-neg75.6%
remove-double-neg75.6%
Simplified75.6%
Taylor expanded in t around inf 75.2%
sub-neg75.2%
Applied egg-rr75.2%
sub-neg75.2%
div-sub75.2%
Simplified75.2%
if 2.9999999999999998e-136 < a Initial program 89.1%
Taylor expanded in t around inf 73.7%
associate-/l*81.8%
Simplified81.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= a -0.096)
(+ x (* y (/ (- t x) (- a z))))
(if (<= a 2.15e-134) t_1 (+ x t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (a <= -0.096) {
tmp = x + (y * ((t - x) / (a - z)));
} else if (a <= 2.15e-134) {
tmp = t_1;
} else {
tmp = x + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
if (a <= (-0.096d0)) then
tmp = x + (y * ((t - x) / (a - z)))
else if (a <= 2.15d-134) then
tmp = t_1
else
tmp = x + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (a <= -0.096) {
tmp = x + (y * ((t - x) / (a - z)));
} else if (a <= 2.15e-134) {
tmp = t_1;
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if a <= -0.096: tmp = x + (y * ((t - x) / (a - z))) elif a <= 2.15e-134: tmp = t_1 else: tmp = x + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (a <= -0.096) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / Float64(a - z)))); elseif (a <= 2.15e-134) tmp = t_1; else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (a <= -0.096) tmp = x + (y * ((t - x) / (a - z))); elseif (a <= 2.15e-134) tmp = t_1; else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.096], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.15e-134], t$95$1, N[(x + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;a \leq -0.096:\\
\;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;a \leq 2.15 \cdot 10^{-134}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + t\_1\\
\end{array}
\end{array}
if a < -0.096000000000000002Initial program 87.0%
Taylor expanded in y around inf 77.4%
if -0.096000000000000002 < a < 2.14999999999999993e-134Initial program 67.8%
+-commutative67.8%
remove-double-neg67.8%
unsub-neg67.8%
*-commutative67.8%
associate-*l/62.6%
associate-/l*75.2%
fma-neg75.1%
remove-double-neg75.1%
Simplified75.1%
Taylor expanded in t around inf 73.8%
sub-neg73.8%
Applied egg-rr73.8%
sub-neg73.8%
div-sub73.8%
Simplified73.8%
if 2.14999999999999993e-134 < a Initial program 89.1%
Taylor expanded in t around inf 73.7%
associate-/l*81.8%
Simplified81.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.15e+54) (not (<= a 1.5e+54))) (+ x (* y (/ t a))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.15e+54) || !(a <= 1.5e+54)) {
tmp = x + (y * (t / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.15d+54)) .or. (.not. (a <= 1.5d+54))) then
tmp = x + (y * (t / a))
else
tmp = t * ((y - z) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.15e+54) || !(a <= 1.5e+54)) {
tmp = x + (y * (t / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.15e+54) or not (a <= 1.5e+54): tmp = x + (y * (t / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.15e+54) || !(a <= 1.5e+54)) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.15e+54) || ~((a <= 1.5e+54))) tmp = x + (y * (t / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.15e+54], N[Not[LessEqual[a, 1.5e+54]], $MachinePrecision]], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{+54} \lor \neg \left(a \leq 1.5 \cdot 10^{+54}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if a < -1.14999999999999997e54 or 1.4999999999999999e54 < a Initial program 89.1%
Taylor expanded in z around 0 58.9%
associate-/l*70.4%
Simplified70.4%
Taylor expanded in t around inf 67.1%
if -1.14999999999999997e54 < a < 1.4999999999999999e54Initial program 74.0%
+-commutative74.0%
remove-double-neg74.0%
unsub-neg74.0%
*-commutative74.0%
associate-*l/67.0%
associate-/l*79.7%
fma-neg79.7%
remove-double-neg79.7%
Simplified79.7%
Taylor expanded in t around inf 72.8%
sub-neg72.8%
Applied egg-rr72.8%
sub-neg72.8%
div-sub72.8%
Simplified72.8%
Final simplification70.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.8e+53) (+ x (* y (/ (- t x) a))) (if (<= a 6.2e+125) (* t (/ (- y z) (- a z))) (+ x (* z (/ (- x t) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.8e+53) {
tmp = x + (y * ((t - x) / a));
} else if (a <= 6.2e+125) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (z * ((x - t) / 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 (a <= (-5.8d+53)) then
tmp = x + (y * ((t - x) / a))
else if (a <= 6.2d+125) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (z * ((x - t) / a))
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.8e+53) {
tmp = x + (y * ((t - x) / a));
} else if (a <= 6.2e+125) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (z * ((x - t) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.8e+53: tmp = x + (y * ((t - x) / a)) elif a <= 6.2e+125: tmp = t * ((y - z) / (a - z)) else: tmp = x + (z * ((x - t) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.8e+53) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (a <= 6.2e+125) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(z * Float64(Float64(x - t) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.8e+53) tmp = x + (y * ((t - x) / a)); elseif (a <= 6.2e+125) tmp = t * ((y - z) / (a - z)); else tmp = x + (z * ((x - t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.8e+53], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.2e+125], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{+53}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{+125}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{x - t}{a}\\
\end{array}
\end{array}
if a < -5.8000000000000004e53Initial program 87.2%
Taylor expanded in z around 0 59.1%
associate-/l*75.6%
Simplified75.6%
if -5.8000000000000004e53 < a < 6.2e125Initial program 75.6%
+-commutative75.6%
remove-double-neg75.6%
unsub-neg75.6%
*-commutative75.6%
associate-*l/69.2%
associate-/l*80.8%
fma-neg80.7%
remove-double-neg80.7%
Simplified80.7%
Taylor expanded in t around inf 71.6%
sub-neg71.6%
Applied egg-rr71.6%
sub-neg71.6%
div-sub71.6%
Simplified71.6%
if 6.2e125 < a Initial program 89.8%
+-commutative89.8%
remove-double-neg89.8%
unsub-neg89.8%
*-commutative89.8%
associate-*l/67.0%
associate-/l*89.1%
fma-neg89.1%
remove-double-neg89.1%
Simplified89.1%
Taylor expanded in y around 0 64.7%
mul-1-neg64.7%
associate-/l*79.4%
distribute-lft-neg-out79.4%
*-commutative79.4%
distribute-rgt-neg-out79.4%
unsub-neg79.4%
Simplified79.4%
Taylor expanded in a around inf 69.8%
Final simplification71.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.2e+54) (+ x (* y (/ (- t x) a))) (if (<= a 1.3e+53) (* t (/ (- y z) (- a z))) (+ x (* y (/ t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.2e+54) {
tmp = x + (y * ((t - x) / a));
} else if (a <= 1.3e+53) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * (t / 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 (a <= (-3.2d+54)) then
tmp = x + (y * ((t - x) / a))
else if (a <= 1.3d+53) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y * (t / a))
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.2e+54) {
tmp = x + (y * ((t - x) / a));
} else if (a <= 1.3e+53) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.2e+54: tmp = x + (y * ((t - x) / a)) elif a <= 1.3e+53: tmp = t * ((y - z) / (a - z)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.2e+54) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (a <= 1.3e+53) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.2e+54) tmp = x + (y * ((t - x) / a)); elseif (a <= 1.3e+53) tmp = t * ((y - z) / (a - z)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.2e+54], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e+53], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+54}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{+53}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if a < -3.2e54Initial program 87.2%
Taylor expanded in z around 0 59.1%
associate-/l*75.6%
Simplified75.6%
if -3.2e54 < a < 1.29999999999999999e53Initial program 74.0%
+-commutative74.0%
remove-double-neg74.0%
unsub-neg74.0%
*-commutative74.0%
associate-*l/67.0%
associate-/l*79.7%
fma-neg79.7%
remove-double-neg79.7%
Simplified79.7%
Taylor expanded in t around inf 72.8%
sub-neg72.8%
Applied egg-rr72.8%
sub-neg72.8%
div-sub72.8%
Simplified72.8%
if 1.29999999999999999e53 < a Initial program 90.5%
Taylor expanded in z around 0 58.8%
associate-/l*66.9%
Simplified66.9%
Taylor expanded in t around inf 67.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -3e+54) (+ x (* y (/ t (- a z)))) (if (<= a 1.55e+54) (* t (/ (- y z) (- a z))) (+ x (* y (/ t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3e+54) {
tmp = x + (y * (t / (a - z)));
} else if (a <= 1.55e+54) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * (t / 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 (a <= (-3d+54)) then
tmp = x + (y * (t / (a - z)))
else if (a <= 1.55d+54) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3e+54) {
tmp = x + (y * (t / (a - z)));
} else if (a <= 1.55e+54) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3e+54: tmp = x + (y * (t / (a - z))) elif a <= 1.55e+54: tmp = t * ((y - z) / (a - z)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3e+54) tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); elseif (a <= 1.55e+54) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3e+54) tmp = x + (y * (t / (a - z))); elseif (a <= 1.55e+54) tmp = t * ((y - z) / (a - z)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3e+54], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e+54], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{+54}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{+54}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if a < -2.9999999999999999e54Initial program 87.2%
Taylor expanded in y around inf 79.7%
Taylor expanded in t around inf 68.8%
if -2.9999999999999999e54 < a < 1.55e54Initial program 74.0%
+-commutative74.0%
remove-double-neg74.0%
unsub-neg74.0%
*-commutative74.0%
associate-*l/67.0%
associate-/l*79.7%
fma-neg79.7%
remove-double-neg79.7%
Simplified79.7%
Taylor expanded in t around inf 72.8%
sub-neg72.8%
Applied egg-rr72.8%
sub-neg72.8%
div-sub72.8%
Simplified72.8%
if 1.55e54 < a Initial program 90.5%
Taylor expanded in z around 0 58.8%
associate-/l*66.9%
Simplified66.9%
Taylor expanded in t around inf 67.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1e+30) (not (<= a 5e+50))) (+ x (* y (/ t a))) (* t (/ (- z y) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1e+30) || !(a <= 5e+50)) {
tmp = x + (y * (t / a));
} else {
tmp = t * ((z - 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 <= (-1d+30)) .or. (.not. (a <= 5d+50))) then
tmp = x + (y * (t / a))
else
tmp = t * ((z - 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 <= -1e+30) || !(a <= 5e+50)) {
tmp = x + (y * (t / a));
} else {
tmp = t * ((z - y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1e+30) or not (a <= 5e+50): tmp = x + (y * (t / a)) else: tmp = t * ((z - y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1e+30) || !(a <= 5e+50)) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(t * Float64(Float64(z - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1e+30) || ~((a <= 5e+50))) tmp = x + (y * (t / a)); else tmp = t * ((z - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1e+30], N[Not[LessEqual[a, 5e+50]], $MachinePrecision]], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+30} \lor \neg \left(a \leq 5 \cdot 10^{+50}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\
\end{array}
\end{array}
if a < -1e30 or 5e50 < a Initial program 89.4%
Taylor expanded in z around 0 57.4%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in t around inf 66.2%
if -1e30 < a < 5e50Initial program 73.5%
+-commutative73.5%
remove-double-neg73.5%
unsub-neg73.5%
*-commutative73.5%
associate-*l/67.6%
associate-/l*79.3%
fma-neg79.3%
remove-double-neg79.3%
Simplified79.3%
Taylor expanded in t around inf 72.9%
sub-div72.9%
clear-num72.9%
div-inv72.9%
clear-num72.8%
Applied egg-rr72.8%
Taylor expanded in a around 0 48.3%
mul-1-neg48.3%
associate-/l*60.5%
distribute-lft-neg-in60.5%
Simplified60.5%
Final simplification62.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -9.2e+29) (not (<= a 2.7e+50))) (+ x (* y (/ t a))) (* t (- 1.0 (/ y z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9.2e+29) || !(a <= 2.7e+50)) {
tmp = x + (y * (t / a));
} else {
tmp = t * (1.0 - (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 <= (-9.2d+29)) .or. (.not. (a <= 2.7d+50))) then
tmp = x + (y * (t / a))
else
tmp = t * (1.0d0 - (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 <= -9.2e+29) || !(a <= 2.7e+50)) {
tmp = x + (y * (t / a));
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -9.2e+29) or not (a <= 2.7e+50): tmp = x + (y * (t / a)) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -9.2e+29) || !(a <= 2.7e+50)) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -9.2e+29) || ~((a <= 2.7e+50))) tmp = x + (y * (t / a)); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -9.2e+29], N[Not[LessEqual[a, 2.7e+50]], $MachinePrecision]], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{+29} \lor \neg \left(a \leq 2.7 \cdot 10^{+50}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if a < -9.2000000000000004e29 or 2.7e50 < a Initial program 89.4%
Taylor expanded in z around 0 57.4%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in t around inf 66.2%
if -9.2000000000000004e29 < a < 2.7e50Initial program 73.5%
+-commutative73.5%
remove-double-neg73.5%
unsub-neg73.5%
*-commutative73.5%
associate-*l/67.6%
associate-/l*79.3%
fma-neg79.3%
remove-double-neg79.3%
Simplified79.3%
Taylor expanded in t around inf 72.9%
Taylor expanded in a around 0 60.5%
associate-*r/60.5%
neg-mul-160.5%
Simplified60.5%
Final simplification62.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.2e+107) t (if (<= z 9e+117) (+ x (* y (/ t a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e+107) {
tmp = t;
} else if (z <= 9e+117) {
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 <= (-9.2d+107)) then
tmp = t
else if (z <= 9d+117) 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 <= -9.2e+107) {
tmp = t;
} else if (z <= 9e+117) {
tmp = x + (y * (t / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.2e+107: tmp = t elif z <= 9e+117: tmp = x + (y * (t / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.2e+107) tmp = t; elseif (z <= 9e+117) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.2e+107) tmp = t; elseif (z <= 9e+117) tmp = x + (y * (t / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e+107], t, If[LessEqual[z, 9e+117], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+107}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+117}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.2000000000000001e107 or 9e117 < z Initial program 61.4%
+-commutative61.4%
remove-double-neg61.4%
unsub-neg61.4%
*-commutative61.4%
associate-*l/38.7%
associate-/l*67.8%
fma-neg67.8%
remove-double-neg67.8%
Simplified67.8%
Taylor expanded in t around inf 61.3%
Taylor expanded in z around inf 48.3%
if -9.2000000000000001e107 < z < 9e117Initial program 88.9%
Taylor expanded in z around 0 54.4%
associate-/l*59.5%
Simplified59.5%
Taylor expanded in t around inf 53.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.5e-30) t (if (<= z 2.15e-257) (* t (/ y (- a z))) (if (<= z 3.7e+92) x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.5e-30) {
tmp = t;
} else if (z <= 2.15e-257) {
tmp = t * (y / (a - z));
} else if (z <= 3.7e+92) {
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.5d-30)) then
tmp = t
else if (z <= 2.15d-257) then
tmp = t * (y / (a - z))
else if (z <= 3.7d+92) 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.5e-30) {
tmp = t;
} else if (z <= 2.15e-257) {
tmp = t * (y / (a - z));
} else if (z <= 3.7e+92) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.5e-30: tmp = t elif z <= 2.15e-257: tmp = t * (y / (a - z)) elif z <= 3.7e+92: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.5e-30) tmp = t; elseif (z <= 2.15e-257) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 3.7e+92) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.5e-30) tmp = t; elseif (z <= 2.15e-257) tmp = t * (y / (a - z)); elseif (z <= 3.7e+92) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.5e-30], t, If[LessEqual[z, 2.15e-257], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e+92], x, t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{-30}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-257}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+92}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.49999999999999995e-30 or 3.69999999999999999e92 < z Initial program 68.9%
+-commutative68.9%
remove-double-neg68.9%
unsub-neg68.9%
*-commutative68.9%
associate-*l/46.6%
associate-/l*73.3%
fma-neg73.3%
remove-double-neg73.3%
Simplified73.3%
Taylor expanded in t around inf 57.0%
Taylor expanded in z around inf 42.2%
if -1.49999999999999995e-30 < z < 2.14999999999999999e-257Initial program 91.2%
+-commutative91.2%
remove-double-neg91.2%
unsub-neg91.2%
*-commutative91.2%
associate-*l/94.2%
associate-/l*92.9%
fma-neg92.8%
remove-double-neg92.8%
Simplified92.8%
Taylor expanded in t around inf 69.1%
Taylor expanded in y around inf 56.2%
if 2.14999999999999999e-257 < z < 3.69999999999999999e92Initial program 88.9%
+-commutative88.9%
remove-double-neg88.9%
unsub-neg88.9%
*-commutative88.9%
associate-*l/81.9%
associate-/l*92.5%
fma-neg92.5%
remove-double-neg92.5%
Simplified92.5%
Taylor expanded in a around inf 41.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.4e+39) x (if (<= a 2.5e+51) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.4e+39) {
tmp = x;
} else if (a <= 2.5e+51) {
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.4d+39)) then
tmp = x
else if (a <= 2.5d+51) 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.4e+39) {
tmp = x;
} else if (a <= 2.5e+51) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.4e+39: tmp = x elif a <= 2.5e+51: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.4e+39) tmp = x; elseif (a <= 2.5e+51) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.4e+39) tmp = x; elseif (a <= 2.5e+51) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.4e+39], x, If[LessEqual[a, 2.5e+51], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{+39}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{+51}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.3999999999999999e39 or 2.5e51 < a Initial program 89.4%
+-commutative89.4%
remove-double-neg89.4%
unsub-neg89.4%
*-commutative89.4%
associate-*l/69.0%
associate-/l*89.5%
fma-neg89.5%
remove-double-neg89.5%
Simplified89.5%
Taylor expanded in a around inf 51.3%
if -3.3999999999999999e39 < a < 2.5e51Initial program 73.5%
+-commutative73.5%
remove-double-neg73.5%
unsub-neg73.5%
*-commutative73.5%
associate-*l/67.6%
associate-/l*79.3%
fma-neg79.3%
remove-double-neg79.3%
Simplified79.3%
Taylor expanded in t around inf 72.9%
Taylor expanded in z around inf 36.4%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 80.0%
+-commutative80.0%
remove-double-neg80.0%
unsub-neg80.0%
*-commutative80.0%
associate-*l/68.2%
associate-/l*83.5%
fma-neg83.4%
remove-double-neg83.4%
Simplified83.4%
Taylor expanded in t around inf 56.6%
Taylor expanded in z around inf 25.5%
herbie shell --seed 2024146
(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)))))