
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (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) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (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) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* (/ (- y z) (- a z)) t)))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) / (a - z)) * 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 = x + (((y - z) / (a - z)) * t)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) / (a - z)) * t);
}
def code(x, y, z, t, a): return x + (((y - z) / (a - z)) * t)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t)) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) / (a - z)) * t); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - z}{a - z} \cdot t
\end{array}
Initial program 86.9%
associate-*l/97.5%
Simplified97.5%
Final simplification97.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ t (/ (- a z) y)))))
(if (<= z -6.6e+218)
(+ x t)
(if (<= z -5.2e-109)
t_1
(if (<= z 4.3e-128)
(+ x (/ (* (- y z) t) a))
(if (<= z 3e+104)
t_1
(if (<= z 1.06e+179)
(+ x t)
(if (<= z 3.4e+224) (+ x (* t (/ y (- a z)))) (+ x t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t / ((a - z) / y));
double tmp;
if (z <= -6.6e+218) {
tmp = x + t;
} else if (z <= -5.2e-109) {
tmp = t_1;
} else if (z <= 4.3e-128) {
tmp = x + (((y - z) * t) / a);
} else if (z <= 3e+104) {
tmp = t_1;
} else if (z <= 1.06e+179) {
tmp = x + t;
} else if (z <= 3.4e+224) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (t / ((a - z) / y))
if (z <= (-6.6d+218)) then
tmp = x + t
else if (z <= (-5.2d-109)) then
tmp = t_1
else if (z <= 4.3d-128) then
tmp = x + (((y - z) * t) / a)
else if (z <= 3d+104) then
tmp = t_1
else if (z <= 1.06d+179) then
tmp = x + t
else if (z <= 3.4d+224) then
tmp = x + (t * (y / (a - z)))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t / ((a - z) / y));
double tmp;
if (z <= -6.6e+218) {
tmp = x + t;
} else if (z <= -5.2e-109) {
tmp = t_1;
} else if (z <= 4.3e-128) {
tmp = x + (((y - z) * t) / a);
} else if (z <= 3e+104) {
tmp = t_1;
} else if (z <= 1.06e+179) {
tmp = x + t;
} else if (z <= 3.4e+224) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t / ((a - z) / y)) tmp = 0 if z <= -6.6e+218: tmp = x + t elif z <= -5.2e-109: tmp = t_1 elif z <= 4.3e-128: tmp = x + (((y - z) * t) / a) elif z <= 3e+104: tmp = t_1 elif z <= 1.06e+179: tmp = x + t elif z <= 3.4e+224: tmp = x + (t * (y / (a - z))) else: tmp = x + t return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t / Float64(Float64(a - z) / y))) tmp = 0.0 if (z <= -6.6e+218) tmp = Float64(x + t); elseif (z <= -5.2e-109) tmp = t_1; elseif (z <= 4.3e-128) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / a)); elseif (z <= 3e+104) tmp = t_1; elseif (z <= 1.06e+179) tmp = Float64(x + t); elseif (z <= 3.4e+224) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t / ((a - z) / y)); tmp = 0.0; if (z <= -6.6e+218) tmp = x + t; elseif (z <= -5.2e-109) tmp = t_1; elseif (z <= 4.3e-128) tmp = x + (((y - z) * t) / a); elseif (z <= 3e+104) tmp = t_1; elseif (z <= 1.06e+179) tmp = x + t; elseif (z <= 3.4e+224) tmp = x + (t * (y / (a - z))); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e+218], N[(x + t), $MachinePrecision], If[LessEqual[z, -5.2e-109], t$95$1, If[LessEqual[z, 4.3e-128], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+104], t$95$1, If[LessEqual[z, 1.06e+179], N[(x + t), $MachinePrecision], If[LessEqual[z, 3.4e+224], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t}{\frac{a - z}{y}}\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+218}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-128}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{+179}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+224}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -6.59999999999999996e218 or 2.99999999999999969e104 < z < 1.05999999999999998e179 or 3.4000000000000002e224 < z Initial program 60.3%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 97.8%
if -6.59999999999999996e218 < z < -5.1999999999999997e-109 or 4.29999999999999994e-128 < z < 2.99999999999999969e104Initial program 92.1%
associate-*l/99.1%
Simplified99.1%
*-commutative99.1%
clear-num99.0%
un-div-inv99.1%
Applied egg-rr99.1%
Taylor expanded in y around inf 79.4%
if -5.1999999999999997e-109 < z < 4.29999999999999994e-128Initial program 96.2%
associate-*l/93.0%
Simplified93.0%
Taylor expanded in a around inf 93.6%
if 1.05999999999999998e179 < z < 3.4000000000000002e224Initial program 72.6%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in y around inf 92.9%
Final simplification87.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ t (/ z y)))))
(if (<= z -2.1e+96)
(+ x t)
(if (<= z -1.4e-57)
t_1
(if (<= z 3.95e-128)
(+ x (* t (/ y a)))
(if (<= z 6e-20)
(- x (* y (/ t z)))
(if (or (<= z 4.6e+178) (not (<= z 1.35e+224))) (+ x t) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t / (z / y));
double tmp;
if (z <= -2.1e+96) {
tmp = x + t;
} else if (z <= -1.4e-57) {
tmp = t_1;
} else if (z <= 3.95e-128) {
tmp = x + (t * (y / a));
} else if (z <= 6e-20) {
tmp = x - (y * (t / z));
} else if ((z <= 4.6e+178) || !(z <= 1.35e+224)) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (t / (z / y))
if (z <= (-2.1d+96)) then
tmp = x + t
else if (z <= (-1.4d-57)) then
tmp = t_1
else if (z <= 3.95d-128) then
tmp = x + (t * (y / a))
else if (z <= 6d-20) then
tmp = x - (y * (t / z))
else if ((z <= 4.6d+178) .or. (.not. (z <= 1.35d+224))) then
tmp = x + t
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 - (t / (z / y));
double tmp;
if (z <= -2.1e+96) {
tmp = x + t;
} else if (z <= -1.4e-57) {
tmp = t_1;
} else if (z <= 3.95e-128) {
tmp = x + (t * (y / a));
} else if (z <= 6e-20) {
tmp = x - (y * (t / z));
} else if ((z <= 4.6e+178) || !(z <= 1.35e+224)) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (t / (z / y)) tmp = 0 if z <= -2.1e+96: tmp = x + t elif z <= -1.4e-57: tmp = t_1 elif z <= 3.95e-128: tmp = x + (t * (y / a)) elif z <= 6e-20: tmp = x - (y * (t / z)) elif (z <= 4.6e+178) or not (z <= 1.35e+224): tmp = x + t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(t / Float64(z / y))) tmp = 0.0 if (z <= -2.1e+96) tmp = Float64(x + t); elseif (z <= -1.4e-57) tmp = t_1; elseif (z <= 3.95e-128) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 6e-20) tmp = Float64(x - Float64(y * Float64(t / z))); elseif ((z <= 4.6e+178) || !(z <= 1.35e+224)) tmp = Float64(x + t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (t / (z / y)); tmp = 0.0; if (z <= -2.1e+96) tmp = x + t; elseif (z <= -1.4e-57) tmp = t_1; elseif (z <= 3.95e-128) tmp = x + (t * (y / a)); elseif (z <= 6e-20) tmp = x - (y * (t / z)); elseif ((z <= 4.6e+178) || ~((z <= 1.35e+224))) tmp = x + t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+96], N[(x + t), $MachinePrecision], If[LessEqual[z, -1.4e-57], t$95$1, If[LessEqual[z, 3.95e-128], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-20], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 4.6e+178], N[Not[LessEqual[z, 1.35e+224]], $MachinePrecision]], N[(x + t), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{t}{\frac{z}{y}}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+96}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.95 \cdot 10^{-128}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-20}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+178} \lor \neg \left(z \leq 1.35 \cdot 10^{+224}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.1000000000000001e96 or 6.00000000000000057e-20 < z < 4.6000000000000002e178 or 1.3499999999999999e224 < z Initial program 74.1%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.0%
if -2.1000000000000001e96 < z < -1.4e-57 or 4.6000000000000002e178 < z < 1.3499999999999999e224Initial program 89.7%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in a around 0 75.2%
+-commutative75.2%
mul-1-neg75.2%
unsub-neg75.2%
associate-/l*83.6%
Simplified83.6%
Taylor expanded in z around 0 78.7%
if -1.4e-57 < z < 3.9500000000000001e-128Initial program 94.6%
associate-*l/94.0%
Simplified94.0%
Taylor expanded in z around 0 85.5%
if 3.9500000000000001e-128 < z < 6.00000000000000057e-20Initial program 99.7%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in y around inf 89.1%
Taylor expanded in a around 0 78.8%
+-commutative78.8%
mul-1-neg78.8%
unsub-neg78.8%
associate-*r/76.1%
Simplified76.1%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ t (/ z y)))))
(if (<= z -9.2e+96)
(+ x t)
(if (<= z -2e-54)
t_1
(if (<= z 3.95e-128)
(+ x (* t (/ y a)))
(if (<= z 4.5e-21)
(- x (/ (* y t) z))
(if (or (<= z 3.2e+177) (not (<= z 1.35e+224))) (+ x t) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t / (z / y));
double tmp;
if (z <= -9.2e+96) {
tmp = x + t;
} else if (z <= -2e-54) {
tmp = t_1;
} else if (z <= 3.95e-128) {
tmp = x + (t * (y / a));
} else if (z <= 4.5e-21) {
tmp = x - ((y * t) / z);
} else if ((z <= 3.2e+177) || !(z <= 1.35e+224)) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (t / (z / y))
if (z <= (-9.2d+96)) then
tmp = x + t
else if (z <= (-2d-54)) then
tmp = t_1
else if (z <= 3.95d-128) then
tmp = x + (t * (y / a))
else if (z <= 4.5d-21) then
tmp = x - ((y * t) / z)
else if ((z <= 3.2d+177) .or. (.not. (z <= 1.35d+224))) then
tmp = x + t
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 - (t / (z / y));
double tmp;
if (z <= -9.2e+96) {
tmp = x + t;
} else if (z <= -2e-54) {
tmp = t_1;
} else if (z <= 3.95e-128) {
tmp = x + (t * (y / a));
} else if (z <= 4.5e-21) {
tmp = x - ((y * t) / z);
} else if ((z <= 3.2e+177) || !(z <= 1.35e+224)) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (t / (z / y)) tmp = 0 if z <= -9.2e+96: tmp = x + t elif z <= -2e-54: tmp = t_1 elif z <= 3.95e-128: tmp = x + (t * (y / a)) elif z <= 4.5e-21: tmp = x - ((y * t) / z) elif (z <= 3.2e+177) or not (z <= 1.35e+224): tmp = x + t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(t / Float64(z / y))) tmp = 0.0 if (z <= -9.2e+96) tmp = Float64(x + t); elseif (z <= -2e-54) tmp = t_1; elseif (z <= 3.95e-128) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 4.5e-21) tmp = Float64(x - Float64(Float64(y * t) / z)); elseif ((z <= 3.2e+177) || !(z <= 1.35e+224)) tmp = Float64(x + t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (t / (z / y)); tmp = 0.0; if (z <= -9.2e+96) tmp = x + t; elseif (z <= -2e-54) tmp = t_1; elseif (z <= 3.95e-128) tmp = x + (t * (y / a)); elseif (z <= 4.5e-21) tmp = x - ((y * t) / z); elseif ((z <= 3.2e+177) || ~((z <= 1.35e+224))) tmp = x + t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e+96], N[(x + t), $MachinePrecision], If[LessEqual[z, -2e-54], t$95$1, If[LessEqual[z, 3.95e-128], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-21], N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 3.2e+177], N[Not[LessEqual[z, 1.35e+224]], $MachinePrecision]], N[(x + t), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{t}{\frac{z}{y}}\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{+96}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.95 \cdot 10^{-128}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-21}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+177} \lor \neg \left(z \leq 1.35 \cdot 10^{+224}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -9.2000000000000006e96 or 4.49999999999999968e-21 < z < 3.2e177 or 1.3499999999999999e224 < z Initial program 74.1%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.0%
if -9.2000000000000006e96 < z < -2.0000000000000001e-54 or 3.2e177 < z < 1.3499999999999999e224Initial program 89.7%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in a around 0 75.2%
+-commutative75.2%
mul-1-neg75.2%
unsub-neg75.2%
associate-/l*83.6%
Simplified83.6%
Taylor expanded in z around 0 78.7%
if -2.0000000000000001e-54 < z < 3.9500000000000001e-128Initial program 94.6%
associate-*l/94.0%
Simplified94.0%
Taylor expanded in z around 0 85.5%
if 3.9500000000000001e-128 < z < 4.49999999999999968e-21Initial program 99.7%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in a around 0 84.0%
+-commutative84.0%
mul-1-neg84.0%
unsub-neg84.0%
associate-/l*80.9%
Simplified80.9%
Taylor expanded in z around 0 78.8%
Final simplification81.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ t z)))))
(if (<= z -4.9e+96)
(+ x t)
(if (<= z -7e-64)
t_1
(if (<= z -4.8e-65)
(* t (- 1.0 (/ y z)))
(if (<= z 3.95e-128)
(+ x (* t (/ y a)))
(if (<= z 5.8e-20) t_1 (+ x t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (t / z));
double tmp;
if (z <= -4.9e+96) {
tmp = x + t;
} else if (z <= -7e-64) {
tmp = t_1;
} else if (z <= -4.8e-65) {
tmp = t * (1.0 - (y / z));
} else if (z <= 3.95e-128) {
tmp = x + (t * (y / a));
} else if (z <= 5.8e-20) {
tmp = t_1;
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y * (t / z))
if (z <= (-4.9d+96)) then
tmp = x + t
else if (z <= (-7d-64)) then
tmp = t_1
else if (z <= (-4.8d-65)) then
tmp = t * (1.0d0 - (y / z))
else if (z <= 3.95d-128) then
tmp = x + (t * (y / a))
else if (z <= 5.8d-20) then
tmp = t_1
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (t / z));
double tmp;
if (z <= -4.9e+96) {
tmp = x + t;
} else if (z <= -7e-64) {
tmp = t_1;
} else if (z <= -4.8e-65) {
tmp = t * (1.0 - (y / z));
} else if (z <= 3.95e-128) {
tmp = x + (t * (y / a));
} else if (z <= 5.8e-20) {
tmp = t_1;
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (t / z)) tmp = 0 if z <= -4.9e+96: tmp = x + t elif z <= -7e-64: tmp = t_1 elif z <= -4.8e-65: tmp = t * (1.0 - (y / z)) elif z <= 3.95e-128: tmp = x + (t * (y / a)) elif z <= 5.8e-20: tmp = t_1 else: tmp = x + t return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(t / z))) tmp = 0.0 if (z <= -4.9e+96) tmp = Float64(x + t); elseif (z <= -7e-64) tmp = t_1; elseif (z <= -4.8e-65) tmp = Float64(t * Float64(1.0 - Float64(y / z))); elseif (z <= 3.95e-128) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 5.8e-20) tmp = t_1; else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (t / z)); tmp = 0.0; if (z <= -4.9e+96) tmp = x + t; elseif (z <= -7e-64) tmp = t_1; elseif (z <= -4.8e-65) tmp = t * (1.0 - (y / z)); elseif (z <= 3.95e-128) tmp = x + (t * (y / a)); elseif (z <= 5.8e-20) tmp = t_1; else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.9e+96], N[(x + t), $MachinePrecision], If[LessEqual[z, -7e-64], t$95$1, If[LessEqual[z, -4.8e-65], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.95e-128], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-20], t$95$1, N[(x + t), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq -4.9 \cdot 10^{+96}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-65}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 3.95 \cdot 10^{-128}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -4.8999999999999996e96 or 5.8e-20 < z Initial program 73.9%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 76.2%
if -4.8999999999999996e96 < z < -7.0000000000000006e-64 or 3.9500000000000001e-128 < z < 5.8e-20Initial program 98.3%
associate-*l/98.4%
Simplified98.4%
Taylor expanded in y around inf 82.5%
Taylor expanded in a around 0 74.8%
+-commutative74.8%
mul-1-neg74.8%
unsub-neg74.8%
associate-*r/73.7%
Simplified73.7%
if -7.0000000000000006e-64 < z < -4.8000000000000003e-65Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in a around 0 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in t around inf 100.0%
if -4.8000000000000003e-65 < z < 3.9500000000000001e-128Initial program 94.3%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in z around 0 87.0%
Final simplification79.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.6e+218)
(+ x t)
(if (or (<= z 1.35e+106) (and (not (<= z 1.06e+179)) (<= z 1.35e+224)))
(+ x (* t (/ y (- a z))))
(+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.6e+218) {
tmp = x + t;
} else if ((z <= 1.35e+106) || (!(z <= 1.06e+179) && (z <= 1.35e+224))) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.6d+218)) then
tmp = x + t
else if ((z <= 1.35d+106) .or. (.not. (z <= 1.06d+179)) .and. (z <= 1.35d+224)) then
tmp = x + (t * (y / (a - z)))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.6e+218) {
tmp = x + t;
} else if ((z <= 1.35e+106) || (!(z <= 1.06e+179) && (z <= 1.35e+224))) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.6e+218: tmp = x + t elif (z <= 1.35e+106) or (not (z <= 1.06e+179) and (z <= 1.35e+224)): tmp = x + (t * (y / (a - z))) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.6e+218) tmp = Float64(x + t); elseif ((z <= 1.35e+106) || (!(z <= 1.06e+179) && (z <= 1.35e+224))) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.6e+218) tmp = x + t; elseif ((z <= 1.35e+106) || (~((z <= 1.06e+179)) && (z <= 1.35e+224))) tmp = x + (t * (y / (a - z))); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.6e+218], N[(x + t), $MachinePrecision], If[Or[LessEqual[z, 1.35e+106], And[N[Not[LessEqual[z, 1.06e+179]], $MachinePrecision], LessEqual[z, 1.35e+224]]], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{+218}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+106} \lor \neg \left(z \leq 1.06 \cdot 10^{+179}\right) \land z \leq 1.35 \cdot 10^{+224}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -6.59999999999999996e218 or 1.35000000000000003e106 < z < 1.05999999999999998e179 or 1.3499999999999999e224 < z Initial program 60.3%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 97.8%
if -6.59999999999999996e218 < z < 1.35000000000000003e106 or 1.05999999999999998e179 < z < 1.3499999999999999e224Initial program 92.3%
associate-*l/96.9%
Simplified96.9%
Taylor expanded in y around inf 82.9%
Final simplification85.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.6e+218)
(+ x t)
(if (<= z 7.2e+105)
(+ x (/ t (/ (- a z) y)))
(if (or (<= z 7.5e+174) (not (<= z 1.35e+224)))
(+ x t)
(+ x (* t (/ y (- a z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.6e+218) {
tmp = x + t;
} else if (z <= 7.2e+105) {
tmp = x + (t / ((a - z) / y));
} else if ((z <= 7.5e+174) || !(z <= 1.35e+224)) {
tmp = x + t;
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.6d+218)) then
tmp = x + t
else if (z <= 7.2d+105) then
tmp = x + (t / ((a - z) / y))
else if ((z <= 7.5d+174) .or. (.not. (z <= 1.35d+224))) then
tmp = x + t
else
tmp = x + (t * (y / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.6e+218) {
tmp = x + t;
} else if (z <= 7.2e+105) {
tmp = x + (t / ((a - z) / y));
} else if ((z <= 7.5e+174) || !(z <= 1.35e+224)) {
tmp = x + t;
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.6e+218: tmp = x + t elif z <= 7.2e+105: tmp = x + (t / ((a - z) / y)) elif (z <= 7.5e+174) or not (z <= 1.35e+224): tmp = x + t else: tmp = x + (t * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.6e+218) tmp = Float64(x + t); elseif (z <= 7.2e+105) tmp = Float64(x + Float64(t / Float64(Float64(a - z) / y))); elseif ((z <= 7.5e+174) || !(z <= 1.35e+224)) tmp = Float64(x + t); else tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.6e+218) tmp = x + t; elseif (z <= 7.2e+105) tmp = x + (t / ((a - z) / y)); elseif ((z <= 7.5e+174) || ~((z <= 1.35e+224))) tmp = x + t; else tmp = x + (t * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.6e+218], N[(x + t), $MachinePrecision], If[LessEqual[z, 7.2e+105], N[(x + N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 7.5e+174], N[Not[LessEqual[z, 1.35e+224]], $MachinePrecision]], N[(x + t), $MachinePrecision], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{+218}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+105}:\\
\;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+174} \lor \neg \left(z \leq 1.35 \cdot 10^{+224}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -6.59999999999999996e218 or 7.1999999999999998e105 < z < 7.5000000000000004e174 or 1.3499999999999999e224 < z Initial program 60.3%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 97.8%
if -6.59999999999999996e218 < z < 7.1999999999999998e105Initial program 93.7%
associate-*l/96.8%
Simplified96.8%
*-commutative96.8%
clear-num96.5%
un-div-inv96.7%
Applied egg-rr96.7%
Taylor expanded in y around inf 82.4%
if 7.5000000000000004e174 < z < 1.3499999999999999e224Initial program 72.6%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in y around inf 92.9%
Final simplification85.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -4.9e+23) (not (<= y 1.6e+66))) (+ x (/ t (/ (- a z) y))) (- x (/ t (+ (/ a z) -1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.9e+23) || !(y <= 1.6e+66)) {
tmp = x + (t / ((a - z) / y));
} else {
tmp = x - (t / ((a / z) + -1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-4.9d+23)) .or. (.not. (y <= 1.6d+66))) then
tmp = x + (t / ((a - z) / y))
else
tmp = x - (t / ((a / z) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.9e+23) || !(y <= 1.6e+66)) {
tmp = x + (t / ((a - z) / y));
} else {
tmp = x - (t / ((a / z) + -1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.9e+23) or not (y <= 1.6e+66): tmp = x + (t / ((a - z) / y)) else: tmp = x - (t / ((a / z) + -1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -4.9e+23) || !(y <= 1.6e+66)) tmp = Float64(x + Float64(t / Float64(Float64(a - z) / y))); else tmp = Float64(x - Float64(t / Float64(Float64(a / z) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -4.9e+23) || ~((y <= 1.6e+66))) tmp = x + (t / ((a - z) / y)); else tmp = x - (t / ((a / z) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -4.9e+23], N[Not[LessEqual[y, 1.6e+66]], $MachinePrecision]], N[(x + N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t / N[(N[(a / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.9 \cdot 10^{+23} \lor \neg \left(y \leq 1.6 \cdot 10^{+66}\right):\\
\;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t}{\frac{a}{z} + -1}\\
\end{array}
\end{array}
if y < -4.9000000000000003e23 or 1.6e66 < y Initial program 83.7%
associate-*l/95.4%
Simplified95.4%
*-commutative95.4%
clear-num95.3%
un-div-inv95.7%
Applied egg-rr95.7%
Taylor expanded in y around inf 89.1%
if -4.9000000000000003e23 < y < 1.6e66Initial program 89.1%
associate-*l/98.9%
Simplified98.9%
Taylor expanded in y around 0 79.7%
+-commutative79.7%
mul-1-neg79.7%
unsub-neg79.7%
associate-/l*89.8%
div-sub89.8%
*-inverses89.8%
Simplified89.8%
Final simplification89.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.8e+235) (not (<= t 6.2e+129))) (* t (- 1.0 (/ y z))) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.8e+235) || !(t <= 6.2e+129)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-4.8d+235)) .or. (.not. (t <= 6.2d+129))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.8e+235) || !(t <= 6.2e+129)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.8e+235) or not (t <= 6.2e+129): tmp = t * (1.0 - (y / z)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.8e+235) || !(t <= 6.2e+129)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.8e+235) || ~((t <= 6.2e+129))) tmp = t * (1.0 - (y / z)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.8e+235], N[Not[LessEqual[t, 6.2e+129]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+235} \lor \neg \left(t \leq 6.2 \cdot 10^{+129}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if t < -4.7999999999999998e235 or 6.1999999999999999e129 < t Initial program 76.3%
associate-*l/98.8%
Simplified98.8%
Taylor expanded in a around 0 38.5%
+-commutative38.5%
mul-1-neg38.5%
unsub-neg38.5%
associate-/l*54.5%
Simplified54.5%
Taylor expanded in t around inf 50.9%
if -4.7999999999999998e235 < t < 6.1999999999999999e129Initial program 89.6%
associate-*l/97.1%
Simplified97.1%
Taylor expanded in z around inf 68.5%
Final simplification64.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.2) (+ x t) (if (<= z 1.6e-25) (+ x (* y (/ t a))) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2) {
tmp = x + t;
} else if (z <= 1.6e-25) {
tmp = x + (y * (t / a));
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.2d0)) then
tmp = x + t
else if (z <= 1.6d-25) then
tmp = x + (y * (t / a))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2) {
tmp = x + t;
} else if (z <= 1.6e-25) {
tmp = x + (y * (t / a));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2: tmp = x + t elif z <= 1.6e-25: tmp = x + (y * (t / a)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2) tmp = Float64(x + t); elseif (z <= 1.6e-25) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.2) tmp = x + t; elseif (z <= 1.6e-25) tmp = x + (y * (t / a)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2], N[(x + t), $MachinePrecision], If[LessEqual[z, 1.6e-25], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-25}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -1.19999999999999996 or 1.6000000000000001e-25 < z Initial program 78.2%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 74.1%
if -1.19999999999999996 < z < 1.6000000000000001e-25Initial program 96.1%
associate-*l/95.0%
Simplified95.0%
*-commutative95.0%
clear-num94.5%
un-div-inv94.8%
Applied egg-rr94.8%
Taylor expanded in z around 0 74.9%
associate-*r/75.6%
Simplified75.6%
Final simplification74.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.0) (+ x t) (if (<= z 1.6e-25) (+ x (* t (/ y a))) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.0) {
tmp = x + t;
} else if (z <= 1.6e-25) {
tmp = x + (t * (y / a));
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.0d0)) then
tmp = x + t
else if (z <= 1.6d-25) then
tmp = x + (t * (y / a))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.0) {
tmp = x + t;
} else if (z <= 1.6e-25) {
tmp = x + (t * (y / a));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.0: tmp = x + t elif z <= 1.6e-25: tmp = x + (t * (y / a)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.0) tmp = Float64(x + t); elseif (z <= 1.6e-25) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.0) tmp = x + t; elseif (z <= 1.6e-25) tmp = x + (t * (y / a)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.0], N[(x + t), $MachinePrecision], If[LessEqual[z, 1.6e-25], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-25}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -1 or 1.6000000000000001e-25 < z Initial program 78.2%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 74.1%
if -1 < z < 1.6000000000000001e-25Initial program 96.1%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in z around 0 75.9%
Final simplification75.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.8e+178) t (if (<= z 3.9e+282) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+178) {
tmp = t;
} else if (z <= 3.9e+282) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.8d+178)) then
tmp = t
else if (z <= 3.9d+282) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+178) {
tmp = t;
} else if (z <= 3.9e+282) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.8e+178: tmp = t elif z <= 3.9e+282: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.8e+178) tmp = t; elseif (z <= 3.9e+282) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.8e+178) tmp = t; elseif (z <= 3.9e+282) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e+178], t, If[LessEqual[z, 3.9e+282], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+178}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+282}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.7999999999999999e178 or 3.8999999999999998e282 < z Initial program 56.7%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around 0 56.7%
+-commutative56.7%
mul-1-neg56.7%
unsub-neg56.7%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 77.0%
Taylor expanded in y around 0 59.4%
if -1.7999999999999999e178 < z < 3.8999999999999998e282Initial program 91.4%
associate-*l/97.1%
Simplified97.1%
Taylor expanded in x around inf 55.2%
Final simplification55.7%
(FPCore (x y z t a) :precision binary64 (if (<= a 7.8e+62) (+ x t) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 7.8e+62) {
tmp = x + 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 <= 7.8d+62) then
tmp = x + 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 <= 7.8e+62) {
tmp = x + t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 7.8e+62: tmp = x + t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 7.8e+62) tmp = Float64(x + t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= 7.8e+62) tmp = x + t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 7.8e+62], N[(x + t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.8 \cdot 10^{+62}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < 7.8e62Initial program 86.9%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in z around inf 61.7%
if 7.8e62 < a Initial program 87.2%
associate-*l/98.6%
Simplified98.6%
Taylor expanded in x around inf 67.6%
Final simplification62.7%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 86.9%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in x around inf 51.4%
Final simplification51.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y z) (- a z)) t))))
(if (< t -1.0682974490174067e-39)
t_1
(if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- 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);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) / (a - z)) * t)
if (t < (-1.0682974490174067d-39)) then
tmp = t_1
else if (t < 3.9110949887586375d-141) then
tmp = x + (((y - z) * t) / (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);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) / (a - z)) * t) tmp = 0 if t < -1.0682974490174067e-39: tmp = t_1 elif t < 3.9110949887586375e-141: tmp = x + (((y - z) * t) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t)) tmp = 0.0 if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(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); tmp = 0.0; if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = x + (((y - z) * t) / (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[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.0682974490174067e-39], t$95$1, If[Less[t, 3.9110949887586375e-141], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z} \cdot t\\
\mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023274
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))
(+ x (/ (* (- y z) t) (- a z))))