
(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 (fma (/ y a) (- t z) x))
double code(double x, double y, double z, double t, double a) {
return fma((y / a), (t - z), x);
}
function code(x, y, z, t, a) return fma(Float64(y / a), Float64(t - z), x) end
code[x_, y_, z_, t_, a_] := N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{y}{a}, t - z, x\right)
\end{array}
Initial program 94.8%
sub-neg94.8%
distribute-frac-neg94.8%
distribute-lft-neg-out94.8%
+-commutative94.8%
distribute-lft-neg-out94.8%
distribute-rgt-neg-in94.8%
associate-*l/98.3%
fma-def98.3%
sub-neg98.3%
distribute-neg-in98.3%
remove-double-neg98.3%
+-commutative98.3%
sub-neg98.3%
Simplified98.3%
Final simplification98.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- (/ z a)))))
(if (<= z -1.8e+118)
t_1
(if (<= z -1.2e-22)
x
(if (<= z -1.75e-51)
(/ t (/ a y))
(if (<= z -7.2e-129)
x
(if (<= z -1.04e-187)
(* y (/ t a))
(if (<= z 2.6e-307)
x
(if (<= z 2.1e-234)
(/ (* y t) a)
(if (<= z 1.2e+101) x t_1))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * -(z / a);
double tmp;
if (z <= -1.8e+118) {
tmp = t_1;
} else if (z <= -1.2e-22) {
tmp = x;
} else if (z <= -1.75e-51) {
tmp = t / (a / y);
} else if (z <= -7.2e-129) {
tmp = x;
} else if (z <= -1.04e-187) {
tmp = y * (t / a);
} else if (z <= 2.6e-307) {
tmp = x;
} else if (z <= 2.1e-234) {
tmp = (y * t) / a;
} else if (z <= 1.2e+101) {
tmp = x;
} 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 = y * -(z / a)
if (z <= (-1.8d+118)) then
tmp = t_1
else if (z <= (-1.2d-22)) then
tmp = x
else if (z <= (-1.75d-51)) then
tmp = t / (a / y)
else if (z <= (-7.2d-129)) then
tmp = x
else if (z <= (-1.04d-187)) then
tmp = y * (t / a)
else if (z <= 2.6d-307) then
tmp = x
else if (z <= 2.1d-234) then
tmp = (y * t) / a
else if (z <= 1.2d+101) then
tmp = x
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 = y * -(z / a);
double tmp;
if (z <= -1.8e+118) {
tmp = t_1;
} else if (z <= -1.2e-22) {
tmp = x;
} else if (z <= -1.75e-51) {
tmp = t / (a / y);
} else if (z <= -7.2e-129) {
tmp = x;
} else if (z <= -1.04e-187) {
tmp = y * (t / a);
} else if (z <= 2.6e-307) {
tmp = x;
} else if (z <= 2.1e-234) {
tmp = (y * t) / a;
} else if (z <= 1.2e+101) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * -(z / a) tmp = 0 if z <= -1.8e+118: tmp = t_1 elif z <= -1.2e-22: tmp = x elif z <= -1.75e-51: tmp = t / (a / y) elif z <= -7.2e-129: tmp = x elif z <= -1.04e-187: tmp = y * (t / a) elif z <= 2.6e-307: tmp = x elif z <= 2.1e-234: tmp = (y * t) / a elif z <= 1.2e+101: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(-Float64(z / a))) tmp = 0.0 if (z <= -1.8e+118) tmp = t_1; elseif (z <= -1.2e-22) tmp = x; elseif (z <= -1.75e-51) tmp = Float64(t / Float64(a / y)); elseif (z <= -7.2e-129) tmp = x; elseif (z <= -1.04e-187) tmp = Float64(y * Float64(t / a)); elseif (z <= 2.6e-307) tmp = x; elseif (z <= 2.1e-234) tmp = Float64(Float64(y * t) / a); elseif (z <= 1.2e+101) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * -(z / a); tmp = 0.0; if (z <= -1.8e+118) tmp = t_1; elseif (z <= -1.2e-22) tmp = x; elseif (z <= -1.75e-51) tmp = t / (a / y); elseif (z <= -7.2e-129) tmp = x; elseif (z <= -1.04e-187) tmp = y * (t / a); elseif (z <= 2.6e-307) tmp = x; elseif (z <= 2.1e-234) tmp = (y * t) / a; elseif (z <= 1.2e+101) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * (-N[(z / a), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[z, -1.8e+118], t$95$1, If[LessEqual[z, -1.2e-22], x, If[LessEqual[z, -1.75e-51], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.2e-129], x, If[LessEqual[z, -1.04e-187], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-307], x, If[LessEqual[z, 2.1e-234], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.2e+101], x, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-\frac{z}{a}\right)\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+118}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-22}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-51}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-129}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.04 \cdot 10^{-187}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-307}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-234}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+101}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.8e118 or 1.19999999999999994e101 < z Initial program 93.4%
associate-*l/98.5%
Simplified98.5%
*-commutative98.5%
clear-num98.4%
un-div-inv98.5%
Applied egg-rr98.5%
Taylor expanded in z around inf 69.9%
mul-1-neg69.9%
associate-*r/68.7%
distribute-rgt-neg-in68.7%
distribute-neg-frac68.7%
Simplified68.7%
if -1.8e118 < z < -1.20000000000000001e-22 or -1.7499999999999999e-51 < z < -7.2e-129 or -1.04e-187 < z < 2.59999999999999996e-307 or 2.09999999999999991e-234 < z < 1.19999999999999994e101Initial program 96.9%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in x around inf 58.9%
if -1.20000000000000001e-22 < z < -1.7499999999999999e-51Initial program 85.8%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in t around inf 59.1%
associate-/l*72.5%
Simplified72.5%
if -7.2e-129 < z < -1.04e-187Initial program 78.0%
associate-*l/99.5%
Simplified99.5%
Taylor expanded in t around inf 48.2%
associate-/l*63.2%
associate-/r/63.6%
Applied egg-rr63.6%
if 2.59999999999999996e-307 < z < 2.09999999999999991e-234Initial program 99.5%
associate-*l/92.7%
Simplified92.7%
Taylor expanded in t around inf 77.5%
Final simplification63.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ (- y) a))))
(if (<= z -2.1e+155)
t_1
(if (<= z -8.4e-22)
x
(if (<= z -7.8e-49)
(/ t (/ a y))
(if (<= z -2e-128)
x
(if (<= z -1.05e-187)
(* y (/ t a))
(if (<= z 4.2e-298)
x
(if (<= z 2.3e-238)
(/ (* y t) a)
(if (<= z 1.8e+101) x t_1))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (-y / a);
double tmp;
if (z <= -2.1e+155) {
tmp = t_1;
} else if (z <= -8.4e-22) {
tmp = x;
} else if (z <= -7.8e-49) {
tmp = t / (a / y);
} else if (z <= -2e-128) {
tmp = x;
} else if (z <= -1.05e-187) {
tmp = y * (t / a);
} else if (z <= 4.2e-298) {
tmp = x;
} else if (z <= 2.3e-238) {
tmp = (y * t) / a;
} else if (z <= 1.8e+101) {
tmp = x;
} 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 = z * (-y / a)
if (z <= (-2.1d+155)) then
tmp = t_1
else if (z <= (-8.4d-22)) then
tmp = x
else if (z <= (-7.8d-49)) then
tmp = t / (a / y)
else if (z <= (-2d-128)) then
tmp = x
else if (z <= (-1.05d-187)) then
tmp = y * (t / a)
else if (z <= 4.2d-298) then
tmp = x
else if (z <= 2.3d-238) then
tmp = (y * t) / a
else if (z <= 1.8d+101) then
tmp = x
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 = z * (-y / a);
double tmp;
if (z <= -2.1e+155) {
tmp = t_1;
} else if (z <= -8.4e-22) {
tmp = x;
} else if (z <= -7.8e-49) {
tmp = t / (a / y);
} else if (z <= -2e-128) {
tmp = x;
} else if (z <= -1.05e-187) {
tmp = y * (t / a);
} else if (z <= 4.2e-298) {
tmp = x;
} else if (z <= 2.3e-238) {
tmp = (y * t) / a;
} else if (z <= 1.8e+101) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (-y / a) tmp = 0 if z <= -2.1e+155: tmp = t_1 elif z <= -8.4e-22: tmp = x elif z <= -7.8e-49: tmp = t / (a / y) elif z <= -2e-128: tmp = x elif z <= -1.05e-187: tmp = y * (t / a) elif z <= 4.2e-298: tmp = x elif z <= 2.3e-238: tmp = (y * t) / a elif z <= 1.8e+101: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(Float64(-y) / a)) tmp = 0.0 if (z <= -2.1e+155) tmp = t_1; elseif (z <= -8.4e-22) tmp = x; elseif (z <= -7.8e-49) tmp = Float64(t / Float64(a / y)); elseif (z <= -2e-128) tmp = x; elseif (z <= -1.05e-187) tmp = Float64(y * Float64(t / a)); elseif (z <= 4.2e-298) tmp = x; elseif (z <= 2.3e-238) tmp = Float64(Float64(y * t) / a); elseif (z <= 1.8e+101) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (-y / a); tmp = 0.0; if (z <= -2.1e+155) tmp = t_1; elseif (z <= -8.4e-22) tmp = x; elseif (z <= -7.8e-49) tmp = t / (a / y); elseif (z <= -2e-128) tmp = x; elseif (z <= -1.05e-187) tmp = y * (t / a); elseif (z <= 4.2e-298) tmp = x; elseif (z <= 2.3e-238) tmp = (y * t) / a; elseif (z <= 1.8e+101) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[((-y) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+155], t$95$1, If[LessEqual[z, -8.4e-22], x, If[LessEqual[z, -7.8e-49], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2e-128], x, If[LessEqual[z, -1.05e-187], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-298], x, If[LessEqual[z, 2.3e-238], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.8e+101], x, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{-y}{a}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.4 \cdot 10^{-22}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-49}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-128}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-187}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-298}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-238}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+101}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.1e155 or 1.80000000000000015e101 < z Initial program 93.8%
associate-*l/98.3%
Simplified98.3%
Taylor expanded in z around inf 77.2%
mul-1-neg77.2%
associate-*l/80.1%
distribute-rgt-neg-in80.1%
Simplified80.1%
if -2.1e155 < z < -8.40000000000000031e-22 or -7.80000000000000023e-49 < z < -2.00000000000000011e-128 or -1.04999999999999996e-187 < z < 4.2000000000000001e-298 or 2.30000000000000005e-238 < z < 1.80000000000000015e101Initial program 96.5%
associate-*l/98.6%
Simplified98.6%
Taylor expanded in x around inf 57.8%
if -8.40000000000000031e-22 < z < -7.80000000000000023e-49Initial program 85.8%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in t around inf 59.1%
associate-/l*72.5%
Simplified72.5%
if -2.00000000000000011e-128 < z < -1.04999999999999996e-187Initial program 78.0%
associate-*l/99.5%
Simplified99.5%
Taylor expanded in t around inf 48.2%
associate-/l*63.2%
associate-/r/63.6%
Applied egg-rr63.6%
if 4.2000000000000001e-298 < z < 2.30000000000000005e-238Initial program 99.5%
associate-*l/92.7%
Simplified92.7%
Taylor expanded in t around inf 77.5%
Final simplification65.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.1e+155)
(* z (/ (- y) a))
(if (<= z -2.6e-23)
x
(if (<= z -5.4e-53)
(/ t (/ a y))
(if (<= z -2.8e-127)
x
(if (<= z -6e-188)
(* y (/ t a))
(if (<= z 6.2e-298)
x
(if (<= z 5.8e-237)
(/ (* y t) a)
(if (<= z 1.2e+101) x (/ z (/ (- a) y)))))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.1e+155) {
tmp = z * (-y / a);
} else if (z <= -2.6e-23) {
tmp = x;
} else if (z <= -5.4e-53) {
tmp = t / (a / y);
} else if (z <= -2.8e-127) {
tmp = x;
} else if (z <= -6e-188) {
tmp = y * (t / a);
} else if (z <= 6.2e-298) {
tmp = x;
} else if (z <= 5.8e-237) {
tmp = (y * t) / a;
} else if (z <= 1.2e+101) {
tmp = x;
} else {
tmp = z / (-a / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.1d+155)) then
tmp = z * (-y / a)
else if (z <= (-2.6d-23)) then
tmp = x
else if (z <= (-5.4d-53)) then
tmp = t / (a / y)
else if (z <= (-2.8d-127)) then
tmp = x
else if (z <= (-6d-188)) then
tmp = y * (t / a)
else if (z <= 6.2d-298) then
tmp = x
else if (z <= 5.8d-237) then
tmp = (y * t) / a
else if (z <= 1.2d+101) then
tmp = x
else
tmp = z / (-a / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.1e+155) {
tmp = z * (-y / a);
} else if (z <= -2.6e-23) {
tmp = x;
} else if (z <= -5.4e-53) {
tmp = t / (a / y);
} else if (z <= -2.8e-127) {
tmp = x;
} else if (z <= -6e-188) {
tmp = y * (t / a);
} else if (z <= 6.2e-298) {
tmp = x;
} else if (z <= 5.8e-237) {
tmp = (y * t) / a;
} else if (z <= 1.2e+101) {
tmp = x;
} else {
tmp = z / (-a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.1e+155: tmp = z * (-y / a) elif z <= -2.6e-23: tmp = x elif z <= -5.4e-53: tmp = t / (a / y) elif z <= -2.8e-127: tmp = x elif z <= -6e-188: tmp = y * (t / a) elif z <= 6.2e-298: tmp = x elif z <= 5.8e-237: tmp = (y * t) / a elif z <= 1.2e+101: tmp = x else: tmp = z / (-a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.1e+155) tmp = Float64(z * Float64(Float64(-y) / a)); elseif (z <= -2.6e-23) tmp = x; elseif (z <= -5.4e-53) tmp = Float64(t / Float64(a / y)); elseif (z <= -2.8e-127) tmp = x; elseif (z <= -6e-188) tmp = Float64(y * Float64(t / a)); elseif (z <= 6.2e-298) tmp = x; elseif (z <= 5.8e-237) tmp = Float64(Float64(y * t) / a); elseif (z <= 1.2e+101) tmp = x; else tmp = Float64(z / Float64(Float64(-a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.1e+155) tmp = z * (-y / a); elseif (z <= -2.6e-23) tmp = x; elseif (z <= -5.4e-53) tmp = t / (a / y); elseif (z <= -2.8e-127) tmp = x; elseif (z <= -6e-188) tmp = y * (t / a); elseif (z <= 6.2e-298) tmp = x; elseif (z <= 5.8e-237) tmp = (y * t) / a; elseif (z <= 1.2e+101) tmp = x; else tmp = z / (-a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.1e+155], N[(z * N[((-y) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e-23], x, If[LessEqual[z, -5.4e-53], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.8e-127], x, If[LessEqual[z, -6e-188], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e-298], x, If[LessEqual[z, 5.8e-237], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.2e+101], x, N[(z / N[((-a) / y), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+155}:\\
\;\;\;\;z \cdot \frac{-y}{a}\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-23}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -5.4 \cdot 10^{-53}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-127}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-188}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-298}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-237}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+101}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{-a}{y}}\\
\end{array}
\end{array}
if z < -2.1e155Initial program 96.4%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 79.2%
mul-1-neg79.2%
associate-*l/79.3%
distribute-rgt-neg-in79.3%
Simplified79.3%
if -2.1e155 < z < -2.6e-23 or -5.3999999999999998e-53 < z < -2.8e-127 or -6.00000000000000033e-188 < z < 6.2000000000000003e-298 or 5.80000000000000022e-237 < z < 1.19999999999999994e101Initial program 96.5%
associate-*l/98.6%
Simplified98.6%
Taylor expanded in x around inf 57.8%
if -2.6e-23 < z < -5.3999999999999998e-53Initial program 85.8%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in t around inf 59.1%
associate-/l*72.5%
Simplified72.5%
if -2.8e-127 < z < -6.00000000000000033e-188Initial program 78.0%
associate-*l/99.5%
Simplified99.5%
Taylor expanded in t around inf 48.2%
associate-/l*63.2%
associate-/r/63.6%
Applied egg-rr63.6%
if 6.2000000000000003e-298 < z < 5.80000000000000022e-237Initial program 99.5%
associate-*l/92.7%
Simplified92.7%
Taylor expanded in t around inf 77.5%
if 1.19999999999999994e101 < z Initial program 91.8%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in z around inf 75.5%
mul-1-neg75.5%
associate-*l/80.8%
distribute-rgt-neg-in80.8%
Simplified80.8%
clear-num80.7%
add-sqr-sqrt0.0%
sqrt-unprod0.7%
sqr-neg0.7%
sqrt-unprod1.1%
add-sqr-sqrt1.1%
associate-/r/1.1%
frac-2neg1.1%
clear-num1.1%
add-sqr-sqrt0.0%
sqrt-unprod64.1%
sqr-neg64.1%
sqrt-unprod80.6%
add-sqr-sqrt80.9%
distribute-neg-frac80.9%
Applied egg-rr80.9%
Final simplification65.0%
(FPCore (x y z t a)
:precision binary64
(if (<= x -3.6e+111)
x
(if (or (<= x 4.5e+87) (and (not (<= x 1.8e+117)) (<= x 1.3e+151)))
(* y (/ (- t z) a))
x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.6e+111) {
tmp = x;
} else if ((x <= 4.5e+87) || (!(x <= 1.8e+117) && (x <= 1.3e+151))) {
tmp = y * ((t - 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 (x <= (-3.6d+111)) then
tmp = x
else if ((x <= 4.5d+87) .or. (.not. (x <= 1.8d+117)) .and. (x <= 1.3d+151)) then
tmp = y * ((t - 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 (x <= -3.6e+111) {
tmp = x;
} else if ((x <= 4.5e+87) || (!(x <= 1.8e+117) && (x <= 1.3e+151))) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -3.6e+111: tmp = x elif (x <= 4.5e+87) or (not (x <= 1.8e+117) and (x <= 1.3e+151)): tmp = y * ((t - z) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -3.6e+111) tmp = x; elseif ((x <= 4.5e+87) || (!(x <= 1.8e+117) && (x <= 1.3e+151))) tmp = Float64(y * Float64(Float64(t - z) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -3.6e+111) tmp = x; elseif ((x <= 4.5e+87) || (~((x <= 1.8e+117)) && (x <= 1.3e+151))) tmp = y * ((t - z) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3.6e+111], x, If[Or[LessEqual[x, 4.5e+87], And[N[Not[LessEqual[x, 1.8e+117]], $MachinePrecision], LessEqual[x, 1.3e+151]]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+111}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+87} \lor \neg \left(x \leq 1.8 \cdot 10^{+117}\right) \land x \leq 1.3 \cdot 10^{+151}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.6000000000000002e111 or 4.5000000000000003e87 < x < 1.80000000000000006e117 or 1.30000000000000007e151 < x Initial program 96.9%
associate-*l/98.8%
Simplified98.8%
Taylor expanded in x around inf 79.5%
if -3.6000000000000002e111 < x < 4.5000000000000003e87 or 1.80000000000000006e117 < x < 1.30000000000000007e151Initial program 93.7%
associate-*l/98.0%
Simplified98.0%
Taylor expanded in x around 0 71.3%
mul-1-neg71.3%
associate-*r/71.0%
distribute-rgt-neg-out71.0%
*-rgt-identity71.0%
*-rgt-identity71.0%
distribute-neg-frac71.0%
neg-sub071.0%
associate--r-71.0%
neg-sub071.0%
+-commutative71.0%
sub-neg71.0%
Simplified71.0%
Final simplification73.8%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.1e+115)
x
(if (<= x 9.2e+86)
(* (/ y a) (- t z))
(if (<= x 1.85e+121) x (if (<= x 3.8e+148) (* y (/ (- t z) a)) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.1e+115) {
tmp = x;
} else if (x <= 9.2e+86) {
tmp = (y / a) * (t - z);
} else if (x <= 1.85e+121) {
tmp = x;
} else if (x <= 3.8e+148) {
tmp = y * ((t - 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 (x <= (-1.1d+115)) then
tmp = x
else if (x <= 9.2d+86) then
tmp = (y / a) * (t - z)
else if (x <= 1.85d+121) then
tmp = x
else if (x <= 3.8d+148) then
tmp = y * ((t - 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 (x <= -1.1e+115) {
tmp = x;
} else if (x <= 9.2e+86) {
tmp = (y / a) * (t - z);
} else if (x <= 1.85e+121) {
tmp = x;
} else if (x <= 3.8e+148) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.1e+115: tmp = x elif x <= 9.2e+86: tmp = (y / a) * (t - z) elif x <= 1.85e+121: tmp = x elif x <= 3.8e+148: tmp = y * ((t - z) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.1e+115) tmp = x; elseif (x <= 9.2e+86) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif (x <= 1.85e+121) tmp = x; elseif (x <= 3.8e+148) tmp = Float64(y * Float64(Float64(t - z) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.1e+115) tmp = x; elseif (x <= 9.2e+86) tmp = (y / a) * (t - z); elseif (x <= 1.85e+121) tmp = x; elseif (x <= 3.8e+148) tmp = y * ((t - z) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.1e+115], x, If[LessEqual[x, 9.2e+86], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e+121], x, If[LessEqual[x, 3.8e+148], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{+115}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 9.2 \cdot 10^{+86}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+121}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+148}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.1e115 or 9.19999999999999958e86 < x < 1.85000000000000006e121 or 3.7999999999999998e148 < x Initial program 96.9%
associate-*l/98.8%
Simplified98.8%
Taylor expanded in x around inf 79.5%
if -1.1e115 < x < 9.19999999999999958e86Initial program 93.5%
associate-*l/98.0%
Simplified98.0%
Taylor expanded in x around 0 70.3%
mul-1-neg70.3%
associate-*r/69.9%
distribute-rgt-neg-out69.9%
*-rgt-identity69.9%
*-rgt-identity69.9%
distribute-neg-frac69.9%
neg-sub069.9%
associate--r-69.9%
neg-sub069.9%
+-commutative69.9%
sub-neg69.9%
Simplified69.9%
clear-num69.9%
un-div-inv70.4%
Applied egg-rr70.4%
Taylor expanded in y around 0 70.3%
associate-/l*70.4%
associate-/r/74.4%
Simplified74.4%
if 1.85000000000000006e121 < x < 3.7999999999999998e148Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
mul-1-neg100.0%
associate-*r/100.0%
distribute-rgt-neg-out100.0%
*-rgt-identity100.0%
*-rgt-identity100.0%
distribute-neg-frac100.0%
neg-sub0100.0%
associate--r-100.0%
neg-sub0100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Final simplification76.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.22e-27) (not (<= z 7.8e-31))) (- x (* (/ y a) z)) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.22e-27) || !(z <= 7.8e-31)) {
tmp = x - ((y / a) * z);
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.22d-27)) .or. (.not. (z <= 7.8d-31))) then
tmp = x - ((y / a) * z)
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.22e-27) || !(z <= 7.8e-31)) {
tmp = x - ((y / a) * z);
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.22e-27) or not (z <= 7.8e-31): tmp = x - ((y / a) * z) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.22e-27) || !(z <= 7.8e-31)) tmp = Float64(x - Float64(Float64(y / a) * z)); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.22e-27) || ~((z <= 7.8e-31))) tmp = x - ((y / a) * z); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.22e-27], N[Not[LessEqual[z, 7.8e-31]], $MachinePrecision]], N[(x - N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{-27} \lor \neg \left(z \leq 7.8 \cdot 10^{-31}\right):\\
\;\;\;\;x - \frac{y}{a} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -1.22e-27 or 7.8000000000000003e-31 < z Initial program 93.2%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in z around inf 81.9%
associate-*l/84.6%
*-commutative84.6%
Simplified84.6%
if -1.22e-27 < z < 7.8000000000000003e-31Initial program 96.6%
sub-neg96.6%
distribute-frac-neg96.6%
distribute-lft-neg-out96.6%
+-commutative96.6%
distribute-lft-neg-out96.6%
distribute-rgt-neg-in96.6%
associate-*l/97.3%
fma-def97.3%
sub-neg97.3%
distribute-neg-in97.3%
remove-double-neg97.3%
+-commutative97.3%
sub-neg97.3%
Simplified97.3%
Taylor expanded in z around 0 91.7%
Final simplification87.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.95e-29) (not (<= z 9.6e-34))) (- x (/ z (/ a y))) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.95e-29) || !(z <= 9.6e-34)) {
tmp = x - (z / (a / y));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.95d-29)) .or. (.not. (z <= 9.6d-34))) then
tmp = x - (z / (a / y))
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.95e-29) || !(z <= 9.6e-34)) {
tmp = x - (z / (a / y));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.95e-29) or not (z <= 9.6e-34): tmp = x - (z / (a / y)) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.95e-29) || !(z <= 9.6e-34)) tmp = Float64(x - Float64(z / Float64(a / y))); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.95e-29) || ~((z <= 9.6e-34))) tmp = x - (z / (a / y)); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.95e-29], N[Not[LessEqual[z, 9.6e-34]], $MachinePrecision]], N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-29} \lor \neg \left(z \leq 9.6 \cdot 10^{-34}\right):\\
\;\;\;\;x - \frac{z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -1.9499999999999999e-29 or 9.59999999999999965e-34 < z Initial program 93.2%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in z around inf 81.9%
associate-*l/84.6%
*-commutative84.6%
Simplified84.6%
clear-num84.6%
div-inv84.7%
Applied egg-rr84.7%
if -1.9499999999999999e-29 < z < 9.59999999999999965e-34Initial program 96.6%
sub-neg96.6%
distribute-frac-neg96.6%
distribute-lft-neg-out96.6%
+-commutative96.6%
distribute-lft-neg-out96.6%
distribute-rgt-neg-in96.6%
associate-*l/97.3%
fma-def97.3%
sub-neg97.3%
distribute-neg-in97.3%
remove-double-neg97.3%
+-commutative97.3%
sub-neg97.3%
Simplified97.3%
Taylor expanded in z around 0 91.7%
Final simplification87.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.45e+172) (* (/ y a) (- t z)) (if (<= z 1.2e+95) (+ x (/ (* y t) a)) (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.45e+172) {
tmp = (y / a) * (t - z);
} else if (z <= 1.2e+95) {
tmp = x + ((y * t) / a);
} else {
tmp = y * ((t - 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 (z <= (-2.45d+172)) then
tmp = (y / a) * (t - z)
else if (z <= 1.2d+95) then
tmp = x + ((y * t) / a)
else
tmp = y * ((t - 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 (z <= -2.45e+172) {
tmp = (y / a) * (t - z);
} else if (z <= 1.2e+95) {
tmp = x + ((y * t) / a);
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.45e+172: tmp = (y / a) * (t - z) elif z <= 1.2e+95: tmp = x + ((y * t) / a) else: tmp = y * ((t - z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.45e+172) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif (z <= 1.2e+95) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = Float64(y * Float64(Float64(t - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.45e+172) tmp = (y / a) * (t - z); elseif (z <= 1.2e+95) tmp = x + ((y * t) / a); else tmp = y * ((t - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.45e+172], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+95], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+172}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+95}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if z < -2.45e172Initial program 96.1%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in x around 0 88.7%
mul-1-neg88.7%
associate-*r/70.8%
distribute-rgt-neg-out70.8%
*-rgt-identity70.8%
*-rgt-identity70.8%
distribute-neg-frac70.8%
neg-sub070.8%
associate--r-70.8%
neg-sub070.8%
+-commutative70.8%
sub-neg70.8%
Simplified70.8%
clear-num70.6%
un-div-inv70.6%
Applied egg-rr70.6%
Taylor expanded in y around 0 88.7%
associate-/l*70.6%
associate-/r/92.4%
Simplified92.4%
if -2.45e172 < z < 1.2e95Initial program 95.1%
sub-neg95.1%
distribute-frac-neg95.1%
distribute-lft-neg-out95.1%
+-commutative95.1%
distribute-lft-neg-out95.1%
distribute-rgt-neg-in95.1%
associate-*l/98.3%
fma-def98.3%
sub-neg98.3%
distribute-neg-in98.3%
remove-double-neg98.3%
+-commutative98.3%
sub-neg98.3%
Simplified98.3%
Taylor expanded in z around 0 81.8%
if 1.2e95 < z Initial program 92.0%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in x around 0 81.0%
mul-1-neg81.0%
associate-*r/86.1%
distribute-rgt-neg-out86.1%
*-rgt-identity86.1%
*-rgt-identity86.1%
distribute-neg-frac86.1%
neg-sub086.1%
associate--r-86.1%
neg-sub086.1%
+-commutative86.1%
sub-neg86.1%
Simplified86.1%
Final simplification83.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.5e+146) (not (<= t 2.9e+54))) (* (/ y a) t) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.5e+146) || !(t <= 2.9e+54)) {
tmp = (y / a) * 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 ((t <= (-6.5d+146)) .or. (.not. (t <= 2.9d+54))) then
tmp = (y / a) * 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 ((t <= -6.5e+146) || !(t <= 2.9e+54)) {
tmp = (y / a) * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.5e+146) or not (t <= 2.9e+54): tmp = (y / a) * t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.5e+146) || !(t <= 2.9e+54)) tmp = Float64(Float64(y / a) * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6.5e+146) || ~((t <= 2.9e+54))) tmp = (y / a) * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.5e+146], N[Not[LessEqual[t, 2.9e+54]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+146} \lor \neg \left(t \leq 2.9 \cdot 10^{+54}\right):\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -6.4999999999999997e146 or 2.8999999999999999e54 < t Initial program 91.2%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around inf 57.8%
associate-*r/64.0%
Simplified64.0%
if -6.4999999999999997e146 < t < 2.8999999999999999e54Initial program 96.5%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in x around inf 50.1%
Final simplification54.7%
(FPCore (x y z t a) :precision binary64 (+ x (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - 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 / a) * (t - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
def code(x, y, z, t, a): return x + ((y / a) * (t - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y / a) * Float64(t - z))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y / a) * (t - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{a} \cdot \left(t - z\right)
\end{array}
Initial program 94.8%
associate-*l/98.3%
Simplified98.3%
Final simplification98.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 94.8%
associate-*l/98.3%
Simplified98.3%
Taylor expanded in x around inf 41.7%
Final simplification41.7%
(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 2023320
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:herbie-target
(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)))