
(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 (+ 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 91.8%
associate-/l*95.8%
Simplified95.8%
Taylor expanded in y around 0 91.8%
associate-*l/97.3%
*-commutative97.3%
Simplified97.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y (- a)))))
(if (<= z -3.1e+79)
(* z (/ y a))
(if (<= z -1.7e-67)
t_1
(if (<= z -1.7e-183)
x
(if (<= z -1.55e-195)
(* (- y) (/ t a))
(if (<= z 4.9e-108) x (if (<= z 6e-39) t_1 (/ z (/ a y))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / -a);
double tmp;
if (z <= -3.1e+79) {
tmp = z * (y / a);
} else if (z <= -1.7e-67) {
tmp = t_1;
} else if (z <= -1.7e-183) {
tmp = x;
} else if (z <= -1.55e-195) {
tmp = -y * (t / a);
} else if (z <= 4.9e-108) {
tmp = x;
} else if (z <= 6e-39) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * (y / -a)
if (z <= (-3.1d+79)) then
tmp = z * (y / a)
else if (z <= (-1.7d-67)) then
tmp = t_1
else if (z <= (-1.7d-183)) then
tmp = x
else if (z <= (-1.55d-195)) then
tmp = -y * (t / a)
else if (z <= 4.9d-108) then
tmp = x
else if (z <= 6d-39) then
tmp = t_1
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 t_1 = t * (y / -a);
double tmp;
if (z <= -3.1e+79) {
tmp = z * (y / a);
} else if (z <= -1.7e-67) {
tmp = t_1;
} else if (z <= -1.7e-183) {
tmp = x;
} else if (z <= -1.55e-195) {
tmp = -y * (t / a);
} else if (z <= 4.9e-108) {
tmp = x;
} else if (z <= 6e-39) {
tmp = t_1;
} else {
tmp = z / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / -a) tmp = 0 if z <= -3.1e+79: tmp = z * (y / a) elif z <= -1.7e-67: tmp = t_1 elif z <= -1.7e-183: tmp = x elif z <= -1.55e-195: tmp = -y * (t / a) elif z <= 4.9e-108: tmp = x elif z <= 6e-39: tmp = t_1 else: tmp = z / (a / y) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / Float64(-a))) tmp = 0.0 if (z <= -3.1e+79) tmp = Float64(z * Float64(y / a)); elseif (z <= -1.7e-67) tmp = t_1; elseif (z <= -1.7e-183) tmp = x; elseif (z <= -1.55e-195) tmp = Float64(Float64(-y) * Float64(t / a)); elseif (z <= 4.9e-108) tmp = x; elseif (z <= 6e-39) tmp = t_1; else tmp = Float64(z / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / -a); tmp = 0.0; if (z <= -3.1e+79) tmp = z * (y / a); elseif (z <= -1.7e-67) tmp = t_1; elseif (z <= -1.7e-183) tmp = x; elseif (z <= -1.55e-195) tmp = -y * (t / a); elseif (z <= 4.9e-108) tmp = x; elseif (z <= 6e-39) tmp = t_1; else tmp = z / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+79], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.7e-67], t$95$1, If[LessEqual[z, -1.7e-183], x, If[LessEqual[z, -1.55e-195], N[((-y) * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e-108], x, If[LessEqual[z, 6e-39], t$95$1, N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{-a}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+79}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-67}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-183}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-195}:\\
\;\;\;\;\left(-y\right) \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-108}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -3.0999999999999999e79Initial program 89.0%
associate-/l*92.4%
Simplified92.4%
Taylor expanded in t around 0 79.4%
+-commutative79.4%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in z around inf 84.1%
+-commutative84.1%
Simplified84.1%
Taylor expanded in y around inf 73.6%
if -3.0999999999999999e79 < z < -1.70000000000000005e-67 or 4.8999999999999998e-108 < z < 6.00000000000000055e-39Initial program 87.5%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in z around 0 69.5%
mul-1-neg69.5%
unsub-neg69.5%
*-commutative69.5%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in x around 0 41.5%
mul-1-neg41.5%
associate-*r/54.4%
distribute-rgt-neg-out54.4%
distribute-neg-frac254.4%
Simplified54.4%
if -1.70000000000000005e-67 < z < -1.70000000000000007e-183 or -1.55000000000000001e-195 < z < 4.8999999999999998e-108Initial program 95.8%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in x around inf 59.7%
if -1.70000000000000007e-183 < z < -1.55000000000000001e-195Initial program 84.2%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 84.2%
mul-1-neg84.2%
unsub-neg84.2%
*-commutative84.2%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around 0 52.0%
mul-1-neg52.0%
associate-*l/67.8%
*-commutative67.8%
distribute-rgt-neg-in67.8%
distribute-frac-neg267.8%
Simplified67.8%
if 6.00000000000000055e-39 < z Initial program 91.9%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in t around 0 83.8%
+-commutative83.8%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in z around inf 91.6%
+-commutative91.6%
Simplified91.6%
Taylor expanded in y around inf 63.2%
clear-num63.2%
un-div-inv63.3%
Applied egg-rr63.3%
Final simplification62.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y (- a)))))
(if (<= z -3.4e+79)
(* z (/ y a))
(if (<= z -1.45e-67)
t_1
(if (<= z -1.2e-183)
x
(if (<= z -2.5e-201)
t_1
(if (<= z 2.95e-108) x (if (<= z 6e-40) t_1 (/ z (/ a y))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / -a);
double tmp;
if (z <= -3.4e+79) {
tmp = z * (y / a);
} else if (z <= -1.45e-67) {
tmp = t_1;
} else if (z <= -1.2e-183) {
tmp = x;
} else if (z <= -2.5e-201) {
tmp = t_1;
} else if (z <= 2.95e-108) {
tmp = x;
} else if (z <= 6e-40) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * (y / -a)
if (z <= (-3.4d+79)) then
tmp = z * (y / a)
else if (z <= (-1.45d-67)) then
tmp = t_1
else if (z <= (-1.2d-183)) then
tmp = x
else if (z <= (-2.5d-201)) then
tmp = t_1
else if (z <= 2.95d-108) then
tmp = x
else if (z <= 6d-40) then
tmp = t_1
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 t_1 = t * (y / -a);
double tmp;
if (z <= -3.4e+79) {
tmp = z * (y / a);
} else if (z <= -1.45e-67) {
tmp = t_1;
} else if (z <= -1.2e-183) {
tmp = x;
} else if (z <= -2.5e-201) {
tmp = t_1;
} else if (z <= 2.95e-108) {
tmp = x;
} else if (z <= 6e-40) {
tmp = t_1;
} else {
tmp = z / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / -a) tmp = 0 if z <= -3.4e+79: tmp = z * (y / a) elif z <= -1.45e-67: tmp = t_1 elif z <= -1.2e-183: tmp = x elif z <= -2.5e-201: tmp = t_1 elif z <= 2.95e-108: tmp = x elif z <= 6e-40: tmp = t_1 else: tmp = z / (a / y) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / Float64(-a))) tmp = 0.0 if (z <= -3.4e+79) tmp = Float64(z * Float64(y / a)); elseif (z <= -1.45e-67) tmp = t_1; elseif (z <= -1.2e-183) tmp = x; elseif (z <= -2.5e-201) tmp = t_1; elseif (z <= 2.95e-108) tmp = x; elseif (z <= 6e-40) tmp = t_1; else tmp = Float64(z / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / -a); tmp = 0.0; if (z <= -3.4e+79) tmp = z * (y / a); elseif (z <= -1.45e-67) tmp = t_1; elseif (z <= -1.2e-183) tmp = x; elseif (z <= -2.5e-201) tmp = t_1; elseif (z <= 2.95e-108) tmp = x; elseif (z <= 6e-40) tmp = t_1; else tmp = z / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e+79], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.45e-67], t$95$1, If[LessEqual[z, -1.2e-183], x, If[LessEqual[z, -2.5e-201], t$95$1, If[LessEqual[z, 2.95e-108], x, If[LessEqual[z, 6e-40], t$95$1, N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{-a}\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+79}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-67}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-183}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.95 \cdot 10^{-108}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -3.40000000000000032e79Initial program 89.0%
associate-/l*92.4%
Simplified92.4%
Taylor expanded in t around 0 79.4%
+-commutative79.4%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in z around inf 84.1%
+-commutative84.1%
Simplified84.1%
Taylor expanded in y around inf 73.6%
if -3.40000000000000032e79 < z < -1.45000000000000002e-67 or -1.19999999999999996e-183 < z < -2.5e-201 or 2.94999999999999982e-108 < z < 6.00000000000000039e-40Initial program 87.1%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in z around 0 71.2%
mul-1-neg71.2%
unsub-neg71.2%
*-commutative71.2%
associate-/l*80.4%
Simplified80.4%
Taylor expanded in x around 0 42.7%
mul-1-neg42.7%
associate-*r/56.0%
distribute-rgt-neg-out56.0%
distribute-neg-frac256.0%
Simplified56.0%
if -1.45000000000000002e-67 < z < -1.19999999999999996e-183 or -2.5e-201 < z < 2.94999999999999982e-108Initial program 95.8%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in x around inf 59.7%
if 6.00000000000000039e-40 < z Initial program 91.9%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in t around 0 83.8%
+-commutative83.8%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in z around inf 91.6%
+-commutative91.6%
Simplified91.6%
Taylor expanded in y around inf 63.2%
clear-num63.2%
un-div-inv63.3%
Applied egg-rr63.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* z y) a))) (t_2 (* t (/ y (- a)))))
(if (<= t -3.7e+221)
t_2
(if (<= t -5e+147)
t_1
(if (<= t -1.2e+123) (/ (* y (- t)) a) (if (<= t 2.8e+47) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z * y) / a);
double t_2 = t * (y / -a);
double tmp;
if (t <= -3.7e+221) {
tmp = t_2;
} else if (t <= -5e+147) {
tmp = t_1;
} else if (t <= -1.2e+123) {
tmp = (y * -t) / a;
} else if (t <= 2.8e+47) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((z * y) / a)
t_2 = t * (y / -a)
if (t <= (-3.7d+221)) then
tmp = t_2
else if (t <= (-5d+147)) then
tmp = t_1
else if (t <= (-1.2d+123)) then
tmp = (y * -t) / a
else if (t <= 2.8d+47) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z * y) / a);
double t_2 = t * (y / -a);
double tmp;
if (t <= -3.7e+221) {
tmp = t_2;
} else if (t <= -5e+147) {
tmp = t_1;
} else if (t <= -1.2e+123) {
tmp = (y * -t) / a;
} else if (t <= 2.8e+47) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z * y) / a) t_2 = t * (y / -a) tmp = 0 if t <= -3.7e+221: tmp = t_2 elif t <= -5e+147: tmp = t_1 elif t <= -1.2e+123: tmp = (y * -t) / a elif t <= 2.8e+47: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z * y) / a)) t_2 = Float64(t * Float64(y / Float64(-a))) tmp = 0.0 if (t <= -3.7e+221) tmp = t_2; elseif (t <= -5e+147) tmp = t_1; elseif (t <= -1.2e+123) tmp = Float64(Float64(y * Float64(-t)) / a); elseif (t <= 2.8e+47) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z * y) / a); t_2 = t * (y / -a); tmp = 0.0; if (t <= -3.7e+221) tmp = t_2; elseif (t <= -5e+147) tmp = t_1; elseif (t <= -1.2e+123) tmp = (y * -t) / a; elseif (t <= 2.8e+47) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+221], t$95$2, If[LessEqual[t, -5e+147], t$95$1, If[LessEqual[t, -1.2e+123], N[(N[(y * (-t)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 2.8e+47], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z \cdot y}{a}\\
t_2 := t \cdot \frac{y}{-a}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+221}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -5 \cdot 10^{+147}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{+123}:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{a}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.70000000000000001e221 or 2.79999999999999988e47 < t Initial program 83.7%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in z around 0 80.5%
mul-1-neg80.5%
unsub-neg80.5%
*-commutative80.5%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in x around 0 59.3%
mul-1-neg59.3%
associate-*r/67.4%
distribute-rgt-neg-out67.4%
distribute-neg-frac267.4%
Simplified67.4%
if -3.70000000000000001e221 < t < -5.0000000000000002e147 or -1.19999999999999994e123 < t < 2.79999999999999988e47Initial program 94.8%
associate-/l*96.8%
Simplified96.8%
Taylor expanded in z around inf 83.1%
if -5.0000000000000002e147 < t < -1.19999999999999994e123Initial program 99.6%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 75.3%
mul-1-neg75.3%
unsub-neg75.3%
*-commutative75.3%
associate-/l*75.3%
Simplified75.3%
Taylor expanded in x around 0 75.3%
mul-1-neg75.3%
associate-*r/75.3%
distribute-rgt-neg-out75.3%
distribute-neg-frac275.3%
Simplified75.3%
*-commutative75.3%
distribute-frac-neg275.3%
distribute-frac-neg75.3%
associate-*l/75.3%
Applied egg-rr75.3%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(if (or (<= z -9.4e+162)
(not (or (<= z 6.8e-53) (and (not (<= z 720.0)) (<= z 2.6e+37)))))
(* z (/ y a))
x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.4e+162) || !((z <= 6.8e-53) || (!(z <= 720.0) && (z <= 2.6e+37)))) {
tmp = z * (y / 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 ((z <= (-9.4d+162)) .or. (.not. (z <= 6.8d-53) .or. (.not. (z <= 720.0d0)) .and. (z <= 2.6d+37))) then
tmp = z * (y / 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 ((z <= -9.4e+162) || !((z <= 6.8e-53) || (!(z <= 720.0) && (z <= 2.6e+37)))) {
tmp = z * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.4e+162) or not ((z <= 6.8e-53) or (not (z <= 720.0) and (z <= 2.6e+37))): tmp = z * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.4e+162) || !((z <= 6.8e-53) || (!(z <= 720.0) && (z <= 2.6e+37)))) tmp = Float64(z * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.4e+162) || ~(((z <= 6.8e-53) || (~((z <= 720.0)) && (z <= 2.6e+37))))) tmp = z * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.4e+162], N[Not[Or[LessEqual[z, 6.8e-53], And[N[Not[LessEqual[z, 720.0]], $MachinePrecision], LessEqual[z, 2.6e+37]]]], $MachinePrecision]], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.4 \cdot 10^{+162} \lor \neg \left(z \leq 6.8 \cdot 10^{-53} \lor \neg \left(z \leq 720\right) \land z \leq 2.6 \cdot 10^{+37}\right):\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.40000000000000006e162 or 6.8e-53 < z < 720 or 2.5999999999999999e37 < z Initial program 88.0%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in t around 0 80.9%
+-commutative80.9%
associate-/l*85.8%
Simplified85.8%
Taylor expanded in z around inf 89.7%
+-commutative89.7%
Simplified89.7%
Taylor expanded in y around inf 73.7%
if -9.40000000000000006e162 < z < 6.8e-53 or 720 < z < 2.5999999999999999e37Initial program 94.0%
associate-/l*97.5%
Simplified97.5%
Taylor expanded in x around inf 50.2%
Final simplification59.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.4e+162)
(* z (/ y a))
(if (<= z 2.4e-113)
x
(if (<= z 1.6e-5) (/ (* z y) a) (if (<= z 8.8e+36) x (/ z (/ a y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.4e+162) {
tmp = z * (y / a);
} else if (z <= 2.4e-113) {
tmp = x;
} else if (z <= 1.6e-5) {
tmp = (z * y) / a;
} else if (z <= 8.8e+36) {
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 <= (-9.4d+162)) then
tmp = z * (y / a)
else if (z <= 2.4d-113) then
tmp = x
else if (z <= 1.6d-5) then
tmp = (z * y) / a
else if (z <= 8.8d+36) 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 <= -9.4e+162) {
tmp = z * (y / a);
} else if (z <= 2.4e-113) {
tmp = x;
} else if (z <= 1.6e-5) {
tmp = (z * y) / a;
} else if (z <= 8.8e+36) {
tmp = x;
} else {
tmp = z / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.4e+162: tmp = z * (y / a) elif z <= 2.4e-113: tmp = x elif z <= 1.6e-5: tmp = (z * y) / a elif z <= 8.8e+36: tmp = x else: tmp = z / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.4e+162) tmp = Float64(z * Float64(y / a)); elseif (z <= 2.4e-113) tmp = x; elseif (z <= 1.6e-5) tmp = Float64(Float64(z * y) / a); elseif (z <= 8.8e+36) tmp = x; else tmp = Float64(z / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.4e+162) tmp = z * (y / a); elseif (z <= 2.4e-113) tmp = x; elseif (z <= 1.6e-5) tmp = (z * y) / a; elseif (z <= 8.8e+36) tmp = x; else tmp = z / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.4e+162], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e-113], x, If[LessEqual[z, 1.6e-5], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 8.8e+36], x, N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.4 \cdot 10^{+162}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-5}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+36}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -9.40000000000000006e162Initial program 84.1%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in t around 0 81.4%
+-commutative81.4%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in z around inf 91.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in y around inf 89.1%
if -9.40000000000000006e162 < z < 2.40000000000000012e-113 or 1.59999999999999993e-5 < z < 8.80000000000000002e36Initial program 95.3%
associate-/l*97.9%
Simplified97.9%
Taylor expanded in x around inf 53.8%
if 2.40000000000000012e-113 < z < 1.59999999999999993e-5Initial program 87.0%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in t around 0 49.6%
+-commutative49.6%
associate-/l*49.6%
Simplified49.6%
Taylor expanded in z around inf 39.8%
+-commutative39.8%
Simplified39.8%
Taylor expanded in y around inf 26.4%
associate-*r/32.9%
Applied egg-rr32.9%
if 8.80000000000000002e36 < z Initial program 89.9%
associate-/l*94.0%
Simplified94.0%
Taylor expanded in t around 0 83.8%
+-commutative83.8%
associate-/l*87.9%
Simplified87.9%
Taylor expanded in z around inf 93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in y around inf 68.1%
clear-num68.1%
un-div-inv68.2%
Applied egg-rr68.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.4e+162)
(* z (/ y a))
(if (<= z 2.4e-113)
x
(if (<= z 1.8e-6) (* y (/ z a)) (if (<= z 9.6e+27) x (/ z (/ a y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.4e+162) {
tmp = z * (y / a);
} else if (z <= 2.4e-113) {
tmp = x;
} else if (z <= 1.8e-6) {
tmp = y * (z / a);
} else if (z <= 9.6e+27) {
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 <= (-9.4d+162)) then
tmp = z * (y / a)
else if (z <= 2.4d-113) then
tmp = x
else if (z <= 1.8d-6) then
tmp = y * (z / a)
else if (z <= 9.6d+27) 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 <= -9.4e+162) {
tmp = z * (y / a);
} else if (z <= 2.4e-113) {
tmp = x;
} else if (z <= 1.8e-6) {
tmp = y * (z / a);
} else if (z <= 9.6e+27) {
tmp = x;
} else {
tmp = z / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.4e+162: tmp = z * (y / a) elif z <= 2.4e-113: tmp = x elif z <= 1.8e-6: tmp = y * (z / a) elif z <= 9.6e+27: tmp = x else: tmp = z / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.4e+162) tmp = Float64(z * Float64(y / a)); elseif (z <= 2.4e-113) tmp = x; elseif (z <= 1.8e-6) tmp = Float64(y * Float64(z / a)); elseif (z <= 9.6e+27) tmp = x; else tmp = Float64(z / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.4e+162) tmp = z * (y / a); elseif (z <= 2.4e-113) tmp = x; elseif (z <= 1.8e-6) tmp = y * (z / a); elseif (z <= 9.6e+27) tmp = x; else tmp = z / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.4e+162], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e-113], x, If[LessEqual[z, 1.8e-6], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.6e+27], x, N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.4 \cdot 10^{+162}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-6}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{+27}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -9.40000000000000006e162Initial program 84.1%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in t around 0 81.4%
+-commutative81.4%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in z around inf 91.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in y around inf 89.1%
if -9.40000000000000006e162 < z < 2.40000000000000012e-113 or 1.79999999999999992e-6 < z < 9.59999999999999991e27Initial program 95.3%
associate-/l*97.9%
Simplified97.9%
Taylor expanded in x around inf 53.8%
if 2.40000000000000012e-113 < z < 1.79999999999999992e-6Initial program 87.0%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in t around 0 49.6%
+-commutative49.6%
associate-/l*49.6%
Simplified49.6%
Taylor expanded in z around inf 39.8%
+-commutative39.8%
Simplified39.8%
Taylor expanded in y around inf 26.4%
clear-num26.3%
un-div-inv26.4%
Applied egg-rr26.4%
associate-/r/32.8%
Applied egg-rr32.8%
if 9.59999999999999991e27 < z Initial program 89.9%
associate-/l*94.0%
Simplified94.0%
Taylor expanded in t around 0 83.8%
+-commutative83.8%
associate-/l*87.9%
Simplified87.9%
Taylor expanded in z around inf 93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in y around inf 68.1%
clear-num68.1%
un-div-inv68.2%
Applied egg-rr68.2%
Final simplification59.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y a))))
(if (<= z -9.4e+162)
t_1
(if (<= z 2.4e-113)
x
(if (<= z 4.2e-7) (* y (/ z a)) (if (<= z 4e+34) 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 <= -9.4e+162) {
tmp = t_1;
} else if (z <= 2.4e-113) {
tmp = x;
} else if (z <= 4.2e-7) {
tmp = y * (z / a);
} else if (z <= 4e+34) {
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 <= (-9.4d+162)) then
tmp = t_1
else if (z <= 2.4d-113) then
tmp = x
else if (z <= 4.2d-7) then
tmp = y * (z / a)
else if (z <= 4d+34) 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 <= -9.4e+162) {
tmp = t_1;
} else if (z <= 2.4e-113) {
tmp = x;
} else if (z <= 4.2e-7) {
tmp = y * (z / a);
} else if (z <= 4e+34) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / a) tmp = 0 if z <= -9.4e+162: tmp = t_1 elif z <= 2.4e-113: tmp = x elif z <= 4.2e-7: tmp = y * (z / a) elif z <= 4e+34: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / a)) tmp = 0.0 if (z <= -9.4e+162) tmp = t_1; elseif (z <= 2.4e-113) tmp = x; elseif (z <= 4.2e-7) tmp = Float64(y * Float64(z / a)); elseif (z <= 4e+34) 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 <= -9.4e+162) tmp = t_1; elseif (z <= 2.4e-113) tmp = x; elseif (z <= 4.2e-7) tmp = y * (z / a); elseif (z <= 4e+34) 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, -9.4e+162], t$95$1, If[LessEqual[z, 2.4e-113], x, If[LessEqual[z, 4.2e-7], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+34], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -9.4 \cdot 10^{+162}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-7}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+34}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.40000000000000006e162 or 3.99999999999999978e34 < z Initial program 87.4%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in t around 0 82.8%
+-commutative82.8%
associate-/l*88.4%
Simplified88.4%
Taylor expanded in z around inf 92.9%
+-commutative92.9%
Simplified92.9%
Taylor expanded in y around inf 76.9%
if -9.40000000000000006e162 < z < 2.40000000000000012e-113 or 4.2e-7 < z < 3.99999999999999978e34Initial program 95.3%
associate-/l*97.9%
Simplified97.9%
Taylor expanded in x around inf 53.8%
if 2.40000000000000012e-113 < z < 4.2e-7Initial program 87.0%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in t around 0 49.6%
+-commutative49.6%
associate-/l*49.6%
Simplified49.6%
Taylor expanded in z around inf 39.8%
+-commutative39.8%
Simplified39.8%
Taylor expanded in y around inf 26.4%
clear-num26.3%
un-div-inv26.4%
Applied egg-rr26.4%
associate-/r/32.8%
Applied egg-rr32.8%
Final simplification58.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.65e+81) (+ x (/ y (/ a z))) (if (<= z 2e-39) (- x (/ t (/ a y))) (* z (+ (/ y a) (/ x z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.65e+81) {
tmp = x + (y / (a / z));
} else if (z <= 2e-39) {
tmp = x - (t / (a / y));
} else {
tmp = z * ((y / a) + (x / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.65d+81)) then
tmp = x + (y / (a / z))
else if (z <= 2d-39) then
tmp = x - (t / (a / y))
else
tmp = z * ((y / a) + (x / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.65e+81) {
tmp = x + (y / (a / z));
} else if (z <= 2e-39) {
tmp = x - (t / (a / y));
} else {
tmp = z * ((y / a) + (x / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.65e+81: tmp = x + (y / (a / z)) elif z <= 2e-39: tmp = x - (t / (a / y)) else: tmp = z * ((y / a) + (x / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.65e+81) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (z <= 2e-39) tmp = Float64(x - Float64(t / Float64(a / y))); else tmp = Float64(z * Float64(Float64(y / a) + Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.65e+81) tmp = x + (y / (a / z)); elseif (z <= 2e-39) tmp = x - (t / (a / y)); else tmp = z * ((y / a) + (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.65e+81], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-39], N[(x - N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y / a), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.65 \cdot 10^{+81}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-39}:\\
\;\;\;\;x - \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{y}{a} + \frac{x}{z}\right)\\
\end{array}
\end{array}
if z < -2.65000000000000014e81Initial program 88.8%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in t around 0 78.9%
+-commutative78.9%
associate-/l*84.3%
Simplified84.3%
clear-num84.2%
un-div-inv85.8%
Applied egg-rr85.8%
if -2.65000000000000014e81 < z < 1.99999999999999986e-39Initial program 92.8%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in y around 0 92.8%
associate-*l/96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in z around 0 82.5%
associate-*l/87.1%
*-commutative87.1%
neg-mul-187.1%
sub-neg87.1%
*-commutative87.1%
associate-*l/82.5%
associate-*r/89.8%
Simplified89.8%
associate-*r/82.5%
clear-num82.5%
associate-/l/89.9%
clear-num89.9%
Applied egg-rr89.9%
if 1.99999999999999986e-39 < z Initial program 91.9%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in t around 0 83.8%
+-commutative83.8%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in z around inf 91.6%
+-commutative91.6%
Simplified91.6%
Final simplification89.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.2e+263) (not (<= t 2e+85))) (* t (/ y (- a))) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.2e+263) || !(t <= 2e+85)) {
tmp = t * (y / -a);
} else {
tmp = x + (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 ((t <= (-5.2d+263)) .or. (.not. (t <= 2d+85))) then
tmp = t * (y / -a)
else
tmp = x + (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 ((t <= -5.2e+263) || !(t <= 2e+85)) {
tmp = t * (y / -a);
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.2e+263) or not (t <= 2e+85): tmp = t * (y / -a) else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.2e+263) || !(t <= 2e+85)) tmp = Float64(t * Float64(y / Float64(-a))); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.2e+263) || ~((t <= 2e+85))) tmp = t * (y / -a); else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.2e+263], N[Not[LessEqual[t, 2e+85]], $MachinePrecision]], N[(t * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+263} \lor \neg \left(t \leq 2 \cdot 10^{+85}\right):\\
\;\;\;\;t \cdot \frac{y}{-a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -5.2000000000000004e263 or 2e85 < t Initial program 81.4%
associate-/l*93.2%
Simplified93.2%
Taylor expanded in z around 0 77.5%
mul-1-neg77.5%
unsub-neg77.5%
*-commutative77.5%
associate-/l*89.3%
Simplified89.3%
Taylor expanded in x around 0 59.6%
mul-1-neg59.6%
associate-*r/71.3%
distribute-rgt-neg-out71.3%
distribute-neg-frac271.3%
Simplified71.3%
if -5.2000000000000004e263 < t < 2e85Initial program 94.7%
associate-/l*96.6%
Simplified96.6%
Taylor expanded in t around 0 79.3%
+-commutative79.3%
associate-/l*81.1%
Simplified81.1%
Final simplification79.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.4e+79) (+ x (/ y (/ a z))) (if (<= z 3.2e-56) (- x (/ t (/ a y))) (+ x (* y (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.4e+79) {
tmp = x + (y / (a / z));
} else if (z <= 3.2e-56) {
tmp = x - (t / (a / y));
} else {
tmp = x + (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 (z <= (-3.4d+79)) then
tmp = x + (y / (a / z))
else if (z <= 3.2d-56) then
tmp = x - (t / (a / y))
else
tmp = x + (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 (z <= -3.4e+79) {
tmp = x + (y / (a / z));
} else if (z <= 3.2e-56) {
tmp = x - (t / (a / y));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.4e+79: tmp = x + (y / (a / z)) elif z <= 3.2e-56: tmp = x - (t / (a / y)) else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.4e+79) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (z <= 3.2e-56) tmp = Float64(x - Float64(t / Float64(a / y))); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.4e+79) tmp = x + (y / (a / z)); elseif (z <= 3.2e-56) tmp = x - (t / (a / y)); else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.4e+79], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e-56], N[(x - N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+79}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-56}:\\
\;\;\;\;x - \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if z < -3.40000000000000032e79Initial program 89.0%
associate-/l*92.4%
Simplified92.4%
Taylor expanded in t around 0 79.4%
+-commutative79.4%
associate-/l*84.5%
Simplified84.5%
clear-num84.4%
un-div-inv86.1%
Applied egg-rr86.1%
if -3.40000000000000032e79 < z < 3.19999999999999986e-56Initial program 93.0%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in y around 0 93.0%
associate-*l/97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in z around 0 83.8%
associate-*l/87.9%
*-commutative87.9%
neg-mul-187.9%
sub-neg87.9%
*-commutative87.9%
associate-*l/83.8%
associate-*r/91.2%
Simplified91.2%
associate-*r/83.8%
clear-num83.8%
associate-/l/91.2%
clear-num91.2%
Applied egg-rr91.2%
if 3.19999999999999986e-56 < z Initial program 91.4%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in t around 0 79.6%
+-commutative79.6%
associate-/l*82.6%
Simplified82.6%
Final simplification87.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.5e+79) (+ x (/ y (/ a z))) (if (<= z 5e-55) (- x (* t (/ y a))) (+ x (* y (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+79) {
tmp = x + (y / (a / z));
} else if (z <= 5e-55) {
tmp = x - (t * (y / a));
} else {
tmp = x + (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 (z <= (-3.5d+79)) then
tmp = x + (y / (a / z))
else if (z <= 5d-55) then
tmp = x - (t * (y / a))
else
tmp = x + (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 (z <= -3.5e+79) {
tmp = x + (y / (a / z));
} else if (z <= 5e-55) {
tmp = x - (t * (y / a));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e+79: tmp = x + (y / (a / z)) elif z <= 5e-55: tmp = x - (t * (y / a)) else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e+79) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (z <= 5e-55) tmp = Float64(x - Float64(t * Float64(y / a))); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.5e+79) tmp = x + (y / (a / z)); elseif (z <= 5e-55) tmp = x - (t * (y / a)); else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e+79], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-55], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+79}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-55}:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if z < -3.4999999999999998e79Initial program 89.0%
associate-/l*92.4%
Simplified92.4%
Taylor expanded in t around 0 79.4%
+-commutative79.4%
associate-/l*84.5%
Simplified84.5%
clear-num84.4%
un-div-inv86.1%
Applied egg-rr86.1%
if -3.4999999999999998e79 < z < 5.0000000000000002e-55Initial program 93.0%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in y around 0 93.0%
associate-*l/97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in z around 0 83.8%
associate-*l/87.9%
*-commutative87.9%
neg-mul-187.9%
sub-neg87.9%
*-commutative87.9%
associate-*l/83.8%
associate-*r/91.2%
Simplified91.2%
if 5.0000000000000002e-55 < z Initial program 91.4%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in t around 0 79.6%
+-commutative79.6%
associate-/l*82.6%
Simplified82.6%
Final simplification87.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 91.8%
associate-/l*95.8%
Simplified95.8%
(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 91.8%
associate-/l*95.8%
Simplified95.8%
Taylor expanded in x around inf 38.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 2024107
(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)))