
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-292) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(- t (/ (* (- t x) (- y a)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-292) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-292) || !(t_1 <= 0.0)) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-292], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-292} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.0000000000000001e-292 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.4%
+-commutative90.4%
remove-double-neg90.4%
unsub-neg90.4%
*-commutative90.4%
associate-*l/78.8%
associate-/l*93.9%
fma-neg93.9%
remove-double-neg93.9%
Simplified93.9%
if -2.0000000000000001e-292 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.3%
+-commutative3.3%
remove-double-neg3.3%
unsub-neg3.3%
*-commutative3.3%
associate-*l/3.9%
associate-/l*3.3%
fma-neg3.3%
remove-double-neg3.3%
Simplified3.3%
Taylor expanded in z around inf 89.6%
associate--l+89.6%
associate-*r/89.6%
associate-*r/89.6%
mul-1-neg89.6%
div-sub89.6%
mul-1-neg89.6%
distribute-lft-out--89.6%
associate-*r/89.6%
mul-1-neg89.6%
unsub-neg89.6%
distribute-rgt-out--89.6%
Simplified89.6%
Final simplification93.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_2 -0.0001)
t_1
(if (<= t_2 -2e-292)
(+ x (* t (+ (/ (- y z) (- a z)) (* (/ x t) (/ (- y z) (- z a))))))
(if (<= t_2 1e-285) (- t (/ (* (- t x) (- y a)) z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) / ((a - z) / (t - x)));
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -0.0001) {
tmp = t_1;
} else if (t_2 <= -2e-292) {
tmp = x + (t * (((y - z) / (a - z)) + ((x / t) * ((y - z) / (z - a)))));
} else if (t_2 <= 1e-285) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((y - z) / ((a - z) / (t - x)))
t_2 = x + ((y - z) * ((t - x) / (a - z)))
if (t_2 <= (-0.0001d0)) then
tmp = t_1
else if (t_2 <= (-2d-292)) then
tmp = x + (t * (((y - z) / (a - z)) + ((x / t) * ((y - z) / (z - a)))))
else if (t_2 <= 1d-285) then
tmp = t - (((t - x) * (y - a)) / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) / ((a - z) / (t - x)));
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -0.0001) {
tmp = t_1;
} else if (t_2 <= -2e-292) {
tmp = x + (t * (((y - z) / (a - z)) + ((x / t) * ((y - z) / (z - a)))));
} else if (t_2 <= 1e-285) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) / ((a - z) / (t - x))) t_2 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_2 <= -0.0001: tmp = t_1 elif t_2 <= -2e-292: tmp = x + (t * (((y - z) / (a - z)) + ((x / t) * ((y - z) / (z - a))))) elif t_2 <= 1e-285: tmp = t - (((t - x) * (y - a)) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_2 <= -0.0001) tmp = t_1; elseif (t_2 <= -2e-292) tmp = Float64(x + Float64(t * Float64(Float64(Float64(y - z) / Float64(a - z)) + Float64(Float64(x / t) * Float64(Float64(y - z) / Float64(z - a)))))); elseif (t_2 <= 1e-285) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) / ((a - z) / (t - x))); t_2 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if (t_2 <= -0.0001) tmp = t_1; elseif (t_2 <= -2e-292) tmp = x + (t * (((y - z) / (a - z)) + ((x / t) * ((y - z) / (z - a))))); elseif (t_2 <= 1e-285) tmp = t - (((t - x) * (y - a)) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -0.0001], t$95$1, If[LessEqual[t$95$2, -2e-292], N[(x + N[(t * N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + N[(N[(x / t), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-285], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_2 \leq -0.0001:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-292}:\\
\;\;\;\;x + t \cdot \left(\frac{y - z}{a - z} + \frac{x}{t} \cdot \frac{y - z}{z - a}\right)\\
\mathbf{elif}\;t\_2 \leq 10^{-285}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000005e-4 or 1.00000000000000007e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 93.5%
clear-num93.4%
un-div-inv93.6%
Applied egg-rr93.6%
if -1.00000000000000005e-4 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.0000000000000001e-292Initial program 66.6%
Taylor expanded in t around inf 87.3%
associate--l+87.3%
mul-1-neg87.3%
times-frac87.5%
div-sub87.6%
Simplified87.6%
if -2.0000000000000001e-292 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.00000000000000007e-285Initial program 3.4%
+-commutative3.4%
remove-double-neg3.4%
unsub-neg3.4%
*-commutative3.4%
associate-*l/7.2%
associate-/l*6.7%
fma-neg6.7%
remove-double-neg6.7%
Simplified6.7%
Taylor expanded in z around inf 90.0%
associate--l+90.0%
associate-*r/90.0%
associate-*r/90.0%
mul-1-neg90.0%
div-sub90.0%
mul-1-neg90.0%
distribute-lft-out--90.0%
associate-*r/90.0%
mul-1-neg90.0%
unsub-neg90.0%
distribute-rgt-out--90.0%
Simplified90.0%
Final simplification92.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-292) (not (<= t_1 1e-285)))
t_1
(- t (/ (* (- t x) (- y a)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-292) || !(t_1 <= 1e-285)) {
tmp = t_1;
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-292)) .or. (.not. (t_1 <= 1d-285))) then
tmp = t_1
else
tmp = t - (((t - x) * (y - a)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-292) || !(t_1 <= 1e-285)) {
tmp = t_1;
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-292) or not (t_1 <= 1e-285): tmp = t_1 else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-292) || !(t_1 <= 1e-285)) tmp = t_1; else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -2e-292) || ~((t_1 <= 1e-285))) tmp = t_1; else tmp = t - (((t - x) * (y - a)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-292], N[Not[LessEqual[t$95$1, 1e-285]], $MachinePrecision]], t$95$1, N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-292} \lor \neg \left(t\_1 \leq 10^{-285}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.0000000000000001e-292 or 1.00000000000000007e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.8%
if -2.0000000000000001e-292 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.00000000000000007e-285Initial program 3.4%
+-commutative3.4%
remove-double-neg3.4%
unsub-neg3.4%
*-commutative3.4%
associate-*l/7.2%
associate-/l*6.7%
fma-neg6.7%
remove-double-neg6.7%
Simplified6.7%
Taylor expanded in z around inf 90.0%
associate--l+90.0%
associate-*r/90.0%
associate-*r/90.0%
mul-1-neg90.0%
div-sub90.0%
mul-1-neg90.0%
distribute-lft-out--90.0%
associate-*r/90.0%
mul-1-neg90.0%
unsub-neg90.0%
distribute-rgt-out--90.0%
Simplified90.0%
Final simplification90.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -2e-292)
t_1
(if (<= t_1 1e-285)
(- t (/ (* (- t x) (- y a)) z))
(+ x (/ (- y z) (/ (- a z) (- t x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -2e-292) {
tmp = t_1;
} else if (t_1 <= 1e-285) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = x + ((y - z) / ((a - z) / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if (t_1 <= (-2d-292)) then
tmp = t_1
else if (t_1 <= 1d-285) then
tmp = t - (((t - x) * (y - a)) / z)
else
tmp = x + ((y - z) / ((a - z) / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -2e-292) {
tmp = t_1;
} else if (t_1 <= 1e-285) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = x + ((y - z) / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_1 <= -2e-292: tmp = t_1 elif t_1 <= 1e-285: tmp = t - (((t - x) * (y - a)) / z) else: tmp = x + ((y - z) / ((a - z) / (t - x))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= -2e-292) tmp = t_1; elseif (t_1 <= 1e-285) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); else tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if (t_1 <= -2e-292) tmp = t_1; elseif (t_1 <= 1e-285) tmp = t - (((t - x) * (y - a)) / z); else tmp = x + ((y - z) / ((a - z) / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-292], t$95$1, If[LessEqual[t$95$1, 1e-285], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-292}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{-285}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.0000000000000001e-292Initial program 90.9%
if -2.0000000000000001e-292 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.00000000000000007e-285Initial program 3.4%
+-commutative3.4%
remove-double-neg3.4%
unsub-neg3.4%
*-commutative3.4%
associate-*l/7.2%
associate-/l*6.7%
fma-neg6.7%
remove-double-neg6.7%
Simplified6.7%
Taylor expanded in z around inf 90.0%
associate--l+90.0%
associate-*r/90.0%
associate-*r/90.0%
mul-1-neg90.0%
div-sub90.0%
mul-1-neg90.0%
distribute-lft-out--90.0%
associate-*r/90.0%
mul-1-neg90.0%
unsub-neg90.0%
distribute-rgt-out--90.0%
Simplified90.0%
if 1.00000000000000007e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.7%
clear-num90.6%
un-div-inv90.7%
Applied egg-rr90.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y z) (/ (- a z) t))))
(if (<= z -5.7e+180)
(+ t (* a (/ (- t x) z)))
(if (<= z -1.52e-106)
t_1
(if (<= z 0.0295)
(+ x (/ y (/ a (- t x))))
(if (<= z 5.3e+116) t_1 (+ t (/ (* x y) z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) / ((a - z) / t);
double tmp;
if (z <= -5.7e+180) {
tmp = t + (a * ((t - x) / z));
} else if (z <= -1.52e-106) {
tmp = t_1;
} else if (z <= 0.0295) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 5.3e+116) {
tmp = t_1;
} else {
tmp = t + ((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) :: t_1
real(8) :: tmp
t_1 = (y - z) / ((a - z) / t)
if (z <= (-5.7d+180)) then
tmp = t + (a * ((t - x) / z))
else if (z <= (-1.52d-106)) then
tmp = t_1
else if (z <= 0.0295d0) then
tmp = x + (y / (a / (t - x)))
else if (z <= 5.3d+116) then
tmp = t_1
else
tmp = t + ((x * 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 = (y - z) / ((a - z) / t);
double tmp;
if (z <= -5.7e+180) {
tmp = t + (a * ((t - x) / z));
} else if (z <= -1.52e-106) {
tmp = t_1;
} else if (z <= 0.0295) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 5.3e+116) {
tmp = t_1;
} else {
tmp = t + ((x * y) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - z) / ((a - z) / t) tmp = 0 if z <= -5.7e+180: tmp = t + (a * ((t - x) / z)) elif z <= -1.52e-106: tmp = t_1 elif z <= 0.0295: tmp = x + (y / (a / (t - x))) elif z <= 5.3e+116: tmp = t_1 else: tmp = t + ((x * y) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - z) / Float64(Float64(a - z) / t)) tmp = 0.0 if (z <= -5.7e+180) tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); elseif (z <= -1.52e-106) tmp = t_1; elseif (z <= 0.0295) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (z <= 5.3e+116) tmp = t_1; else tmp = Float64(t + Float64(Float64(x * y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - z) / ((a - z) / t); tmp = 0.0; if (z <= -5.7e+180) tmp = t + (a * ((t - x) / z)); elseif (z <= -1.52e-106) tmp = t_1; elseif (z <= 0.0295) tmp = x + (y / (a / (t - x))); elseif (z <= 5.3e+116) tmp = t_1; else tmp = t + ((x * y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.7e+180], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.52e-106], t$95$1, If[LessEqual[z, 0.0295], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.3e+116], t$95$1, N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{if}\;z \leq -5.7 \cdot 10^{+180}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq -1.52 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.0295:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\
\end{array}
\end{array}
if z < -5.7000000000000002e180Initial program 45.7%
Taylor expanded in y around 0 16.2%
mul-1-neg16.2%
distribute-neg-frac16.2%
*-commutative16.2%
distribute-rgt-neg-out16.2%
Simplified16.2%
Taylor expanded in z around inf 61.7%
associate-*r/71.3%
Simplified71.3%
if -5.7000000000000002e180 < z < -1.5200000000000001e-106 or 0.029499999999999998 < z < 5.3000000000000002e116Initial program 81.1%
clear-num81.0%
un-div-inv81.1%
Applied egg-rr81.1%
Taylor expanded in a around 0 81.2%
+-commutative81.2%
mul-1-neg81.2%
sub-neg81.2%
Simplified81.2%
Taylor expanded in x around 0 65.7%
div-sub65.7%
div-sub65.7%
Simplified65.7%
if -1.5200000000000001e-106 < z < 0.029499999999999998Initial program 94.9%
clear-num94.8%
un-div-inv95.0%
Applied egg-rr95.0%
Taylor expanded in y around inf 91.0%
Taylor expanded in a around inf 81.3%
if 5.3000000000000002e116 < z Initial program 59.7%
Taylor expanded in a around 0 43.8%
mul-1-neg43.8%
distribute-neg-frac243.8%
Simplified43.8%
Taylor expanded in y around 0 70.9%
div-sub70.9%
associate-*r*70.9%
mul-1-neg70.9%
Simplified70.9%
Taylor expanded in t around 0 71.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.5e+85)
(+ t (* a (/ (- t x) z)))
(if (<= z -7.5e-66)
(+ x (* y (/ (- x t) z)))
(if (<= z 5.6e+24) (+ x (/ y (/ a (- t x)))) (+ t (/ (* x y) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e+85) {
tmp = t + (a * ((t - x) / z));
} else if (z <= -7.5e-66) {
tmp = x + (y * ((x - t) / z));
} else if (z <= 5.6e+24) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t + ((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 (z <= (-8.5d+85)) then
tmp = t + (a * ((t - x) / z))
else if (z <= (-7.5d-66)) then
tmp = x + (y * ((x - t) / z))
else if (z <= 5.6d+24) then
tmp = x + (y / (a / (t - x)))
else
tmp = t + ((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 (z <= -8.5e+85) {
tmp = t + (a * ((t - x) / z));
} else if (z <= -7.5e-66) {
tmp = x + (y * ((x - t) / z));
} else if (z <= 5.6e+24) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t + ((x * y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.5e+85: tmp = t + (a * ((t - x) / z)) elif z <= -7.5e-66: tmp = x + (y * ((x - t) / z)) elif z <= 5.6e+24: tmp = x + (y / (a / (t - x))) else: tmp = t + ((x * y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.5e+85) tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); elseif (z <= -7.5e-66) tmp = Float64(x + Float64(y * Float64(Float64(x - t) / z))); elseif (z <= 5.6e+24) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); else tmp = Float64(t + Float64(Float64(x * y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.5e+85) tmp = t + (a * ((t - x) / z)); elseif (z <= -7.5e-66) tmp = x + (y * ((x - t) / z)); elseif (z <= 5.6e+24) tmp = x + (y / (a / (t - x))); else tmp = t + ((x * y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.5e+85], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.5e-66], N[(x + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e+24], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+85}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-66}:\\
\;\;\;\;x + y \cdot \frac{x - t}{z}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\
\end{array}
\end{array}
if z < -8.4999999999999994e85Initial program 59.0%
Taylor expanded in y around 0 22.7%
mul-1-neg22.7%
distribute-neg-frac22.7%
*-commutative22.7%
distribute-rgt-neg-out22.7%
Simplified22.7%
Taylor expanded in z around inf 55.8%
associate-*r/63.3%
Simplified63.3%
if -8.4999999999999994e85 < z < -7.49999999999999995e-66Initial program 88.9%
clear-num88.9%
un-div-inv89.0%
Applied egg-rr89.0%
Taylor expanded in y around inf 76.7%
Taylor expanded in a around 0 55.6%
mul-1-neg55.6%
associate-*r/58.9%
unsub-neg58.9%
Simplified58.9%
if -7.49999999999999995e-66 < z < 5.6000000000000003e24Initial program 92.4%
clear-num92.4%
un-div-inv92.5%
Applied egg-rr92.5%
Taylor expanded in y around inf 87.4%
Taylor expanded in a around inf 78.4%
if 5.6000000000000003e24 < z Initial program 68.8%
Taylor expanded in a around 0 48.2%
mul-1-neg48.2%
distribute-neg-frac248.2%
Simplified48.2%
Taylor expanded in y around 0 69.7%
div-sub69.7%
associate-*r*69.7%
mul-1-neg69.7%
Simplified69.7%
Taylor expanded in t around 0 62.0%
Final simplification70.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.05e+72) (not (<= z 9.5e+26))) (+ t (* y (/ (- x t) z))) (+ x (/ y (/ (- a z) (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.05e+72) || !(z <= 9.5e+26)) {
tmp = t + (y * ((x - t) / 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 ((z <= (-3.05d+72)) .or. (.not. (z <= 9.5d+26))) then
tmp = t + (y * ((x - t) / 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 ((z <= -3.05e+72) || !(z <= 9.5e+26)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (y / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.05e+72) or not (z <= 9.5e+26): tmp = t + (y * ((x - t) / z)) else: tmp = x + (y / ((a - z) / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.05e+72) || !(z <= 9.5e+26)) tmp = Float64(t + Float64(y * Float64(Float64(x - t) / 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 ((z <= -3.05e+72) || ~((z <= 9.5e+26))) tmp = t + (y * ((x - t) / z)); else tmp = x + (y / ((a - z) / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.05e+72], N[Not[LessEqual[z, 9.5e+26]], $MachinePrecision]], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $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}\;z \leq -3.05 \cdot 10^{+72} \lor \neg \left(z \leq 9.5 \cdot 10^{+26}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if z < -3.04999999999999996e72 or 9.50000000000000054e26 < z Initial program 64.3%
Taylor expanded in a around 0 46.9%
mul-1-neg46.9%
distribute-neg-frac246.9%
Simplified46.9%
Taylor expanded in y around 0 69.6%
div-sub69.6%
associate-*r*69.6%
mul-1-neg69.6%
Simplified69.6%
if -3.04999999999999996e72 < z < 9.50000000000000054e26Initial program 92.2%
clear-num92.2%
un-div-inv92.3%
Applied egg-rr92.3%
Taylor expanded in y around inf 86.4%
Final simplification79.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3e+72) (not (<= z 2.8e+27))) (+ t (* y (/ (- x t) z))) (+ x (* y (/ (- t x) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3e+72) || !(z <= 2.8e+27)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (y * ((t - x) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3d+72)) .or. (.not. (z <= 2.8d+27))) then
tmp = t + (y * ((x - t) / z))
else
tmp = x + (y * ((t - x) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3e+72) || !(z <= 2.8e+27)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (y * ((t - x) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3e+72) or not (z <= 2.8e+27): tmp = t + (y * ((x - t) / z)) else: tmp = x + (y * ((t - x) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3e+72) || !(z <= 2.8e+27)) tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3e+72) || ~((z <= 2.8e+27))) tmp = t + (y * ((x - t) / z)); else tmp = x + (y * ((t - x) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3e+72], N[Not[LessEqual[z, 2.8e+27]], $MachinePrecision]], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+72} \lor \neg \left(z \leq 2.8 \cdot 10^{+27}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
\end{array}
\end{array}
if z < -3.00000000000000003e72 or 2.7999999999999999e27 < z Initial program 64.3%
Taylor expanded in a around 0 46.9%
mul-1-neg46.9%
distribute-neg-frac246.9%
Simplified46.9%
Taylor expanded in y around 0 69.6%
div-sub69.6%
associate-*r*69.6%
mul-1-neg69.6%
Simplified69.6%
if -3.00000000000000003e72 < z < 2.7999999999999999e27Initial program 92.2%
Taylor expanded in y around inf 86.4%
Final simplification79.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -3.9e+130) (not (<= x 2.1e+54))) (* 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 <= -3.9e+130) || !(x <= 2.1e+54)) {
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 <= (-3.9d+130)) .or. (.not. (x <= 2.1d+54))) 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 <= -3.9e+130) || !(x <= 2.1e+54)) {
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 <= -3.9e+130) or not (x <= 2.1e+54): 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 <= -3.9e+130) || !(x <= 2.1e+54)) 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 <= -3.9e+130) || ~((x <= 2.1e+54))) 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, -3.9e+130], N[Not[LessEqual[x, 2.1e+54]], $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 -3.9 \cdot 10^{+130} \lor \neg \left(x \leq 2.1 \cdot 10^{+54}\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 < -3.9000000000000002e130 or 2.09999999999999986e54 < x Initial program 75.3%
+-commutative75.3%
remove-double-neg75.3%
unsub-neg75.3%
*-commutative75.3%
associate-*l/62.2%
associate-/l*77.0%
fma-neg77.1%
remove-double-neg77.1%
Simplified77.1%
Taylor expanded in t around 0 59.8%
mul-1-neg59.8%
*-rgt-identity59.8%
associate-/l*72.5%
distribute-rgt-neg-in72.5%
mul-1-neg72.5%
distribute-lft-in72.6%
mul-1-neg72.6%
unsub-neg72.6%
Simplified72.6%
if -3.9000000000000002e130 < x < 2.09999999999999986e54Initial program 83.7%
Taylor expanded in t around inf 64.0%
associate-/l*76.2%
Simplified76.2%
Final simplification74.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.08e-106) (not (<= z 1e+26))) (+ t (* y (/ (- x t) z))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.08e-106) || !(z <= 1e+26)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.08d-106)) .or. (.not. (z <= 1d+26))) then
tmp = t + (y * ((x - t) / z))
else
tmp = x + (y / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.08e-106) || !(z <= 1e+26)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.08e-106) or not (z <= 1e+26): tmp = t + (y * ((x - t) / z)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.08e-106) || !(z <= 1e+26)) tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.08e-106) || ~((z <= 1e+26))) tmp = t + (y * ((x - t) / z)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.08e-106], N[Not[LessEqual[z, 1e+26]], $MachinePrecision]], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.08 \cdot 10^{-106} \lor \neg \left(z \leq 10^{+26}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -2.0800000000000001e-106 or 1.00000000000000005e26 < z Initial program 68.9%
Taylor expanded in a around 0 47.8%
mul-1-neg47.8%
distribute-neg-frac247.8%
Simplified47.8%
Taylor expanded in y around 0 66.5%
div-sub66.5%
associate-*r*66.5%
mul-1-neg66.5%
Simplified66.5%
if -2.0800000000000001e-106 < z < 1.00000000000000005e26Initial program 93.6%
clear-num93.5%
un-div-inv93.7%
Applied egg-rr93.7%
Taylor expanded in y around inf 89.9%
Taylor expanded in a around inf 80.6%
Final simplification73.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.15e+75) (+ t (* a (/ (- t x) z))) (if (<= z 2.8e+27) (+ x (/ y (/ a (- t x)))) (+ t (/ (* x y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+75) {
tmp = t + (a * ((t - x) / z));
} else if (z <= 2.8e+27) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t + ((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 (z <= (-1.15d+75)) then
tmp = t + (a * ((t - x) / z))
else if (z <= 2.8d+27) then
tmp = x + (y / (a / (t - x)))
else
tmp = t + ((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 (z <= -1.15e+75) {
tmp = t + (a * ((t - x) / z));
} else if (z <= 2.8e+27) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t + ((x * y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e+75: tmp = t + (a * ((t - x) / z)) elif z <= 2.8e+27: tmp = x + (y / (a / (t - x))) else: tmp = t + ((x * y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e+75) tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); elseif (z <= 2.8e+27) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); else tmp = Float64(t + Float64(Float64(x * y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.15e+75) tmp = t + (a * ((t - x) / z)); elseif (z <= 2.8e+27) tmp = x + (y / (a / (t - x))); else tmp = t + ((x * y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+75], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+27], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+75}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+27}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\
\end{array}
\end{array}
if z < -1.1499999999999999e75Initial program 58.7%
Taylor expanded in y around 0 21.9%
mul-1-neg21.9%
distribute-neg-frac21.9%
*-commutative21.9%
distribute-rgt-neg-out21.9%
Simplified21.9%
Taylor expanded in z around inf 55.5%
associate-*r/62.8%
Simplified62.8%
if -1.1499999999999999e75 < z < 2.7999999999999999e27Initial program 92.3%
clear-num92.3%
un-div-inv92.4%
Applied egg-rr92.4%
Taylor expanded in y around inf 86.0%
Taylor expanded in a around inf 72.4%
if 2.7999999999999999e27 < z Initial program 68.8%
Taylor expanded in a around 0 48.2%
mul-1-neg48.2%
distribute-neg-frac248.2%
Simplified48.2%
Taylor expanded in y around 0 69.7%
div-sub69.7%
associate-*r*69.7%
mul-1-neg69.7%
Simplified69.7%
Taylor expanded in t around 0 62.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -7e+75) (+ t (* a (/ (- t x) z))) (if (<= z 4.6e+26) (+ x (* y (/ (- t x) a))) (+ t (/ (* x y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7e+75) {
tmp = t + (a * ((t - x) / z));
} else if (z <= 4.6e+26) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t + ((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 (z <= (-7d+75)) then
tmp = t + (a * ((t - x) / z))
else if (z <= 4.6d+26) then
tmp = x + (y * ((t - x) / a))
else
tmp = t + ((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 (z <= -7e+75) {
tmp = t + (a * ((t - x) / z));
} else if (z <= 4.6e+26) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t + ((x * y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7e+75: tmp = t + (a * ((t - x) / z)) elif z <= 4.6e+26: tmp = x + (y * ((t - x) / a)) else: tmp = t + ((x * y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7e+75) tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); elseif (z <= 4.6e+26) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = Float64(t + Float64(Float64(x * y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7e+75) tmp = t + (a * ((t - x) / z)); elseif (z <= 4.6e+26) tmp = x + (y * ((t - x) / a)); else tmp = t + ((x * y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7e+75], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+26], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+75}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+26}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\
\end{array}
\end{array}
if z < -6.9999999999999997e75Initial program 58.7%
Taylor expanded in y around 0 21.9%
mul-1-neg21.9%
distribute-neg-frac21.9%
*-commutative21.9%
distribute-rgt-neg-out21.9%
Simplified21.9%
Taylor expanded in z around inf 55.5%
associate-*r/62.8%
Simplified62.8%
if -6.9999999999999997e75 < z < 4.6000000000000001e26Initial program 92.3%
Taylor expanded in z around 0 68.2%
associate-/l*72.3%
Simplified72.3%
if 4.6000000000000001e26 < z Initial program 68.8%
Taylor expanded in a around 0 48.2%
mul-1-neg48.2%
distribute-neg-frac248.2%
Simplified48.2%
Taylor expanded in y around 0 69.7%
div-sub69.7%
associate-*r*69.7%
mul-1-neg69.7%
Simplified69.7%
Taylor expanded in t around 0 62.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.35e+75) (+ t (* a (/ (- t x) z))) (if (<= z 5.3e+29) (+ x (* t (/ (- y z) a))) (+ t (/ (* x y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e+75) {
tmp = t + (a * ((t - x) / z));
} else if (z <= 5.3e+29) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t + ((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 (z <= (-1.35d+75)) then
tmp = t + (a * ((t - x) / z))
else if (z <= 5.3d+29) then
tmp = x + (t * ((y - z) / a))
else
tmp = t + ((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 (z <= -1.35e+75) {
tmp = t + (a * ((t - x) / z));
} else if (z <= 5.3e+29) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t + ((x * y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.35e+75: tmp = t + (a * ((t - x) / z)) elif z <= 5.3e+29: tmp = x + (t * ((y - z) / a)) else: tmp = t + ((x * y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.35e+75) tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); elseif (z <= 5.3e+29) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); else tmp = Float64(t + Float64(Float64(x * y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.35e+75) tmp = t + (a * ((t - x) / z)); elseif (z <= 5.3e+29) tmp = x + (t * ((y - z) / a)); else tmp = t + ((x * y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e+75], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.3e+29], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+75}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{+29}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\
\end{array}
\end{array}
if z < -1.34999999999999999e75Initial program 58.7%
Taylor expanded in y around 0 21.9%
mul-1-neg21.9%
distribute-neg-frac21.9%
*-commutative21.9%
distribute-rgt-neg-out21.9%
Simplified21.9%
Taylor expanded in z around inf 55.5%
associate-*r/62.8%
Simplified62.8%
if -1.34999999999999999e75 < z < 5.3e29Initial program 92.4%
Taylor expanded in t around inf 67.9%
associate-/l*70.3%
Simplified70.3%
Taylor expanded in a around inf 56.5%
associate-/l*59.5%
Simplified59.5%
if 5.3e29 < z Initial program 68.2%
Taylor expanded in a around 0 49.1%
mul-1-neg49.1%
distribute-neg-frac249.1%
Simplified49.1%
Taylor expanded in y around 0 71.1%
div-sub71.1%
associate-*r*71.1%
mul-1-neg71.1%
Simplified71.1%
Taylor expanded in t around 0 63.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.3e+72) (- t (* a (/ x z))) (if (<= z 0.0049) (* x (+ (/ y (- z a)) 1.0)) (+ t (/ (* x y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+72) {
tmp = t - (a * (x / z));
} else if (z <= 0.0049) {
tmp = x * ((y / (z - a)) + 1.0);
} else {
tmp = t + ((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 (z <= (-2.3d+72)) then
tmp = t - (a * (x / z))
else if (z <= 0.0049d0) then
tmp = x * ((y / (z - a)) + 1.0d0)
else
tmp = t + ((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 (z <= -2.3e+72) {
tmp = t - (a * (x / z));
} else if (z <= 0.0049) {
tmp = x * ((y / (z - a)) + 1.0);
} else {
tmp = t + ((x * y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e+72: tmp = t - (a * (x / z)) elif z <= 0.0049: tmp = x * ((y / (z - a)) + 1.0) else: tmp = t + ((x * y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e+72) tmp = Float64(t - Float64(a * Float64(x / z))); elseif (z <= 0.0049) tmp = Float64(x * Float64(Float64(y / Float64(z - a)) + 1.0)); else tmp = Float64(t + Float64(Float64(x * y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.3e+72) tmp = t - (a * (x / z)); elseif (z <= 0.0049) tmp = x * ((y / (z - a)) + 1.0); else tmp = t + ((x * y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+72], N[(t - N[(a * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0049], N[(x * N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+72}:\\
\;\;\;\;t - a \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 0.0049:\\
\;\;\;\;x \cdot \left(\frac{y}{z - a} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\
\end{array}
\end{array}
if z < -2.3e72Initial program 60.2%
Taylor expanded in y around 0 24.8%
mul-1-neg24.8%
distribute-neg-frac24.8%
*-commutative24.8%
distribute-rgt-neg-out24.8%
Simplified24.8%
Taylor expanded in z around inf 53.5%
Taylor expanded in t around 0 57.1%
mul-1-neg57.1%
associate-/l*60.6%
distribute-lft-neg-in60.6%
Simplified60.6%
if -2.3e72 < z < 0.0048999999999999998Initial program 93.2%
clear-num93.1%
un-div-inv93.3%
Applied egg-rr93.3%
Taylor expanded in y around inf 87.1%
Taylor expanded in x around inf 60.9%
mul-1-neg60.9%
unsub-neg60.9%
Simplified60.9%
if 0.0048999999999999998 < z Initial program 69.3%
Taylor expanded in a around 0 46.1%
mul-1-neg46.1%
distribute-neg-frac246.1%
Simplified46.1%
Taylor expanded in y around 0 66.7%
div-sub66.7%
associate-*r*66.7%
mul-1-neg66.7%
Simplified66.7%
Taylor expanded in t around 0 57.2%
Final simplification60.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.2e+85) (not (<= z 7.5e-5))) (* t (+ (/ a z) 1.0)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.2e+85) || !(z <= 7.5e-5)) {
tmp = t * ((a / z) + 1.0);
} 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 ((z <= (-4.2d+85)) .or. (.not. (z <= 7.5d-5))) then
tmp = t * ((a / z) + 1.0d0)
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 ((z <= -4.2e+85) || !(z <= 7.5e-5)) {
tmp = t * ((a / z) + 1.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.2e+85) or not (z <= 7.5e-5): tmp = t * ((a / z) + 1.0) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.2e+85) || !(z <= 7.5e-5)) tmp = Float64(t * Float64(Float64(a / z) + 1.0)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.2e+85) || ~((z <= 7.5e-5))) tmp = t * ((a / z) + 1.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.2e+85], N[Not[LessEqual[z, 7.5e-5]], $MachinePrecision]], N[(t * N[(N[(a / z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+85} \lor \neg \left(z \leq 7.5 \cdot 10^{-5}\right):\\
\;\;\;\;t \cdot \left(\frac{a}{z} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.2000000000000002e85 or 7.49999999999999934e-5 < z Initial program 64.8%
Taylor expanded in y around 0 28.5%
mul-1-neg28.5%
distribute-neg-frac28.5%
*-commutative28.5%
distribute-rgt-neg-out28.5%
Simplified28.5%
Taylor expanded in z around inf 49.2%
Taylor expanded in t around inf 45.6%
if -4.2000000000000002e85 < z < 7.49999999999999934e-5Initial program 92.6%
+-commutative92.6%
remove-double-neg92.6%
unsub-neg92.6%
*-commutative92.6%
associate-*l/88.7%
associate-/l*93.6%
fma-neg93.7%
remove-double-neg93.7%
Simplified93.7%
Taylor expanded in a around inf 32.3%
Final simplification37.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.4e+74) (- t (* a (/ x z))) (if (<= z 7.5e+23) (+ x (* t (/ y a))) (+ t (/ (* x y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+74) {
tmp = t - (a * (x / z));
} else if (z <= 7.5e+23) {
tmp = x + (t * (y / a));
} else {
tmp = t + ((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 (z <= (-2.4d+74)) then
tmp = t - (a * (x / z))
else if (z <= 7.5d+23) then
tmp = x + (t * (y / a))
else
tmp = t + ((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 (z <= -2.4e+74) {
tmp = t - (a * (x / z));
} else if (z <= 7.5e+23) {
tmp = x + (t * (y / a));
} else {
tmp = t + ((x * y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.4e+74: tmp = t - (a * (x / z)) elif z <= 7.5e+23: tmp = x + (t * (y / a)) else: tmp = t + ((x * y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.4e+74) tmp = Float64(t - Float64(a * Float64(x / z))); elseif (z <= 7.5e+23) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t + Float64(Float64(x * y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.4e+74) tmp = t - (a * (x / z)); elseif (z <= 7.5e+23) tmp = x + (t * (y / a)); else tmp = t + ((x * y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e+74], N[(t - N[(a * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+23], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+74}:\\
\;\;\;\;t - a \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+23}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\
\end{array}
\end{array}
if z < -2.40000000000000008e74Initial program 58.7%
Taylor expanded in y around 0 21.9%
mul-1-neg21.9%
distribute-neg-frac21.9%
*-commutative21.9%
distribute-rgt-neg-out21.9%
Simplified21.9%
Taylor expanded in z around inf 55.5%
Taylor expanded in t around 0 59.0%
mul-1-neg59.0%
associate-/l*62.7%
distribute-lft-neg-in62.7%
Simplified62.7%
if -2.40000000000000008e74 < z < 7.49999999999999987e23Initial program 92.3%
Taylor expanded in t around inf 67.7%
associate-/l*70.1%
Simplified70.1%
Taylor expanded in z around 0 52.7%
associate-/l*56.3%
Simplified56.3%
if 7.49999999999999987e23 < z Initial program 68.8%
Taylor expanded in a around 0 48.2%
mul-1-neg48.2%
distribute-neg-frac248.2%
Simplified48.2%
Taylor expanded in y around 0 69.7%
div-sub69.7%
associate-*r*69.7%
mul-1-neg69.7%
Simplified69.7%
Taylor expanded in t around 0 62.0%
Final simplification58.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.4e-90) (* t (- 1.0 (/ y z))) (if (<= z 2e+27) (+ x (* t (/ y a))) (+ t (/ (* x y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.4e-90) {
tmp = t * (1.0 - (y / z));
} else if (z <= 2e+27) {
tmp = x + (t * (y / a));
} else {
tmp = t + ((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 (z <= (-3.4d-90)) then
tmp = t * (1.0d0 - (y / z))
else if (z <= 2d+27) then
tmp = x + (t * (y / a))
else
tmp = t + ((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 (z <= -3.4e-90) {
tmp = t * (1.0 - (y / z));
} else if (z <= 2e+27) {
tmp = x + (t * (y / a));
} else {
tmp = t + ((x * y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.4e-90: tmp = t * (1.0 - (y / z)) elif z <= 2e+27: tmp = x + (t * (y / a)) else: tmp = t + ((x * y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.4e-90) tmp = Float64(t * Float64(1.0 - Float64(y / z))); elseif (z <= 2e+27) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t + Float64(Float64(x * y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.4e-90) tmp = t * (1.0 - (y / z)); elseif (z <= 2e+27) tmp = x + (t * (y / a)); else tmp = t + ((x * y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.4e-90], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+27], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-90}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+27}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\
\end{array}
\end{array}
if z < -3.39999999999999994e-90Initial program 68.7%
Taylor expanded in a around 0 48.1%
mul-1-neg48.1%
distribute-neg-frac248.1%
Simplified48.1%
Taylor expanded in y around 0 65.2%
div-sub65.2%
associate-*r*65.2%
mul-1-neg65.2%
Simplified65.2%
Taylor expanded in t around inf 51.8%
mul-1-neg51.8%
unsub-neg51.8%
Simplified51.8%
if -3.39999999999999994e-90 < z < 2e27Initial program 93.6%
Taylor expanded in t around inf 67.8%
associate-/l*70.1%
Simplified70.1%
Taylor expanded in z around 0 57.1%
associate-/l*61.7%
Simplified61.7%
if 2e27 < z Initial program 68.8%
Taylor expanded in a around 0 48.2%
mul-1-neg48.2%
distribute-neg-frac248.2%
Simplified48.2%
Taylor expanded in y around 0 69.7%
div-sub69.7%
associate-*r*69.7%
mul-1-neg69.7%
Simplified69.7%
Taylor expanded in t around 0 62.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.22e-95) (* t (- 1.0 (/ y z))) (if (<= z 1.25e-103) x (+ t (/ (* x y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.22e-95) {
tmp = t * (1.0 - (y / z));
} else if (z <= 1.25e-103) {
tmp = x;
} else {
tmp = t + ((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 (z <= (-1.22d-95)) then
tmp = t * (1.0d0 - (y / z))
else if (z <= 1.25d-103) then
tmp = x
else
tmp = t + ((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 (z <= -1.22e-95) {
tmp = t * (1.0 - (y / z));
} else if (z <= 1.25e-103) {
tmp = x;
} else {
tmp = t + ((x * y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.22e-95: tmp = t * (1.0 - (y / z)) elif z <= 1.25e-103: tmp = x else: tmp = t + ((x * y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.22e-95) tmp = Float64(t * Float64(1.0 - Float64(y / z))); elseif (z <= 1.25e-103) tmp = x; else tmp = Float64(t + Float64(Float64(x * y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.22e-95) tmp = t * (1.0 - (y / z)); elseif (z <= 1.25e-103) tmp = x; else tmp = t + ((x * y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.22e-95], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e-103], x, N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{-95}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-103}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\
\end{array}
\end{array}
if z < -1.22e-95Initial program 68.7%
Taylor expanded in a around 0 48.1%
mul-1-neg48.1%
distribute-neg-frac248.1%
Simplified48.1%
Taylor expanded in y around 0 65.2%
div-sub65.2%
associate-*r*65.2%
mul-1-neg65.2%
Simplified65.2%
Taylor expanded in t around inf 51.8%
mul-1-neg51.8%
unsub-neg51.8%
Simplified51.8%
if -1.22e-95 < z < 1.24999999999999992e-103Initial program 95.6%
+-commutative95.6%
remove-double-neg95.6%
unsub-neg95.6%
*-commutative95.6%
associate-*l/90.2%
associate-/l*96.2%
fma-neg96.3%
remove-double-neg96.3%
Simplified96.3%
Taylor expanded in a around inf 38.0%
if 1.24999999999999992e-103 < z Initial program 76.5%
Taylor expanded in a around 0 44.5%
mul-1-neg44.5%
distribute-neg-frac244.5%
Simplified44.5%
Taylor expanded in y around 0 59.8%
div-sub59.8%
associate-*r*59.8%
mul-1-neg59.8%
Simplified59.8%
Taylor expanded in t around 0 51.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.2e+40) (+ x t) (if (<= a 2.15e+92) (* t (- 1.0 (/ y z))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.2e+40) {
tmp = x + t;
} else if (a <= 2.15e+92) {
tmp = t * (1.0 - (y / z));
} 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 <= (-2.2d+40)) then
tmp = x + t
else if (a <= 2.15d+92) then
tmp = t * (1.0d0 - (y / z))
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 <= -2.2e+40) {
tmp = x + t;
} else if (a <= 2.15e+92) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.2e+40: tmp = x + t elif a <= 2.15e+92: tmp = t * (1.0 - (y / z)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.2e+40) tmp = Float64(x + t); elseif (a <= 2.15e+92) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.2e+40) tmp = x + t; elseif (a <= 2.15e+92) tmp = t * (1.0 - (y / z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.2e+40], N[(x + t), $MachinePrecision], If[LessEqual[a, 2.15e+92], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{+40}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;a \leq 2.15 \cdot 10^{+92}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.1999999999999999e40Initial program 80.3%
Taylor expanded in t around inf 57.0%
associate-/l*70.2%
Simplified70.2%
Taylor expanded in z around inf 37.6%
if -2.1999999999999999e40 < a < 2.1499999999999999e92Initial program 79.3%
Taylor expanded in a around 0 51.4%
mul-1-neg51.4%
distribute-neg-frac251.4%
Simplified51.4%
Taylor expanded in y around 0 63.8%
div-sub63.8%
associate-*r*63.8%
mul-1-neg63.8%
Simplified63.8%
Taylor expanded in t around inf 48.8%
mul-1-neg48.8%
unsub-neg48.8%
Simplified48.8%
if 2.1499999999999999e92 < a Initial program 87.9%
+-commutative87.9%
remove-double-neg87.9%
unsub-neg87.9%
*-commutative87.9%
associate-*l/68.6%
associate-/l*92.4%
fma-neg92.4%
remove-double-neg92.4%
Simplified92.4%
Taylor expanded in a around inf 48.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.7e+61) t (if (<= z 0.0025) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.7e+61) {
tmp = t;
} else if (z <= 0.0025) {
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 <= (-4.7d+61)) then
tmp = t
else if (z <= 0.0025d0) 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 <= -4.7e+61) {
tmp = t;
} else if (z <= 0.0025) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.7e+61: tmp = t elif z <= 0.0025: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.7e+61) tmp = t; elseif (z <= 0.0025) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.7e+61) tmp = t; elseif (z <= 0.0025) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.7e+61], t, If[LessEqual[z, 0.0025], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+61}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 0.0025:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.6999999999999998e61 or 0.00250000000000000005 < z Initial program 65.8%
clear-num64.7%
un-div-inv64.9%
Applied egg-rr64.9%
Taylor expanded in a around 0 64.6%
+-commutative64.6%
mul-1-neg64.6%
sub-neg64.6%
Simplified64.6%
Taylor expanded in z around -inf 42.6%
if -4.6999999999999998e61 < z < 0.00250000000000000005Initial program 93.0%
+-commutative93.0%
remove-double-neg93.0%
unsub-neg93.0%
*-commutative93.0%
associate-*l/89.6%
associate-/l*94.1%
fma-neg94.1%
remove-double-neg94.1%
Simplified94.1%
Taylor expanded in a around inf 33.6%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 80.9%
clear-num80.4%
un-div-inv80.5%
Applied egg-rr80.5%
Taylor expanded in a around 0 79.6%
+-commutative79.6%
mul-1-neg79.6%
sub-neg79.6%
Simplified79.6%
Taylor expanded in z around -inf 22.8%
herbie shell --seed 2024137
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))