
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= a -4e-64) (- x (/ y (/ a (- z t)))) (fma (/ y a) (- t z) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4e-64) {
tmp = x - (y / (a / (z - t)));
} else {
tmp = fma((y / a), (t - z), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4e-64) tmp = Float64(x - Float64(y / Float64(a / Float64(z - t)))); else tmp = fma(Float64(y / a), Float64(t - z), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4e-64], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{-64}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - z, x\right)\\
\end{array}
\end{array}
if a < -3.99999999999999986e-64Initial program 90.3%
associate-/l*98.7%
Simplified98.7%
if -3.99999999999999986e-64 < a Initial program 93.6%
sub-neg93.6%
distribute-frac-neg93.6%
distribute-lft-neg-out93.6%
+-commutative93.6%
distribute-lft-neg-out93.6%
distribute-rgt-neg-in93.6%
associate-*l/97.8%
fma-def97.8%
sub-neg97.8%
distribute-neg-in97.8%
remove-double-neg97.8%
+-commutative97.8%
sub-neg97.8%
Simplified97.8%
Final simplification98.1%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -8.5e-11)
(and (not (<= y -1.4e-92))
(or (<= y -6.2e-117) (not (<= y 4.5e-195)))))
(* y (/ (- t z) a))
x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8.5e-11) || (!(y <= -1.4e-92) && ((y <= -6.2e-117) || !(y <= 4.5e-195)))) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-8.5d-11)) .or. (.not. (y <= (-1.4d-92))) .and. (y <= (-6.2d-117)) .or. (.not. (y <= 4.5d-195))) then
tmp = y * ((t - z) / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8.5e-11) || (!(y <= -1.4e-92) && ((y <= -6.2e-117) || !(y <= 4.5e-195)))) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -8.5e-11) or (not (y <= -1.4e-92) and ((y <= -6.2e-117) or not (y <= 4.5e-195))): tmp = y * ((t - z) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -8.5e-11) || (!(y <= -1.4e-92) && ((y <= -6.2e-117) || !(y <= 4.5e-195)))) tmp = Float64(y * Float64(Float64(t - z) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -8.5e-11) || (~((y <= -1.4e-92)) && ((y <= -6.2e-117) || ~((y <= 4.5e-195))))) tmp = y * ((t - z) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -8.5e-11], And[N[Not[LessEqual[y, -1.4e-92]], $MachinePrecision], Or[LessEqual[y, -6.2e-117], N[Not[LessEqual[y, 4.5e-195]], $MachinePrecision]]]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-11} \lor \neg \left(y \leq -1.4 \cdot 10^{-92}\right) \land \left(y \leq -6.2 \cdot 10^{-117} \lor \neg \left(y \leq 4.5 \cdot 10^{-195}\right)\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -8.50000000000000037e-11 or -1.4e-92 < y < -6.20000000000000022e-117 or 4.5e-195 < y Initial program 90.1%
associate-*l/96.6%
Simplified96.6%
Taylor expanded in x around 0 69.4%
mul-1-neg69.4%
associate-*r/75.0%
distribute-rgt-neg-out75.0%
distribute-neg-frac75.0%
neg-sub075.0%
associate--r-75.0%
neg-sub075.0%
+-commutative75.0%
sub-neg75.0%
Simplified75.0%
if -8.50000000000000037e-11 < y < -1.4e-92 or -6.20000000000000022e-117 < y < 4.5e-195Initial program 97.9%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in x around inf 78.8%
Final simplification76.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t z) a))))
(if (<= y -1.85e-10)
t_1
(if (<= y -7.1e-99)
x
(if (<= y -1.02e-116)
t_1
(if (<= y 4.5e-195) x (* (/ y a) (- t z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - z) / a);
double tmp;
if (y <= -1.85e-10) {
tmp = t_1;
} else if (y <= -7.1e-99) {
tmp = x;
} else if (y <= -1.02e-116) {
tmp = t_1;
} else if (y <= 4.5e-195) {
tmp = x;
} else {
tmp = (y / a) * (t - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((t - z) / a)
if (y <= (-1.85d-10)) then
tmp = t_1
else if (y <= (-7.1d-99)) then
tmp = x
else if (y <= (-1.02d-116)) then
tmp = t_1
else if (y <= 4.5d-195) then
tmp = x
else
tmp = (y / a) * (t - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - z) / a);
double tmp;
if (y <= -1.85e-10) {
tmp = t_1;
} else if (y <= -7.1e-99) {
tmp = x;
} else if (y <= -1.02e-116) {
tmp = t_1;
} else if (y <= 4.5e-195) {
tmp = x;
} else {
tmp = (y / a) * (t - z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - z) / a) tmp = 0 if y <= -1.85e-10: tmp = t_1 elif y <= -7.1e-99: tmp = x elif y <= -1.02e-116: tmp = t_1 elif y <= 4.5e-195: tmp = x else: tmp = (y / a) * (t - z) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - z) / a)) tmp = 0.0 if (y <= -1.85e-10) tmp = t_1; elseif (y <= -7.1e-99) tmp = x; elseif (y <= -1.02e-116) tmp = t_1; elseif (y <= 4.5e-195) tmp = x; else tmp = Float64(Float64(y / a) * Float64(t - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - z) / a); tmp = 0.0; if (y <= -1.85e-10) tmp = t_1; elseif (y <= -7.1e-99) tmp = x; elseif (y <= -1.02e-116) tmp = t_1; elseif (y <= 4.5e-195) tmp = x; else tmp = (y / a) * (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.85e-10], t$95$1, If[LessEqual[y, -7.1e-99], x, If[LessEqual[y, -1.02e-116], t$95$1, If[LessEqual[y, 4.5e-195], x, N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - z}{a}\\
\mathbf{if}\;y \leq -1.85 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -7.1 \cdot 10^{-99}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-116}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-195}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if y < -1.85000000000000007e-10 or -7.09999999999999994e-99 < y < -1.02e-116Initial program 89.7%
associate-*l/96.0%
Simplified96.0%
Taylor expanded in x around 0 74.8%
mul-1-neg74.8%
associate-*r/81.2%
distribute-rgt-neg-out81.2%
distribute-neg-frac81.2%
neg-sub081.2%
associate--r-81.2%
neg-sub081.2%
+-commutative81.2%
sub-neg81.2%
Simplified81.2%
if -1.85000000000000007e-10 < y < -7.09999999999999994e-99 or -1.02e-116 < y < 4.5e-195Initial program 97.9%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in x around inf 78.8%
if 4.5e-195 < y Initial program 90.3%
sub-neg90.3%
distribute-rgt-in88.2%
Applied egg-rr88.2%
Taylor expanded in x around 0 61.3%
mul-1-neg61.3%
associate-*l/60.3%
*-commutative60.3%
distribute-neg-in60.3%
mul-1-neg60.3%
associate-*r/63.9%
remove-double-neg63.9%
sub-neg63.9%
distribute-rgt-out--71.1%
Simplified71.1%
Final simplification76.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z) a))))
(if (<= y -1.7e+183)
(/ t (/ a y))
(if (<= y -6.6e+66)
t_1
(if (<= y -6.4e+65) (* t (/ y a)) (if (<= y 1.2e+63) x t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (-z / a);
double tmp;
if (y <= -1.7e+183) {
tmp = t / (a / y);
} else if (y <= -6.6e+66) {
tmp = t_1;
} else if (y <= -6.4e+65) {
tmp = t * (y / a);
} else if (y <= 1.2e+63) {
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 (y <= (-1.7d+183)) then
tmp = t / (a / y)
else if (y <= (-6.6d+66)) then
tmp = t_1
else if (y <= (-6.4d+65)) then
tmp = t * (y / a)
else if (y <= 1.2d+63) 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 (y <= -1.7e+183) {
tmp = t / (a / y);
} else if (y <= -6.6e+66) {
tmp = t_1;
} else if (y <= -6.4e+65) {
tmp = t * (y / a);
} else if (y <= 1.2e+63) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (-z / a) tmp = 0 if y <= -1.7e+183: tmp = t / (a / y) elif y <= -6.6e+66: tmp = t_1 elif y <= -6.4e+65: tmp = t * (y / a) elif y <= 1.2e+63: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(-z) / a)) tmp = 0.0 if (y <= -1.7e+183) tmp = Float64(t / Float64(a / y)); elseif (y <= -6.6e+66) tmp = t_1; elseif (y <= -6.4e+65) tmp = Float64(t * Float64(y / a)); elseif (y <= 1.2e+63) 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 (y <= -1.7e+183) tmp = t / (a / y); elseif (y <= -6.6e+66) tmp = t_1; elseif (y <= -6.4e+65) tmp = t * (y / a); elseif (y <= 1.2e+63) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+183], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.6e+66], t$95$1, If[LessEqual[y, -6.4e+65], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+63], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-z}{a}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+183}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;y \leq -6.6 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -6.4 \cdot 10^{+65}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+63}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.7e183Initial program 88.4%
associate-*l/94.2%
Simplified94.2%
Taylor expanded in t around inf 56.2%
associate-*r/60.1%
Simplified60.1%
associate-*r/56.2%
associate-/l*62.1%
Applied egg-rr62.1%
if -1.7e183 < y < -6.6000000000000003e66 or 1.2e63 < y Initial program 81.9%
sub-neg81.9%
distribute-rgt-in78.8%
Applied egg-rr78.8%
Taylor expanded in z around inf 49.6%
associate-*r/49.6%
*-commutative49.6%
neg-mul-149.6%
distribute-lft-neg-in49.6%
*-commutative49.6%
associate-*r/59.3%
Simplified59.3%
if -6.6000000000000003e66 < y < -6.40000000000000014e65Initial program 98.4%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in t around inf 98.4%
associate-*r/100.0%
Simplified100.0%
if -6.40000000000000014e65 < y < 1.2e63Initial program 98.2%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in x around inf 61.7%
Final simplification61.3%
(FPCore (x y z t a)
:precision binary64
(if (<= y -5.2e+63)
(* z (/ y (- a)))
(if (<= y 5.5e-137)
x
(if (<= y 4e-42)
(/ (* y (- z)) a)
(if (<= y 1.25e+65) x (/ (- z) (/ a y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.2e+63) {
tmp = z * (y / -a);
} else if (y <= 5.5e-137) {
tmp = x;
} else if (y <= 4e-42) {
tmp = (y * -z) / a;
} else if (y <= 1.25e+65) {
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 (y <= (-5.2d+63)) then
tmp = z * (y / -a)
else if (y <= 5.5d-137) then
tmp = x
else if (y <= 4d-42) then
tmp = (y * -z) / a
else if (y <= 1.25d+65) 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 (y <= -5.2e+63) {
tmp = z * (y / -a);
} else if (y <= 5.5e-137) {
tmp = x;
} else if (y <= 4e-42) {
tmp = (y * -z) / a;
} else if (y <= 1.25e+65) {
tmp = x;
} else {
tmp = -z / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.2e+63: tmp = z * (y / -a) elif y <= 5.5e-137: tmp = x elif y <= 4e-42: tmp = (y * -z) / a elif y <= 1.25e+65: tmp = x else: tmp = -z / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.2e+63) tmp = Float64(z * Float64(y / Float64(-a))); elseif (y <= 5.5e-137) tmp = x; elseif (y <= 4e-42) tmp = Float64(Float64(y * Float64(-z)) / a); elseif (y <= 1.25e+65) tmp = x; else tmp = Float64(Float64(-z) / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.2e+63) tmp = z * (y / -a); elseif (y <= 5.5e-137) tmp = x; elseif (y <= 4e-42) tmp = (y * -z) / a; elseif (y <= 1.25e+65) tmp = x; else tmp = -z / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.2e+63], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e-137], x, If[LessEqual[y, 4e-42], N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 1.25e+65], x, N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+63}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-137}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-42}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+65}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\end{array}
\end{array}
if y < -5.2000000000000002e63Initial program 86.2%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in z around inf 42.2%
mul-1-neg42.2%
associate-*l/55.8%
*-commutative55.8%
distribute-rgt-neg-in55.8%
*-lft-identity55.8%
associate-*l/55.7%
remove-double-neg55.7%
neg-mul-155.7%
associate-*r*55.7%
*-commutative55.7%
neg-mul-155.7%
*-commutative55.7%
distribute-neg-frac55.7%
metadata-eval55.7%
metadata-eval55.7%
associate-/r*55.7%
neg-mul-155.7%
associate-*r/55.8%
*-rgt-identity55.8%
distribute-frac-neg55.8%
remove-double-neg55.8%
Simplified55.8%
if -5.2000000000000002e63 < y < 5.5000000000000003e-137 or 4.00000000000000015e-42 < y < 1.24999999999999993e65Initial program 98.0%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in x around inf 64.8%
if 5.5000000000000003e-137 < y < 4.00000000000000015e-42Initial program 99.8%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in z around inf 65.2%
mul-1-neg65.2%
associate-*l/58.3%
*-commutative58.3%
distribute-rgt-neg-in58.3%
*-lft-identity58.3%
associate-*l/58.1%
remove-double-neg58.1%
neg-mul-158.1%
associate-*r*58.1%
*-commutative58.1%
neg-mul-158.1%
*-commutative58.1%
distribute-neg-frac58.1%
metadata-eval58.1%
metadata-eval58.1%
associate-/r*58.1%
neg-mul-158.1%
associate-*r/58.3%
*-rgt-identity58.3%
distribute-frac-neg58.3%
remove-double-neg58.3%
Simplified58.3%
frac-2neg58.3%
remove-double-neg58.3%
distribute-frac-neg58.3%
distribute-rgt-neg-in58.3%
distribute-lft-neg-in58.3%
associate-*r/65.2%
Applied egg-rr65.2%
if 1.24999999999999993e65 < y Initial program 81.8%
associate-*l/98.0%
Simplified98.0%
Taylor expanded in z around inf 51.9%
mul-1-neg51.9%
associate-*l/61.9%
*-commutative61.9%
distribute-rgt-neg-in61.9%
*-lft-identity61.9%
associate-*l/61.9%
remove-double-neg61.9%
neg-mul-161.9%
associate-*r*61.9%
*-commutative61.9%
neg-mul-161.9%
*-commutative61.9%
distribute-neg-frac61.9%
metadata-eval61.9%
metadata-eval61.9%
associate-/r*61.9%
neg-mul-161.9%
associate-*r/61.9%
*-rgt-identity61.9%
distribute-frac-neg61.9%
remove-double-neg61.9%
Simplified61.9%
frac-2neg61.9%
remove-double-neg61.9%
distribute-frac-neg61.9%
distribute-rgt-neg-in61.9%
distribute-lft-neg-in61.9%
clear-num61.9%
un-div-inv62.0%
Applied egg-rr62.0%
Final simplification62.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.4e+82) (not (<= y 5.5e+60))) (* y (/ (- t z) a)) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.4e+82) || !(y <= 5.5e+60)) {
tmp = y * ((t - 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 ((y <= (-2.4d+82)) .or. (.not. (y <= 5.5d+60))) then
tmp = y * ((t - 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 ((y <= -2.4e+82) || !(y <= 5.5e+60)) {
tmp = y * ((t - z) / a);
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.4e+82) or not (y <= 5.5e+60): tmp = y * ((t - z) / a) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.4e+82) || !(y <= 5.5e+60)) tmp = Float64(y * Float64(Float64(t - z) / a)); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.4e+82) || ~((y <= 5.5e+60))) tmp = y * ((t - z) / a); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.4e+82], N[Not[LessEqual[y, 5.5e+60]], $MachinePrecision]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+82} \lor \neg \left(y \leq 5.5 \cdot 10^{+60}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if y < -2.39999999999999998e82 or 5.5000000000000001e60 < y Initial program 84.3%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in x around 0 78.1%
mul-1-neg78.1%
associate-*r/90.6%
distribute-rgt-neg-out90.6%
distribute-neg-frac90.6%
neg-sub090.6%
associate--r-90.6%
neg-sub090.6%
+-commutative90.6%
sub-neg90.6%
Simplified90.6%
if -2.39999999999999998e82 < y < 5.5000000000000001e60Initial program 97.6%
sub-neg97.6%
distribute-frac-neg97.6%
distribute-lft-neg-out97.6%
+-commutative97.6%
distribute-lft-neg-out97.6%
distribute-rgt-neg-in97.6%
associate-*l/95.9%
fma-def95.9%
sub-neg95.9%
distribute-neg-in95.9%
remove-double-neg95.9%
+-commutative95.9%
sub-neg95.9%
Simplified95.9%
Taylor expanded in z around 0 75.0%
associate-/l*75.4%
associate-/r/73.6%
Applied egg-rr73.6%
Final simplification80.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.3e+82) (not (<= y 4.8e+61))) (* y (/ (- t z) a)) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.3e+82) || !(y <= 4.8e+61)) {
tmp = y * ((t - 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 ((y <= (-2.3d+82)) .or. (.not. (y <= 4.8d+61))) then
tmp = y * ((t - 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 ((y <= -2.3e+82) || !(y <= 4.8e+61)) {
tmp = y * ((t - z) / a);
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.3e+82) or not (y <= 4.8e+61): tmp = y * ((t - z) / a) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.3e+82) || !(y <= 4.8e+61)) tmp = Float64(y * Float64(Float64(t - 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 ((y <= -2.3e+82) || ~((y <= 4.8e+61))) tmp = y * ((t - z) / a); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.3e+82], N[Not[LessEqual[y, 4.8e+61]], $MachinePrecision]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+82} \lor \neg \left(y \leq 4.8 \cdot 10^{+61}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if y < -2.29999999999999988e82 or 4.7999999999999998e61 < y Initial program 84.3%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in x around 0 78.1%
mul-1-neg78.1%
associate-*r/90.6%
distribute-rgt-neg-out90.6%
distribute-neg-frac90.6%
neg-sub090.6%
associate--r-90.6%
neg-sub090.6%
+-commutative90.6%
sub-neg90.6%
Simplified90.6%
if -2.29999999999999988e82 < y < 4.7999999999999998e61Initial program 97.6%
sub-neg97.6%
distribute-frac-neg97.6%
distribute-lft-neg-out97.6%
+-commutative97.6%
distribute-lft-neg-out97.6%
distribute-rgt-neg-in97.6%
associate-*l/95.9%
fma-def95.9%
sub-neg95.9%
distribute-neg-in95.9%
remove-double-neg95.9%
+-commutative95.9%
sub-neg95.9%
Simplified95.9%
Taylor expanded in z around 0 75.0%
Final simplification80.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5e+99) (not (<= t 2e+30))) (+ x (* t (/ y a))) (- x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5e+99) || !(t <= 2e+30)) {
tmp = x + (t * (y / a));
} else {
tmp = x - (z * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-5d+99)) .or. (.not. (t <= 2d+30))) then
tmp = x + (t * (y / a))
else
tmp = x - (z * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5e+99) || !(t <= 2e+30)) {
tmp = x + (t * (y / a));
} else {
tmp = x - (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5e+99) or not (t <= 2e+30): tmp = x + (t * (y / a)) else: tmp = x - (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5e+99) || !(t <= 2e+30)) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x - Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5e+99) || ~((t <= 2e+30))) tmp = x + (t * (y / a)); else tmp = x - (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5e+99], N[Not[LessEqual[t, 2e+30]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+99} \lor \neg \left(t \leq 2 \cdot 10^{+30}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -5.00000000000000008e99 or 2e30 < t Initial program 92.2%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in z around 0 84.2%
cancel-sign-sub-inv84.2%
metadata-eval84.2%
*-lft-identity84.2%
+-commutative84.2%
associate-*r/88.6%
Simplified88.6%
if -5.00000000000000008e99 < t < 2e30Initial program 92.8%
associate-*l/96.0%
Simplified96.0%
Taylor expanded in z around inf 84.5%
associate-*l/88.9%
*-commutative88.9%
Simplified88.9%
Final simplification88.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -9e+85) (* (/ y a) (- t z)) (if (<= z 1.4e+106) (+ x (* t (/ y a))) (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+85) {
tmp = (y / a) * (t - z);
} else if (z <= 1.4e+106) {
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 (z <= (-9d+85)) then
tmp = (y / a) * (t - z)
else if (z <= 1.4d+106) 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 (z <= -9e+85) {
tmp = (y / a) * (t - z);
} else if (z <= 1.4e+106) {
tmp = x + (t * (y / a));
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9e+85: tmp = (y / a) * (t - z) elif z <= 1.4e+106: tmp = x + (t * (y / a)) else: tmp = y * ((t - z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9e+85) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif (z <= 1.4e+106) 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 (z <= -9e+85) tmp = (y / a) * (t - z); elseif (z <= 1.4e+106) tmp = x + (t * (y / a)); else tmp = y * ((t - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e+85], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+106], 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}\;z \leq -9 \cdot 10^{+85}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+106}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if z < -9.00000000000000013e85Initial program 83.0%
sub-neg83.0%
distribute-rgt-in80.9%
Applied egg-rr80.9%
Taylor expanded in x around 0 54.7%
mul-1-neg54.7%
associate-*l/60.4%
*-commutative60.4%
distribute-neg-in60.4%
mul-1-neg60.4%
associate-*r/58.3%
remove-double-neg58.3%
sub-neg58.3%
distribute-rgt-out--66.2%
Simplified66.2%
if -9.00000000000000013e85 < z < 1.39999999999999996e106Initial program 96.0%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in z around 0 83.6%
cancel-sign-sub-inv83.6%
metadata-eval83.6%
*-lft-identity83.6%
+-commutative83.6%
associate-*r/86.8%
Simplified86.8%
if 1.39999999999999996e106 < z Initial program 91.3%
associate-*l/93.3%
Simplified93.3%
Taylor expanded in x around 0 73.9%
mul-1-neg73.9%
associate-*r/80.4%
distribute-rgt-neg-out80.4%
distribute-neg-frac80.4%
neg-sub080.4%
associate--r-80.4%
neg-sub080.4%
+-commutative80.4%
sub-neg80.4%
Simplified80.4%
Final simplification81.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -8.8e-66) (- 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 (a <= -8.8e-66) {
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 (a <= (-8.8d-66)) 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 (a <= -8.8e-66) {
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 a <= -8.8e-66: 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 (a <= -8.8e-66) 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 (a <= -8.8e-66) 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[a, -8.8e-66], 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}\;a \leq -8.8 \cdot 10^{-66}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if a < -8.8000000000000004e-66Initial program 90.3%
associate-/l*98.7%
Simplified98.7%
if -8.8000000000000004e-66 < a Initial program 93.6%
associate-*l/97.8%
Simplified97.8%
Final simplification98.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -4.4e+63) (not (<= y 5.8e+60))) (* z (/ y (- a))) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.4e+63) || !(y <= 5.8e+60)) {
tmp = z * (y / -a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-4.4d+63)) .or. (.not. (y <= 5.8d+60))) then
tmp = z * (y / -a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.4e+63) || !(y <= 5.8e+60)) {
tmp = z * (y / -a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.4e+63) or not (y <= 5.8e+60): tmp = z * (y / -a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -4.4e+63) || !(y <= 5.8e+60)) tmp = Float64(z * Float64(y / Float64(-a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -4.4e+63) || ~((y <= 5.8e+60))) tmp = z * (y / -a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -4.4e+63], N[Not[LessEqual[y, 5.8e+60]], $MachinePrecision]], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+63} \lor \neg \left(y \leq 5.8 \cdot 10^{+60}\right):\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -4.3999999999999997e63 or 5.79999999999999999e60 < y Initial program 84.2%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in z around inf 46.7%
mul-1-neg46.7%
associate-*l/58.6%
*-commutative58.6%
distribute-rgt-neg-in58.6%
*-lft-identity58.6%
associate-*l/58.6%
remove-double-neg58.6%
neg-mul-158.6%
associate-*r*58.6%
*-commutative58.6%
neg-mul-158.6%
*-commutative58.6%
distribute-neg-frac58.6%
metadata-eval58.6%
metadata-eval58.6%
associate-/r*58.6%
neg-mul-158.6%
associate-*r/58.6%
*-rgt-identity58.6%
distribute-frac-neg58.6%
remove-double-neg58.6%
Simplified58.6%
if -4.3999999999999997e63 < y < 5.79999999999999999e60Initial program 98.2%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in x around inf 61.7%
Final simplification60.5%
(FPCore (x y z t a) :precision binary64 (if (<= y -5.8e+63) (* z (/ y (- a))) (if (<= y 5.5e+61) x (/ (- z) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.8e+63) {
tmp = z * (y / -a);
} else if (y <= 5.5e+61) {
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 (y <= (-5.8d+63)) then
tmp = z * (y / -a)
else if (y <= 5.5d+61) 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 (y <= -5.8e+63) {
tmp = z * (y / -a);
} else if (y <= 5.5e+61) {
tmp = x;
} else {
tmp = -z / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.8e+63: tmp = z * (y / -a) elif y <= 5.5e+61: tmp = x else: tmp = -z / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.8e+63) tmp = Float64(z * Float64(y / Float64(-a))); elseif (y <= 5.5e+61) tmp = x; else tmp = Float64(Float64(-z) / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.8e+63) tmp = z * (y / -a); elseif (y <= 5.5e+61) tmp = x; else tmp = -z / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.8e+63], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+61], x, N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+63}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+61}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\end{array}
\end{array}
if y < -5.7999999999999999e63Initial program 86.2%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in z around inf 42.2%
mul-1-neg42.2%
associate-*l/55.8%
*-commutative55.8%
distribute-rgt-neg-in55.8%
*-lft-identity55.8%
associate-*l/55.7%
remove-double-neg55.7%
neg-mul-155.7%
associate-*r*55.7%
*-commutative55.7%
neg-mul-155.7%
*-commutative55.7%
distribute-neg-frac55.7%
metadata-eval55.7%
metadata-eval55.7%
associate-/r*55.7%
neg-mul-155.7%
associate-*r/55.8%
*-rgt-identity55.8%
distribute-frac-neg55.8%
remove-double-neg55.8%
Simplified55.8%
if -5.7999999999999999e63 < y < 5.50000000000000036e61Initial program 98.2%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in x around inf 61.7%
if 5.50000000000000036e61 < y Initial program 81.8%
associate-*l/98.0%
Simplified98.0%
Taylor expanded in z around inf 51.9%
mul-1-neg51.9%
associate-*l/61.9%
*-commutative61.9%
distribute-rgt-neg-in61.9%
*-lft-identity61.9%
associate-*l/61.9%
remove-double-neg61.9%
neg-mul-161.9%
associate-*r*61.9%
*-commutative61.9%
neg-mul-161.9%
*-commutative61.9%
distribute-neg-frac61.9%
metadata-eval61.9%
metadata-eval61.9%
associate-/r*61.9%
neg-mul-161.9%
associate-*r/61.9%
*-rgt-identity61.9%
distribute-frac-neg61.9%
remove-double-neg61.9%
Simplified61.9%
frac-2neg61.9%
remove-double-neg61.9%
distribute-frac-neg61.9%
distribute-rgt-neg-in61.9%
distribute-lft-neg-in61.9%
clear-num61.9%
un-div-inv62.0%
Applied egg-rr62.0%
Final simplification60.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -7.5e+93) (not (<= y 4.6e+95))) (* t (/ y a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7.5e+93) || !(y <= 4.6e+95)) {
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 ((y <= (-7.5d+93)) .or. (.not. (y <= 4.6d+95))) 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 ((y <= -7.5e+93) || !(y <= 4.6e+95)) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -7.5e+93) or not (y <= 4.6e+95): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -7.5e+93) || !(y <= 4.6e+95)) 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 ((y <= -7.5e+93) || ~((y <= 4.6e+95))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -7.5e+93], N[Not[LessEqual[y, 4.6e+95]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+93} \lor \neg \left(y \leq 4.6 \cdot 10^{+95}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7.5000000000000002e93 or 4.59999999999999994e95 < y Initial program 84.1%
associate-*l/96.7%
Simplified96.7%
Taylor expanded in t around inf 45.7%
associate-*r/54.5%
Simplified54.5%
if -7.5000000000000002e93 < y < 4.59999999999999994e95Initial program 97.2%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in x around inf 59.8%
Final simplification58.0%
(FPCore (x y z t a) :precision binary64 (if (<= y -7e+93) (/ t (/ a y)) (if (<= y 1.5e+95) x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7e+93) {
tmp = t / (a / y);
} else if (y <= 1.5e+95) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-7d+93)) then
tmp = t / (a / y)
else if (y <= 1.5d+95) then
tmp = x
else
tmp = t * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7e+93) {
tmp = t / (a / y);
} else if (y <= 1.5e+95) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -7e+93: tmp = t / (a / y) elif y <= 1.5e+95: tmp = x else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -7e+93) tmp = Float64(t / Float64(a / y)); elseif (y <= 1.5e+95) tmp = x; else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -7e+93) tmp = t / (a / y); elseif (y <= 1.5e+95) tmp = x; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -7e+93], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+95], x, N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+93}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+95}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -6.99999999999999996e93Initial program 86.1%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in t around inf 51.6%
associate-*r/54.2%
Simplified54.2%
associate-*r/51.6%
associate-/l*55.6%
Applied egg-rr55.6%
if -6.99999999999999996e93 < y < 1.49999999999999996e95Initial program 97.2%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in x around inf 59.8%
if 1.49999999999999996e95 < y Initial program 81.6%
associate-*l/97.7%
Simplified97.7%
Taylor expanded in t around inf 38.9%
associate-*r/54.8%
Simplified54.8%
Final simplification58.2%
(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 92.6%
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 92.6%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in x around inf 41.9%
Final simplification41.9%
(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 2023332
(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)))