
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
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)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
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)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y a))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / a));
}
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 + ((z - t) * (y / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / a));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{a}
\end{array}
Initial program 93.3%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in y around 0 93.3%
associate-*l/98.0%
*-commutative98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ t (- a)))))
(if (<= y -4.5e+162)
(/ (* z y) a)
(if (<= y -2.1e+53)
t_1
(if (<= y -2.6e-36)
(* y (/ z a))
(if (<= y 2.7e-45)
x
(if (or (<= y 7.1e+65) (not (<= y 1.55e+130)))
t_1
(/ y (/ a z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / -a);
double tmp;
if (y <= -4.5e+162) {
tmp = (z * y) / a;
} else if (y <= -2.1e+53) {
tmp = t_1;
} else if (y <= -2.6e-36) {
tmp = y * (z / a);
} else if (y <= 2.7e-45) {
tmp = x;
} else if ((y <= 7.1e+65) || !(y <= 1.55e+130)) {
tmp = t_1;
} else {
tmp = 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 = y * (t / -a)
if (y <= (-4.5d+162)) then
tmp = (z * y) / a
else if (y <= (-2.1d+53)) then
tmp = t_1
else if (y <= (-2.6d-36)) then
tmp = y * (z / a)
else if (y <= 2.7d-45) then
tmp = x
else if ((y <= 7.1d+65) .or. (.not. (y <= 1.55d+130))) then
tmp = t_1
else
tmp = 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 = y * (t / -a);
double tmp;
if (y <= -4.5e+162) {
tmp = (z * y) / a;
} else if (y <= -2.1e+53) {
tmp = t_1;
} else if (y <= -2.6e-36) {
tmp = y * (z / a);
} else if (y <= 2.7e-45) {
tmp = x;
} else if ((y <= 7.1e+65) || !(y <= 1.55e+130)) {
tmp = t_1;
} else {
tmp = y / (a / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / -a) tmp = 0 if y <= -4.5e+162: tmp = (z * y) / a elif y <= -2.1e+53: tmp = t_1 elif y <= -2.6e-36: tmp = y * (z / a) elif y <= 2.7e-45: tmp = x elif (y <= 7.1e+65) or not (y <= 1.55e+130): tmp = t_1 else: tmp = y / (a / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / Float64(-a))) tmp = 0.0 if (y <= -4.5e+162) tmp = Float64(Float64(z * y) / a); elseif (y <= -2.1e+53) tmp = t_1; elseif (y <= -2.6e-36) tmp = Float64(y * Float64(z / a)); elseif (y <= 2.7e-45) tmp = x; elseif ((y <= 7.1e+65) || !(y <= 1.55e+130)) tmp = t_1; else tmp = Float64(y / Float64(a / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / -a); tmp = 0.0; if (y <= -4.5e+162) tmp = (z * y) / a; elseif (y <= -2.1e+53) tmp = t_1; elseif (y <= -2.6e-36) tmp = y * (z / a); elseif (y <= 2.7e-45) tmp = x; elseif ((y <= 7.1e+65) || ~((y <= 1.55e+130))) tmp = t_1; else tmp = y / (a / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e+162], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -2.1e+53], t$95$1, If[LessEqual[y, -2.6e-36], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e-45], x, If[Or[LessEqual[y, 7.1e+65], N[Not[LessEqual[y, 1.55e+130]], $MachinePrecision]], t$95$1, N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{-a}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+162}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-36}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-45}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.1 \cdot 10^{+65} \lor \neg \left(y \leq 1.55 \cdot 10^{+130}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if y < -4.49999999999999972e162Initial program 88.3%
associate-/l*97.0%
Simplified97.0%
Taylor expanded in y around 0 88.3%
associate-*l/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 79.0%
Taylor expanded in z around inf 64.2%
*-commutative64.2%
associate-*l/72.6%
Applied egg-rr72.6%
if -4.49999999999999972e162 < y < -2.1000000000000002e53 or 2.69999999999999985e-45 < y < 7.1000000000000003e65 or 1.55e130 < y Initial program 88.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around 0 88.9%
associate-*l/97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in z around 0 66.0%
associate-*l/72.3%
*-commutative72.3%
neg-mul-172.3%
sub-neg72.3%
associate-*r/66.0%
associate-*l/70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in x around 0 51.3%
associate-*r/51.3%
neg-mul-151.3%
distribute-lft-neg-in51.3%
*-commutative51.3%
associate-/l*57.5%
Simplified57.5%
if -2.1000000000000002e53 < y < -2.6e-36Initial program 94.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 94.9%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in y around inf 89.5%
Taylor expanded in z around inf 74.5%
if -2.6e-36 < y < 2.69999999999999985e-45Initial program 99.9%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in x around inf 67.3%
if 7.1000000000000003e65 < y < 1.55e130Initial program 83.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 83.3%
associate-*l/94.5%
*-commutative94.5%
Simplified94.5%
Taylor expanded in y around inf 76.8%
Taylor expanded in z around inf 65.2%
clear-num65.2%
un-div-inv65.3%
Applied egg-rr65.3%
Final simplification65.1%
(FPCore (x y z t a)
:precision binary64
(if (<= y -5.4e+157)
(/ (* z y) a)
(if (<= y -9.2e+51)
(* t (/ y (- a)))
(if (<= y -2.3e-36)
(* y (/ z a))
(if (<= y 2.4e-44)
x
(if (or (<= y 1e+66) (not (<= y 1.85e+130)))
(* y (/ t (- a)))
(/ y (/ a z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.4e+157) {
tmp = (z * y) / a;
} else if (y <= -9.2e+51) {
tmp = t * (y / -a);
} else if (y <= -2.3e-36) {
tmp = y * (z / a);
} else if (y <= 2.4e-44) {
tmp = x;
} else if ((y <= 1e+66) || !(y <= 1.85e+130)) {
tmp = y * (t / -a);
} else {
tmp = 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 (y <= (-5.4d+157)) then
tmp = (z * y) / a
else if (y <= (-9.2d+51)) then
tmp = t * (y / -a)
else if (y <= (-2.3d-36)) then
tmp = y * (z / a)
else if (y <= 2.4d-44) then
tmp = x
else if ((y <= 1d+66) .or. (.not. (y <= 1.85d+130))) then
tmp = y * (t / -a)
else
tmp = 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 (y <= -5.4e+157) {
tmp = (z * y) / a;
} else if (y <= -9.2e+51) {
tmp = t * (y / -a);
} else if (y <= -2.3e-36) {
tmp = y * (z / a);
} else if (y <= 2.4e-44) {
tmp = x;
} else if ((y <= 1e+66) || !(y <= 1.85e+130)) {
tmp = y * (t / -a);
} else {
tmp = y / (a / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.4e+157: tmp = (z * y) / a elif y <= -9.2e+51: tmp = t * (y / -a) elif y <= -2.3e-36: tmp = y * (z / a) elif y <= 2.4e-44: tmp = x elif (y <= 1e+66) or not (y <= 1.85e+130): tmp = y * (t / -a) else: tmp = y / (a / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.4e+157) tmp = Float64(Float64(z * y) / a); elseif (y <= -9.2e+51) tmp = Float64(t * Float64(y / Float64(-a))); elseif (y <= -2.3e-36) tmp = Float64(y * Float64(z / a)); elseif (y <= 2.4e-44) tmp = x; elseif ((y <= 1e+66) || !(y <= 1.85e+130)) tmp = Float64(y * Float64(t / Float64(-a))); else tmp = Float64(y / Float64(a / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.4e+157) tmp = (z * y) / a; elseif (y <= -9.2e+51) tmp = t * (y / -a); elseif (y <= -2.3e-36) tmp = y * (z / a); elseif (y <= 2.4e-44) tmp = x; elseif ((y <= 1e+66) || ~((y <= 1.85e+130))) tmp = y * (t / -a); else tmp = y / (a / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.4e+157], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -9.2e+51], N[(t * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.3e-36], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e-44], x, If[Or[LessEqual[y, 1e+66], N[Not[LessEqual[y, 1.85e+130]], $MachinePrecision]], N[(y * N[(t / (-a)), $MachinePrecision]), $MachinePrecision], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+157}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;y \leq -9.2 \cdot 10^{+51}:\\
\;\;\;\;t \cdot \frac{y}{-a}\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-36}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-44}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 10^{+66} \lor \neg \left(y \leq 1.85 \cdot 10^{+130}\right):\\
\;\;\;\;y \cdot \frac{t}{-a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if y < -5.4000000000000001e157Initial program 88.3%
associate-/l*97.0%
Simplified97.0%
Taylor expanded in y around 0 88.3%
associate-*l/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 79.0%
Taylor expanded in z around inf 64.2%
*-commutative64.2%
associate-*l/72.6%
Applied egg-rr72.6%
if -5.4000000000000001e157 < y < -9.2000000000000002e51Initial program 85.4%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in y around 0 85.4%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 70.3%
associate-*l/83.3%
*-commutative83.3%
neg-mul-183.3%
sub-neg83.3%
associate-*r/70.3%
associate-*l/84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in x around 0 62.9%
mul-1-neg62.9%
associate-/l*77.2%
distribute-lft-neg-in77.2%
*-commutative77.2%
Simplified77.2%
if -9.2000000000000002e51 < y < -2.29999999999999996e-36Initial program 94.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 94.9%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in y around inf 89.5%
Taylor expanded in z around inf 74.5%
if -2.29999999999999996e-36 < y < 2.40000000000000009e-44Initial program 99.9%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in x around inf 67.3%
if 2.40000000000000009e-44 < y < 9.99999999999999945e65 or 1.8500000000000001e130 < y Initial program 89.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 89.5%
associate-*l/97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in z around 0 65.2%
associate-*l/70.3%
*-commutative70.3%
neg-mul-170.3%
sub-neg70.3%
associate-*r/65.2%
associate-*l/67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in x around 0 49.2%
associate-*r/49.2%
neg-mul-149.2%
distribute-lft-neg-in49.2%
*-commutative49.2%
associate-/l*54.2%
Simplified54.2%
if 9.99999999999999945e65 < y < 1.8500000000000001e130Initial program 83.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 83.3%
associate-*l/94.5%
*-commutative94.5%
Simplified94.5%
Taylor expanded in y around inf 76.8%
Taylor expanded in z around inf 65.2%
clear-num65.2%
un-div-inv65.3%
Applied egg-rr65.3%
Final simplification65.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- z t) (/ y a))))
(if (<= y -4.1e-44)
t_1
(if (<= y 2.75e-170)
x
(if (<= y 6.6e-53) t_1 (if (<= y 2.5e-46) x (* y (/ (- z t) a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * (y / a);
double tmp;
if (y <= -4.1e-44) {
tmp = t_1;
} else if (y <= 2.75e-170) {
tmp = x;
} else if (y <= 6.6e-53) {
tmp = t_1;
} else if (y <= 2.5e-46) {
tmp = x;
} else {
tmp = y * ((z - t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (z - t) * (y / a)
if (y <= (-4.1d-44)) then
tmp = t_1
else if (y <= 2.75d-170) then
tmp = x
else if (y <= 6.6d-53) then
tmp = t_1
else if (y <= 2.5d-46) then
tmp = x
else
tmp = y * ((z - t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * (y / a);
double tmp;
if (y <= -4.1e-44) {
tmp = t_1;
} else if (y <= 2.75e-170) {
tmp = x;
} else if (y <= 6.6e-53) {
tmp = t_1;
} else if (y <= 2.5e-46) {
tmp = x;
} else {
tmp = y * ((z - t) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) * (y / a) tmp = 0 if y <= -4.1e-44: tmp = t_1 elif y <= 2.75e-170: tmp = x elif y <= 6.6e-53: tmp = t_1 elif y <= 2.5e-46: tmp = x else: tmp = y * ((z - t) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) * Float64(y / a)) tmp = 0.0 if (y <= -4.1e-44) tmp = t_1; elseif (y <= 2.75e-170) tmp = x; elseif (y <= 6.6e-53) tmp = t_1; elseif (y <= 2.5e-46) tmp = x; else tmp = Float64(y * Float64(Float64(z - t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) * (y / a); tmp = 0.0; if (y <= -4.1e-44) tmp = t_1; elseif (y <= 2.75e-170) tmp = x; elseif (y <= 6.6e-53) tmp = t_1; elseif (y <= 2.5e-46) tmp = x; else tmp = y * ((z - t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.1e-44], t$95$1, If[LessEqual[y, 2.75e-170], x, If[LessEqual[y, 6.6e-53], t$95$1, If[LessEqual[y, 2.5e-46], x, N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{if}\;y \leq -4.1 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{-170}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-46}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if y < -4.09999999999999992e-44 or 2.75000000000000009e-170 < y < 6.60000000000000009e-53Initial program 92.2%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in y around 0 92.2%
associate-*l/98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in y around inf 73.1%
Taylor expanded in z around 0 67.0%
+-commutative67.0%
associate-*l/66.6%
mul-1-neg66.6%
associate-/l*70.9%
distribute-lft-neg-in70.9%
*-commutative70.9%
distribute-lft-out82.6%
sub-neg82.6%
*-commutative82.6%
associate-/l*77.5%
associate-*l/77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in y around 0 77.5%
associate-*l/98.7%
*-commutative98.7%
Simplified82.6%
if -4.09999999999999992e-44 < y < 2.75000000000000009e-170 or 6.60000000000000009e-53 < y < 2.49999999999999996e-46Initial program 99.9%
associate-/l*88.3%
Simplified88.3%
Taylor expanded in x around inf 77.9%
if 2.49999999999999996e-46 < y Initial program 88.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 88.4%
associate-*l/96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in y around inf 76.5%
Taylor expanded in z around 0 58.3%
+-commutative58.3%
associate-*l/58.0%
mul-1-neg58.0%
associate-/l*59.8%
distribute-lft-neg-in59.8%
*-commutative59.8%
distribute-lft-out80.0%
sub-neg80.0%
*-commutative80.0%
associate-/l*71.7%
associate-*l/82.1%
*-commutative82.1%
Simplified82.1%
Final simplification80.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -6e-44) (not (<= y 3.6e-141))) (* y (/ (- z t) a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6e-44) || !(y <= 3.6e-141)) {
tmp = y * ((z - t) / a);
} 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 ((y <= (-6d-44)) .or. (.not. (y <= 3.6d-141))) then
tmp = y * ((z - t) / a)
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 ((y <= -6e-44) || !(y <= 3.6e-141)) {
tmp = y * ((z - t) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -6e-44) or not (y <= 3.6e-141): tmp = y * ((z - t) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -6e-44) || !(y <= 3.6e-141)) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -6e-44) || ~((y <= 3.6e-141))) tmp = y * ((z - t) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -6e-44], N[Not[LessEqual[y, 3.6e-141]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-44} \lor \neg \left(y \leq 3.6 \cdot 10^{-141}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.0000000000000005e-44 or 3.60000000000000015e-141 < y Initial program 90.0%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in y around 0 90.0%
associate-*l/97.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in y around inf 75.9%
Taylor expanded in z around 0 61.7%
+-commutative61.7%
associate-*l/61.3%
mul-1-neg61.3%
associate-/l*64.4%
distribute-lft-neg-in64.4%
*-commutative64.4%
distribute-lft-out80.8%
sub-neg80.8%
*-commutative80.8%
associate-/l*73.9%
associate-*l/81.1%
*-commutative81.1%
Simplified81.1%
if -6.0000000000000005e-44 < y < 3.60000000000000015e-141Initial program 99.9%
associate-/l*85.5%
Simplified85.5%
Taylor expanded in x around inf 73.9%
Final simplification78.7%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.65e+183) (* y (/ (- z t) a)) (if (<= t 3.2e+115) (+ x (/ (* z y) a)) (* (- z t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.65e+183) {
tmp = y * ((z - t) / a);
} else if (t <= 3.2e+115) {
tmp = x + ((z * y) / a);
} else {
tmp = (z - t) * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.65d+183)) then
tmp = y * ((z - t) / a)
else if (t <= 3.2d+115) then
tmp = x + ((z * y) / a)
else
tmp = (z - t) * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.65e+183) {
tmp = y * ((z - t) / a);
} else if (t <= 3.2e+115) {
tmp = x + ((z * y) / a);
} else {
tmp = (z - t) * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.65e+183: tmp = y * ((z - t) / a) elif t <= 3.2e+115: tmp = x + ((z * y) / a) else: tmp = (z - t) * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.65e+183) tmp = Float64(y * Float64(Float64(z - t) / a)); elseif (t <= 3.2e+115) tmp = Float64(x + Float64(Float64(z * y) / a)); else tmp = Float64(Float64(z - t) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.65e+183) tmp = y * ((z - t) / a); elseif (t <= 3.2e+115) tmp = x + ((z * y) / a); else tmp = (z - t) * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.65e+183], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+115], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.65 \cdot 10^{+183}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+115}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -2.6500000000000001e183Initial program 93.2%
associate-/l*93.2%
Simplified93.2%
Taylor expanded in y around 0 93.2%
associate-*l/96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in y around inf 71.6%
Taylor expanded in z around 0 57.8%
+-commutative57.8%
associate-*l/54.3%
mul-1-neg54.3%
associate-/l*57.5%
distribute-lft-neg-in57.5%
*-commutative57.5%
distribute-lft-out86.1%
sub-neg86.1%
*-commutative86.1%
associate-/l*82.8%
associate-*l/86.1%
*-commutative86.1%
Simplified86.1%
if -2.6500000000000001e183 < t < 3.2e115Initial program 95.3%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in z around inf 83.7%
if 3.2e115 < t Initial program 85.3%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in y around 0 85.3%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 78.0%
Taylor expanded in z around 0 60.6%
+-commutative60.6%
associate-*l/56.1%
mul-1-neg56.1%
associate-/l*68.6%
distribute-lft-neg-in68.6%
*-commutative68.6%
distribute-lft-out89.1%
sub-neg89.1%
*-commutative89.1%
associate-/l*76.5%
associate-*l/84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y around 0 76.5%
associate-*l/99.9%
*-commutative99.9%
Simplified89.1%
Final simplification84.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.2e+172) (* y (/ (- z t) a)) (if (<= t 5.5e+114) (+ x (* z (/ y a))) (* (- z t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+172) {
tmp = y * ((z - t) / a);
} else if (t <= 5.5e+114) {
tmp = x + (z * (y / a));
} else {
tmp = (z - t) * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-6.2d+172)) then
tmp = y * ((z - t) / a)
else if (t <= 5.5d+114) then
tmp = x + (z * (y / a))
else
tmp = (z - t) * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+172) {
tmp = y * ((z - t) / a);
} else if (t <= 5.5e+114) {
tmp = x + (z * (y / a));
} else {
tmp = (z - t) * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.2e+172: tmp = y * ((z - t) / a) elif t <= 5.5e+114: tmp = x + (z * (y / a)) else: tmp = (z - t) * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e+172) tmp = Float64(y * Float64(Float64(z - t) / a)); elseif (t <= 5.5e+114) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(Float64(z - t) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.2e+172) tmp = y * ((z - t) / a); elseif (t <= 5.5e+114) tmp = x + (z * (y / a)); else tmp = (z - t) * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e+172], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+114], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+172}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+114}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -6.19999999999999976e172Initial program 93.7%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in y around 0 93.7%
associate-*l/96.8%
*-commutative96.8%
Simplified96.8%
Taylor expanded in y around inf 70.4%
Taylor expanded in z around 0 57.5%
+-commutative57.5%
associate-*l/50.9%
mul-1-neg50.9%
associate-/l*53.9%
distribute-lft-neg-in53.9%
*-commutative53.9%
distribute-lft-out83.9%
sub-neg83.9%
*-commutative83.9%
associate-/l*80.8%
associate-*l/83.9%
*-commutative83.9%
Simplified83.9%
if -6.19999999999999976e172 < t < 5.5000000000000001e114Initial program 95.2%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in t around 0 84.1%
+-commutative84.1%
associate-/l*83.6%
Simplified83.6%
*-commutative40.5%
associate-*l/41.0%
Applied egg-rr84.1%
*-commutative84.1%
associate-*l/88.2%
Applied egg-rr88.2%
if 5.5000000000000001e114 < t Initial program 85.3%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in y around 0 85.3%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 78.0%
Taylor expanded in z around 0 60.6%
+-commutative60.6%
associate-*l/56.1%
mul-1-neg56.1%
associate-/l*68.6%
distribute-lft-neg-in68.6%
*-commutative68.6%
distribute-lft-out89.1%
sub-neg89.1%
*-commutative89.1%
associate-/l*76.5%
associate-*l/84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y around 0 76.5%
associate-*l/99.9%
*-commutative99.9%
Simplified89.1%
Final simplification87.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.3e+137) (- x (* t (/ y a))) (if (<= t 2.05e+114) (+ x (* z (/ y a))) (* (- z t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.3e+137) {
tmp = x - (t * (y / a));
} else if (t <= 2.05e+114) {
tmp = x + (z * (y / a));
} else {
tmp = (z - t) * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-4.3d+137)) then
tmp = x - (t * (y / a))
else if (t <= 2.05d+114) then
tmp = x + (z * (y / a))
else
tmp = (z - t) * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.3e+137) {
tmp = x - (t * (y / a));
} else if (t <= 2.05e+114) {
tmp = x + (z * (y / a));
} else {
tmp = (z - t) * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.3e+137: tmp = x - (t * (y / a)) elif t <= 2.05e+114: tmp = x + (z * (y / a)) else: tmp = (z - t) * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.3e+137) tmp = Float64(x - Float64(t * Float64(y / a))); elseif (t <= 2.05e+114) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(Float64(z - t) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.3e+137) tmp = x - (t * (y / a)); elseif (t <= 2.05e+114) tmp = x + (z * (y / a)); else tmp = (z - t) * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.3e+137], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.05e+114], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.3 \cdot 10^{+137}:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{+114}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -4.29999999999999965e137Initial program 94.4%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in y around 0 94.4%
associate-*l/97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in z around 0 85.6%
associate-*l/85.6%
*-commutative85.6%
neg-mul-185.6%
sub-neg85.6%
associate-*r/85.6%
associate-*l/88.3%
*-commutative88.3%
Simplified88.3%
if -4.29999999999999965e137 < t < 2.05e114Initial program 95.1%
associate-/l*94.0%
Simplified94.0%
Taylor expanded in t around 0 83.8%
+-commutative83.8%
associate-/l*83.3%
Simplified83.3%
*-commutative40.8%
associate-*l/41.3%
Applied egg-rr83.8%
*-commutative83.8%
associate-*l/88.0%
Applied egg-rr88.0%
if 2.05e114 < t Initial program 85.3%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in y around 0 85.3%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 78.0%
Taylor expanded in z around 0 60.6%
+-commutative60.6%
associate-*l/56.1%
mul-1-neg56.1%
associate-/l*68.6%
distribute-lft-neg-in68.6%
*-commutative68.6%
distribute-lft-out89.1%
sub-neg89.1%
*-commutative89.1%
associate-/l*76.5%
associate-*l/84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in y around 0 76.5%
associate-*l/99.9%
*-commutative99.9%
Simplified89.1%
Final simplification88.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.5e-36) (not (<= y 1.75e+34))) (* y (/ z a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.5e-36) || !(y <= 1.75e+34)) {
tmp = y * (z / a);
} 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 ((y <= (-2.5d-36)) .or. (.not. (y <= 1.75d+34))) then
tmp = y * (z / a)
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 ((y <= -2.5e-36) || !(y <= 1.75e+34)) {
tmp = y * (z / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.5e-36) or not (y <= 1.75e+34): tmp = y * (z / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.5e-36) || !(y <= 1.75e+34)) tmp = Float64(y * Float64(z / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.5e-36) || ~((y <= 1.75e+34))) tmp = y * (z / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.5e-36], N[Not[LessEqual[y, 1.75e+34]], $MachinePrecision]], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-36} \lor \neg \left(y \leq 1.75 \cdot 10^{+34}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.50000000000000002e-36 or 1.74999999999999999e34 < y Initial program 87.4%
associate-/l*99.0%
Simplified99.0%
Taylor expanded in y around 0 87.4%
associate-*l/97.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in y around inf 79.0%
Taylor expanded in z around inf 52.7%
if -2.50000000000000002e-36 < y < 1.74999999999999999e34Initial program 99.9%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in x around inf 61.5%
Final simplification56.9%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.5e-36) (/ (* z y) a) (if (<= y 1.55e+34) x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.5e-36) {
tmp = (z * y) / a;
} else if (y <= 1.55e+34) {
tmp = x;
} else {
tmp = y * (z / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-2.5d-36)) then
tmp = (z * y) / a
else if (y <= 1.55d+34) then
tmp = x
else
tmp = y * (z / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.5e-36) {
tmp = (z * y) / a;
} else if (y <= 1.55e+34) {
tmp = x;
} else {
tmp = y * (z / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.5e-36: tmp = (z * y) / a elif y <= 1.55e+34: tmp = x else: tmp = y * (z / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.5e-36) tmp = Float64(Float64(z * y) / a); elseif (y <= 1.55e+34) tmp = x; else tmp = Float64(y * Float64(z / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.5e-36) tmp = (z * y) / a; elseif (y <= 1.55e+34) tmp = x; else tmp = y * (z / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.5e-36], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 1.55e+34], x, N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-36}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+34}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if y < -2.50000000000000002e-36Initial program 89.7%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in y around 0 89.7%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 80.5%
Taylor expanded in z around inf 57.2%
*-commutative57.2%
associate-*l/61.4%
Applied egg-rr61.4%
if -2.50000000000000002e-36 < y < 1.54999999999999989e34Initial program 99.9%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in x around inf 61.5%
if 1.54999999999999989e34 < y Initial program 85.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 85.3%
associate-*l/95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in y around inf 77.7%
Taylor expanded in z around inf 48.6%
Final simplification57.9%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) a))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / a));
}
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))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / a));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / a))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / a))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a}
\end{array}
Initial program 93.3%
associate-/l*94.3%
Simplified94.3%
Final simplification94.3%
(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 93.3%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in x around inf 36.8%
Final simplification36.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ a (- z t))))
(if (< y -1.0761266216389975e-10)
(+ x (/ 1.0 (/ t_1 y)))
(if (< y 2.894426862792089e-49)
(+ x (/ (* y (- z t)) a))
(+ x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x + (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) / a);
} else {
tmp = x + (y / 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 = a / (z - t)
if (y < (-1.0761266216389975d-10)) then
tmp = x + (1.0d0 / (t_1 / y))
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) / a)
else
tmp = x + (y / 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 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x + (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) / a);
} else {
tmp = x + (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a / (z - t) tmp = 0 if y < -1.0761266216389975e-10: tmp = x + (1.0 / (t_1 / y)) elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) / a) else: tmp = x + (y / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(a / Float64(z - t)) tmp = 0.0 if (y < -1.0761266216389975e-10) tmp = Float64(x + Float64(1.0 / Float64(t_1 / y))); elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / a)); else tmp = Float64(x + Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a / (z - t); tmp = 0.0; if (y < -1.0761266216389975e-10) tmp = x + (1.0 / (t_1 / y)); elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) / a); else tmp = x + (y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x + N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x + \frac{1}{\frac{t\_1}{y}}\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024096
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:precision binary64
:alt
(if (< y -1.0761266216389975e-10) (+ x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (+ x (/ (* y (- z t)) a)) (+ x (/ y (/ a (- z t))))))
(+ x (/ (* y (- z t)) a)))