
(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
(let* ((t_1 (* y (- z t))))
(if (or (<= t_1 -5e+201) (not (<= t_1 1e+161)))
(+ x (/ (- t z) (/ a y)))
(- x (/ t_1 a)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 <= -5e+201) || !(t_1 <= 1e+161)) {
tmp = x + ((t - z) / (a / y));
} else {
tmp = x - (t_1 / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z - t)
if ((t_1 <= (-5d+201)) .or. (.not. (t_1 <= 1d+161))) then
tmp = x + ((t - z) / (a / y))
else
tmp = x - (t_1 / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 <= -5e+201) || !(t_1 <= 1e+161)) {
tmp = x + ((t - z) / (a / y));
} else {
tmp = x - (t_1 / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if (t_1 <= -5e+201) or not (t_1 <= 1e+161): tmp = x + ((t - z) / (a / y)) else: tmp = x - (t_1 / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if ((t_1 <= -5e+201) || !(t_1 <= 1e+161)) tmp = Float64(x + Float64(Float64(t - z) / Float64(a / y))); else tmp = Float64(x - Float64(t_1 / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); tmp = 0.0; if ((t_1 <= -5e+201) || ~((t_1 <= 1e+161))) tmp = x + ((t - z) / (a / y)); else tmp = x - (t_1 / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+201], N[Not[LessEqual[t$95$1, 1e+161]], $MachinePrecision]], N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+201} \lor \neg \left(t\_1 \leq 10^{+161}\right):\\
\;\;\;\;x + \frac{t - z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t\_1}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -4.9999999999999995e201 or 1e161 < (*.f64 y (-.f64 z t)) Initial program 85.3%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in y around 0 85.3%
*-commutative85.3%
associate-/l*99.9%
Simplified99.9%
if -4.9999999999999995e201 < (*.f64 y (-.f64 z t)) < 1e161Initial program 99.8%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) a)))
(if (<= t_1 -2e+301)
(+ x (* (/ y a) (- t z)))
(if (<= t_1 5e+274) (- x t_1) (- x (/ y (/ a (- z t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / a;
double tmp;
if (t_1 <= -2e+301) {
tmp = x + ((y / a) * (t - z));
} else if (t_1 <= 5e+274) {
tmp = x - t_1;
} else {
tmp = x - (y / (a / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y * (z - t)) / a
if (t_1 <= (-2d+301)) then
tmp = x + ((y / a) * (t - z))
else if (t_1 <= 5d+274) then
tmp = x - t_1
else
tmp = x - (y / (a / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / a;
double tmp;
if (t_1 <= -2e+301) {
tmp = x + ((y / a) * (t - z));
} else if (t_1 <= 5e+274) {
tmp = x - t_1;
} else {
tmp = x - (y / (a / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / a tmp = 0 if t_1 <= -2e+301: tmp = x + ((y / a) * (t - z)) elif t_1 <= 5e+274: tmp = x - t_1 else: tmp = x - (y / (a / (z - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / a) tmp = 0.0 if (t_1 <= -2e+301) tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); elseif (t_1 <= 5e+274) tmp = Float64(x - t_1); else tmp = Float64(x - Float64(y / Float64(a / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / a; tmp = 0.0; if (t_1 <= -2e+301) tmp = x + ((y / a) * (t - z)); elseif (t_1 <= 5e+274) tmp = x - t_1; else tmp = x - (y / (a / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+301], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+274], N[(x - t$95$1), $MachinePrecision], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+301}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+274}:\\
\;\;\;\;x - t\_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) a) < -2.00000000000000011e301Initial program 88.4%
associate-*l/99.9%
Simplified99.9%
if -2.00000000000000011e301 < (/.f64 (*.f64 y (-.f64 z t)) a) < 4.9999999999999998e274Initial program 99.8%
if 4.9999999999999998e274 < (/.f64 (*.f64 y (-.f64 z t)) a) Initial program 78.3%
associate-/l*100.0%
Simplified100.0%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))) (t_2 (- x (/ z (/ a y)))))
(if (<= z -1.18e+81)
t_2
(if (<= z -4.3e-42)
t_1
(if (<= z 4e-217)
(- x (/ y (/ (- a) t)))
(if (<= z 1300.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double t_2 = x - (z / (a / y));
double tmp;
if (z <= -1.18e+81) {
tmp = t_2;
} else if (z <= -4.3e-42) {
tmp = t_1;
} else if (z <= 4e-217) {
tmp = x - (y / (-a / t));
} else if (z <= 1300.0) {
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 + (t * (y / a))
t_2 = x - (z / (a / y))
if (z <= (-1.18d+81)) then
tmp = t_2
else if (z <= (-4.3d-42)) then
tmp = t_1
else if (z <= 4d-217) then
tmp = x - (y / (-a / t))
else if (z <= 1300.0d0) 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 + (t * (y / a));
double t_2 = x - (z / (a / y));
double tmp;
if (z <= -1.18e+81) {
tmp = t_2;
} else if (z <= -4.3e-42) {
tmp = t_1;
} else if (z <= 4e-217) {
tmp = x - (y / (-a / t));
} else if (z <= 1300.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) t_2 = x - (z / (a / y)) tmp = 0 if z <= -1.18e+81: tmp = t_2 elif z <= -4.3e-42: tmp = t_1 elif z <= 4e-217: tmp = x - (y / (-a / t)) elif z <= 1300.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) t_2 = Float64(x - Float64(z / Float64(a / y))) tmp = 0.0 if (z <= -1.18e+81) tmp = t_2; elseif (z <= -4.3e-42) tmp = t_1; elseif (z <= 4e-217) tmp = Float64(x - Float64(y / Float64(Float64(-a) / t))); elseif (z <= 1300.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); t_2 = x - (z / (a / y)); tmp = 0.0; if (z <= -1.18e+81) tmp = t_2; elseif (z <= -4.3e-42) tmp = t_1; elseif (z <= 4e-217) tmp = x - (y / (-a / t)); elseif (z <= 1300.0) 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[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.18e+81], t$95$2, If[LessEqual[z, -4.3e-42], t$95$1, If[LessEqual[z, 4e-217], N[(x - N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1300.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
t_2 := x - \frac{z}{\frac{a}{y}}\\
\mathbf{if}\;z \leq -1.18 \cdot 10^{+81}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-217}:\\
\;\;\;\;x - \frac{y}{\frac{-a}{t}}\\
\mathbf{elif}\;z \leq 1300:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.17999999999999995e81 or 1300 < z Initial program 87.0%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in z around inf 83.3%
Taylor expanded in y around 0 83.1%
*-commutative83.1%
associate-/l*91.0%
Simplified91.0%
if -1.17999999999999995e81 < z < -4.3000000000000001e-42 or 4.00000000000000033e-217 < z < 1300Initial program 98.6%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in z around 0 88.4%
cancel-sign-sub-inv88.4%
metadata-eval88.4%
*-lft-identity88.4%
+-commutative88.4%
associate-*r/92.0%
Simplified92.0%
if -4.3000000000000001e-42 < z < 4.00000000000000033e-217Initial program 99.9%
associate-/l*97.9%
Simplified97.9%
Taylor expanded in z around 0 93.1%
associate-*r/93.1%
neg-mul-193.1%
Simplified93.1%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(if (<= x -8.4e+36)
x
(if (<= x -1.6e-131)
(/ (* y t) a)
(if (<= x 6.5e-286)
(* z (/ y (- a)))
(if (<= x 1.2e+96) (/ t (/ a y)) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -8.4e+36) {
tmp = x;
} else if (x <= -1.6e-131) {
tmp = (y * t) / a;
} else if (x <= 6.5e-286) {
tmp = z * (y / -a);
} else if (x <= 1.2e+96) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-8.4d+36)) then
tmp = x
else if (x <= (-1.6d-131)) then
tmp = (y * t) / a
else if (x <= 6.5d-286) then
tmp = z * (y / -a)
else if (x <= 1.2d+96) then
tmp = t / (a / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -8.4e+36) {
tmp = x;
} else if (x <= -1.6e-131) {
tmp = (y * t) / a;
} else if (x <= 6.5e-286) {
tmp = z * (y / -a);
} else if (x <= 1.2e+96) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -8.4e+36: tmp = x elif x <= -1.6e-131: tmp = (y * t) / a elif x <= 6.5e-286: tmp = z * (y / -a) elif x <= 1.2e+96: tmp = t / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -8.4e+36) tmp = x; elseif (x <= -1.6e-131) tmp = Float64(Float64(y * t) / a); elseif (x <= 6.5e-286) tmp = Float64(z * Float64(y / Float64(-a))); elseif (x <= 1.2e+96) tmp = Float64(t / Float64(a / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -8.4e+36) tmp = x; elseif (x <= -1.6e-131) tmp = (y * t) / a; elseif (x <= 6.5e-286) tmp = z * (y / -a); elseif (x <= 1.2e+96) tmp = t / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -8.4e+36], x, If[LessEqual[x, -1.6e-131], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[x, 6.5e-286], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.2e+96], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.4 \cdot 10^{+36}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-131}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-286}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+96}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -8.40000000000000018e36 or 1.19999999999999996e96 < x Initial program 94.6%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in x around inf 68.9%
if -8.40000000000000018e36 < x < -1.6e-131Initial program 90.9%
associate-*l/94.9%
Simplified94.9%
Taylor expanded in t around inf 53.4%
*-commutative53.4%
Simplified53.4%
if -1.6e-131 < x < 6.5000000000000004e-286Initial program 95.0%
associate-*l/87.7%
Simplified87.7%
Taylor expanded in z around inf 49.9%
mul-1-neg49.9%
associate-*l/52.4%
*-commutative52.4%
distribute-rgt-neg-in52.4%
*-lft-identity52.4%
associate-*l/52.3%
remove-double-neg52.3%
neg-mul-152.3%
associate-*r*52.3%
*-commutative52.3%
neg-mul-152.3%
*-commutative52.3%
distribute-neg-frac52.3%
metadata-eval52.3%
metadata-eval52.3%
associate-/r*52.3%
neg-mul-152.3%
associate-*r/52.4%
*-rgt-identity52.4%
distribute-frac-neg52.4%
remove-double-neg52.4%
Simplified52.4%
if 6.5000000000000004e-286 < x < 1.19999999999999996e96Initial program 95.0%
associate-*l/96.2%
Simplified96.2%
Taylor expanded in t around inf 48.9%
associate-*r/50.1%
Simplified50.1%
clear-num50.1%
div-inv50.2%
Applied egg-rr50.2%
Final simplification58.7%
(FPCore (x y z t a)
:precision binary64
(if (<= x -4e+38)
x
(if (<= x -1.9e-124)
(/ (* y t) a)
(if (<= x 1.52e-260)
(/ (- y) (/ a z))
(if (<= x 5.4e+93) (/ t (/ a y)) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4e+38) {
tmp = x;
} else if (x <= -1.9e-124) {
tmp = (y * t) / a;
} else if (x <= 1.52e-260) {
tmp = -y / (a / z);
} else if (x <= 5.4e+93) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-4d+38)) then
tmp = x
else if (x <= (-1.9d-124)) then
tmp = (y * t) / a
else if (x <= 1.52d-260) then
tmp = -y / (a / z)
else if (x <= 5.4d+93) then
tmp = t / (a / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4e+38) {
tmp = x;
} else if (x <= -1.9e-124) {
tmp = (y * t) / a;
} else if (x <= 1.52e-260) {
tmp = -y / (a / z);
} else if (x <= 5.4e+93) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4e+38: tmp = x elif x <= -1.9e-124: tmp = (y * t) / a elif x <= 1.52e-260: tmp = -y / (a / z) elif x <= 5.4e+93: tmp = t / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4e+38) tmp = x; elseif (x <= -1.9e-124) tmp = Float64(Float64(y * t) / a); elseif (x <= 1.52e-260) tmp = Float64(Float64(-y) / Float64(a / z)); elseif (x <= 5.4e+93) tmp = Float64(t / Float64(a / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4e+38) tmp = x; elseif (x <= -1.9e-124) tmp = (y * t) / a; elseif (x <= 1.52e-260) tmp = -y / (a / z); elseif (x <= 5.4e+93) tmp = t / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4e+38], x, If[LessEqual[x, -1.9e-124], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[x, 1.52e-260], N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.4e+93], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+38}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-124}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;x \leq 1.52 \cdot 10^{-260}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{+93}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.99999999999999991e38 or 5.3999999999999999e93 < x Initial program 94.6%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in x around inf 68.9%
if -3.99999999999999991e38 < x < -1.90000000000000006e-124Initial program 90.9%
associate-*l/94.9%
Simplified94.9%
Taylor expanded in t around inf 53.4%
*-commutative53.4%
Simplified53.4%
if -1.90000000000000006e-124 < x < 1.52e-260Initial program 93.5%
associate-*l/85.2%
Simplified85.2%
Taylor expanded in z around inf 47.8%
mul-1-neg47.8%
associate-*l/49.9%
*-commutative49.9%
distribute-rgt-neg-in49.9%
*-lft-identity49.9%
associate-*l/49.9%
remove-double-neg49.9%
neg-mul-149.9%
associate-*r*49.9%
*-commutative49.9%
neg-mul-149.9%
*-commutative49.9%
distribute-neg-frac49.9%
metadata-eval49.9%
metadata-eval49.9%
associate-/r*49.9%
neg-mul-149.9%
associate-*r/49.9%
*-rgt-identity49.9%
distribute-frac-neg49.9%
remove-double-neg49.9%
Simplified49.9%
*-commutative49.9%
frac-2neg49.9%
remove-double-neg49.9%
distribute-frac-neg49.9%
distribute-lft-neg-in49.9%
associate-/r/50.3%
distribute-neg-frac50.3%
Applied egg-rr50.3%
if 1.52e-260 < x < 5.3999999999999999e93Initial program 95.9%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in t around inf 48.8%
associate-*r/51.3%
Simplified51.3%
clear-num51.3%
div-inv51.4%
Applied egg-rr51.4%
Final simplification58.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -5.8e-28) (not (<= x 1.3e-208))) (+ x (* t (/ y a))) (* y (/ (- t z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5.8e-28) || !(x <= 1.3e-208)) {
tmp = x + (t * (y / a));
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-5.8d-28)) .or. (.not. (x <= 1.3d-208))) then
tmp = x + (t * (y / a))
else
tmp = y * ((t - z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5.8e-28) || !(x <= 1.3e-208)) {
tmp = x + (t * (y / a));
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -5.8e-28) or not (x <= 1.3e-208): tmp = x + (t * (y / a)) else: tmp = y * ((t - z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -5.8e-28) || !(x <= 1.3e-208)) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(y * Float64(Float64(t - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -5.8e-28) || ~((x <= 1.3e-208))) tmp = x + (t * (y / a)); else tmp = y * ((t - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -5.8e-28], N[Not[LessEqual[x, 1.3e-208]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{-28} \lor \neg \left(x \leq 1.3 \cdot 10^{-208}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if x < -5.80000000000000026e-28 or 1.30000000000000008e-208 < x Initial program 95.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around 0 80.6%
cancel-sign-sub-inv80.6%
metadata-eval80.6%
*-lft-identity80.6%
+-commutative80.6%
associate-*r/83.6%
Simplified83.6%
if -5.80000000000000026e-28 < x < 1.30000000000000008e-208Initial program 92.2%
associate-*l/87.7%
Simplified87.7%
Taylor expanded in x around 0 79.1%
mul-1-neg79.1%
associate-*r/77.8%
distribute-rgt-neg-out77.8%
*-rgt-identity77.8%
*-rgt-identity77.8%
distribute-neg-frac77.8%
neg-sub077.8%
associate--r-77.8%
neg-sub077.8%
+-commutative77.8%
sub-neg77.8%
Simplified77.8%
Final simplification81.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.55e+81) (not (<= z 1.8))) (- x (* y (/ z a))) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.55e+81) || !(z <= 1.8)) {
tmp = x - (y * (z / a));
} else {
tmp = x + (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 ((z <= (-1.55d+81)) .or. (.not. (z <= 1.8d0))) then
tmp = x - (y * (z / a))
else
tmp = x + (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 ((z <= -1.55e+81) || !(z <= 1.8)) {
tmp = x - (y * (z / a));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.55e+81) or not (z <= 1.8): tmp = x - (y * (z / a)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.55e+81) || !(z <= 1.8)) tmp = Float64(x - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.55e+81) || ~((z <= 1.8))) tmp = x - (y * (z / a)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.55e+81], N[Not[LessEqual[z, 1.8]], $MachinePrecision]], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+81} \lor \neg \left(z \leq 1.8\right):\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.55e81 or 1.80000000000000004 < z Initial program 87.0%
associate-*l/98.3%
Simplified98.3%
Taylor expanded in y around 0 87.0%
*-commutative87.0%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in z around inf 83.1%
associate-*r/83.3%
Simplified83.3%
if -1.55e81 < z < 1.80000000000000004Initial program 99.3%
associate-*l/94.9%
Simplified94.9%
Taylor expanded in z around 0 91.3%
cancel-sign-sub-inv91.3%
metadata-eval91.3%
*-lft-identity91.3%
+-commutative91.3%
associate-*r/89.4%
Simplified89.4%
Final simplification86.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.8e+80) (not (<= z 3000000.0))) (- x (/ z (/ a y))) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.8e+80) || !(z <= 3000000.0)) {
tmp = x - (z / (a / y));
} else {
tmp = x + (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 ((z <= (-2.8d+80)) .or. (.not. (z <= 3000000.0d0))) then
tmp = x - (z / (a / y))
else
tmp = x + (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 ((z <= -2.8e+80) || !(z <= 3000000.0)) {
tmp = x - (z / (a / y));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.8e+80) or not (z <= 3000000.0): tmp = x - (z / (a / y)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.8e+80) || !(z <= 3000000.0)) tmp = Float64(x - Float64(z / Float64(a / y))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.8e+80) || ~((z <= 3000000.0))) tmp = x - (z / (a / y)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.8e+80], N[Not[LessEqual[z, 3000000.0]], $MachinePrecision]], N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+80} \lor \neg \left(z \leq 3000000\right):\\
\;\;\;\;x - \frac{z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -2.79999999999999984e80 or 3e6 < z Initial program 87.0%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in z around inf 83.3%
Taylor expanded in y around 0 83.1%
*-commutative83.1%
associate-/l*91.0%
Simplified91.0%
if -2.79999999999999984e80 < z < 3e6Initial program 99.3%
associate-*l/94.9%
Simplified94.9%
Taylor expanded in z around 0 91.3%
cancel-sign-sub-inv91.3%
metadata-eval91.3%
*-lft-identity91.3%
+-commutative91.3%
associate-*r/89.4%
Simplified89.4%
Final simplification90.1%
(FPCore (x y z t a) :precision binary64 (if (<= x -4.9e+96) x (if (<= x 4e+117) (* y (/ (- t z) a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.9e+96) {
tmp = x;
} else if (x <= 4e+117) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-4.9d+96)) then
tmp = x
else if (x <= 4d+117) then
tmp = y * ((t - z) / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.9e+96) {
tmp = x;
} else if (x <= 4e+117) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.9e+96: tmp = x elif x <= 4e+117: tmp = y * ((t - z) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.9e+96) tmp = x; elseif (x <= 4e+117) tmp = Float64(y * Float64(Float64(t - z) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.9e+96) tmp = x; elseif (x <= 4e+117) tmp = y * ((t - z) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.9e+96], x, If[LessEqual[x, 4e+117], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.9 \cdot 10^{+96}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+117}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.8999999999999996e96 or 4.0000000000000002e117 < x Initial program 93.3%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around inf 75.0%
if -4.8999999999999996e96 < x < 4.0000000000000002e117Initial program 94.9%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in x around 0 71.8%
mul-1-neg71.8%
associate-*r/69.0%
distribute-rgt-neg-out69.0%
*-rgt-identity69.0%
*-rgt-identity69.0%
distribute-neg-frac69.0%
neg-sub069.0%
associate--r-69.0%
neg-sub069.0%
+-commutative69.0%
sub-neg69.0%
Simplified69.0%
Final simplification71.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.9e+38) x (if (<= a 3700000000.0) (* t (/ y a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.9e+38) {
tmp = x;
} else if (a <= 3700000000.0) {
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 (a <= (-1.9d+38)) then
tmp = x
else if (a <= 3700000000.0d0) 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 (a <= -1.9e+38) {
tmp = x;
} else if (a <= 3700000000.0) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.9e+38: tmp = x elif a <= 3700000000.0: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.9e+38) tmp = x; elseif (a <= 3700000000.0) 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 (a <= -1.9e+38) tmp = x; elseif (a <= 3700000000.0) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.9e+38], x, If[LessEqual[a, 3700000000.0], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+38}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3700000000:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.8999999999999999e38 or 3.7e9 < a Initial program 88.2%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in x around inf 64.4%
if -1.8999999999999999e38 < a < 3.7e9Initial program 99.2%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in t around inf 49.5%
associate-*r/49.5%
Simplified49.5%
Final simplification56.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.4e+37) x (if (<= a 5000000000.0) (/ t (/ a y)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.4e+37) {
tmp = x;
} else if (a <= 5000000000.0) {
tmp = t / (a / y);
} 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 (a <= (-3.4d+37)) then
tmp = x
else if (a <= 5000000000.0d0) then
tmp = t / (a / y)
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 (a <= -3.4e+37) {
tmp = x;
} else if (a <= 5000000000.0) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.4e+37: tmp = x elif a <= 5000000000.0: tmp = t / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.4e+37) tmp = x; elseif (a <= 5000000000.0) tmp = Float64(t / Float64(a / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.4e+37) tmp = x; elseif (a <= 5000000000.0) tmp = t / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.4e+37], x, If[LessEqual[a, 5000000000.0], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{+37}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 5000000000:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.40000000000000006e37 or 5e9 < a Initial program 88.2%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in x around inf 64.4%
if -3.40000000000000006e37 < a < 5e9Initial program 99.2%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in t around inf 49.5%
associate-*r/49.5%
Simplified49.5%
clear-num49.5%
div-inv49.5%
Applied egg-rr49.5%
Final simplification56.1%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.22e+37) x (if (<= x 7e+93) (/ (* y t) a) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.22e+37) {
tmp = x;
} else if (x <= 7e+93) {
tmp = (y * t) / a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.22d+37)) then
tmp = x
else if (x <= 7d+93) then
tmp = (y * t) / a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.22e+37) {
tmp = x;
} else if (x <= 7e+93) {
tmp = (y * t) / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.22e+37: tmp = x elif x <= 7e+93: tmp = (y * t) / a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.22e+37) tmp = x; elseif (x <= 7e+93) tmp = Float64(Float64(y * t) / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.22e+37) tmp = x; elseif (x <= 7e+93) tmp = (y * t) / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.22e+37], x, If[LessEqual[x, 7e+93], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.22 \cdot 10^{+37}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7 \cdot 10^{+93}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.22e37 or 6.99999999999999996e93 < x Initial program 94.6%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in x around inf 68.9%
if -1.22e37 < x < 6.99999999999999996e93Initial program 94.2%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in t around inf 45.8%
*-commutative45.8%
Simplified45.8%
Final simplification55.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.7e-201) (+ x (* y (/ (- t z) a))) (+ x (* (/ y a) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.7e-201) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + ((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 (y <= (-1.7d-201)) then
tmp = x + (y * ((t - z) / a))
else
tmp = x + ((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 (y <= -1.7e-201) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + ((y / a) * (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.7e-201: tmp = x + (y * ((t - z) / a)) else: tmp = x + ((y / a) * (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.7e-201) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.7e-201) tmp = x + (y * ((t - z) / a)); else tmp = x + ((y / a) * (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.7e-201], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-201}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if y < -1.69999999999999993e-201Initial program 91.1%
associate-/l*97.2%
Simplified97.2%
clear-num97.1%
associate-/r/97.1%
clear-num97.1%
Applied egg-rr97.1%
if -1.69999999999999993e-201 < y Initial program 96.7%
associate-*l/98.6%
Simplified98.6%
Final simplification98.0%
(FPCore (x y z t a) :precision binary64 (if (<= y -5e-194) (- x (/ y (/ a (- z t)))) (+ x (* (/ y a) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5e-194) {
tmp = x - (y / (a / (z - t)));
} else {
tmp = x + ((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 (y <= (-5d-194)) then
tmp = x - (y / (a / (z - t)))
else
tmp = x + ((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 (y <= -5e-194) {
tmp = x - (y / (a / (z - t)));
} else {
tmp = x + ((y / a) * (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5e-194: tmp = x - (y / (a / (z - t))) else: tmp = x + ((y / a) * (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5e-194) tmp = Float64(x - Float64(y / Float64(a / Float64(z - t)))); else tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5e-194) tmp = x - (y / (a / (z - t))); else tmp = x + ((y / a) * (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5e-194], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-194}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if y < -5.0000000000000002e-194Initial program 91.0%
associate-/l*97.2%
Simplified97.2%
if -5.0000000000000002e-194 < y Initial program 96.7%
associate-*l/98.6%
Simplified98.6%
Final simplification98.0%
(FPCore (x y z t a) :precision binary64 (+ x (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y / a) * (t - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
def code(x, y, z, t, a): return x + ((y / a) * (t - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y / a) * Float64(t - z))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y / a) * (t - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{a} \cdot \left(t - z\right)
\end{array}
Initial program 94.3%
associate-*l/96.3%
Simplified96.3%
Final simplification96.3%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 94.3%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in x around inf 41.7%
Final simplification41.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ a (- z t))))
(if (< y -1.0761266216389975e-10)
(- x (/ 1.0 (/ t_1 y)))
(if (< y 2.894426862792089e-49)
(- x (/ (* y (- z t)) a))
(- x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = a / (z - t)
if (y < (-1.0761266216389975d-10)) then
tmp = x - (1.0d0 / (t_1 / y))
else if (y < 2.894426862792089d-49) then
tmp = x - ((y * (z - t)) / a)
else
tmp = x - (y / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a / (z - t) tmp = 0 if y < -1.0761266216389975e-10: tmp = x - (1.0 / (t_1 / y)) elif y < 2.894426862792089e-49: tmp = x - ((y * (z - t)) / a) else: tmp = x - (y / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(a / Float64(z - t)) tmp = 0.0 if (y < -1.0761266216389975e-10) tmp = Float64(x - Float64(1.0 / Float64(t_1 / y))); elseif (y < 2.894426862792089e-49) tmp = Float64(x - Float64(Float64(y * Float64(z - t)) / a)); else tmp = Float64(x - Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a / (z - t); tmp = 0.0; if (y < -1.0761266216389975e-10) tmp = x - (1.0 / (t_1 / y)); elseif (y < 2.894426862792089e-49) tmp = x - ((y * (z - t)) / a); else tmp = x - (y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x - N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{1}{\frac{t\_1}{y}}\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x - \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024040
(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)))