
(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 16 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 (if (<= a -0.004) (+ x (* y (* (/ 1.0 a) (- t z)))) (if (<= a 1.08e-68) (+ x (/ (* y (- t z)) a)) (+ x (* y (/ (- t z) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.004) {
tmp = x + (y * ((1.0 / a) * (t - z)));
} else if (a <= 1.08e-68) {
tmp = x + ((y * (t - z)) / a);
} else {
tmp = x + (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 (a <= (-0.004d0)) then
tmp = x + (y * ((1.0d0 / a) * (t - z)))
else if (a <= 1.08d-68) then
tmp = x + ((y * (t - z)) / a)
else
tmp = x + (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 (a <= -0.004) {
tmp = x + (y * ((1.0 / a) * (t - z)));
} else if (a <= 1.08e-68) {
tmp = x + ((y * (t - z)) / a);
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -0.004: tmp = x + (y * ((1.0 / a) * (t - z))) elif a <= 1.08e-68: tmp = x + ((y * (t - z)) / a) else: tmp = x + (y * ((t - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.004) tmp = Float64(x + Float64(y * Float64(Float64(1.0 / a) * Float64(t - z)))); elseif (a <= 1.08e-68) tmp = Float64(x + Float64(Float64(y * Float64(t - z)) / a)); else tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -0.004) tmp = x + (y * ((1.0 / a) * (t - z))); elseif (a <= 1.08e-68) tmp = x + ((y * (t - z)) / a); else tmp = x + (y * ((t - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.004], N[(x + N[(y * N[(N[(1.0 / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.08e-68], N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.004:\\
\;\;\;\;x + y \cdot \left(\frac{1}{a} \cdot \left(t - z\right)\right)\\
\mathbf{elif}\;a \leq 1.08 \cdot 10^{-68}:\\
\;\;\;\;x + \frac{y \cdot \left(t - z\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if a < -0.0040000000000000001Initial program 84.4%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.8%
Applied egg-rr99.8%
if -0.0040000000000000001 < a < 1.0799999999999999e-68Initial program 99.1%
if 1.0799999999999999e-68 < a Initial program 85.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))) (t_2 (* y (/ z (- a)))))
(if (<= z -4e+106)
t_2
(if (<= z -1.05e+74)
x
(if (<= z -3e+50)
t_2
(if (<= z -6e-153)
t_1
(if (<= z -1.1e-243)
x
(if (<= z 1.8e-265)
(/ y (/ a t))
(if (<= z 1.42e-179) x (if (<= z 1.1e+46) t_1 t_2))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double t_2 = y * (z / -a);
double tmp;
if (z <= -4e+106) {
tmp = t_2;
} else if (z <= -1.05e+74) {
tmp = x;
} else if (z <= -3e+50) {
tmp = t_2;
} else if (z <= -6e-153) {
tmp = t_1;
} else if (z <= -1.1e-243) {
tmp = x;
} else if (z <= 1.8e-265) {
tmp = y / (a / t);
} else if (z <= 1.42e-179) {
tmp = x;
} else if (z <= 1.1e+46) {
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 = t * (y / a)
t_2 = y * (z / -a)
if (z <= (-4d+106)) then
tmp = t_2
else if (z <= (-1.05d+74)) then
tmp = x
else if (z <= (-3d+50)) then
tmp = t_2
else if (z <= (-6d-153)) then
tmp = t_1
else if (z <= (-1.1d-243)) then
tmp = x
else if (z <= 1.8d-265) then
tmp = y / (a / t)
else if (z <= 1.42d-179) then
tmp = x
else if (z <= 1.1d+46) 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 = t * (y / a);
double t_2 = y * (z / -a);
double tmp;
if (z <= -4e+106) {
tmp = t_2;
} else if (z <= -1.05e+74) {
tmp = x;
} else if (z <= -3e+50) {
tmp = t_2;
} else if (z <= -6e-153) {
tmp = t_1;
} else if (z <= -1.1e-243) {
tmp = x;
} else if (z <= 1.8e-265) {
tmp = y / (a / t);
} else if (z <= 1.42e-179) {
tmp = x;
} else if (z <= 1.1e+46) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) t_2 = y * (z / -a) tmp = 0 if z <= -4e+106: tmp = t_2 elif z <= -1.05e+74: tmp = x elif z <= -3e+50: tmp = t_2 elif z <= -6e-153: tmp = t_1 elif z <= -1.1e-243: tmp = x elif z <= 1.8e-265: tmp = y / (a / t) elif z <= 1.42e-179: tmp = x elif z <= 1.1e+46: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) t_2 = Float64(y * Float64(z / Float64(-a))) tmp = 0.0 if (z <= -4e+106) tmp = t_2; elseif (z <= -1.05e+74) tmp = x; elseif (z <= -3e+50) tmp = t_2; elseif (z <= -6e-153) tmp = t_1; elseif (z <= -1.1e-243) tmp = x; elseif (z <= 1.8e-265) tmp = Float64(y / Float64(a / t)); elseif (z <= 1.42e-179) tmp = x; elseif (z <= 1.1e+46) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); t_2 = y * (z / -a); tmp = 0.0; if (z <= -4e+106) tmp = t_2; elseif (z <= -1.05e+74) tmp = x; elseif (z <= -3e+50) tmp = t_2; elseif (z <= -6e-153) tmp = t_1; elseif (z <= -1.1e-243) tmp = x; elseif (z <= 1.8e-265) tmp = y / (a / t); elseif (z <= 1.42e-179) tmp = x; elseif (z <= 1.1e+46) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+106], t$95$2, If[LessEqual[z, -1.05e+74], x, If[LessEqual[z, -3e+50], t$95$2, If[LessEqual[z, -6e-153], t$95$1, If[LessEqual[z, -1.1e-243], x, If[LessEqual[z, 1.8e-265], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.42e-179], x, If[LessEqual[z, 1.1e+46], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
t_2 := y \cdot \frac{z}{-a}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+106}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+50}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-243}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-265}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{-179}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -4.00000000000000036e106 or -1.0499999999999999e74 < z < -2.9999999999999998e50 or 1.1e46 < z Initial program 84.1%
associate-/l*86.2%
Simplified86.2%
Taylor expanded in z around inf 56.9%
mul-1-neg56.9%
associate-/l*61.9%
distribute-lft-neg-in61.9%
Simplified61.9%
if -4.00000000000000036e106 < z < -1.0499999999999999e74 or -6e-153 < z < -1.1e-243 or 1.8000000000000001e-265 < z < 1.42e-179Initial program 93.4%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in x around inf 70.3%
if -2.9999999999999998e50 < z < -6e-153 or 1.42e-179 < z < 1.1e46Initial program 96.9%
associate-/l*93.2%
Simplified93.2%
Taylor expanded in t around inf 55.6%
associate-/l*57.9%
Simplified57.9%
if -1.1e-243 < z < 1.8000000000000001e-265Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t around inf 78.1%
*-commutative78.1%
associate-/l*78.2%
Simplified78.2%
clear-num78.3%
un-div-inv78.3%
Applied egg-rr78.3%
Final simplification62.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.4e+56) (not (<= a 2e-71))) (+ x (* y (/ (- t z) a))) (+ x (/ (* y (- t z)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.4e+56) || !(a <= 2e-71)) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + ((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 ((a <= (-7.4d+56)) .or. (.not. (a <= 2d-71))) then
tmp = x + (y * ((t - z) / a))
else
tmp = x + ((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 ((a <= -7.4e+56) || !(a <= 2e-71)) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + ((y * (t - z)) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.4e+56) or not (a <= 2e-71): tmp = x + (y * ((t - z) / a)) else: tmp = x + ((y * (t - z)) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.4e+56) || !(a <= 2e-71)) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x + Float64(Float64(y * Float64(t - z)) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.4e+56) || ~((a <= 2e-71))) tmp = x + (y * ((t - z) / a)); else tmp = x + ((y * (t - z)) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.4e+56], N[Not[LessEqual[a, 2e-71]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.4 \cdot 10^{+56} \lor \neg \left(a \leq 2 \cdot 10^{-71}\right):\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(t - z\right)}{a}\\
\end{array}
\end{array}
if a < -7.39999999999999994e56 or 1.9999999999999998e-71 < a Initial program 83.8%
associate-/l*99.8%
Simplified99.8%
if -7.39999999999999994e56 < a < 1.9999999999999998e-71Initial program 99.1%
Final simplification99.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.5e-71) (not (<= y 3.2e-70))) (* y (/ (- t z) a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.5e-71) || !(y <= 3.2e-70)) {
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 ((y <= (-2.5d-71)) .or. (.not. (y <= 3.2d-70))) 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 ((y <= -2.5e-71) || !(y <= 3.2e-70)) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.5e-71) or not (y <= 3.2e-70): tmp = y * ((t - z) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.5e-71) || !(y <= 3.2e-70)) 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 ((y <= -2.5e-71) || ~((y <= 3.2e-70))) tmp = y * ((t - z) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.5e-71], N[Not[LessEqual[y, 3.2e-70]], $MachinePrecision]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-71} \lor \neg \left(y \leq 3.2 \cdot 10^{-70}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.49999999999999999e-71 or 3.1999999999999997e-70 < y Initial program 88.4%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
clear-num99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 71.9%
mul-1-neg71.9%
associate-*l/78.4%
distribute-rgt-neg-in78.4%
sub-neg78.4%
distribute-neg-in78.4%
remove-double-neg78.4%
+-commutative78.4%
sub-neg78.4%
associate-*l/71.9%
associate-/l*80.5%
Simplified80.5%
if -2.49999999999999999e-71 < y < 3.1999999999999997e-70Initial program 97.7%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in x around inf 61.0%
Final simplification73.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -0.00026) (not (<= x 1.12e+82))) (+ x (* y (/ t a))) (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -0.00026) || !(x <= 1.12e+82)) {
tmp = x + (y * (t / a));
} else {
tmp = (y / a) * (t - 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 ((x <= (-0.00026d0)) .or. (.not. (x <= 1.12d+82))) then
tmp = x + (y * (t / a))
else
tmp = (y / a) * (t - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -0.00026) || !(x <= 1.12e+82)) {
tmp = x + (y * (t / a));
} else {
tmp = (y / a) * (t - z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -0.00026) or not (x <= 1.12e+82): tmp = x + (y * (t / a)) else: tmp = (y / a) * (t - z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -0.00026) || !(x <= 1.12e+82)) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(Float64(y / a) * Float64(t - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -0.00026) || ~((x <= 1.12e+82))) tmp = x + (y * (t / a)); else tmp = (y / a) * (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -0.00026], N[Not[LessEqual[x, 1.12e+82]], $MachinePrecision]], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00026 \lor \neg \left(x \leq 1.12 \cdot 10^{+82}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4 or 1.11999999999999998e82 < x Initial program 92.1%
associate-/l*90.5%
Simplified90.5%
clear-num90.5%
un-div-inv91.4%
Applied egg-rr91.4%
clear-num90.5%
associate-/r/91.4%
Applied egg-rr91.4%
Taylor expanded in z around 0 80.9%
sub-neg80.9%
mul-1-neg80.9%
associate-*l/80.2%
distribute-rgt-neg-in80.2%
distribute-rgt-neg-out80.2%
remove-double-neg80.2%
associate-/r/84.4%
Simplified84.4%
associate-/r/80.2%
Applied egg-rr80.2%
if -2.59999999999999977e-4 < x < 1.11999999999999998e82Initial program 91.3%
associate-/l*92.7%
Simplified92.7%
clear-num92.6%
un-div-inv92.6%
Applied egg-rr92.6%
Taylor expanded in x around 0 77.2%
mul-1-neg77.2%
associate-*r/78.6%
distribute-rgt-neg-in78.6%
neg-sub078.6%
div-sub76.6%
associate--r-76.6%
neg-sub076.6%
+-commutative76.6%
sub-neg76.6%
distribute-lft-out--75.9%
associate-/l*75.8%
*-commutative75.8%
associate-/l*74.6%
*-commutative74.6%
associate-*l/70.9%
associate-*r/76.4%
distribute-rgt-out--81.3%
Simplified81.3%
Final simplification80.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -0.00026) (not (<= x 3.25e+91))) (+ x (/ t (/ a y))) (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -0.00026) || !(x <= 3.25e+91)) {
tmp = x + (t / (a / y));
} else {
tmp = (y / a) * (t - 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 ((x <= (-0.00026d0)) .or. (.not. (x <= 3.25d+91))) then
tmp = x + (t / (a / y))
else
tmp = (y / a) * (t - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -0.00026) || !(x <= 3.25e+91)) {
tmp = x + (t / (a / y));
} else {
tmp = (y / a) * (t - z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -0.00026) or not (x <= 3.25e+91): tmp = x + (t / (a / y)) else: tmp = (y / a) * (t - z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -0.00026) || !(x <= 3.25e+91)) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(Float64(y / a) * Float64(t - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -0.00026) || ~((x <= 3.25e+91))) tmp = x + (t / (a / y)); else tmp = (y / a) * (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -0.00026], N[Not[LessEqual[x, 3.25e+91]], $MachinePrecision]], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00026 \lor \neg \left(x \leq 3.25 \cdot 10^{+91}\right):\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4 or 3.2499999999999999e91 < x Initial program 92.1%
associate-/l*90.5%
Simplified90.5%
clear-num90.5%
un-div-inv91.4%
Applied egg-rr91.4%
clear-num90.5%
associate-/r/91.4%
Applied egg-rr91.4%
Taylor expanded in z around 0 80.9%
sub-neg80.9%
mul-1-neg80.9%
associate-*l/80.2%
distribute-rgt-neg-in80.2%
distribute-rgt-neg-out80.2%
remove-double-neg80.2%
associate-/r/84.4%
Simplified84.4%
if -2.59999999999999977e-4 < x < 3.2499999999999999e91Initial program 91.3%
associate-/l*92.7%
Simplified92.7%
clear-num92.6%
un-div-inv92.6%
Applied egg-rr92.6%
Taylor expanded in x around 0 77.2%
mul-1-neg77.2%
associate-*r/78.6%
distribute-rgt-neg-in78.6%
neg-sub078.6%
div-sub76.6%
associate--r-76.6%
neg-sub076.6%
+-commutative76.6%
sub-neg76.6%
distribute-lft-out--75.9%
associate-/l*75.8%
*-commutative75.8%
associate-/l*74.6%
*-commutative74.6%
associate-*l/70.9%
associate-*r/76.4%
distribute-rgt-out--81.3%
Simplified81.3%
Final simplification82.7%
(FPCore (x y z t a) :precision binary64 (if (<= y -5.8e-164) (* (- t z) (/ y a)) (if (<= y 2.1e-83) x (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.8e-164) {
tmp = (t - z) * (y / a);
} else if (y <= 2.1e-83) {
tmp = x;
} 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 (y <= (-5.8d-164)) then
tmp = (t - z) * (y / a)
else if (y <= 2.1d-83) then
tmp = x
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 (y <= -5.8e-164) {
tmp = (t - z) * (y / a);
} else if (y <= 2.1e-83) {
tmp = x;
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.8e-164: tmp = (t - z) * (y / a) elif y <= 2.1e-83: tmp = x else: tmp = y * ((t - z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.8e-164) tmp = Float64(Float64(t - z) * Float64(y / a)); elseif (y <= 2.1e-83) tmp = x; 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 (y <= -5.8e-164) tmp = (t - z) * (y / a); elseif (y <= 2.1e-83) tmp = x; else tmp = y * ((t - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.8e-164], N[(N[(t - z), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e-83], x, N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{-164}:\\
\;\;\;\;\left(t - z\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-83}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if y < -5.8e-164Initial program 91.6%
associate-/l*90.9%
Simplified90.9%
clear-num90.9%
un-div-inv91.8%
Applied egg-rr91.8%
Taylor expanded in x around 0 69.4%
mul-1-neg69.4%
associate-*r/70.7%
distribute-rgt-neg-in70.7%
neg-sub070.7%
div-sub69.7%
associate--r-69.7%
neg-sub069.7%
+-commutative69.7%
sub-neg69.7%
distribute-lft-out--67.8%
associate-/l*63.8%
*-commutative63.8%
associate-/l*66.8%
*-commutative66.8%
associate-*l/65.2%
associate-*r/66.5%
distribute-rgt-out--75.1%
Simplified75.1%
if -5.8e-164 < y < 2.0999999999999999e-83Initial program 98.5%
associate-/l*83.9%
Simplified83.9%
Taylor expanded in x around inf 66.9%
if 2.0999999999999999e-83 < y Initial program 85.4%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
clear-num99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 72.7%
mul-1-neg72.7%
associate-*l/80.0%
distribute-rgt-neg-in80.0%
sub-neg80.0%
distribute-neg-in80.0%
remove-double-neg80.0%
+-commutative80.0%
sub-neg80.0%
associate-*l/72.7%
associate-/l*82.1%
Simplified82.1%
Final simplification75.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.8e-11) (+ x (/ t (/ a y))) (if (<= t 3.8e-38) (- x (* y (/ z a))) (* (- t z) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.8e-11) {
tmp = x + (t / (a / y));
} else if (t <= 3.8e-38) {
tmp = x - (y * (z / a));
} else {
tmp = (t - z) * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-4.8d-11)) then
tmp = x + (t / (a / y))
else if (t <= 3.8d-38) then
tmp = x - (y * (z / a))
else
tmp = (t - z) * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.8e-11) {
tmp = x + (t / (a / y));
} else if (t <= 3.8e-38) {
tmp = x - (y * (z / a));
} else {
tmp = (t - z) * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.8e-11: tmp = x + (t / (a / y)) elif t <= 3.8e-38: tmp = x - (y * (z / a)) else: tmp = (t - z) * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.8e-11) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (t <= 3.8e-38) tmp = Float64(x - Float64(y * Float64(z / a))); else tmp = Float64(Float64(t - z) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.8e-11) tmp = x + (t / (a / y)); elseif (t <= 3.8e-38) tmp = x - (y * (z / a)); else tmp = (t - z) * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.8e-11], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e-38], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - z), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-11}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-38}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(t - z\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -4.8000000000000002e-11Initial program 91.2%
associate-/l*93.0%
Simplified93.0%
clear-num93.0%
un-div-inv93.1%
Applied egg-rr93.1%
clear-num93.0%
associate-/r/93.0%
Applied egg-rr93.0%
Taylor expanded in z around 0 79.7%
sub-neg79.7%
mul-1-neg79.7%
associate-*l/81.7%
distribute-rgt-neg-in81.7%
distribute-rgt-neg-out81.7%
remove-double-neg81.7%
associate-/r/83.2%
Simplified83.2%
if -4.8000000000000002e-11 < t < 3.8e-38Initial program 93.1%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in z around inf 84.7%
associate-/l*87.0%
Simplified87.0%
if 3.8e-38 < t Initial program 89.4%
associate-/l*83.0%
Simplified83.0%
clear-num82.9%
un-div-inv84.3%
Applied egg-rr84.3%
Taylor expanded in x around 0 74.0%
mul-1-neg74.0%
associate-*r/70.1%
distribute-rgt-neg-in70.1%
neg-sub070.1%
div-sub64.4%
associate--r-64.4%
neg-sub064.4%
+-commutative64.4%
sub-neg64.4%
distribute-lft-out--64.4%
associate-/l*64.3%
*-commutative64.3%
associate-/l*68.4%
*-commutative68.4%
associate-*l/69.8%
associate-*r/73.4%
distribute-rgt-out--81.8%
Simplified81.8%
Final simplification84.7%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.8e-12) (+ x (/ t (/ a y))) (if (<= t 1.05e-39) (- x (* y (/ z a))) (/ (- t z) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.8e-12) {
tmp = x + (t / (a / y));
} else if (t <= 1.05e-39) {
tmp = x - (y * (z / a));
} else {
tmp = (t - 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 (t <= (-6.8d-12)) then
tmp = x + (t / (a / y))
else if (t <= 1.05d-39) then
tmp = x - (y * (z / a))
else
tmp = (t - 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 (t <= -6.8e-12) {
tmp = x + (t / (a / y));
} else if (t <= 1.05e-39) {
tmp = x - (y * (z / a));
} else {
tmp = (t - z) / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.8e-12: tmp = x + (t / (a / y)) elif t <= 1.05e-39: tmp = x - (y * (z / a)) else: tmp = (t - z) / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.8e-12) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (t <= 1.05e-39) tmp = Float64(x - Float64(y * Float64(z / a))); else tmp = Float64(Float64(t - z) / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.8e-12) tmp = x + (t / (a / y)); elseif (t <= 1.05e-39) tmp = x - (y * (z / a)); else tmp = (t - z) / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.8e-12], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-39], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{-12}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-39}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - z}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -6.8000000000000001e-12Initial program 91.2%
associate-/l*93.0%
Simplified93.0%
clear-num93.0%
un-div-inv93.1%
Applied egg-rr93.1%
clear-num93.0%
associate-/r/93.0%
Applied egg-rr93.0%
Taylor expanded in z around 0 79.7%
sub-neg79.7%
mul-1-neg79.7%
associate-*l/81.7%
distribute-rgt-neg-in81.7%
distribute-rgt-neg-out81.7%
remove-double-neg81.7%
associate-/r/83.2%
Simplified83.2%
if -6.8000000000000001e-12 < t < 1.04999999999999997e-39Initial program 93.0%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in z around inf 85.2%
associate-/l*87.5%
Simplified87.5%
if 1.04999999999999997e-39 < t Initial program 89.7%
associate-/l*83.4%
Simplified83.4%
clear-num83.4%
un-div-inv84.7%
Applied egg-rr84.7%
Taylor expanded in x around 0 73.4%
mul-1-neg73.4%
associate-*r/69.6%
distribute-rgt-neg-in69.6%
neg-sub069.6%
div-sub64.0%
associate--r-64.0%
neg-sub064.0%
+-commutative64.0%
sub-neg64.0%
distribute-lft-out--64.0%
associate-/l*63.9%
*-commutative63.9%
associate-/l*67.9%
*-commutative67.9%
associate-*l/69.3%
associate-*r/72.8%
distribute-rgt-out--80.9%
Simplified80.9%
*-commutative80.9%
clear-num80.9%
un-div-inv81.0%
Applied egg-rr81.0%
Final simplification84.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.52e-21) (not (<= t 3.5e-70))) (* t (/ y a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.52e-21) || !(t <= 3.5e-70)) {
tmp = t * (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 ((t <= (-1.52d-21)) .or. (.not. (t <= 3.5d-70))) then
tmp = t * (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 ((t <= -1.52e-21) || !(t <= 3.5e-70)) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.52e-21) or not (t <= 3.5e-70): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.52e-21) || !(t <= 3.5e-70)) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.52e-21) || ~((t <= 3.5e-70))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.52e-21], N[Not[LessEqual[t, 3.5e-70]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.52 \cdot 10^{-21} \lor \neg \left(t \leq 3.5 \cdot 10^{-70}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.52000000000000009e-21 or 3.49999999999999974e-70 < t Initial program 90.2%
associate-/l*88.3%
Simplified88.3%
Taylor expanded in t around inf 58.6%
associate-/l*58.1%
Simplified58.1%
if -1.52000000000000009e-21 < t < 3.49999999999999974e-70Initial program 93.3%
associate-/l*95.8%
Simplified95.8%
Taylor expanded in x around inf 46.9%
Final simplification53.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.4e-65) (* y (/ t a)) (if (<= t 2.75e-70) x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.4e-65) {
tmp = y * (t / a);
} else if (t <= 2.75e-70) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.4d-65)) then
tmp = y * (t / a)
else if (t <= 2.75d-70) then
tmp = x
else
tmp = t * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.4e-65) {
tmp = y * (t / a);
} else if (t <= 2.75e-70) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.4e-65: tmp = y * (t / a) elif t <= 2.75e-70: tmp = x else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.4e-65) tmp = Float64(y * Float64(t / a)); elseif (t <= 2.75e-70) tmp = x; else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.4e-65) tmp = y * (t / a); elseif (t <= 2.75e-70) tmp = x; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.4e-65], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.75e-70], x, N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-65}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;t \leq 2.75 \cdot 10^{-70}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -1.4e-65Initial program 91.6%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in t around inf 51.6%
*-commutative51.6%
associate-/l*52.2%
Simplified52.2%
if -1.4e-65 < t < 2.75e-70Initial program 92.7%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in x around inf 48.7%
if 2.75e-70 < t Initial program 90.4%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in t around inf 60.7%
associate-/l*59.5%
Simplified59.5%
Final simplification53.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.6e-67) (/ y (/ a t)) (if (<= t 3.5e-70) x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.6e-67) {
tmp = y / (a / t);
} else if (t <= 3.5e-70) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-3.6d-67)) then
tmp = y / (a / t)
else if (t <= 3.5d-70) then
tmp = x
else
tmp = t * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.6e-67) {
tmp = y / (a / t);
} else if (t <= 3.5e-70) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.6e-67: tmp = y / (a / t) elif t <= 3.5e-70: tmp = x else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.6e-67) tmp = Float64(y / Float64(a / t)); elseif (t <= 3.5e-70) tmp = x; else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.6e-67) tmp = y / (a / t); elseif (t <= 3.5e-70) tmp = x; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.6e-67], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e-70], x, N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-67}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-70}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -3.59999999999999999e-67Initial program 91.6%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in t around inf 51.6%
*-commutative51.6%
associate-/l*52.2%
Simplified52.2%
clear-num52.2%
un-div-inv52.2%
Applied egg-rr52.2%
if -3.59999999999999999e-67 < t < 3.49999999999999974e-70Initial program 92.7%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in x around inf 48.7%
if 3.49999999999999974e-70 < t Initial program 90.4%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in t around inf 60.7%
associate-/l*59.5%
Simplified59.5%
Final simplification53.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.25e-64) (/ y (/ a t)) (if (<= t 3.5e-70) x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.25e-64) {
tmp = y / (a / t);
} else if (t <= 3.5e-70) {
tmp = x;
} else {
tmp = (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 (t <= (-2.25d-64)) then
tmp = y / (a / t)
else if (t <= 3.5d-70) then
tmp = x
else
tmp = (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 (t <= -2.25e-64) {
tmp = y / (a / t);
} else if (t <= 3.5e-70) {
tmp = x;
} else {
tmp = (y * t) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.25e-64: tmp = y / (a / t) elif t <= 3.5e-70: tmp = x else: tmp = (y * t) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.25e-64) tmp = Float64(y / Float64(a / t)); elseif (t <= 3.5e-70) tmp = x; else tmp = Float64(Float64(y * t) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.25e-64) tmp = y / (a / t); elseif (t <= 3.5e-70) tmp = x; else tmp = (y * t) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.25e-64], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e-70], x, N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.25 \cdot 10^{-64}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-70}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\end{array}
\end{array}
if t < -2.25000000000000005e-64Initial program 91.6%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in t around inf 51.6%
*-commutative51.6%
associate-/l*52.2%
Simplified52.2%
clear-num52.2%
un-div-inv52.2%
Applied egg-rr52.2%
if -2.25000000000000005e-64 < t < 3.49999999999999974e-70Initial program 92.7%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in x around inf 48.7%
if 3.49999999999999974e-70 < t Initial program 90.4%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in t around inf 60.7%
Final simplification53.4%
(FPCore (x y z t a) :precision binary64 (if (<= x -2.5e+231) (- x (/ (* y z) a)) (+ x (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.5e+231) {
tmp = x - ((y * z) / a);
} else {
tmp = x + (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 (x <= (-2.5d+231)) then
tmp = x - ((y * z) / a)
else
tmp = x + (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 (x <= -2.5e+231) {
tmp = x - ((y * z) / a);
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.5e+231: tmp = x - ((y * z) / a) else: tmp = x + (y * ((t - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.5e+231) tmp = Float64(x - Float64(Float64(y * z) / a)); else tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.5e+231) tmp = x - ((y * z) / a); else tmp = x + (y * ((t - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.5e+231], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+231}:\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if x < -2.50000000000000014e231Initial program 94.4%
associate-/l*73.1%
Simplified73.1%
Taylor expanded in z around inf 100.0%
if -2.50000000000000014e231 < x Initial program 91.4%
associate-/l*93.1%
Simplified93.1%
Final simplification93.6%
(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(y / Float64(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[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a}{t - z}}
\end{array}
Initial program 91.6%
associate-/l*91.7%
Simplified91.7%
clear-num91.7%
un-div-inv92.1%
Applied egg-rr92.1%
Final simplification92.1%
(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.6%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in x around inf 34.0%
Final simplification34.0%
(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 2024039
(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)))