
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))))
(if (<= t_1 (- INFINITY))
(- x (* (- z t) (/ y a)))
(if (<= t_1 5e+275)
(+ x (/ (* y (- t z)) a))
(- x (/ y (/ a (- z t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x - ((z - t) * (y / a));
} else if (t_1 <= 5e+275) {
tmp = x + ((y * (t - z)) / a);
} else {
tmp = x - (y / (a / (z - t)));
}
return tmp;
}
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 <= -Double.POSITIVE_INFINITY) {
tmp = x - ((z - t) * (y / a));
} else if (t_1 <= 5e+275) {
tmp = x + ((y * (t - z)) / a);
} else {
tmp = x - (y / (a / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if t_1 <= -math.inf: tmp = x - ((z - t) * (y / a)) elif t_1 <= 5e+275: tmp = x + ((y * (t - z)) / a) else: tmp = x - (y / (a / (z - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x - Float64(Float64(z - t) * Float64(y / a))); elseif (t_1 <= 5e+275) tmp = Float64(x + Float64(Float64(y * Float64(t - z)) / a)); 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); tmp = 0.0; if (t_1 <= -Inf) tmp = x - ((z - t) * (y / a)); elseif (t_1 <= 5e+275) tmp = x + ((y * (t - z)) / a); else tmp = x - (y / (a / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x - N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+275], N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;x - \left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+275}:\\
\;\;\;\;x + \frac{y \cdot \left(t - z\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -inf.0Initial program 73.2%
associate-*l/99.9%
Simplified99.9%
if -inf.0 < (*.f64 y (-.f64 z t)) < 5.0000000000000003e275Initial program 99.9%
if 5.0000000000000003e275 < (*.f64 y (-.f64 z t)) Initial program 73.7%
associate-/l*99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y) (/ a z))) (t_2 (/ (* y t) a)))
(if (<= x -9.2e+17)
x
(if (<= x -1.3e-87)
(/ y (/ a t))
(if (<= x -9.2e-201)
t_1
(if (<= x 2.8e-300)
t_2
(if (<= x 2.2e-228) t_1 (if (<= x 1.75e-39) t_2 x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -y / (a / z);
double t_2 = (y * t) / a;
double tmp;
if (x <= -9.2e+17) {
tmp = x;
} else if (x <= -1.3e-87) {
tmp = y / (a / t);
} else if (x <= -9.2e-201) {
tmp = t_1;
} else if (x <= 2.8e-300) {
tmp = t_2;
} else if (x <= 2.2e-228) {
tmp = t_1;
} else if (x <= 1.75e-39) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -y / (a / z)
t_2 = (y * t) / a
if (x <= (-9.2d+17)) then
tmp = x
else if (x <= (-1.3d-87)) then
tmp = y / (a / t)
else if (x <= (-9.2d-201)) then
tmp = t_1
else if (x <= 2.8d-300) then
tmp = t_2
else if (x <= 2.2d-228) then
tmp = t_1
else if (x <= 1.75d-39) then
tmp = t_2
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -y / (a / z);
double t_2 = (y * t) / a;
double tmp;
if (x <= -9.2e+17) {
tmp = x;
} else if (x <= -1.3e-87) {
tmp = y / (a / t);
} else if (x <= -9.2e-201) {
tmp = t_1;
} else if (x <= 2.8e-300) {
tmp = t_2;
} else if (x <= 2.2e-228) {
tmp = t_1;
} else if (x <= 1.75e-39) {
tmp = t_2;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -y / (a / z) t_2 = (y * t) / a tmp = 0 if x <= -9.2e+17: tmp = x elif x <= -1.3e-87: tmp = y / (a / t) elif x <= -9.2e-201: tmp = t_1 elif x <= 2.8e-300: tmp = t_2 elif x <= 2.2e-228: tmp = t_1 elif x <= 1.75e-39: tmp = t_2 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-y) / Float64(a / z)) t_2 = Float64(Float64(y * t) / a) tmp = 0.0 if (x <= -9.2e+17) tmp = x; elseif (x <= -1.3e-87) tmp = Float64(y / Float64(a / t)); elseif (x <= -9.2e-201) tmp = t_1; elseif (x <= 2.8e-300) tmp = t_2; elseif (x <= 2.2e-228) tmp = t_1; elseif (x <= 1.75e-39) tmp = t_2; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -y / (a / z); t_2 = (y * t) / a; tmp = 0.0; if (x <= -9.2e+17) tmp = x; elseif (x <= -1.3e-87) tmp = y / (a / t); elseif (x <= -9.2e-201) tmp = t_1; elseif (x <= 2.8e-300) tmp = t_2; elseif (x <= 2.2e-228) tmp = t_1; elseif (x <= 1.75e-39) tmp = t_2; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[x, -9.2e+17], x, If[LessEqual[x, -1.3e-87], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -9.2e-201], t$95$1, If[LessEqual[x, 2.8e-300], t$95$2, If[LessEqual[x, 2.2e-228], t$95$1, If[LessEqual[x, 1.75e-39], t$95$2, x]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-y}{\frac{a}{z}}\\
t_2 := \frac{y \cdot t}{a}\\
\mathbf{if}\;x \leq -9.2 \cdot 10^{+17}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.3 \cdot 10^{-87}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;x \leq -9.2 \cdot 10^{-201}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-300}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-228}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{-39}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -9.2e17 or 1.75e-39 < x Initial program 93.3%
associate-*l/96.7%
Simplified96.7%
Taylor expanded in x around inf 63.5%
if -9.2e17 < x < -1.30000000000000001e-87Initial program 87.9%
associate-*l/93.9%
Simplified93.9%
*-commutative93.9%
clear-num93.6%
un-div-inv93.7%
Applied egg-rr93.7%
Taylor expanded in t around inf 58.3%
associate-/l*64.3%
Simplified64.3%
if -1.30000000000000001e-87 < x < -9.19999999999999943e-201 or 2.79999999999999994e-300 < x < 2.2e-228Initial program 97.6%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in z around inf 58.1%
mul-1-neg58.1%
associate-/l*55.5%
Simplified55.5%
if -9.19999999999999943e-201 < x < 2.79999999999999994e-300 or 2.2e-228 < x < 1.75e-39Initial program 94.9%
associate-*l/92.1%
Simplified92.1%
Taylor expanded in t around inf 55.7%
Final simplification60.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y t) a)))
(if (<= x -2.8e+16)
x
(if (<= x -7.6e-88)
(/ y (/ a t))
(if (<= x -2.5e-207)
(/ (* y (- z)) a)
(if (<= x 5.4e-300)
t_1
(if (<= x 7e-231) (/ (- y) (/ a z)) (if (<= x 6.5e-42) t_1 x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * t) / a;
double tmp;
if (x <= -2.8e+16) {
tmp = x;
} else if (x <= -7.6e-88) {
tmp = y / (a / t);
} else if (x <= -2.5e-207) {
tmp = (y * -z) / a;
} else if (x <= 5.4e-300) {
tmp = t_1;
} else if (x <= 7e-231) {
tmp = -y / (a / z);
} else if (x <= 6.5e-42) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (y * t) / a
if (x <= (-2.8d+16)) then
tmp = x
else if (x <= (-7.6d-88)) then
tmp = y / (a / t)
else if (x <= (-2.5d-207)) then
tmp = (y * -z) / a
else if (x <= 5.4d-300) then
tmp = t_1
else if (x <= 7d-231) then
tmp = -y / (a / z)
else if (x <= 6.5d-42) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * t) / a;
double tmp;
if (x <= -2.8e+16) {
tmp = x;
} else if (x <= -7.6e-88) {
tmp = y / (a / t);
} else if (x <= -2.5e-207) {
tmp = (y * -z) / a;
} else if (x <= 5.4e-300) {
tmp = t_1;
} else if (x <= 7e-231) {
tmp = -y / (a / z);
} else if (x <= 6.5e-42) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * t) / a tmp = 0 if x <= -2.8e+16: tmp = x elif x <= -7.6e-88: tmp = y / (a / t) elif x <= -2.5e-207: tmp = (y * -z) / a elif x <= 5.4e-300: tmp = t_1 elif x <= 7e-231: tmp = -y / (a / z) elif x <= 6.5e-42: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * t) / a) tmp = 0.0 if (x <= -2.8e+16) tmp = x; elseif (x <= -7.6e-88) tmp = Float64(y / Float64(a / t)); elseif (x <= -2.5e-207) tmp = Float64(Float64(y * Float64(-z)) / a); elseif (x <= 5.4e-300) tmp = t_1; elseif (x <= 7e-231) tmp = Float64(Float64(-y) / Float64(a / z)); elseif (x <= 6.5e-42) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * t) / a; tmp = 0.0; if (x <= -2.8e+16) tmp = x; elseif (x <= -7.6e-88) tmp = y / (a / t); elseif (x <= -2.5e-207) tmp = (y * -z) / a; elseif (x <= 5.4e-300) tmp = t_1; elseif (x <= 7e-231) tmp = -y / (a / z); elseif (x <= 6.5e-42) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[x, -2.8e+16], x, If[LessEqual[x, -7.6e-88], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.5e-207], N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[x, 5.4e-300], t$95$1, If[LessEqual[x, 7e-231], N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e-42], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot t}{a}\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+16}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -7.6 \cdot 10^{-88}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-207}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{-300}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-231}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-42}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.8e16 or 6.4999999999999998e-42 < x Initial program 93.3%
associate-*l/96.7%
Simplified96.7%
Taylor expanded in x around inf 63.5%
if -2.8e16 < x < -7.60000000000000022e-88Initial program 87.9%
associate-*l/93.9%
Simplified93.9%
*-commutative93.9%
clear-num93.6%
un-div-inv93.7%
Applied egg-rr93.7%
Taylor expanded in t around inf 58.3%
associate-/l*64.3%
Simplified64.3%
if -7.60000000000000022e-88 < x < -2.50000000000000007e-207Initial program 99.8%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in x around 0 91.8%
mul-1-neg91.8%
distribute-frac-neg91.8%
distribute-rgt-neg-in91.8%
associate-*r/76.2%
Simplified76.2%
Taylor expanded in y around 0 91.8%
Taylor expanded in t around 0 57.7%
mul-1-neg57.7%
distribute-lft-neg-out57.7%
*-commutative57.7%
Simplified57.7%
if -2.50000000000000007e-207 < x < 5.3999999999999999e-300 or 7.0000000000000002e-231 < x < 6.4999999999999998e-42Initial program 94.9%
associate-*l/92.1%
Simplified92.1%
Taylor expanded in t around inf 55.7%
if 5.3999999999999999e-300 < x < 7.0000000000000002e-231Initial program 94.2%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in z around inf 58.8%
mul-1-neg58.8%
associate-/l*64.4%
Simplified64.4%
Final simplification61.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= z -1.26e+78)
(/ z (/ (- a) y))
(if (<= z 1.3e+131)
t_1
(if (<= z 9.6e+198)
(* y (/ (- z) a))
(if (<= z 3e+282) t_1 (/ (* y (- z)) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (z <= -1.26e+78) {
tmp = z / (-a / y);
} else if (z <= 1.3e+131) {
tmp = t_1;
} else if (z <= 9.6e+198) {
tmp = y * (-z / a);
} else if (z <= 3e+282) {
tmp = t_1;
} else {
tmp = (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) :: t_1
real(8) :: tmp
t_1 = x + (t * (y / a))
if (z <= (-1.26d+78)) then
tmp = z / (-a / y)
else if (z <= 1.3d+131) then
tmp = t_1
else if (z <= 9.6d+198) then
tmp = y * (-z / a)
else if (z <= 3d+282) then
tmp = t_1
else
tmp = (y * -z) / a
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 tmp;
if (z <= -1.26e+78) {
tmp = z / (-a / y);
} else if (z <= 1.3e+131) {
tmp = t_1;
} else if (z <= 9.6e+198) {
tmp = y * (-z / a);
} else if (z <= 3e+282) {
tmp = t_1;
} else {
tmp = (y * -z) / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if z <= -1.26e+78: tmp = z / (-a / y) elif z <= 1.3e+131: tmp = t_1 elif z <= 9.6e+198: tmp = y * (-z / a) elif z <= 3e+282: tmp = t_1 else: tmp = (y * -z) / a return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (z <= -1.26e+78) tmp = Float64(z / Float64(Float64(-a) / y)); elseif (z <= 1.3e+131) tmp = t_1; elseif (z <= 9.6e+198) tmp = Float64(y * Float64(Float64(-z) / a)); elseif (z <= 3e+282) tmp = t_1; else tmp = Float64(Float64(y * Float64(-z)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (z <= -1.26e+78) tmp = z / (-a / y); elseif (z <= 1.3e+131) tmp = t_1; elseif (z <= 9.6e+198) tmp = y * (-z / a); elseif (z <= 3e+282) tmp = t_1; else tmp = (y * -z) / a; 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]}, If[LessEqual[z, -1.26e+78], N[(z / N[((-a) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+131], t$95$1, If[LessEqual[z, 9.6e+198], N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+282], t$95$1, N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -1.26 \cdot 10^{+78}:\\
\;\;\;\;\frac{z}{\frac{-a}{y}}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{+198}:\\
\;\;\;\;y \cdot \frac{-z}{a}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+282}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\
\end{array}
\end{array}
if z < -1.25999999999999992e78Initial program 87.2%
associate-*l/95.5%
Simplified95.5%
*-commutative95.5%
clear-num95.5%
un-div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in z around inf 68.2%
mul-1-neg68.2%
associate-*l/76.6%
distribute-rgt-neg-in76.6%
Simplified76.6%
associate-*l/68.2%
frac-2neg68.2%
add-sqr-sqrt68.0%
sqrt-unprod54.4%
sqr-neg54.4%
sqrt-unprod0.0%
add-sqr-sqrt3.2%
distribute-rgt-neg-out3.2%
add-sqr-sqrt3.2%
sqrt-unprod3.1%
sqr-neg3.1%
sqrt-unprod0.0%
add-sqr-sqrt68.2%
Applied egg-rr68.2%
*-commutative68.2%
associate-/l*76.6%
distribute-frac-neg76.6%
Simplified76.6%
if -1.25999999999999992e78 < z < 1.3e131 or 9.6000000000000006e198 < z < 2.99999999999999997e282Initial program 96.4%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in z around 0 84.0%
cancel-sign-sub-inv84.0%
metadata-eval84.0%
*-lft-identity84.0%
+-commutative84.0%
associate-*l/84.3%
*-commutative84.3%
Simplified84.3%
if 1.3e131 < z < 9.6000000000000006e198Initial program 83.1%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in x around 0 60.2%
mul-1-neg60.2%
distribute-frac-neg60.2%
distribute-rgt-neg-in60.2%
associate-*r/76.9%
Simplified76.9%
Taylor expanded in z around inf 71.7%
associate-*r/71.7%
neg-mul-171.7%
Simplified71.7%
if 2.99999999999999997e282 < z Initial program 100.0%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in x around 0 84.1%
mul-1-neg84.1%
distribute-frac-neg84.1%
distribute-rgt-neg-in84.1%
associate-*r/53.1%
Simplified53.1%
Taylor expanded in y around 0 84.1%
Taylor expanded in t around 0 84.1%
mul-1-neg84.1%
distribute-lft-neg-out84.1%
*-commutative84.1%
Simplified84.1%
Final simplification82.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.26e+78)
(/ z (/ (- a) y))
(if (<= z 1.3e+131)
(+ x (* t (/ y a)))
(if (<= z 9e+207)
(* y (/ (- z) a))
(if (<= z 2.5e+283) (+ x (/ (* y t) a)) (/ (* y (- z)) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.26e+78) {
tmp = z / (-a / y);
} else if (z <= 1.3e+131) {
tmp = x + (t * (y / a));
} else if (z <= 9e+207) {
tmp = y * (-z / a);
} else if (z <= 2.5e+283) {
tmp = x + ((y * t) / a);
} else {
tmp = (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 <= (-1.26d+78)) then
tmp = z / (-a / y)
else if (z <= 1.3d+131) then
tmp = x + (t * (y / a))
else if (z <= 9d+207) then
tmp = y * (-z / a)
else if (z <= 2.5d+283) then
tmp = x + ((y * t) / a)
else
tmp = (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 <= -1.26e+78) {
tmp = z / (-a / y);
} else if (z <= 1.3e+131) {
tmp = x + (t * (y / a));
} else if (z <= 9e+207) {
tmp = y * (-z / a);
} else if (z <= 2.5e+283) {
tmp = x + ((y * t) / a);
} else {
tmp = (y * -z) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.26e+78: tmp = z / (-a / y) elif z <= 1.3e+131: tmp = x + (t * (y / a)) elif z <= 9e+207: tmp = y * (-z / a) elif z <= 2.5e+283: tmp = x + ((y * t) / a) else: tmp = (y * -z) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.26e+78) tmp = Float64(z / Float64(Float64(-a) / y)); elseif (z <= 1.3e+131) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 9e+207) tmp = Float64(y * Float64(Float64(-z) / a)); elseif (z <= 2.5e+283) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = Float64(Float64(y * Float64(-z)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.26e+78) tmp = z / (-a / y); elseif (z <= 1.3e+131) tmp = x + (t * (y / a)); elseif (z <= 9e+207) tmp = y * (-z / a); elseif (z <= 2.5e+283) tmp = x + ((y * t) / a); else tmp = (y * -z) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.26e+78], N[(z / N[((-a) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+131], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+207], N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+283], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.26 \cdot 10^{+78}:\\
\;\;\;\;\frac{z}{\frac{-a}{y}}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+131}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+207}:\\
\;\;\;\;y \cdot \frac{-z}{a}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+283}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\
\end{array}
\end{array}
if z < -1.25999999999999992e78Initial program 87.2%
associate-*l/95.5%
Simplified95.5%
*-commutative95.5%
clear-num95.5%
un-div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in z around inf 68.2%
mul-1-neg68.2%
associate-*l/76.6%
distribute-rgt-neg-in76.6%
Simplified76.6%
associate-*l/68.2%
frac-2neg68.2%
add-sqr-sqrt68.0%
sqrt-unprod54.4%
sqr-neg54.4%
sqrt-unprod0.0%
add-sqr-sqrt3.2%
distribute-rgt-neg-out3.2%
add-sqr-sqrt3.2%
sqrt-unprod3.1%
sqr-neg3.1%
sqrt-unprod0.0%
add-sqr-sqrt68.2%
Applied egg-rr68.2%
*-commutative68.2%
associate-/l*76.6%
distribute-frac-neg76.6%
Simplified76.6%
if -1.25999999999999992e78 < z < 1.3e131Initial program 97.2%
associate-*l/94.8%
Simplified94.8%
Taylor expanded in z around 0 84.4%
cancel-sign-sub-inv84.4%
metadata-eval84.4%
*-lft-identity84.4%
+-commutative84.4%
associate-*l/85.3%
*-commutative85.3%
Simplified85.3%
if 1.3e131 < z < 9.00000000000000006e207Initial program 83.1%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in x around 0 60.2%
mul-1-neg60.2%
distribute-frac-neg60.2%
distribute-rgt-neg-in60.2%
associate-*r/76.9%
Simplified76.9%
Taylor expanded in z around inf 71.7%
associate-*r/71.7%
neg-mul-171.7%
Simplified71.7%
if 9.00000000000000006e207 < z < 2.5000000000000002e283Initial program 82.4%
associate-*l/91.1%
Simplified91.1%
Taylor expanded in z around 0 77.5%
cancel-sign-sub-inv77.5%
metadata-eval77.5%
*-lft-identity77.5%
+-commutative77.5%
associate-*l/68.6%
*-commutative68.6%
Simplified68.6%
associate-*r/77.5%
Applied egg-rr77.5%
if 2.5000000000000002e283 < z Initial program 100.0%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in x around 0 84.1%
mul-1-neg84.1%
distribute-frac-neg84.1%
distribute-rgt-neg-in84.1%
associate-*r/53.1%
Simplified53.1%
Taylor expanded in y around 0 84.1%
Taylor expanded in t around 0 84.1%
mul-1-neg84.1%
distribute-lft-neg-out84.1%
*-commutative84.1%
Simplified84.1%
Final simplification82.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- a)))))
(if (<= z -1.05e+78)
t_1
(if (<= z -4.5e-228)
x
(if (<= z -1.06e-278) (* t (/ y a)) (if (<= z 1.75e+20) 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 <= -1.05e+78) {
tmp = t_1;
} else if (z <= -4.5e-228) {
tmp = x;
} else if (z <= -1.06e-278) {
tmp = t * (y / a);
} else if (z <= 1.75e+20) {
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 <= (-1.05d+78)) then
tmp = t_1
else if (z <= (-4.5d-228)) then
tmp = x
else if (z <= (-1.06d-278)) then
tmp = t * (y / a)
else if (z <= 1.75d+20) 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 <= -1.05e+78) {
tmp = t_1;
} else if (z <= -4.5e-228) {
tmp = x;
} else if (z <= -1.06e-278) {
tmp = t * (y / a);
} else if (z <= 1.75e+20) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / -a) tmp = 0 if z <= -1.05e+78: tmp = t_1 elif z <= -4.5e-228: tmp = x elif z <= -1.06e-278: tmp = t * (y / a) elif z <= 1.75e+20: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(-a))) tmp = 0.0 if (z <= -1.05e+78) tmp = t_1; elseif (z <= -4.5e-228) tmp = x; elseif (z <= -1.06e-278) tmp = Float64(t * Float64(y / a)); elseif (z <= 1.75e+20) 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 <= -1.05e+78) tmp = t_1; elseif (z <= -4.5e-228) tmp = x; elseif (z <= -1.06e-278) tmp = t * (y / a); elseif (z <= 1.75e+20) 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, -1.05e+78], t$95$1, If[LessEqual[z, -4.5e-228], x, If[LessEqual[z, -1.06e-278], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+20], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{-a}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+78}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-228}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.06 \cdot 10^{-278}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+20}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.05e78 or 1.75e20 < z Initial program 89.6%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in z around inf 56.9%
mul-1-neg56.9%
associate-*l/63.4%
*-commutative63.4%
distribute-rgt-neg-in63.4%
distribute-frac-neg63.4%
*-lft-identity63.4%
metadata-eval63.4%
times-frac63.4%
neg-mul-163.4%
neg-mul-163.4%
remove-double-neg63.4%
Simplified63.4%
if -1.05e78 < z < -4.4999999999999999e-228 or -1.0600000000000001e-278 < z < 1.75e20Initial program 96.6%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in x around inf 53.2%
if -4.4999999999999999e-228 < z < -1.0600000000000001e-278Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in t around inf 78.6%
associate-*l/78.6%
*-commutative78.6%
Simplified78.6%
Final simplification58.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6e+77)
(/ z (/ (- a) y))
(if (<= z -4e-229)
x
(if (<= z -9e-280)
(* t (/ y a))
(if (<= z 1.34e+20) x (* z (/ y (- a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+77) {
tmp = z / (-a / y);
} else if (z <= -4e-229) {
tmp = x;
} else if (z <= -9e-280) {
tmp = t * (y / a);
} else if (z <= 1.34e+20) {
tmp = x;
} else {
tmp = 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 (z <= (-6d+77)) then
tmp = z / (-a / y)
else if (z <= (-4d-229)) then
tmp = x
else if (z <= (-9d-280)) then
tmp = t * (y / a)
else if (z <= 1.34d+20) then
tmp = x
else
tmp = 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 (z <= -6e+77) {
tmp = z / (-a / y);
} else if (z <= -4e-229) {
tmp = x;
} else if (z <= -9e-280) {
tmp = t * (y / a);
} else if (z <= 1.34e+20) {
tmp = x;
} else {
tmp = z * (y / -a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6e+77: tmp = z / (-a / y) elif z <= -4e-229: tmp = x elif z <= -9e-280: tmp = t * (y / a) elif z <= 1.34e+20: tmp = x else: tmp = z * (y / -a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e+77) tmp = Float64(z / Float64(Float64(-a) / y)); elseif (z <= -4e-229) tmp = x; elseif (z <= -9e-280) tmp = Float64(t * Float64(y / a)); elseif (z <= 1.34e+20) tmp = x; else tmp = Float64(z * Float64(y / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6e+77) tmp = z / (-a / y); elseif (z <= -4e-229) tmp = x; elseif (z <= -9e-280) tmp = t * (y / a); elseif (z <= 1.34e+20) tmp = x; else tmp = z * (y / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e+77], N[(z / N[((-a) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e-229], x, If[LessEqual[z, -9e-280], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.34e+20], x, N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+77}:\\
\;\;\;\;\frac{z}{\frac{-a}{y}}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-229}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-280}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.34 \cdot 10^{+20}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\end{array}
\end{array}
if z < -5.9999999999999996e77Initial program 87.2%
associate-*l/95.5%
Simplified95.5%
*-commutative95.5%
clear-num95.5%
un-div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in z around inf 68.2%
mul-1-neg68.2%
associate-*l/76.6%
distribute-rgt-neg-in76.6%
Simplified76.6%
associate-*l/68.2%
frac-2neg68.2%
add-sqr-sqrt68.0%
sqrt-unprod54.4%
sqr-neg54.4%
sqrt-unprod0.0%
add-sqr-sqrt3.2%
distribute-rgt-neg-out3.2%
add-sqr-sqrt3.2%
sqrt-unprod3.1%
sqr-neg3.1%
sqrt-unprod0.0%
add-sqr-sqrt68.2%
Applied egg-rr68.2%
*-commutative68.2%
associate-/l*76.6%
distribute-frac-neg76.6%
Simplified76.6%
if -5.9999999999999996e77 < z < -4.00000000000000028e-229 or -8.9999999999999991e-280 < z < 1.34e20Initial program 96.6%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in x around inf 53.2%
if -4.00000000000000028e-229 < z < -8.9999999999999991e-280Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in t around inf 78.6%
associate-*l/78.6%
*-commutative78.6%
Simplified78.6%
if 1.34e20 < z Initial program 91.5%
associate-*l/98.1%
Simplified98.1%
Taylor expanded in z around inf 48.2%
mul-1-neg48.2%
associate-*l/53.2%
*-commutative53.2%
distribute-rgt-neg-in53.2%
distribute-frac-neg53.2%
*-lft-identity53.2%
metadata-eval53.2%
times-frac53.2%
neg-mul-153.2%
neg-mul-153.2%
remove-double-neg53.2%
Simplified53.2%
Final simplification58.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -64000000.0) (not (<= z 1.22e-15))) (- x (* y (/ z a))) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -64000000.0) || !(z <= 1.22e-15)) {
tmp = x - (y * (z / a));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-64000000.0d0)) .or. (.not. (z <= 1.22d-15))) then
tmp = x - (y * (z / a))
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -64000000.0) || !(z <= 1.22e-15)) {
tmp = x - (y * (z / a));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -64000000.0) or not (z <= 1.22e-15): tmp = x - (y * (z / a)) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -64000000.0) || !(z <= 1.22e-15)) tmp = Float64(x - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -64000000.0) || ~((z <= 1.22e-15))) tmp = x - (y * (z / a)); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -64000000.0], N[Not[LessEqual[z, 1.22e-15]], $MachinePrecision]], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -64000000 \lor \neg \left(z \leq 1.22 \cdot 10^{-15}\right):\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -6.4e7 or 1.21999999999999991e-15 < z Initial program 91.6%
associate-*l/96.9%
Simplified96.9%
*-commutative96.9%
clear-num96.9%
un-div-inv97.3%
Applied egg-rr97.3%
Taylor expanded in z around inf 81.4%
associate-*r/82.1%
Simplified82.1%
if -6.4e7 < z < 1.21999999999999991e-15Initial program 96.3%
associate-*l/93.6%
Simplified93.6%
Taylor expanded in z around 0 89.8%
cancel-sign-sub-inv89.8%
metadata-eval89.8%
*-lft-identity89.8%
+-commutative89.8%
associate-*l/89.5%
*-commutative89.5%
Simplified89.5%
associate-*r/89.8%
Applied egg-rr89.8%
Final simplification86.0%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.2e-199) (- x (* (- z t) (/ y a))) (+ x (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.2e-199) {
tmp = x - ((z - t) * (y / 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 (t <= 1.2d-199) then
tmp = x - ((z - t) * (y / 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 (t <= 1.2e-199) {
tmp = x - ((z - t) * (y / a));
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.2e-199: tmp = x - ((z - t) * (y / a)) else: tmp = x + (y * ((t - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.2e-199) tmp = Float64(x - Float64(Float64(z - t) * Float64(y / 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 (t <= 1.2e-199) tmp = x - ((z - t) * (y / a)); else tmp = x + (y * ((t - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.2e-199], N[(x - N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.2 \cdot 10^{-199}:\\
\;\;\;\;x - \left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if t < 1.19999999999999998e-199Initial program 93.9%
associate-*l/98.5%
Simplified98.5%
if 1.19999999999999998e-199 < t Initial program 94.1%
associate-/l*97.5%
Simplified97.5%
clear-num97.3%
associate-/r/95.7%
clear-num95.8%
Applied egg-rr95.8%
Final simplification97.3%
(FPCore (x y z t a) :precision binary64 (if (<= t 2.4e-205) (+ x (* (/ y a) (- t z))) (- x (/ y (/ a (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.4e-205) {
tmp = x + ((y / a) * (t - z));
} 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) :: tmp
if (t <= 2.4d-205) then
tmp = x + ((y / a) * (t - z))
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 tmp;
if (t <= 2.4e-205) {
tmp = x + ((y / a) * (t - z));
} else {
tmp = x - (y / (a / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2.4e-205: tmp = x + ((y / a) * (t - z)) else: tmp = x - (y / (a / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2.4e-205) tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); else tmp = Float64(x - Float64(y / Float64(a / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 2.4e-205) tmp = x + ((y / a) * (t - z)); else tmp = x - (y / (a / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.4e-205], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.4 \cdot 10^{-205}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\end{array}
\end{array}
if t < 2.4000000000000002e-205Initial program 94.5%
associate-*l/98.5%
Simplified98.5%
if 2.4000000000000002e-205 < t Initial program 93.4%
associate-/l*97.5%
Simplified97.5%
Final simplification98.0%
(FPCore (x y z t a) :precision binary64 (if (<= x -4.8e+18) x (if (<= x 1.72e-34) (* t (/ y a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.8e+18) {
tmp = x;
} else if (x <= 1.72e-34) {
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 (x <= (-4.8d+18)) then
tmp = x
else if (x <= 1.72d-34) 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 (x <= -4.8e+18) {
tmp = x;
} else if (x <= 1.72e-34) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.8e+18: tmp = x elif x <= 1.72e-34: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.8e+18) tmp = x; elseif (x <= 1.72e-34) 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 (x <= -4.8e+18) tmp = x; elseif (x <= 1.72e-34) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.8e+18], x, If[LessEqual[x, 1.72e-34], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+18}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.72 \cdot 10^{-34}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.8e18 or 1.7200000000000001e-34 < x Initial program 93.3%
associate-*l/96.7%
Simplified96.7%
Taylor expanded in x around inf 63.5%
if -4.8e18 < x < 1.7200000000000001e-34Initial program 94.9%
associate-*l/93.4%
Simplified93.4%
Taylor expanded in t around inf 47.9%
associate-*l/46.4%
*-commutative46.4%
Simplified46.4%
Final simplification55.9%
(FPCore (x y z t a) :precision binary64 (if (<= x -8e+15) x (if (<= x 4.6e-47) (/ (* y t) a) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -8e+15) {
tmp = x;
} else if (x <= 4.6e-47) {
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 <= (-8d+15)) then
tmp = x
else if (x <= 4.6d-47) 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 <= -8e+15) {
tmp = x;
} else if (x <= 4.6e-47) {
tmp = (y * t) / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -8e+15: tmp = x elif x <= 4.6e-47: tmp = (y * t) / a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -8e+15) tmp = x; elseif (x <= 4.6e-47) 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 <= -8e+15) tmp = x; elseif (x <= 4.6e-47) tmp = (y * t) / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -8e+15], x, If[LessEqual[x, 4.6e-47], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+15}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{-47}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -8e15 or 4.59999999999999964e-47 < x Initial program 93.3%
associate-*l/96.7%
Simplified96.7%
Taylor expanded in x around inf 63.5%
if -8e15 < x < 4.59999999999999964e-47Initial program 94.9%
associate-*l/93.4%
Simplified93.4%
Taylor expanded in t around inf 47.9%
Final simplification56.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(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.0%
associate-*l/95.2%
Simplified95.2%
Final simplification95.2%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 94.0%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in x around inf 41.6%
Final simplification41.6%
(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 2023274
(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)))