
(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 14 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 (let* ((t_1 (/ (* y (- z t)) a))) (if (<= t_1 2e+255) (+ x t_1) (+ x (/ y (/ a (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / a;
double tmp;
if (t_1 <= 2e+255) {
tmp = x + t_1;
} else {
tmp = x + (y / (a / (z - 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 = (y * (z - t)) / a
if (t_1 <= 2d+255) then
tmp = x + t_1
else
tmp = x + (y / (a / (z - t)))
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 - t)) / a;
double tmp;
if (t_1 <= 2e+255) {
tmp = x + t_1;
} else {
tmp = x + (y / (a / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / a tmp = 0 if t_1 <= 2e+255: tmp = x + t_1 else: tmp = x + (y / (a / (z - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / a) tmp = 0.0 if (t_1 <= 2e+255) tmp = Float64(x + t_1); else tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / a; tmp = 0.0; if (t_1 <= 2e+255) tmp = x + t_1; else tmp = x + (y / (a / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+255], N[(x + t$95$1), $MachinePrecision], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+255}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) a) < 1.99999999999999998e255Initial program 97.3%
if 1.99999999999999998e255 < (/.f64 (*.f64 y (-.f64 z t)) a) Initial program 67.9%
associate-/l*100.0%
Simplified100.0%
Final simplification97.7%
(FPCore (x y z t a)
:precision binary64
(if (<= x -5.5e+170)
x
(if (or (<= x -1.5e+155)
(and (not (<= x -5.4e+72))
(or (<= x -1.2e-73)
(and (not (<= x -6e-114)) (<= x 1.85e-14)))))
(* y (/ (- z t) a))
x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.5e+170) {
tmp = x;
} else if ((x <= -1.5e+155) || (!(x <= -5.4e+72) && ((x <= -1.2e-73) || (!(x <= -6e-114) && (x <= 1.85e-14))))) {
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 (x <= (-5.5d+170)) then
tmp = x
else if ((x <= (-1.5d+155)) .or. (.not. (x <= (-5.4d+72))) .and. (x <= (-1.2d-73)) .or. (.not. (x <= (-6d-114))) .and. (x <= 1.85d-14)) 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 (x <= -5.5e+170) {
tmp = x;
} else if ((x <= -1.5e+155) || (!(x <= -5.4e+72) && ((x <= -1.2e-73) || (!(x <= -6e-114) && (x <= 1.85e-14))))) {
tmp = y * ((z - t) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5.5e+170: tmp = x elif (x <= -1.5e+155) or (not (x <= -5.4e+72) and ((x <= -1.2e-73) or (not (x <= -6e-114) and (x <= 1.85e-14)))): tmp = y * ((z - t) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5.5e+170) tmp = x; elseif ((x <= -1.5e+155) || (!(x <= -5.4e+72) && ((x <= -1.2e-73) || (!(x <= -6e-114) && (x <= 1.85e-14))))) 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 (x <= -5.5e+170) tmp = x; elseif ((x <= -1.5e+155) || (~((x <= -5.4e+72)) && ((x <= -1.2e-73) || (~((x <= -6e-114)) && (x <= 1.85e-14))))) tmp = y * ((z - t) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5.5e+170], x, If[Or[LessEqual[x, -1.5e+155], And[N[Not[LessEqual[x, -5.4e+72]], $MachinePrecision], Or[LessEqual[x, -1.2e-73], And[N[Not[LessEqual[x, -6e-114]], $MachinePrecision], LessEqual[x, 1.85e-14]]]]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+170}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{+155} \lor \neg \left(x \leq -5.4 \cdot 10^{+72}\right) \land \left(x \leq -1.2 \cdot 10^{-73} \lor \neg \left(x \leq -6 \cdot 10^{-114}\right) \land x \leq 1.85 \cdot 10^{-14}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -5.4999999999999999e170 or -1.5000000000000001e155 < x < -5.4000000000000001e72 or -1.20000000000000003e-73 < x < -6.0000000000000003e-114 or 1.85000000000000001e-14 < x Initial program 94.8%
+-commutative94.8%
associate-*l/98.8%
fma-def98.8%
Simplified98.8%
Taylor expanded in y around 0 74.1%
if -5.4999999999999999e170 < x < -1.5000000000000001e155 or -5.4000000000000001e72 < x < -1.20000000000000003e-73 or -6.0000000000000003e-114 < x < 1.85000000000000001e-14Initial program 91.6%
+-commutative91.6%
associate-*l/94.4%
fma-def94.4%
Simplified94.4%
Taylor expanded in y around inf 72.7%
div-sub74.1%
Simplified74.1%
Final simplification74.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y a) (- t))))
(if (<= z -9.5e+77)
(/ y (/ a z))
(if (<= z -7e-102)
x
(if (<= z -7.2e-238)
t_1
(if (<= z 3.4e-240) x (if (<= z 2.7) t_1 (* (/ y a) z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * -t;
double tmp;
if (z <= -9.5e+77) {
tmp = y / (a / z);
} else if (z <= -7e-102) {
tmp = x;
} else if (z <= -7.2e-238) {
tmp = t_1;
} else if (z <= 3.4e-240) {
tmp = x;
} else if (z <= 2.7) {
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 / a) * -t
if (z <= (-9.5d+77)) then
tmp = y / (a / z)
else if (z <= (-7d-102)) then
tmp = x
else if (z <= (-7.2d-238)) then
tmp = t_1
else if (z <= 3.4d-240) then
tmp = x
else if (z <= 2.7d0) 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 / a) * -t;
double tmp;
if (z <= -9.5e+77) {
tmp = y / (a / z);
} else if (z <= -7e-102) {
tmp = x;
} else if (z <= -7.2e-238) {
tmp = t_1;
} else if (z <= 3.4e-240) {
tmp = x;
} else if (z <= 2.7) {
tmp = t_1;
} else {
tmp = (y / a) * z;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / a) * -t tmp = 0 if z <= -9.5e+77: tmp = y / (a / z) elif z <= -7e-102: tmp = x elif z <= -7.2e-238: tmp = t_1 elif z <= 3.4e-240: tmp = x elif z <= 2.7: tmp = t_1 else: tmp = (y / a) * z return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / a) * Float64(-t)) tmp = 0.0 if (z <= -9.5e+77) tmp = Float64(y / Float64(a / z)); elseif (z <= -7e-102) tmp = x; elseif (z <= -7.2e-238) tmp = t_1; elseif (z <= 3.4e-240) tmp = x; elseif (z <= 2.7) tmp = t_1; else tmp = Float64(Float64(y / a) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / a) * -t; tmp = 0.0; if (z <= -9.5e+77) tmp = y / (a / z); elseif (z <= -7e-102) tmp = x; elseif (z <= -7.2e-238) tmp = t_1; elseif (z <= 3.4e-240) tmp = x; elseif (z <= 2.7) tmp = t_1; else tmp = (y / a) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * (-t)), $MachinePrecision]}, If[LessEqual[z, -9.5e+77], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7e-102], x, If[LessEqual[z, -7.2e-238], t$95$1, If[LessEqual[z, 3.4e-240], x, If[LessEqual[z, 2.7], t$95$1, N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+77}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-102}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-240}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot z\\
\end{array}
\end{array}
if z < -9.4999999999999998e77Initial program 92.1%
+-commutative92.1%
associate-*l/92.8%
fma-def92.8%
Simplified92.8%
Taylor expanded in z around inf 52.5%
associate-/l*55.1%
Simplified55.1%
if -9.4999999999999998e77 < z < -6.99999999999999973e-102 or -7.20000000000000021e-238 < z < 3.3999999999999999e-240Initial program 97.0%
+-commutative97.0%
associate-*l/97.1%
fma-def97.1%
Simplified97.1%
Taylor expanded in y around 0 68.6%
if -6.99999999999999973e-102 < z < -7.20000000000000021e-238 or 3.3999999999999999e-240 < z < 2.7000000000000002Initial program 89.7%
+-commutative89.7%
associate-*l/98.8%
fma-def98.8%
Simplified98.8%
Taylor expanded in t around inf 48.1%
mul-1-neg48.1%
associate-*r/56.1%
distribute-rgt-neg-in56.1%
distribute-neg-frac56.1%
Simplified56.1%
if 2.7000000000000002 < z Initial program 93.7%
+-commutative93.7%
associate-*l/93.5%
fma-def93.5%
Simplified93.5%
Taylor expanded in z around inf 53.5%
associate-/l*49.9%
Simplified49.9%
associate-/r/56.3%
Applied egg-rr56.3%
Final simplification59.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.15e+78)
(/ y (/ a z))
(if (<= z -2.8e-102)
x
(if (<= z -5.3e-238)
(/ y (/ (- a) t))
(if (<= z 9e-240)
x
(if (<= z 0.054) (* (/ y a) (- t)) (* (/ y a) z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+78) {
tmp = y / (a / z);
} else if (z <= -2.8e-102) {
tmp = x;
} else if (z <= -5.3e-238) {
tmp = y / (-a / t);
} else if (z <= 9e-240) {
tmp = x;
} else if (z <= 0.054) {
tmp = (y / a) * -t;
} 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 (z <= (-1.15d+78)) then
tmp = y / (a / z)
else if (z <= (-2.8d-102)) then
tmp = x
else if (z <= (-5.3d-238)) then
tmp = y / (-a / t)
else if (z <= 9d-240) then
tmp = x
else if (z <= 0.054d0) then
tmp = (y / a) * -t
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 (z <= -1.15e+78) {
tmp = y / (a / z);
} else if (z <= -2.8e-102) {
tmp = x;
} else if (z <= -5.3e-238) {
tmp = y / (-a / t);
} else if (z <= 9e-240) {
tmp = x;
} else if (z <= 0.054) {
tmp = (y / a) * -t;
} else {
tmp = (y / a) * z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e+78: tmp = y / (a / z) elif z <= -2.8e-102: tmp = x elif z <= -5.3e-238: tmp = y / (-a / t) elif z <= 9e-240: tmp = x elif z <= 0.054: tmp = (y / a) * -t else: tmp = (y / a) * z return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e+78) tmp = Float64(y / Float64(a / z)); elseif (z <= -2.8e-102) tmp = x; elseif (z <= -5.3e-238) tmp = Float64(y / Float64(Float64(-a) / t)); elseif (z <= 9e-240) tmp = x; elseif (z <= 0.054) tmp = Float64(Float64(y / a) * Float64(-t)); else tmp = Float64(Float64(y / a) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.15e+78) tmp = y / (a / z); elseif (z <= -2.8e-102) tmp = x; elseif (z <= -5.3e-238) tmp = y / (-a / t); elseif (z <= 9e-240) tmp = x; elseif (z <= 0.054) tmp = (y / a) * -t; else tmp = (y / a) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+78], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.8e-102], x, If[LessEqual[z, -5.3e-238], N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-240], x, If[LessEqual[z, 0.054], N[(N[(y / a), $MachinePrecision] * (-t)), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+78}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-102}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -5.3 \cdot 10^{-238}:\\
\;\;\;\;\frac{y}{\frac{-a}{t}}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-240}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 0.054:\\
\;\;\;\;\frac{y}{a} \cdot \left(-t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot z\\
\end{array}
\end{array}
if z < -1.1500000000000001e78Initial program 92.1%
+-commutative92.1%
associate-*l/92.8%
fma-def92.8%
Simplified92.8%
Taylor expanded in z around inf 52.5%
associate-/l*55.1%
Simplified55.1%
if -1.1500000000000001e78 < z < -2.80000000000000013e-102 or -5.29999999999999968e-238 < z < 9.0000000000000003e-240Initial program 97.0%
+-commutative97.0%
associate-*l/97.1%
fma-def97.1%
Simplified97.1%
Taylor expanded in y around 0 68.6%
if -2.80000000000000013e-102 < z < -5.29999999999999968e-238Initial program 92.5%
+-commutative92.5%
associate-*l/99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in t around inf 54.4%
mul-1-neg54.4%
associate-*r/61.6%
distribute-rgt-neg-in61.6%
distribute-neg-frac61.6%
Simplified61.6%
*-commutative61.6%
frac-2neg61.6%
remove-double-neg61.6%
associate-*l/54.4%
Applied egg-rr54.4%
associate-/l*61.8%
Simplified61.8%
if 9.0000000000000003e-240 < z < 0.0539999999999999994Initial program 87.9%
+-commutative87.9%
associate-*l/98.3%
fma-def98.2%
Simplified98.2%
Taylor expanded in t around inf 43.9%
mul-1-neg43.9%
associate-*r/52.3%
distribute-rgt-neg-in52.3%
distribute-neg-frac52.3%
Simplified52.3%
if 0.0539999999999999994 < z Initial program 93.7%
+-commutative93.7%
associate-*l/93.5%
fma-def93.5%
Simplified93.5%
Taylor expanded in z around inf 53.5%
associate-/l*49.9%
Simplified49.9%
associate-/r/56.3%
Applied egg-rr56.3%
Final simplification59.2%
(FPCore (x y z t a)
:precision binary64
(if (<= x -2.3e-53)
x
(if (or (<= x -4.5e-72) (and (not (<= x -1.55e-116)) (<= x 2.9e-101)))
(* y (/ z a))
x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.3e-53) {
tmp = x;
} else if ((x <= -4.5e-72) || (!(x <= -1.55e-116) && (x <= 2.9e-101))) {
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 (x <= (-2.3d-53)) then
tmp = x
else if ((x <= (-4.5d-72)) .or. (.not. (x <= (-1.55d-116))) .and. (x <= 2.9d-101)) 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 (x <= -2.3e-53) {
tmp = x;
} else if ((x <= -4.5e-72) || (!(x <= -1.55e-116) && (x <= 2.9e-101))) {
tmp = y * (z / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.3e-53: tmp = x elif (x <= -4.5e-72) or (not (x <= -1.55e-116) and (x <= 2.9e-101)): tmp = y * (z / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.3e-53) tmp = x; elseif ((x <= -4.5e-72) || (!(x <= -1.55e-116) && (x <= 2.9e-101))) 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 (x <= -2.3e-53) tmp = x; elseif ((x <= -4.5e-72) || (~((x <= -1.55e-116)) && (x <= 2.9e-101))) tmp = y * (z / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.3e-53], x, If[Or[LessEqual[x, -4.5e-72], And[N[Not[LessEqual[x, -1.55e-116]], $MachinePrecision], LessEqual[x, 2.9e-101]]], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{-53}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-72} \lor \neg \left(x \leq -1.55 \cdot 10^{-116}\right) \land x \leq 2.9 \cdot 10^{-101}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.3000000000000001e-53 or -4.5e-72 < x < -1.55000000000000009e-116 or 2.9e-101 < x Initial program 91.7%
+-commutative91.7%
associate-*l/98.5%
fma-def98.5%
Simplified98.5%
Taylor expanded in y around 0 59.9%
if -2.3000000000000001e-53 < x < -4.5e-72 or -1.55000000000000009e-116 < x < 2.9e-101Initial program 94.9%
+-commutative94.9%
associate-*l/92.4%
fma-def92.4%
Simplified92.4%
Taylor expanded in z around inf 49.5%
associate-*r/45.9%
Simplified45.9%
Final simplification54.7%
(FPCore (x y z t a)
:precision binary64
(if (<= x -7.2e-52)
x
(if (<= x -1.5e-67)
(* y (/ z a))
(if (<= x -7.5e-116) x (if (<= x 5.3e-101) (* (/ y a) z) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -7.2e-52) {
tmp = x;
} else if (x <= -1.5e-67) {
tmp = y * (z / a);
} else if (x <= -7.5e-116) {
tmp = x;
} else if (x <= 5.3e-101) {
tmp = (y / a) * z;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-7.2d-52)) then
tmp = x
else if (x <= (-1.5d-67)) then
tmp = y * (z / a)
else if (x <= (-7.5d-116)) then
tmp = x
else if (x <= 5.3d-101) then
tmp = (y / a) * z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -7.2e-52) {
tmp = x;
} else if (x <= -1.5e-67) {
tmp = y * (z / a);
} else if (x <= -7.5e-116) {
tmp = x;
} else if (x <= 5.3e-101) {
tmp = (y / a) * z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -7.2e-52: tmp = x elif x <= -1.5e-67: tmp = y * (z / a) elif x <= -7.5e-116: tmp = x elif x <= 5.3e-101: tmp = (y / a) * z else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -7.2e-52) tmp = x; elseif (x <= -1.5e-67) tmp = Float64(y * Float64(z / a)); elseif (x <= -7.5e-116) tmp = x; elseif (x <= 5.3e-101) tmp = Float64(Float64(y / a) * z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -7.2e-52) tmp = x; elseif (x <= -1.5e-67) tmp = y * (z / a); elseif (x <= -7.5e-116) tmp = x; elseif (x <= 5.3e-101) tmp = (y / a) * z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -7.2e-52], x, If[LessEqual[x, -1.5e-67], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.5e-116], x, If[LessEqual[x, 5.3e-101], N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{-52}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-67}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-116}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.3 \cdot 10^{-101}:\\
\;\;\;\;\frac{y}{a} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -7.19999999999999976e-52 or -1.50000000000000016e-67 < x < -7.5000000000000004e-116 or 5.3000000000000003e-101 < x Initial program 91.7%
+-commutative91.7%
associate-*l/98.5%
fma-def98.5%
Simplified98.5%
Taylor expanded in y around 0 59.9%
if -7.19999999999999976e-52 < x < -1.50000000000000016e-67Initial program 100.0%
+-commutative100.0%
associate-*l/99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in z around inf 83.8%
associate-*r/83.8%
Simplified83.8%
if -7.5000000000000004e-116 < x < 5.3000000000000003e-101Initial program 94.6%
+-commutative94.6%
associate-*l/91.9%
fma-def91.9%
Simplified91.9%
Taylor expanded in z around inf 47.2%
associate-/l*43.3%
Simplified43.3%
associate-/r/46.5%
Applied egg-rr46.5%
Final simplification55.8%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.65e-48)
x
(if (<= x -4.8e-67)
(/ z (/ a y))
(if (<= x -4.8e-116) x (if (<= x 5.05e-101) (* (/ y a) z) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.65e-48) {
tmp = x;
} else if (x <= -4.8e-67) {
tmp = z / (a / y);
} else if (x <= -4.8e-116) {
tmp = x;
} else if (x <= 5.05e-101) {
tmp = (y / a) * z;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.65d-48)) then
tmp = x
else if (x <= (-4.8d-67)) then
tmp = z / (a / y)
else if (x <= (-4.8d-116)) then
tmp = x
else if (x <= 5.05d-101) then
tmp = (y / a) * z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.65e-48) {
tmp = x;
} else if (x <= -4.8e-67) {
tmp = z / (a / y);
} else if (x <= -4.8e-116) {
tmp = x;
} else if (x <= 5.05e-101) {
tmp = (y / a) * z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.65e-48: tmp = x elif x <= -4.8e-67: tmp = z / (a / y) elif x <= -4.8e-116: tmp = x elif x <= 5.05e-101: tmp = (y / a) * z else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.65e-48) tmp = x; elseif (x <= -4.8e-67) tmp = Float64(z / Float64(a / y)); elseif (x <= -4.8e-116) tmp = x; elseif (x <= 5.05e-101) tmp = Float64(Float64(y / a) * z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.65e-48) tmp = x; elseif (x <= -4.8e-67) tmp = z / (a / y); elseif (x <= -4.8e-116) tmp = x; elseif (x <= 5.05e-101) tmp = (y / a) * z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.65e-48], x, If[LessEqual[x, -4.8e-67], N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.8e-116], x, If[LessEqual[x, 5.05e-101], N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{-48}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-67}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-116}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.05 \cdot 10^{-101}:\\
\;\;\;\;\frac{y}{a} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.65e-48 or -4.8e-67 < x < -4.79999999999999986e-116 or 5.05000000000000013e-101 < x Initial program 91.7%
+-commutative91.7%
associate-*l/98.5%
fma-def98.5%
Simplified98.5%
Taylor expanded in y around 0 59.9%
if -1.65e-48 < x < -4.8e-67Initial program 100.0%
+-commutative100.0%
associate-*l/99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in z around inf 83.8%
associate-/l*83.8%
Simplified83.8%
associate-/r/83.5%
Applied egg-rr83.5%
*-commutative83.5%
clear-num83.5%
un-div-inv83.8%
Applied egg-rr83.8%
if -4.79999999999999986e-116 < x < 5.05000000000000013e-101Initial program 94.6%
+-commutative94.6%
associate-*l/91.9%
fma-def91.9%
Simplified91.9%
Taylor expanded in z around inf 47.2%
associate-/l*43.3%
Simplified43.3%
associate-/r/46.5%
Applied egg-rr46.5%
Final simplification55.8%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.9e-48)
x
(if (<= x -1.15e-70)
(/ z (/ a y))
(if (<= x -4.3e-114) x (if (<= x 2.35e-101) (/ (* y z) a) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.9e-48) {
tmp = x;
} else if (x <= -1.15e-70) {
tmp = z / (a / y);
} else if (x <= -4.3e-114) {
tmp = x;
} else if (x <= 2.35e-101) {
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 (x <= (-1.9d-48)) then
tmp = x
else if (x <= (-1.15d-70)) then
tmp = z / (a / y)
else if (x <= (-4.3d-114)) then
tmp = x
else if (x <= 2.35d-101) 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 (x <= -1.9e-48) {
tmp = x;
} else if (x <= -1.15e-70) {
tmp = z / (a / y);
} else if (x <= -4.3e-114) {
tmp = x;
} else if (x <= 2.35e-101) {
tmp = (y * z) / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.9e-48: tmp = x elif x <= -1.15e-70: tmp = z / (a / y) elif x <= -4.3e-114: tmp = x elif x <= 2.35e-101: tmp = (y * z) / a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.9e-48) tmp = x; elseif (x <= -1.15e-70) tmp = Float64(z / Float64(a / y)); elseif (x <= -4.3e-114) tmp = x; elseif (x <= 2.35e-101) tmp = Float64(Float64(y * z) / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.9e-48) tmp = x; elseif (x <= -1.15e-70) tmp = z / (a / y); elseif (x <= -4.3e-114) tmp = x; elseif (x <= 2.35e-101) tmp = (y * z) / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.9e-48], x, If[LessEqual[x, -1.15e-70], N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.3e-114], x, If[LessEqual[x, 2.35e-101], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{-48}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.15 \cdot 10^{-70}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;x \leq -4.3 \cdot 10^{-114}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.35 \cdot 10^{-101}:\\
\;\;\;\;\frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.90000000000000001e-48 or -1.15e-70 < x < -4.3e-114 or 2.35e-101 < x Initial program 91.7%
+-commutative91.7%
associate-*l/98.5%
fma-def98.5%
Simplified98.5%
Taylor expanded in y around 0 59.9%
if -1.90000000000000001e-48 < x < -1.15e-70Initial program 100.0%
+-commutative100.0%
associate-*l/99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in z around inf 83.8%
associate-/l*83.8%
Simplified83.8%
associate-/r/83.5%
Applied egg-rr83.5%
*-commutative83.5%
clear-num83.5%
un-div-inv83.8%
Applied egg-rr83.8%
if -4.3e-114 < x < 2.35e-101Initial program 94.6%
+-commutative94.6%
associate-*l/91.9%
fma-def91.9%
Simplified91.9%
Taylor expanded in z around inf 47.2%
Final simplification56.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* y (- z t)) a))) (if (<= t_1 -2e+110) t_1 (+ x (/ y (/ a (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / a;
double tmp;
if (t_1 <= -2e+110) {
tmp = t_1;
} else {
tmp = x + (y / (a / (z - 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 = (y * (z - t)) / a
if (t_1 <= (-2d+110)) then
tmp = t_1
else
tmp = x + (y / (a / (z - t)))
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 - t)) / a;
double tmp;
if (t_1 <= -2e+110) {
tmp = t_1;
} else {
tmp = x + (y / (a / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / a tmp = 0 if t_1 <= -2e+110: tmp = t_1 else: tmp = x + (y / (a / (z - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / a) tmp = 0.0 if (t_1 <= -2e+110) tmp = t_1; else tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / a; tmp = 0.0; if (t_1 <= -2e+110) tmp = t_1; else tmp = x + (y / (a / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+110], t$95$1, N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+110}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) a) < -2e110Initial program 93.2%
+-commutative93.2%
associate-*l/96.5%
fma-def96.5%
Simplified96.5%
Taylor expanded in y around -inf 87.9%
if -2e110 < (/.f64 (*.f64 y (-.f64 z t)) a) Initial program 92.8%
associate-/l*97.5%
Simplified97.5%
Final simplification95.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.8e+23) (not (<= z 0.0065))) (+ x (* (/ y a) z)) (+ x (/ y (/ (- a) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.8e+23) || !(z <= 0.0065)) {
tmp = x + ((y / a) * z);
} else {
tmp = x + (y / (-a / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.8d+23)) .or. (.not. (z <= 0.0065d0))) then
tmp = x + ((y / a) * z)
else
tmp = x + (y / (-a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.8e+23) || !(z <= 0.0065)) {
tmp = x + ((y / a) * z);
} else {
tmp = x + (y / (-a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.8e+23) or not (z <= 0.0065): tmp = x + ((y / a) * z) else: tmp = x + (y / (-a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.8e+23) || !(z <= 0.0065)) tmp = Float64(x + Float64(Float64(y / a) * z)); else tmp = Float64(x + Float64(y / Float64(Float64(-a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.8e+23) || ~((z <= 0.0065))) tmp = x + ((y / a) * z); else tmp = x + (y / (-a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.8e+23], N[Not[LessEqual[z, 0.0065]], $MachinePrecision]], N[(x + N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+23} \lor \neg \left(z \leq 0.0065\right):\\
\;\;\;\;x + \frac{y}{a} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{-a}{t}}\\
\end{array}
\end{array}
if z < -4.8e23 or 0.0064999999999999997 < z Initial program 93.0%
+-commutative93.0%
associate-*l/94.0%
fma-def94.0%
Simplified94.0%
Taylor expanded in t around 0 82.9%
associate-/l*80.0%
Simplified80.0%
associate-/r/53.6%
Applied egg-rr86.9%
if -4.8e23 < z < 0.0064999999999999997Initial program 92.9%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in z around 0 87.7%
associate-*r/87.7%
neg-mul-187.7%
Simplified87.7%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8.2e+96) (not (<= t 1.15e+121))) (* y (/ (- z t) a)) (+ x (* (/ y a) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8.2e+96) || !(t <= 1.15e+121)) {
tmp = y * ((z - t) / a);
} else {
tmp = x + ((y / a) * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-8.2d+96)) .or. (.not. (t <= 1.15d+121))) then
tmp = y * ((z - t) / a)
else
tmp = x + ((y / a) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8.2e+96) || !(t <= 1.15e+121)) {
tmp = y * ((z - t) / a);
} else {
tmp = x + ((y / a) * z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8.2e+96) or not (t <= 1.15e+121): tmp = y * ((z - t) / a) else: tmp = x + ((y / a) * z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -8.2e+96) || !(t <= 1.15e+121)) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = Float64(x + Float64(Float64(y / a) * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -8.2e+96) || ~((t <= 1.15e+121))) tmp = y * ((z - t) / a); else tmp = x + ((y / a) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8.2e+96], N[Not[LessEqual[t, 1.15e+121]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+96} \lor \neg \left(t \leq 1.15 \cdot 10^{+121}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot z\\
\end{array}
\end{array}
if t < -8.19999999999999996e96 or 1.1499999999999999e121 < t Initial program 88.1%
+-commutative88.1%
associate-*l/95.1%
fma-def95.1%
Simplified95.1%
Taylor expanded in y around inf 72.0%
div-sub74.8%
Simplified74.8%
if -8.19999999999999996e96 < t < 1.1499999999999999e121Initial program 94.8%
+-commutative94.8%
associate-*l/96.7%
fma-def96.7%
Simplified96.7%
Taylor expanded in t around 0 80.1%
associate-/l*79.9%
Simplified79.9%
associate-/r/33.4%
Applied egg-rr84.2%
Final simplification81.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.5e+23) (not (<= z 0.72))) (+ x (* (/ y a) z)) (- x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.5e+23) || !(z <= 0.72)) {
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 <= (-3.5d+23)) .or. (.not. (z <= 0.72d0))) 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 <= -3.5e+23) || !(z <= 0.72)) {
tmp = x + ((y / a) * z);
} else {
tmp = x - (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.5e+23) or not (z <= 0.72): 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 <= -3.5e+23) || !(z <= 0.72)) tmp = Float64(x + Float64(Float64(y / a) * z)); else tmp = Float64(x - Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.5e+23) || ~((z <= 0.72))) 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, -3.5e+23], N[Not[LessEqual[z, 0.72]], $MachinePrecision]], N[(x + N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+23} \lor \neg \left(z \leq 0.72\right):\\
\;\;\;\;x + \frac{y}{a} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -3.5000000000000002e23 or 0.71999999999999997 < z Initial program 93.0%
+-commutative93.0%
associate-*l/94.0%
fma-def94.0%
Simplified94.0%
Taylor expanded in t around 0 82.9%
associate-/l*80.0%
Simplified80.0%
associate-/r/53.6%
Applied egg-rr86.9%
if -3.5000000000000002e23 < z < 0.71999999999999997Initial program 92.9%
+-commutative92.9%
associate-*l/97.9%
fma-def97.9%
Simplified97.9%
fma-udef97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 85.2%
mul-1-neg85.2%
associate-/l*89.6%
unsub-neg89.6%
associate-/r/87.6%
*-commutative87.6%
Simplified87.6%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (+ (* (/ y a) (- z t)) x))
double code(double x, double y, double z, double t, double a) {
return ((y / a) * (z - t)) + 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 = ((y / a) * (z - t)) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return ((y / a) * (z - t)) + x;
}
def code(x, y, z, t, a): return ((y / a) * (z - t)) + x
function code(x, y, z, t, a) return Float64(Float64(Float64(y / a) * Float64(z - t)) + x) end
function tmp = code(x, y, z, t, a) tmp = ((y / a) * (z - t)) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(y / a), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\frac{y}{a} \cdot \left(z - t\right) + x
\end{array}
Initial program 92.9%
+-commutative92.9%
associate-*l/96.2%
fma-def96.2%
Simplified96.2%
fma-udef96.2%
Applied egg-rr96.2%
Final simplification96.2%
(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 92.9%
+-commutative92.9%
associate-*l/96.2%
fma-def96.2%
Simplified96.2%
Taylor expanded in y around 0 42.2%
Final simplification42.2%
(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 2024031
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
: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)))