
(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 12 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 (* y (/ (- z t) a)))
(if (<= t_1 2e+146) (+ x (/ t_1 a)) (+ x (* (- z t) (/ y a)))))))
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 + (y * ((z - t) / a));
} else if (t_1 <= 2e+146) {
tmp = x + (t_1 / a);
} else {
tmp = x + ((z - t) * (y / a));
}
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 + (y * ((z - t) / a));
} else if (t_1 <= 2e+146) {
tmp = x + (t_1 / a);
} else {
tmp = x + ((z - t) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if t_1 <= -math.inf: tmp = x + (y * ((z - t) / a)) elif t_1 <= 2e+146: tmp = x + (t_1 / a) else: tmp = x + ((z - t) * (y / a)) 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(y * Float64(Float64(z - t) / a))); elseif (t_1 <= 2e+146) tmp = Float64(x + Float64(t_1 / a)); else tmp = Float64(x + Float64(Float64(z - t) * Float64(y / 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 <= -Inf) tmp = x + (y * ((z - t) / a)); elseif (t_1 <= 2e+146) tmp = x + (t_1 / a); else tmp = x + ((z - t) * (y / a)); 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[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+146], N[(x + N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+146}:\\
\;\;\;\;x + \frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -inf.0Initial program 73.0%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6473.0%
Simplified73.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64100.0%
Applied egg-rr100.0%
if -inf.0 < (*.f64 y (-.f64 z t)) < 1.99999999999999987e146Initial program 99.8%
if 1.99999999999999987e146 < (*.f64 y (-.f64 z t)) Initial program 90.0%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6490.0%
Simplified90.0%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* y (- z t)) a)) (t_2 (/ (- z t) (/ a y)))) (if (<= t_1 -1e+162) t_2 (if (<= t_1 4e+152) (+ x (/ (* y z) a)) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / a;
double t_2 = (z - t) / (a / y);
double tmp;
if (t_1 <= -1e+162) {
tmp = t_2;
} else if (t_1 <= 4e+152) {
tmp = x + ((y * z) / a);
} 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 = (y * (z - t)) / a
t_2 = (z - t) / (a / y)
if (t_1 <= (-1d+162)) then
tmp = t_2
else if (t_1 <= 4d+152) then
tmp = x + ((y * z) / a)
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 = (y * (z - t)) / a;
double t_2 = (z - t) / (a / y);
double tmp;
if (t_1 <= -1e+162) {
tmp = t_2;
} else if (t_1 <= 4e+152) {
tmp = x + ((y * z) / a);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / a t_2 = (z - t) / (a / y) tmp = 0 if t_1 <= -1e+162: tmp = t_2 elif t_1 <= 4e+152: tmp = x + ((y * z) / a) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / a) t_2 = Float64(Float64(z - t) / Float64(a / y)) tmp = 0.0 if (t_1 <= -1e+162) tmp = t_2; elseif (t_1 <= 4e+152) tmp = Float64(x + Float64(Float64(y * z) / a)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / a; t_2 = (z - t) / (a / y); tmp = 0.0; if (t_1 <= -1e+162) tmp = t_2; elseif (t_1 <= 4e+152) tmp = x + ((y * z) / a); else tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(z - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+162], t$95$2, If[LessEqual[t$95$1, 4e+152], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a}\\
t_2 := \frac{z - t}{\frac{a}{y}}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+162}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+152}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) a) < -9.9999999999999994e161 or 4.0000000000000002e152 < (/.f64 (*.f64 y (-.f64 z t)) a) Initial program 88.4%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6488.4%
Simplified88.4%
Taylor expanded in x around 0
mul-1-negN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
mul-1-negN/A
sub-negN/A
--lowering--.f6485.1%
Simplified85.1%
*-commutativeN/A
associate-/l*N/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f64N/A
/-lowering-/.f6490.3%
Applied egg-rr90.3%
if -9.9999999999999994e161 < (/.f64 (*.f64 y (-.f64 z t)) a) < 4.0000000000000002e152Initial program 99.8%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6484.7%
Simplified84.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* y (- z t)) a)) (t_2 (* (- z t) (/ y a)))) (if (<= t_1 -1e+162) t_2 (if (<= t_1 4e+152) (+ x (/ (* y z) a)) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / a;
double t_2 = (z - t) * (y / a);
double tmp;
if (t_1 <= -1e+162) {
tmp = t_2;
} else if (t_1 <= 4e+152) {
tmp = x + ((y * z) / a);
} 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 = (y * (z - t)) / a
t_2 = (z - t) * (y / a)
if (t_1 <= (-1d+162)) then
tmp = t_2
else if (t_1 <= 4d+152) then
tmp = x + ((y * z) / a)
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 = (y * (z - t)) / a;
double t_2 = (z - t) * (y / a);
double tmp;
if (t_1 <= -1e+162) {
tmp = t_2;
} else if (t_1 <= 4e+152) {
tmp = x + ((y * z) / a);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / a t_2 = (z - t) * (y / a) tmp = 0 if t_1 <= -1e+162: tmp = t_2 elif t_1 <= 4e+152: tmp = x + ((y * z) / a) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / a) t_2 = Float64(Float64(z - t) * Float64(y / a)) tmp = 0.0 if (t_1 <= -1e+162) tmp = t_2; elseif (t_1 <= 4e+152) tmp = Float64(x + Float64(Float64(y * z) / a)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / a; t_2 = (z - t) * (y / a); tmp = 0.0; if (t_1 <= -1e+162) tmp = t_2; elseif (t_1 <= 4e+152) tmp = x + ((y * z) / a); else tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+162], t$95$2, If[LessEqual[t$95$1, 4e+152], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a}\\
t_2 := \left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+162}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+152}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) a) < -9.9999999999999994e161 or 4.0000000000000002e152 < (/.f64 (*.f64 y (-.f64 z t)) a) Initial program 88.4%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6488.4%
Simplified88.4%
Taylor expanded in x around 0
mul-1-negN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
mul-1-negN/A
sub-negN/A
--lowering--.f6485.1%
Simplified85.1%
*-commutativeN/A
associate-/l*N/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
distribute-lft-neg-inN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f6490.3%
Applied egg-rr90.3%
if -9.9999999999999994e161 < (/.f64 (*.f64 y (-.f64 z t)) a) < 4.0000000000000002e152Initial program 99.8%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6484.7%
Simplified84.7%
Final simplification87.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (- z t))) (t_2 (+ x (* (- z t) (/ y a))))) (if (<= t_1 -1e+235) t_2 (if (<= t_1 2e+146) (+ x (/ t_1 a)) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double t_2 = x + ((z - t) * (y / a));
double tmp;
if (t_1 <= -1e+235) {
tmp = t_2;
} else if (t_1 <= 2e+146) {
tmp = x + (t_1 / a);
} 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 = y * (z - t)
t_2 = x + ((z - t) * (y / a))
if (t_1 <= (-1d+235)) then
tmp = t_2
else if (t_1 <= 2d+146) then
tmp = x + (t_1 / a)
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 = y * (z - t);
double t_2 = x + ((z - t) * (y / a));
double tmp;
if (t_1 <= -1e+235) {
tmp = t_2;
} else if (t_1 <= 2e+146) {
tmp = x + (t_1 / a);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) t_2 = x + ((z - t) * (y / a)) tmp = 0 if t_1 <= -1e+235: tmp = t_2 elif t_1 <= 2e+146: tmp = x + (t_1 / a) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) t_2 = Float64(x + Float64(Float64(z - t) * Float64(y / a))) tmp = 0.0 if (t_1 <= -1e+235) tmp = t_2; elseif (t_1 <= 2e+146) tmp = Float64(x + Float64(t_1 / a)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); t_2 = x + ((z - t) * (y / a)); tmp = 0.0; if (t_1 <= -1e+235) tmp = t_2; elseif (t_1 <= 2e+146) tmp = x + (t_1 / a); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+235], t$95$2, If[LessEqual[t$95$1, 2e+146], N[(x + N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
t_2 := x + \left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+235}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+146}:\\
\;\;\;\;x + \frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -1.0000000000000001e235 or 1.99999999999999987e146 < (*.f64 y (-.f64 z t)) Initial program 85.2%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6485.2%
Simplified85.2%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
if -1.0000000000000001e235 < (*.f64 y (-.f64 z t)) < 1.99999999999999987e146Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (- z t)))) (if (<= t_1 (- INFINITY)) (* y (/ (- z t) a)) (+ 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 <= -((double) INFINITY)) {
tmp = y * ((z - t) / a);
} else {
tmp = x + (t_1 / a);
}
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 = y * ((z - t) / a);
} 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 <= -math.inf: tmp = y * ((z - t) / a) 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 <= Float64(-Inf)) tmp = Float64(y * Float64(Float64(z - t) / a)); 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 <= -Inf) tmp = y * ((z - t) / a); 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[LessEqual[t$95$1, (-Infinity)], N[(y * N[(N[(z - t), $MachinePrecision] / a), $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 -\infty:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t\_1}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -inf.0Initial program 73.0%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6473.0%
Simplified73.0%
Taylor expanded in x around 0
mul-1-negN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
mul-1-negN/A
sub-negN/A
--lowering--.f6473.0%
Simplified73.0%
associate-/l*N/A
*-commutativeN/A
clear-numN/A
frac-2negN/A
frac-2negN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
distribute-neg-frac2N/A
clear-numN/A
distribute-neg-frac2N/A
remove-double-divN/A
*-lowering-*.f64N/A
Applied egg-rr89.3%
if -inf.0 < (*.f64 y (-.f64 z t)) Initial program 97.7%
Final simplification96.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -4e+111) (* y (/ (- z t) a)) (if (<= t 2.6e+146) (+ x (/ y (/ a z))) (* (- z t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4e+111) {
tmp = y * ((z - t) / a);
} else if (t <= 2.6e+146) {
tmp = x + (y / (a / z));
} else {
tmp = (z - 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 <= (-4d+111)) then
tmp = y * ((z - t) / a)
else if (t <= 2.6d+146) then
tmp = x + (y / (a / z))
else
tmp = (z - 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 <= -4e+111) {
tmp = y * ((z - t) / a);
} else if (t <= 2.6e+146) {
tmp = x + (y / (a / z));
} else {
tmp = (z - t) * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4e+111: tmp = y * ((z - t) / a) elif t <= 2.6e+146: tmp = x + (y / (a / z)) else: tmp = (z - t) * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4e+111) tmp = Float64(y * Float64(Float64(z - t) / a)); elseif (t <= 2.6e+146) tmp = Float64(x + Float64(y / Float64(a / z))); else tmp = Float64(Float64(z - t) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4e+111) tmp = y * ((z - t) / a); elseif (t <= 2.6e+146) tmp = x + (y / (a / z)); else tmp = (z - t) * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4e+111], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e+146], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+111}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+146}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -3.99999999999999983e111Initial program 97.0%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6497.0%
Simplified97.0%
Taylor expanded in x around 0
mul-1-negN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
mul-1-negN/A
sub-negN/A
--lowering--.f6474.7%
Simplified74.7%
associate-/l*N/A
*-commutativeN/A
clear-numN/A
frac-2negN/A
frac-2negN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
distribute-neg-frac2N/A
clear-numN/A
distribute-neg-frac2N/A
remove-double-divN/A
*-lowering-*.f64N/A
Applied egg-rr72.0%
if -3.99999999999999983e111 < t < 2.60000000000000014e146Initial program 95.7%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6495.7%
Simplified95.7%
Taylor expanded in t around 0
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6486.0%
Simplified86.0%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6484.9%
Applied egg-rr84.9%
if 2.60000000000000014e146 < t Initial program 89.7%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6489.7%
Simplified89.7%
Taylor expanded in x around 0
mul-1-negN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
mul-1-negN/A
sub-negN/A
--lowering--.f6468.9%
Simplified68.9%
*-commutativeN/A
associate-/l*N/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
distribute-lft-neg-inN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f6476.4%
Applied egg-rr76.4%
Final simplification81.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.2e+23) x (if (<= a 50000.0) (* (- z t) (/ y a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.2e+23) {
tmp = x;
} else if (a <= 50000.0) {
tmp = (z - 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 <= (-2.2d+23)) then
tmp = x
else if (a <= 50000.0d0) then
tmp = (z - 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 <= -2.2e+23) {
tmp = x;
} else if (a <= 50000.0) {
tmp = (z - t) * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.2e+23: tmp = x elif a <= 50000.0: tmp = (z - t) * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.2e+23) tmp = x; elseif (a <= 50000.0) tmp = Float64(Float64(z - 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 <= -2.2e+23) tmp = x; elseif (a <= 50000.0) tmp = (z - t) * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.2e+23], x, If[LessEqual[a, 50000.0], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{+23}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 50000:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.20000000000000008e23 or 5e4 < a Initial program 89.7%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6489.7%
Simplified89.7%
Taylor expanded in x around inf
Simplified64.5%
if -2.20000000000000008e23 < a < 5e4Initial program 99.8%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6499.8%
Simplified99.8%
Taylor expanded in x around 0
mul-1-negN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
mul-1-negN/A
sub-negN/A
--lowering--.f6480.2%
Simplified80.2%
*-commutativeN/A
associate-/l*N/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
distribute-lft-neg-inN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f6476.8%
Applied egg-rr76.8%
Final simplification71.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* y z) a))) (if (<= z -5.5e+115) t_1 (if (<= z 4.3e+28) x t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / a;
double tmp;
if (z <= -5.5e+115) {
tmp = t_1;
} else if (z <= 4.3e+28) {
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 = (y * z) / a
if (z <= (-5.5d+115)) then
tmp = t_1
else if (z <= 4.3d+28) 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 = (y * z) / a;
double tmp;
if (z <= -5.5e+115) {
tmp = t_1;
} else if (z <= 4.3e+28) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * z) / a tmp = 0 if z <= -5.5e+115: tmp = t_1 elif z <= 4.3e+28: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * z) / a) tmp = 0.0 if (z <= -5.5e+115) tmp = t_1; elseif (z <= 4.3e+28) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * z) / a; tmp = 0.0; if (z <= -5.5e+115) tmp = t_1; elseif (z <= 4.3e+28) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -5.5e+115], t$95$1, If[LessEqual[z, 4.3e+28], x, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot z}{a}\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+28}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.5e115 or 4.29999999999999975e28 < z Initial program 94.0%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6494.0%
Simplified94.0%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f6464.8%
Simplified64.8%
if -5.5e115 < z < 4.29999999999999975e28Initial program 95.7%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6495.7%
Simplified95.7%
Taylor expanded in x around inf
Simplified53.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.5e+115) (/ y (/ a z)) (if (<= z 1.44e+26) x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e+115) {
tmp = y / (a / z);
} else if (z <= 1.44e+26) {
tmp = x;
} else {
tmp = z / (a / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5.5d+115)) then
tmp = y / (a / z)
else if (z <= 1.44d+26) then
tmp = x
else
tmp = z / (a / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e+115) {
tmp = y / (a / z);
} else if (z <= 1.44e+26) {
tmp = x;
} else {
tmp = z / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.5e+115: tmp = y / (a / z) elif z <= 1.44e+26: tmp = x else: tmp = z / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.5e+115) tmp = Float64(y / Float64(a / z)); elseif (z <= 1.44e+26) tmp = x; else tmp = Float64(z / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.5e+115) tmp = y / (a / z); elseif (z <= 1.44e+26) tmp = x; else tmp = z / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.5e+115], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.44e+26], x, N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+115}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq 1.44 \cdot 10^{+26}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -5.5e115Initial program 91.2%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6491.2%
Simplified91.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f6465.1%
Simplified65.1%
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6464.8%
Applied egg-rr64.8%
if -5.5e115 < z < 1.44000000000000006e26Initial program 95.7%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6495.7%
Simplified95.7%
Taylor expanded in x around inf
Simplified53.0%
if 1.44000000000000006e26 < z Initial program 96.2%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6496.2%
Simplified96.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f6464.5%
Simplified64.5%
associate-*l/N/A
clear-numN/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
/-lowering-/.f6463.0%
Applied egg-rr63.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -6e+115) (/ y (/ a z)) (if (<= z 5.3e+26) x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+115) {
tmp = y / (a / z);
} else if (z <= 5.3e+26) {
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+115)) then
tmp = y / (a / z)
else if (z <= 5.3d+26) 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+115) {
tmp = y / (a / z);
} else if (z <= 5.3e+26) {
tmp = x;
} else {
tmp = z * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6e+115: tmp = y / (a / z) elif z <= 5.3e+26: tmp = x else: tmp = z * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e+115) tmp = Float64(y / Float64(a / z)); elseif (z <= 5.3e+26) tmp = x; else tmp = Float64(z * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6e+115) tmp = y / (a / z); elseif (z <= 5.3e+26) tmp = x; else tmp = z * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e+115], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.3e+26], x, N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+115}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{+26}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -6.0000000000000001e115Initial program 91.2%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6491.2%
Simplified91.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f6465.1%
Simplified65.1%
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6464.8%
Applied egg-rr64.8%
if -6.0000000000000001e115 < z < 5.29999999999999969e26Initial program 95.7%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6495.7%
Simplified95.7%
Taylor expanded in x around inf
Simplified53.0%
if 5.29999999999999969e26 < z Initial program 96.2%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6496.2%
Simplified96.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f6464.5%
Simplified64.5%
associate-*l/N/A
*-lowering-*.f64N/A
/-lowering-/.f6463.0%
Applied egg-rr63.0%
Final simplification57.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* z (/ y a)))) (if (<= z -5.8e+115) t_1 (if (<= z 4.4e+26) 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 <= -5.8e+115) {
tmp = t_1;
} else if (z <= 4.4e+26) {
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 <= (-5.8d+115)) then
tmp = t_1
else if (z <= 4.4d+26) 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 <= -5.8e+115) {
tmp = t_1;
} else if (z <= 4.4e+26) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / a) tmp = 0 if z <= -5.8e+115: tmp = t_1 elif z <= 4.4e+26: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / a)) tmp = 0.0 if (z <= -5.8e+115) tmp = t_1; elseif (z <= 4.4e+26) 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 <= -5.8e+115) tmp = t_1; elseif (z <= 4.4e+26) 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, -5.8e+115], t$95$1, If[LessEqual[z, 4.4e+26], x, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+26}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.80000000000000009e115 or 4.40000000000000014e26 < z Initial program 94.0%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6494.0%
Simplified94.0%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f6464.8%
Simplified64.8%
associate-*l/N/A
*-lowering-*.f64N/A
/-lowering-/.f6463.7%
Applied egg-rr63.7%
if -5.80000000000000009e115 < z < 4.40000000000000014e26Initial program 95.7%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6495.7%
Simplified95.7%
Taylor expanded in x around inf
Simplified53.0%
Final simplification57.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 95.0%
*-commutativeN/A
associate-/l*N/A
cancel-sign-subN/A
sub0-negN/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
*-commutativeN/A
--lowering--.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6495.0%
Simplified95.0%
Taylor expanded in x around inf
Simplified41.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 2024152
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:precision binary64
:alt
(! :herbie-platform default (if (< y -430450648655599/4000000000000000000000000) (+ x (/ 1 (/ (/ a (- z t)) y))) (if (< y 2894426862792089/10000000000000000000000000000000000000000000000000000000000000000) (+ x (/ (* y (- z t)) a)) (+ x (/ y (/ a (- z t)))))))
(+ x (/ (* y (- z t)) a)))