
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
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) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\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) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
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) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= t -9e+149)
(- x (/ y (/ t (- a z))))
(if (<= t 1.15e+145)
(+ x (+ y (/ (- t z) (/ (- a t) y))))
(+ x (* (- z a) (/ y t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9e+149) {
tmp = x - (y / (t / (a - z)));
} else if (t <= 1.15e+145) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else {
tmp = x + ((z - a) * (y / 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 <= (-9d+149)) then
tmp = x - (y / (t / (a - z)))
else if (t <= 1.15d+145) then
tmp = x + (y + ((t - z) / ((a - t) / y)))
else
tmp = x + ((z - a) * (y / 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 <= -9e+149) {
tmp = x - (y / (t / (a - z)));
} else if (t <= 1.15e+145) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else {
tmp = x + ((z - a) * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9e+149: tmp = x - (y / (t / (a - z))) elif t <= 1.15e+145: tmp = x + (y + ((t - z) / ((a - t) / y))) else: tmp = x + ((z - a) * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9e+149) tmp = Float64(x - Float64(y / Float64(t / Float64(a - z)))); elseif (t <= 1.15e+145) tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); else tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9e+149) tmp = x - (y / (t / (a - z))); elseif (t <= 1.15e+145) tmp = x + (y + ((t - z) / ((a - t) / y))); else tmp = x + ((z - a) * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9e+149], N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+145], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{+149}:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+145}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\
\end{array}
\end{array}
if t < -8.99999999999999965e149Initial program 32.5%
associate-*l/54.8%
Simplified54.8%
Taylor expanded in t around -inf 69.2%
+-commutative69.2%
mul-1-neg69.2%
unsub-neg69.2%
distribute-lft-out--69.7%
Simplified69.7%
expm1-log1p-u65.5%
expm1-udef50.7%
Applied egg-rr50.7%
expm1-def65.5%
expm1-log1p69.7%
associate-/l*88.8%
Simplified88.8%
if -8.99999999999999965e149 < t < 1.15e145Initial program 89.9%
associate--l+91.9%
associate-/l*95.9%
Simplified95.9%
if 1.15e145 < t Initial program 47.1%
associate-*l/59.1%
Simplified59.1%
Taylor expanded in y around 0 82.4%
Taylor expanded in t around inf 78.7%
mul-1-neg78.7%
neg-mul-178.7%
+-commutative78.7%
sub-neg78.7%
associate-*r/89.1%
distribute-lft-neg-in89.1%
sub-neg89.1%
+-commutative89.1%
distribute-neg-in89.1%
remove-double-neg89.1%
sub-neg89.1%
Simplified89.1%
Final simplification94.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* y z) a))))
(if (<= a -3.8e+73)
(+ y x)
(if (<= a -9.5e-83)
t_1
(if (<= a 6.6e-146)
(+ x (* y (/ z t)))
(if (<= a 9.2e+48)
t_1
(if (<= a 2.2e+70) (+ x (* z (/ y t))) (+ y x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y * z) / a);
double tmp;
if (a <= -3.8e+73) {
tmp = y + x;
} else if (a <= -9.5e-83) {
tmp = t_1;
} else if (a <= 6.6e-146) {
tmp = x + (y * (z / t));
} else if (a <= 9.2e+48) {
tmp = t_1;
} else if (a <= 2.2e+70) {
tmp = x + (z * (y / t));
} else {
tmp = y + 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 = x - ((y * z) / a)
if (a <= (-3.8d+73)) then
tmp = y + x
else if (a <= (-9.5d-83)) then
tmp = t_1
else if (a <= 6.6d-146) then
tmp = x + (y * (z / t))
else if (a <= 9.2d+48) then
tmp = t_1
else if (a <= 2.2d+70) then
tmp = x + (z * (y / t))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y * z) / a);
double tmp;
if (a <= -3.8e+73) {
tmp = y + x;
} else if (a <= -9.5e-83) {
tmp = t_1;
} else if (a <= 6.6e-146) {
tmp = x + (y * (z / t));
} else if (a <= 9.2e+48) {
tmp = t_1;
} else if (a <= 2.2e+70) {
tmp = x + (z * (y / t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((y * z) / a) tmp = 0 if a <= -3.8e+73: tmp = y + x elif a <= -9.5e-83: tmp = t_1 elif a <= 6.6e-146: tmp = x + (y * (z / t)) elif a <= 9.2e+48: tmp = t_1 elif a <= 2.2e+70: tmp = x + (z * (y / t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y * z) / a)) tmp = 0.0 if (a <= -3.8e+73) tmp = Float64(y + x); elseif (a <= -9.5e-83) tmp = t_1; elseif (a <= 6.6e-146) tmp = Float64(x + Float64(y * Float64(z / t))); elseif (a <= 9.2e+48) tmp = t_1; elseif (a <= 2.2e+70) tmp = Float64(x + Float64(z * Float64(y / t))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((y * z) / a); tmp = 0.0; if (a <= -3.8e+73) tmp = y + x; elseif (a <= -9.5e-83) tmp = t_1; elseif (a <= 6.6e-146) tmp = x + (y * (z / t)); elseif (a <= 9.2e+48) tmp = t_1; elseif (a <= 2.2e+70) tmp = x + (z * (y / t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.8e+73], N[(y + x), $MachinePrecision], If[LessEqual[a, -9.5e-83], t$95$1, If[LessEqual[a, 6.6e-146], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.2e+48], t$95$1, If[LessEqual[a, 2.2e+70], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y \cdot z}{a}\\
\mathbf{if}\;a \leq -3.8 \cdot 10^{+73}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq -9.5 \cdot 10^{-83}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{-146}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{+48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{+70}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -3.80000000000000022e73 or 2.20000000000000001e70 < a Initial program 73.2%
associate-*l/89.9%
Simplified89.9%
Taylor expanded in a around inf 81.9%
if -3.80000000000000022e73 < a < -9.50000000000000051e-83 or 6.6e-146 < a < 9.2000000000000001e48Initial program 79.1%
associate--l+80.4%
sub-neg80.4%
+-commutative80.4%
associate-/l*84.5%
distribute-neg-frac84.5%
associate-/r/80.4%
fma-def80.4%
sub-neg80.4%
+-commutative80.4%
distribute-neg-in80.4%
unsub-neg80.4%
remove-double-neg80.4%
Simplified80.4%
Taylor expanded in z around inf 84.4%
associate-*r/84.4%
associate-*r*84.4%
neg-mul-184.4%
Simplified84.4%
Taylor expanded in a around inf 74.1%
associate-*r/74.1%
mul-1-neg74.1%
Simplified74.1%
if -9.50000000000000051e-83 < a < 6.6e-146Initial program 82.5%
associate-*l/82.5%
Simplified82.5%
Taylor expanded in y around 0 95.6%
Taylor expanded in a around 0 86.9%
if 9.2000000000000001e48 < a < 2.20000000000000001e70Initial program 65.4%
associate-*l/75.7%
Simplified75.7%
Taylor expanded in y around 0 87.4%
Taylor expanded in a around 0 64.2%
associate-/l*74.4%
Simplified74.4%
associate-/r/74.7%
Applied egg-rr74.7%
Final simplification80.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.1e+150)
(- x (/ y (/ t (- a z))))
(if (<= t 3.2e+152)
(+ x (* y (+ (/ (- t z) (- a t)) 1.0)))
(+ x (* (- z a) (/ y t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.1e+150) {
tmp = x - (y / (t / (a - z)));
} else if (t <= 3.2e+152) {
tmp = x + (y * (((t - z) / (a - t)) + 1.0));
} else {
tmp = x + ((z - a) * (y / 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 <= (-1.1d+150)) then
tmp = x - (y / (t / (a - z)))
else if (t <= 3.2d+152) then
tmp = x + (y * (((t - z) / (a - t)) + 1.0d0))
else
tmp = x + ((z - a) * (y / 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 <= -1.1e+150) {
tmp = x - (y / (t / (a - z)));
} else if (t <= 3.2e+152) {
tmp = x + (y * (((t - z) / (a - t)) + 1.0));
} else {
tmp = x + ((z - a) * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.1e+150: tmp = x - (y / (t / (a - z))) elif t <= 3.2e+152: tmp = x + (y * (((t - z) / (a - t)) + 1.0)) else: tmp = x + ((z - a) * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.1e+150) tmp = Float64(x - Float64(y / Float64(t / Float64(a - z)))); elseif (t <= 3.2e+152) tmp = Float64(x + Float64(y * Float64(Float64(Float64(t - z) / Float64(a - t)) + 1.0))); else tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.1e+150) tmp = x - (y / (t / (a - z))); elseif (t <= 3.2e+152) tmp = x + (y * (((t - z) / (a - t)) + 1.0)); else tmp = x + ((z - a) * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.1e+150], N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+152], N[(x + N[(y * N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+150}:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+152}:\\
\;\;\;\;x + y \cdot \left(\frac{t - z}{a - t} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\
\end{array}
\end{array}
if t < -1.1e150Initial program 32.5%
associate-*l/54.8%
Simplified54.8%
Taylor expanded in t around -inf 69.2%
+-commutative69.2%
mul-1-neg69.2%
unsub-neg69.2%
distribute-lft-out--69.7%
Simplified69.7%
expm1-log1p-u65.5%
expm1-udef50.7%
Applied egg-rr50.7%
expm1-def65.5%
expm1-log1p69.7%
associate-/l*88.8%
Simplified88.8%
if -1.1e150 < t < 3.20000000000000005e152Initial program 89.9%
associate--l+91.9%
sub-neg91.9%
+-commutative91.9%
associate-/l*95.9%
distribute-neg-frac95.9%
associate-/r/94.8%
fma-def94.8%
sub-neg94.8%
+-commutative94.8%
distribute-neg-in94.8%
unsub-neg94.8%
remove-double-neg94.8%
Simplified94.8%
Taylor expanded in y around 0 95.8%
associate--l+94.7%
div-sub94.7%
Simplified94.7%
if 3.20000000000000005e152 < t Initial program 47.1%
associate-*l/59.1%
Simplified59.1%
Taylor expanded in y around 0 82.4%
Taylor expanded in t around inf 78.7%
mul-1-neg78.7%
neg-mul-178.7%
+-commutative78.7%
sub-neg78.7%
associate-*r/89.1%
distribute-lft-neg-in89.1%
sub-neg89.1%
+-commutative89.1%
distribute-neg-in89.1%
remove-double-neg89.1%
sub-neg89.1%
Simplified89.1%
Final simplification93.3%
(FPCore (x y z t a) :precision binary64 (+ (* y (- (+ (/ t (- a t)) 1.0) (/ z (- a t)))) x))
double code(double x, double y, double z, double t, double a) {
return (y * (((t / (a - t)) + 1.0) - (z / (a - t)))) + 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 = (y * (((t / (a - t)) + 1.0d0) - (z / (a - t)))) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (y * (((t / (a - t)) + 1.0) - (z / (a - t)))) + x;
}
def code(x, y, z, t, a): return (y * (((t / (a - t)) + 1.0) - (z / (a - t)))) + x
function code(x, y, z, t, a) return Float64(Float64(y * Float64(Float64(Float64(t / Float64(a - t)) + 1.0) - Float64(z / Float64(a - t)))) + x) end
function tmp = code(x, y, z, t, a) tmp = (y * (((t / (a - t)) + 1.0) - (z / (a - t)))) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(y * N[(N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(\left(\frac{t}{a - t} + 1\right) - \frac{z}{a - t}\right) + x
\end{array}
Initial program 77.1%
associate-*l/83.5%
Simplified83.5%
Taylor expanded in y around 0 91.9%
Final simplification91.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.75e+152)
(+ y (- x (/ y (/ a z))))
(if (<= a 9.8e+73)
(- x (* z (/ y (- a t))))
(+ x (* y (+ (/ t (- a t)) 1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.75e+152) {
tmp = y + (x - (y / (a / z)));
} else if (a <= 9.8e+73) {
tmp = x - (z * (y / (a - t)));
} else {
tmp = x + (y * ((t / (a - t)) + 1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.75d+152)) then
tmp = y + (x - (y / (a / z)))
else if (a <= 9.8d+73) then
tmp = x - (z * (y / (a - t)))
else
tmp = x + (y * ((t / (a - t)) + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.75e+152) {
tmp = y + (x - (y / (a / z)));
} else if (a <= 9.8e+73) {
tmp = x - (z * (y / (a - t)));
} else {
tmp = x + (y * ((t / (a - t)) + 1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.75e+152: tmp = y + (x - (y / (a / z))) elif a <= 9.8e+73: tmp = x - (z * (y / (a - t))) else: tmp = x + (y * ((t / (a - t)) + 1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.75e+152) tmp = Float64(y + Float64(x - Float64(y / Float64(a / z)))); elseif (a <= 9.8e+73) tmp = Float64(x - Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(x + Float64(y * Float64(Float64(t / Float64(a - t)) + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.75e+152) tmp = y + (x - (y / (a / z))); elseif (a <= 9.8e+73) tmp = x - (z * (y / (a - t))); else tmp = x + (y * ((t / (a - t)) + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.75e+152], N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.8e+73], N[(x - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.75 \cdot 10^{+152}:\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{elif}\;a \leq 9.8 \cdot 10^{+73}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(\frac{t}{a - t} + 1\right)\\
\end{array}
\end{array}
if a < -1.74999999999999991e152Initial program 74.9%
associate-*l/92.3%
Simplified92.3%
Taylor expanded in t around 0 82.1%
associate--l+82.1%
associate-/l*90.2%
Simplified90.2%
if -1.74999999999999991e152 < a < 9.7999999999999998e73Initial program 78.3%
associate--l+83.0%
sub-neg83.0%
+-commutative83.0%
associate-/l*85.8%
distribute-neg-frac85.8%
associate-/r/85.9%
fma-def85.9%
sub-neg85.9%
+-commutative85.9%
distribute-neg-in85.9%
unsub-neg85.9%
remove-double-neg85.9%
Simplified85.9%
Taylor expanded in z around inf 85.5%
mul-1-neg85.5%
*-commutative85.5%
associate-*r/86.9%
distribute-lft-neg-in86.9%
Simplified86.9%
if 9.7999999999999998e73 < a Initial program 75.0%
associate-*l/90.9%
Simplified90.9%
Taylor expanded in y around 0 94.5%
Taylor expanded in z around 0 89.2%
Final simplification87.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.52e+140)
(- x (/ y (/ t (- a z))))
(if (<= t 4.4e+141)
(- (+ y x) (* y (/ z (- a t))))
(+ x (* (- z a) (/ y t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.52e+140) {
tmp = x - (y / (t / (a - z)));
} else if (t <= 4.4e+141) {
tmp = (y + x) - (y * (z / (a - t)));
} else {
tmp = x + ((z - a) * (y / 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 <= (-1.52d+140)) then
tmp = x - (y / (t / (a - z)))
else if (t <= 4.4d+141) then
tmp = (y + x) - (y * (z / (a - t)))
else
tmp = x + ((z - a) * (y / 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 <= -1.52e+140) {
tmp = x - (y / (t / (a - z)));
} else if (t <= 4.4e+141) {
tmp = (y + x) - (y * (z / (a - t)));
} else {
tmp = x + ((z - a) * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.52e+140: tmp = x - (y / (t / (a - z))) elif t <= 4.4e+141: tmp = (y + x) - (y * (z / (a - t))) else: tmp = x + ((z - a) * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.52e+140) tmp = Float64(x - Float64(y / Float64(t / Float64(a - z)))); elseif (t <= 4.4e+141) tmp = Float64(Float64(y + x) - Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.52e+140) tmp = x - (y / (t / (a - z))); elseif (t <= 4.4e+141) tmp = (y + x) - (y * (z / (a - t))); else tmp = x + ((z - a) * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.52e+140], N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e+141], N[(N[(y + x), $MachinePrecision] - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.52 \cdot 10^{+140}:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+141}:\\
\;\;\;\;\left(y + x\right) - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\
\end{array}
\end{array}
if t < -1.52e140Initial program 33.6%
associate-*l/54.6%
Simplified54.6%
Taylor expanded in t around -inf 68.1%
+-commutative68.1%
mul-1-neg68.1%
unsub-neg68.1%
distribute-lft-out--68.6%
Simplified68.6%
expm1-log1p-u64.4%
expm1-udef50.4%
Applied egg-rr50.4%
expm1-def64.4%
expm1-log1p68.6%
associate-/l*86.7%
Simplified86.7%
if -1.52e140 < t < 4.4e141Initial program 90.3%
associate-*l/93.0%
Simplified93.0%
Taylor expanded in z around inf 91.8%
if 4.4e141 < t Initial program 47.1%
associate-*l/59.1%
Simplified59.1%
Taylor expanded in y around 0 82.4%
Taylor expanded in t around inf 78.7%
mul-1-neg78.7%
neg-mul-178.7%
+-commutative78.7%
sub-neg78.7%
associate-*r/89.1%
distribute-lft-neg-in89.1%
sub-neg89.1%
+-commutative89.1%
distribute-neg-in89.1%
remove-double-neg89.1%
sub-neg89.1%
Simplified89.1%
Final simplification90.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5.2e+178)
(+ y x)
(if (<= a -4.9e-14)
(- x (/ y (/ a z)))
(if (<= a 1e+72) (+ x (* y (/ z t))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.2e+178) {
tmp = y + x;
} else if (a <= -4.9e-14) {
tmp = x - (y / (a / z));
} else if (a <= 1e+72) {
tmp = x + (y * (z / t));
} else {
tmp = y + 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 <= (-5.2d+178)) then
tmp = y + x
else if (a <= (-4.9d-14)) then
tmp = x - (y / (a / z))
else if (a <= 1d+72) then
tmp = x + (y * (z / t))
else
tmp = y + 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 <= -5.2e+178) {
tmp = y + x;
} else if (a <= -4.9e-14) {
tmp = x - (y / (a / z));
} else if (a <= 1e+72) {
tmp = x + (y * (z / t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.2e+178: tmp = y + x elif a <= -4.9e-14: tmp = x - (y / (a / z)) elif a <= 1e+72: tmp = x + (y * (z / t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.2e+178) tmp = Float64(y + x); elseif (a <= -4.9e-14) tmp = Float64(x - Float64(y / Float64(a / z))); elseif (a <= 1e+72) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.2e+178) tmp = y + x; elseif (a <= -4.9e-14) tmp = x - (y / (a / z)); elseif (a <= 1e+72) tmp = x + (y * (z / t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.2e+178], N[(y + x), $MachinePrecision], If[LessEqual[a, -4.9e-14], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e+72], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{+178}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq -4.9 \cdot 10^{-14}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;a \leq 10^{+72}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -5.2000000000000001e178 or 9.99999999999999944e71 < a Initial program 75.2%
associate-*l/93.0%
Simplified93.0%
Taylor expanded in a around inf 87.9%
if -5.2000000000000001e178 < a < -4.89999999999999995e-14Initial program 70.6%
associate--l+70.6%
sub-neg70.6%
+-commutative70.6%
associate-/l*82.6%
distribute-neg-frac82.6%
associate-/r/83.2%
fma-def83.2%
sub-neg83.2%
+-commutative83.2%
distribute-neg-in83.2%
unsub-neg83.2%
remove-double-neg83.2%
Simplified83.2%
Taylor expanded in z around inf 71.3%
associate-*r/71.3%
associate-*r*71.3%
neg-mul-171.3%
Simplified71.3%
Taylor expanded in a around inf 70.2%
mul-1-neg70.2%
associate-/l*72.6%
distribute-neg-frac72.6%
Simplified72.6%
if -4.89999999999999995e-14 < a < 9.99999999999999944e71Initial program 80.2%
associate-*l/77.8%
Simplified77.8%
Taylor expanded in y around 0 91.1%
Taylor expanded in a around 0 74.2%
Final simplification78.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.65e-47) (not (<= t 3.85e+77))) (+ x (* (- z a) (/ y t))) (+ y (- x (/ y (/ a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.65e-47) || !(t <= 3.85e+77)) {
tmp = x + ((z - a) * (y / t));
} else {
tmp = y + (x - (y / (a / 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 ((t <= (-1.65d-47)) .or. (.not. (t <= 3.85d+77))) then
tmp = x + ((z - a) * (y / t))
else
tmp = y + (x - (y / (a / z)))
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.65e-47) || !(t <= 3.85e+77)) {
tmp = x + ((z - a) * (y / t));
} else {
tmp = y + (x - (y / (a / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.65e-47) or not (t <= 3.85e+77): tmp = x + ((z - a) * (y / t)) else: tmp = y + (x - (y / (a / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.65e-47) || !(t <= 3.85e+77)) tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t))); else tmp = Float64(y + Float64(x - Float64(y / Float64(a / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.65e-47) || ~((t <= 3.85e+77))) tmp = x + ((z - a) * (y / t)); else tmp = y + (x - (y / (a / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.65e-47], N[Not[LessEqual[t, 3.85e+77]], $MachinePrecision]], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{-47} \lor \neg \left(t \leq 3.85 \cdot 10^{+77}\right):\\
\;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\end{array}
\end{array}
if t < -1.65000000000000002e-47 or 3.8499999999999999e77 < t Initial program 56.8%
associate-*l/70.8%
Simplified70.8%
Taylor expanded in y around 0 87.5%
Taylor expanded in t around inf 75.0%
mul-1-neg75.0%
neg-mul-175.0%
+-commutative75.0%
sub-neg75.0%
associate-*r/81.0%
distribute-lft-neg-in81.0%
sub-neg81.0%
+-commutative81.0%
distribute-neg-in81.0%
remove-double-neg81.0%
sub-neg81.0%
Simplified81.0%
if -1.65000000000000002e-47 < t < 3.8499999999999999e77Initial program 94.4%
associate-*l/94.3%
Simplified94.3%
Taylor expanded in t around 0 85.3%
associate--l+85.3%
associate-/l*85.4%
Simplified85.4%
Final simplification83.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.75e+152) (not (<= a 4.4e+73))) (+ y (- x (/ y (/ a z)))) (- x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.75e+152) || !(a <= 4.4e+73)) {
tmp = y + (x - (y / (a / z)));
} else {
tmp = x - (z * (y / (a - 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 ((a <= (-1.75d+152)) .or. (.not. (a <= 4.4d+73))) then
tmp = y + (x - (y / (a / z)))
else
tmp = x - (z * (y / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.75e+152) || !(a <= 4.4e+73)) {
tmp = y + (x - (y / (a / z)));
} else {
tmp = x - (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.75e+152) or not (a <= 4.4e+73): tmp = y + (x - (y / (a / z))) else: tmp = x - (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.75e+152) || !(a <= 4.4e+73)) tmp = Float64(y + Float64(x - Float64(y / Float64(a / z)))); else tmp = Float64(x - Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.75e+152) || ~((a <= 4.4e+73))) tmp = y + (x - (y / (a / z))); else tmp = x - (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.75e+152], N[Not[LessEqual[a, 4.4e+73]], $MachinePrecision]], N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.75 \cdot 10^{+152} \lor \neg \left(a \leq 4.4 \cdot 10^{+73}\right):\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if a < -1.74999999999999991e152 or 4.4e73 < a Initial program 74.9%
associate-*l/91.4%
Simplified91.4%
Taylor expanded in t around 0 81.1%
associate--l+81.1%
associate-/l*88.6%
Simplified88.6%
if -1.74999999999999991e152 < a < 4.4e73Initial program 78.3%
associate--l+83.0%
sub-neg83.0%
+-commutative83.0%
associate-/l*85.8%
distribute-neg-frac85.8%
associate-/r/85.9%
fma-def85.9%
sub-neg85.9%
+-commutative85.9%
distribute-neg-in85.9%
unsub-neg85.9%
remove-double-neg85.9%
Simplified85.9%
Taylor expanded in z around inf 85.5%
mul-1-neg85.5%
*-commutative85.5%
associate-*r/86.9%
distribute-lft-neg-in86.9%
Simplified86.9%
Final simplification87.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.8e-47) (+ x (* y (/ z t))) (if (<= t 2.7e+77) (+ y (- x (/ y (/ a z)))) (+ x (* z (/ y t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.8e-47) {
tmp = x + (y * (z / t));
} else if (t <= 2.7e+77) {
tmp = y + (x - (y / (a / z)));
} else {
tmp = x + (z * (y / 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 <= (-3.8d-47)) then
tmp = x + (y * (z / t))
else if (t <= 2.7d+77) then
tmp = y + (x - (y / (a / z)))
else
tmp = x + (z * (y / 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 <= -3.8e-47) {
tmp = x + (y * (z / t));
} else if (t <= 2.7e+77) {
tmp = y + (x - (y / (a / z)));
} else {
tmp = x + (z * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.8e-47: tmp = x + (y * (z / t)) elif t <= 2.7e+77: tmp = y + (x - (y / (a / z))) else: tmp = x + (z * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.8e-47) tmp = Float64(x + Float64(y * Float64(z / t))); elseif (t <= 2.7e+77) tmp = Float64(y + Float64(x - Float64(y / Float64(a / z)))); else tmp = Float64(x + Float64(z * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.8e-47) tmp = x + (y * (z / t)); elseif (t <= 2.7e+77) tmp = y + (x - (y / (a / z))); else tmp = x + (z * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.8e-47], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+77], N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{-47}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+77}:\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if t < -3.80000000000000015e-47Initial program 57.4%
associate-*l/72.2%
Simplified72.2%
Taylor expanded in y around 0 87.5%
Taylor expanded in a around 0 71.9%
if -3.80000000000000015e-47 < t < 2.6999999999999998e77Initial program 94.4%
associate-*l/94.3%
Simplified94.3%
Taylor expanded in t around 0 85.3%
associate--l+85.3%
associate-/l*85.4%
Simplified85.4%
if 2.6999999999999998e77 < t Initial program 55.7%
associate-*l/68.5%
Simplified68.5%
Taylor expanded in y around 0 87.6%
Taylor expanded in a around 0 71.3%
associate-/l*72.7%
Simplified72.7%
associate-/r/72.7%
Applied egg-rr72.7%
Final simplification79.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.8e-47) (- x (/ y (/ t (- a z)))) (if (<= t 3.2e+77) (+ y (- x (/ y (/ a z)))) (+ x (* (- z a) (/ y t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.8e-47) {
tmp = x - (y / (t / (a - z)));
} else if (t <= 3.2e+77) {
tmp = y + (x - (y / (a / z)));
} else {
tmp = x + ((z - a) * (y / 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 <= (-3.8d-47)) then
tmp = x - (y / (t / (a - z)))
else if (t <= 3.2d+77) then
tmp = y + (x - (y / (a / z)))
else
tmp = x + ((z - a) * (y / 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 <= -3.8e-47) {
tmp = x - (y / (t / (a - z)));
} else if (t <= 3.2e+77) {
tmp = y + (x - (y / (a / z)));
} else {
tmp = x + ((z - a) * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.8e-47: tmp = x - (y / (t / (a - z))) elif t <= 3.2e+77: tmp = y + (x - (y / (a / z))) else: tmp = x + ((z - a) * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.8e-47) tmp = Float64(x - Float64(y / Float64(t / Float64(a - z)))); elseif (t <= 3.2e+77) tmp = Float64(y + Float64(x - Float64(y / Float64(a / z)))); else tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.8e-47) tmp = x - (y / (t / (a - z))); elseif (t <= 3.2e+77) tmp = y + (x - (y / (a / z))); else tmp = x + ((z - a) * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.8e-47], N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+77], N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{-47}:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+77}:\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\
\end{array}
\end{array}
if t < -3.80000000000000015e-47Initial program 57.4%
associate-*l/72.2%
Simplified72.2%
Taylor expanded in t around -inf 72.8%
+-commutative72.8%
mul-1-neg72.8%
unsub-neg72.8%
distribute-lft-out--73.0%
Simplified73.0%
expm1-log1p-u51.8%
expm1-udef43.7%
Applied egg-rr43.7%
expm1-def51.8%
expm1-log1p73.0%
associate-/l*82.0%
Simplified82.0%
if -3.80000000000000015e-47 < t < 3.2000000000000002e77Initial program 94.4%
associate-*l/94.3%
Simplified94.3%
Taylor expanded in t around 0 85.3%
associate--l+85.3%
associate-/l*85.4%
Simplified85.4%
if 3.2000000000000002e77 < t Initial program 55.7%
associate-*l/68.5%
Simplified68.5%
Taylor expanded in y around 0 87.6%
Taylor expanded in t around inf 78.2%
mul-1-neg78.2%
neg-mul-178.2%
+-commutative78.2%
sub-neg78.2%
associate-*r/85.5%
distribute-lft-neg-in85.5%
sub-neg85.5%
+-commutative85.5%
distribute-neg-in85.5%
remove-double-neg85.5%
sub-neg85.5%
Simplified85.5%
Final simplification84.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.9e+23) (+ y x) (if (<= a 8.2e+71) (+ x (* y (/ z t))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.9e+23) {
tmp = y + x;
} else if (a <= 8.2e+71) {
tmp = x + (y * (z / t));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.9d+23)) then
tmp = y + x
else if (a <= 8.2d+71) then
tmp = x + (y * (z / t))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.9e+23) {
tmp = y + x;
} else if (a <= 8.2e+71) {
tmp = x + (y * (z / t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.9e+23: tmp = y + x elif a <= 8.2e+71: tmp = x + (y * (z / t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.9e+23) tmp = Float64(y + x); elseif (a <= 8.2e+71) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.9e+23) tmp = y + x; elseif (a <= 8.2e+71) tmp = x + (y * (z / t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.9e+23], N[(y + x), $MachinePrecision], If[LessEqual[a, 8.2e+71], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+23}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{+71}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -1.89999999999999987e23 or 8.2000000000000004e71 < a Initial program 73.0%
associate-*l/89.1%
Simplified89.1%
Taylor expanded in a around inf 79.8%
if -1.89999999999999987e23 < a < 8.2000000000000004e71Initial program 80.5%
associate-*l/78.7%
Simplified78.7%
Taylor expanded in y around 0 91.5%
Taylor expanded in a around 0 72.8%
Final simplification76.0%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.08e+214) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.08e+214) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 1.08d+214) then
tmp = y + x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.08e+214) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.08e+214: tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.08e+214) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.08e+214) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.08e+214], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.08 \cdot 10^{+214}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < 1.08e214Initial program 80.4%
associate-*l/86.3%
Simplified86.3%
Taylor expanded in a around inf 61.9%
if 1.08e214 < t Initial program 46.2%
associate-*l/57.0%
Simplified57.0%
Taylor expanded in x around inf 64.9%
Final simplification62.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 77.1%
associate-*l/83.5%
Simplified83.5%
Taylor expanded in x around inf 50.1%
Final simplification50.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (< t_2 -1.3664970889390727e-7)
t_1
(if (< t_2 1.4754293444577233e-239)
(/ (- (* y (- a z)) (* x t)) (- a t))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} 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) :: t_2
real(8) :: tmp
t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 < (-1.3664970889390727d-7)) then
tmp = t_1
else if (t_2 < 1.4754293444577233d-239) then
tmp = ((y * (a - z)) - (x * t)) / (a - t)
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 + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 < -1.3664970889390727e-7: tmp = t_1 elif t_2 < 1.4754293444577233e-239: tmp = ((y * (a - z)) - (x * t)) / (a - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = ((y * (a - z)) - (x * t)) / (a - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023171
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))