
(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 (- x (* y (- (/ z (- a t)) (+ (/ t (- a t)) 1.0)))))
double code(double x, double y, double z, double t, double a) {
return x - (y * ((z / (a - t)) - ((t / (a - t)) + 1.0)));
}
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 / (a - t)) - ((t / (a - t)) + 1.0d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (y * ((z / (a - t)) - ((t / (a - t)) + 1.0)));
}
def code(x, y, z, t, a): return x - (y * ((z / (a - t)) - ((t / (a - t)) + 1.0)))
function code(x, y, z, t, a) return Float64(x - Float64(y * Float64(Float64(z / Float64(a - t)) - Float64(Float64(t / Float64(a - t)) + 1.0)))) end
function tmp = code(x, y, z, t, a) tmp = x - (y * ((z / (a - t)) - ((t / (a - t)) + 1.0))); end
code[x_, y_, z_, t_, a_] := N[(x - N[(y * N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - y \cdot \left(\frac{z}{a - t} - \left(\frac{t}{a - t} + 1\right)\right)
\end{array}
Initial program 76.4%
sub-neg76.4%
distribute-frac-neg76.4%
distribute-rgt-neg-out76.4%
associate-/l*81.6%
div-sub81.4%
associate-+r-81.4%
associate-/r/81.9%
distribute-rgt-neg-out81.9%
associate-/r/81.4%
distribute-frac-neg81.4%
associate-+l+81.4%
associate-+r-86.1%
distribute-frac-neg86.1%
Simplified86.3%
Taylor expanded in y around 0 93.9%
Final simplification93.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z a) t)))))
(if (<= a -4.8e+193)
(+ x y)
(if (<= a -780000000.0)
(- x (* y (/ z a)))
(if (<= a -1.9e-58)
t_1
(if (<= a -2.8e-83)
(- y (/ (* y z) a))
(if (<= a 4e-262)
(+ x (* z (/ y t)))
(if (<= a 3.1e+16) t_1 (+ x y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - a) / t));
double tmp;
if (a <= -4.8e+193) {
tmp = x + y;
} else if (a <= -780000000.0) {
tmp = x - (y * (z / a));
} else if (a <= -1.9e-58) {
tmp = t_1;
} else if (a <= -2.8e-83) {
tmp = y - ((y * z) / a);
} else if (a <= 4e-262) {
tmp = x + (z * (y / t));
} else if (a <= 3.1e+16) {
tmp = t_1;
} else {
tmp = x + 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) :: t_1
real(8) :: tmp
t_1 = x + (y * ((z - a) / t))
if (a <= (-4.8d+193)) then
tmp = x + y
else if (a <= (-780000000.0d0)) then
tmp = x - (y * (z / a))
else if (a <= (-1.9d-58)) then
tmp = t_1
else if (a <= (-2.8d-83)) then
tmp = y - ((y * z) / a)
else if (a <= 4d-262) then
tmp = x + (z * (y / t))
else if (a <= 3.1d+16) then
tmp = t_1
else
tmp = x + y
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) / t));
double tmp;
if (a <= -4.8e+193) {
tmp = x + y;
} else if (a <= -780000000.0) {
tmp = x - (y * (z / a));
} else if (a <= -1.9e-58) {
tmp = t_1;
} else if (a <= -2.8e-83) {
tmp = y - ((y * z) / a);
} else if (a <= 4e-262) {
tmp = x + (z * (y / t));
} else if (a <= 3.1e+16) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - a) / t)) tmp = 0 if a <= -4.8e+193: tmp = x + y elif a <= -780000000.0: tmp = x - (y * (z / a)) elif a <= -1.9e-58: tmp = t_1 elif a <= -2.8e-83: tmp = y - ((y * z) / a) elif a <= 4e-262: tmp = x + (z * (y / t)) elif a <= 3.1e+16: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - a) / t))) tmp = 0.0 if (a <= -4.8e+193) tmp = Float64(x + y); elseif (a <= -780000000.0) tmp = Float64(x - Float64(y * Float64(z / a))); elseif (a <= -1.9e-58) tmp = t_1; elseif (a <= -2.8e-83) tmp = Float64(y - Float64(Float64(y * z) / a)); elseif (a <= 4e-262) tmp = Float64(x + Float64(z * Float64(y / t))); elseif (a <= 3.1e+16) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - a) / t)); tmp = 0.0; if (a <= -4.8e+193) tmp = x + y; elseif (a <= -780000000.0) tmp = x - (y * (z / a)); elseif (a <= -1.9e-58) tmp = t_1; elseif (a <= -2.8e-83) tmp = y - ((y * z) / a); elseif (a <= 4e-262) tmp = x + (z * (y / t)); elseif (a <= 3.1e+16) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.8e+193], N[(x + y), $MachinePrecision], If[LessEqual[a, -780000000.0], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.9e-58], t$95$1, If[LessEqual[a, -2.8e-83], N[(y - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e-262], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.1e+16], t$95$1, N[(x + y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - a}{t}\\
\mathbf{if}\;a \leq -4.8 \cdot 10^{+193}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -780000000:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq -1.9 \cdot 10^{-58}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.8 \cdot 10^{-83}:\\
\;\;\;\;y - \frac{y \cdot z}{a}\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-262}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -4.8e193 or 3.1e16 < a Initial program 87.4%
+-commutative87.4%
associate--l+87.4%
sub-neg87.4%
distribute-frac-neg87.4%
*-commutative87.4%
distribute-rgt-neg-in87.4%
associate-/l*98.8%
sub-neg98.8%
distribute-neg-in98.8%
remove-double-neg98.8%
+-commutative98.8%
sub-neg98.8%
Simplified98.8%
Taylor expanded in a around inf 87.3%
+-commutative87.3%
Simplified87.3%
if -4.8e193 < a < -7.8e8Initial program 70.9%
sub-neg70.9%
distribute-frac-neg70.9%
distribute-rgt-neg-out70.9%
associate-/l*74.8%
div-sub74.8%
associate-+r-74.8%
associate-/r/75.0%
distribute-rgt-neg-out75.0%
associate-/r/74.8%
distribute-frac-neg74.8%
associate-+l+74.8%
associate-+r-87.7%
distribute-frac-neg87.7%
Simplified87.7%
Taylor expanded in y around 0 94.6%
Taylor expanded in z around inf 79.5%
mul-1-neg79.5%
associate-/l*88.5%
distribute-neg-frac88.5%
Simplified88.5%
Taylor expanded in a around inf 73.4%
mul-1-neg73.4%
associate-/l*79.4%
unsub-neg79.4%
associate-/l*73.4%
associate-*r/79.4%
Simplified79.4%
if -7.8e8 < a < -1.8999999999999999e-58 or 4.00000000000000005e-262 < a < 3.1e16Initial program 68.5%
sub-neg68.5%
distribute-frac-neg68.5%
distribute-rgt-neg-out68.5%
associate-/l*70.2%
div-sub69.8%
associate-+r-69.8%
associate-/r/71.1%
distribute-rgt-neg-out71.1%
associate-/r/69.8%
distribute-frac-neg69.8%
associate-+l+69.8%
associate-+r-79.3%
distribute-frac-neg79.3%
Simplified79.7%
Taylor expanded in y around 0 94.4%
Taylor expanded in t around inf 87.3%
associate-*r/87.3%
mul-1-neg87.3%
sub-neg87.3%
sub-neg87.3%
mul-1-neg87.3%
+-commutative87.3%
distribute-lft-in87.3%
neg-mul-187.3%
mul-1-neg87.3%
remove-double-neg87.3%
neg-mul-187.3%
sub-neg87.3%
Simplified87.3%
if -1.8999999999999999e-58 < a < -2.8000000000000001e-83Initial program 80.2%
+-commutative80.2%
associate--l+80.2%
sub-neg80.2%
distribute-frac-neg80.2%
*-commutative80.2%
distribute-rgt-neg-in80.2%
associate-/l*80.8%
sub-neg80.8%
distribute-neg-in80.8%
remove-double-neg80.8%
+-commutative80.8%
sub-neg80.8%
Simplified80.8%
Taylor expanded in t around 0 80.6%
mul-1-neg80.6%
sub-neg80.6%
associate--l+80.6%
+-commutative80.6%
Simplified80.6%
Taylor expanded in x around 0 62.3%
if -2.8000000000000001e-83 < a < 4.00000000000000005e-262Initial program 73.9%
sub-neg73.9%
distribute-frac-neg73.9%
distribute-rgt-neg-out73.9%
associate-/l*77.2%
div-sub76.9%
associate-+r-76.9%
associate-/r/77.2%
distribute-rgt-neg-out77.2%
associate-/r/76.9%
distribute-frac-neg76.9%
associate-+l+76.9%
associate-+r-78.6%
distribute-frac-neg78.6%
Simplified78.8%
Taylor expanded in y around 0 87.6%
Taylor expanded in z around inf 90.8%
mul-1-neg90.8%
associate-/l*86.1%
distribute-neg-frac86.1%
Simplified86.1%
Taylor expanded in x around 0 90.8%
mul-1-neg90.8%
associate-*r/86.1%
sub-neg86.1%
associate-*r/90.8%
associate-/l*86.1%
Simplified86.1%
Taylor expanded in a around 0 80.6%
cancel-sign-sub-inv80.6%
metadata-eval80.6%
*-lft-identity80.6%
+-commutative80.6%
associate-/l*78.2%
associate-/r/82.7%
Simplified82.7%
Final simplification84.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.5e+191)
(+ x y)
(if (<= a -750000000.0)
(- x (* y (/ z a)))
(if (<= a -1e-44)
(+ x (* y (/ (- z a) t)))
(if (<= a 1.6e+16) (+ x (* (- z a) (/ y t))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.5e+191) {
tmp = x + y;
} else if (a <= -750000000.0) {
tmp = x - (y * (z / a));
} else if (a <= -1e-44) {
tmp = x + (y * ((z - a) / t));
} else if (a <= 1.6e+16) {
tmp = x + ((z - a) * (y / t));
} else {
tmp = x + 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 (a <= (-2.5d+191)) then
tmp = x + y
else if (a <= (-750000000.0d0)) then
tmp = x - (y * (z / a))
else if (a <= (-1d-44)) then
tmp = x + (y * ((z - a) / t))
else if (a <= 1.6d+16) then
tmp = x + ((z - a) * (y / t))
else
tmp = x + y
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.5e+191) {
tmp = x + y;
} else if (a <= -750000000.0) {
tmp = x - (y * (z / a));
} else if (a <= -1e-44) {
tmp = x + (y * ((z - a) / t));
} else if (a <= 1.6e+16) {
tmp = x + ((z - a) * (y / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.5e+191: tmp = x + y elif a <= -750000000.0: tmp = x - (y * (z / a)) elif a <= -1e-44: tmp = x + (y * ((z - a) / t)) elif a <= 1.6e+16: tmp = x + ((z - a) * (y / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.5e+191) tmp = Float64(x + y); elseif (a <= -750000000.0) tmp = Float64(x - Float64(y * Float64(z / a))); elseif (a <= -1e-44) tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); elseif (a <= 1.6e+16) tmp = Float64(x + Float64(Float64(z - a) * Float64(y / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.5e+191) tmp = x + y; elseif (a <= -750000000.0) tmp = x - (y * (z / a)); elseif (a <= -1e-44) tmp = x + (y * ((z - a) / t)); elseif (a <= 1.6e+16) tmp = x + ((z - a) * (y / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e+191], N[(x + y), $MachinePrecision], If[LessEqual[a, -750000000.0], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1e-44], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e+16], N[(x + N[(N[(z - a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+191}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -750000000:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq -1 \cdot 10^{-44}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{+16}:\\
\;\;\;\;x + \left(z - a\right) \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.5000000000000001e191 or 1.6e16 < a Initial program 87.4%
+-commutative87.4%
associate--l+87.4%
sub-neg87.4%
distribute-frac-neg87.4%
*-commutative87.4%
distribute-rgt-neg-in87.4%
associate-/l*98.8%
sub-neg98.8%
distribute-neg-in98.8%
remove-double-neg98.8%
+-commutative98.8%
sub-neg98.8%
Simplified98.8%
Taylor expanded in a around inf 87.3%
+-commutative87.3%
Simplified87.3%
if -2.5000000000000001e191 < a < -7.5e8Initial program 70.9%
sub-neg70.9%
distribute-frac-neg70.9%
distribute-rgt-neg-out70.9%
associate-/l*74.8%
div-sub74.8%
associate-+r-74.8%
associate-/r/75.0%
distribute-rgt-neg-out75.0%
associate-/r/74.8%
distribute-frac-neg74.8%
associate-+l+74.8%
associate-+r-87.7%
distribute-frac-neg87.7%
Simplified87.7%
Taylor expanded in y around 0 94.6%
Taylor expanded in z around inf 79.5%
mul-1-neg79.5%
associate-/l*88.5%
distribute-neg-frac88.5%
Simplified88.5%
Taylor expanded in a around inf 73.4%
mul-1-neg73.4%
associate-/l*79.4%
unsub-neg79.4%
associate-/l*73.4%
associate-*r/79.4%
Simplified79.4%
if -7.5e8 < a < -9.99999999999999953e-45Initial program 55.6%
sub-neg55.6%
distribute-frac-neg55.6%
distribute-rgt-neg-out55.6%
associate-/l*56.1%
div-sub56.1%
associate-+r-56.1%
associate-/r/56.2%
distribute-rgt-neg-out56.2%
associate-/r/56.1%
distribute-frac-neg56.1%
associate-+l+56.1%
associate-+r-79.9%
distribute-frac-neg79.9%
Simplified79.9%
Taylor expanded in y around 0 88.5%
Taylor expanded in t around inf 91.1%
associate-*r/91.1%
mul-1-neg91.1%
sub-neg91.1%
sub-neg91.1%
mul-1-neg91.1%
+-commutative91.1%
distribute-lft-in91.1%
neg-mul-191.1%
mul-1-neg91.1%
remove-double-neg91.1%
neg-mul-191.1%
sub-neg91.1%
Simplified91.1%
if -9.99999999999999953e-45 < a < 1.6e16Initial program 72.6%
sub-neg72.6%
distribute-frac-neg72.6%
distribute-rgt-neg-out72.6%
associate-/l*74.4%
div-sub74.0%
associate-+r-74.0%
associate-/r/74.9%
distribute-rgt-neg-out74.9%
associate-/r/74.0%
distribute-frac-neg74.0%
associate-+l+74.0%
associate-+r-78.2%
distribute-frac-neg78.2%
Simplified78.6%
Taylor expanded in y around 0 91.2%
Taylor expanded in t around inf 79.2%
associate-*r/79.2%
mul-1-neg79.2%
sub-neg79.2%
*-commutative79.2%
sub-neg79.2%
mul-1-neg79.2%
associate-*r*79.2%
+-commutative79.2%
distribute-lft-in79.2%
neg-mul-179.2%
mul-1-neg79.2%
remove-double-neg79.2%
neg-mul-179.2%
sub-neg79.2%
*-commutative79.2%
associate-*l/81.0%
*-commutative81.0%
Simplified81.0%
Final simplification83.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.25e-201) (not (<= a 2.7e-54))) (+ x (+ y (/ (- t z) (/ (- a t) y)))) (- x (/ y (/ (- a t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.25e-201) || !(a <= 2.7e-54)) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} 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 <= (-1.25d-201)) .or. (.not. (a <= 2.7d-54))) then
tmp = x + (y + ((t - z) / ((a - t) / y)))
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 <= -1.25e-201) || !(a <= 2.7e-54)) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else {
tmp = x - (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.25e-201) or not (a <= 2.7e-54): tmp = x + (y + ((t - z) / ((a - t) / y))) else: tmp = x - (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.25e-201) || !(a <= 2.7e-54)) tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); else tmp = Float64(x - Float64(y / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.25e-201) || ~((a <= 2.7e-54))) tmp = x + (y + ((t - z) / ((a - t) / y))); else tmp = x - (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.25e-201], N[Not[LessEqual[a, 2.7e-54]], $MachinePrecision]], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{-201} \lor \neg \left(a \leq 2.7 \cdot 10^{-54}\right):\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if a < -1.25e-201 or 2.70000000000000026e-54 < a Initial program 79.5%
sub-neg79.5%
distribute-frac-neg79.5%
distribute-rgt-neg-out79.5%
associate-/l*86.1%
div-sub86.0%
associate-+r-86.0%
associate-/r/86.5%
distribute-rgt-neg-out86.5%
associate-/r/86.0%
distribute-frac-neg86.0%
associate-+l+86.0%
associate-+r-91.6%
distribute-frac-neg91.6%
Simplified91.7%
if -1.25e-201 < a < 2.70000000000000026e-54Initial program 70.1%
sub-neg70.1%
distribute-frac-neg70.1%
distribute-rgt-neg-out70.1%
associate-/l*72.3%
div-sub71.9%
associate-+r-71.9%
associate-/r/72.4%
distribute-rgt-neg-out72.4%
associate-/r/71.9%
distribute-frac-neg71.9%
associate-+l+71.9%
associate-+r-74.9%
distribute-frac-neg74.9%
Simplified75.3%
Taylor expanded in y around 0 94.2%
Taylor expanded in z around inf 90.7%
mul-1-neg90.7%
associate-/l*93.0%
distribute-neg-frac93.0%
Simplified93.0%
Taylor expanded in x around 0 90.7%
mul-1-neg90.7%
associate-*r/93.0%
sub-neg93.0%
associate-*r/90.7%
associate-/l*93.0%
Simplified93.0%
Final simplification92.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.4e+142)
(- (+ x y) (* y (/ z a)))
(if (<= a 1.15e+16)
(- x (/ y (/ (- a t) z)))
(+ y (+ x (/ y (/ (- a) z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e+142) {
tmp = (x + y) - (y * (z / a));
} else if (a <= 1.15e+16) {
tmp = x - (y / ((a - t) / z));
} 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 (a <= (-1.4d+142)) then
tmp = (x + y) - (y * (z / a))
else if (a <= 1.15d+16) then
tmp = x - (y / ((a - t) / z))
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 (a <= -1.4e+142) {
tmp = (x + y) - (y * (z / a));
} else if (a <= 1.15e+16) {
tmp = x - (y / ((a - t) / z));
} else {
tmp = y + (x + (y / (-a / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.4e+142: tmp = (x + y) - (y * (z / a)) elif a <= 1.15e+16: tmp = x - (y / ((a - t) / z)) else: tmp = y + (x + (y / (-a / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e+142) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); elseif (a <= 1.15e+16) tmp = Float64(x - Float64(y / Float64(Float64(a - t) / z))); else tmp = Float64(y + Float64(x + Float64(y / Float64(Float64(-a) / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.4e+142) tmp = (x + y) - (y * (z / a)); elseif (a <= 1.15e+16) tmp = x - (y / ((a - t) / z)); else tmp = y + (x + (y / (-a / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e+142], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.15e+16], N[(x - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x + N[(y / N[((-a) / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+142}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+16}:\\
\;\;\;\;x - \frac{y}{\frac{a - t}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + \left(x + \frac{y}{\frac{-a}{z}}\right)\\
\end{array}
\end{array}
if a < -1.4e142Initial program 83.4%
associate-*l/97.1%
Simplified97.1%
Taylor expanded in t around 0 97.1%
if -1.4e142 < a < 1.15e16Initial program 70.8%
sub-neg70.8%
distribute-frac-neg70.8%
distribute-rgt-neg-out70.8%
associate-/l*73.0%
div-sub72.7%
associate-+r-72.7%
associate-/r/73.4%
distribute-rgt-neg-out73.4%
associate-/r/72.7%
distribute-frac-neg72.7%
associate-+l+72.7%
associate-+r-80.1%
distribute-frac-neg80.1%
Simplified80.4%
Taylor expanded in y around 0 91.6%
Taylor expanded in z around inf 85.8%
mul-1-neg85.8%
associate-/l*87.5%
distribute-neg-frac87.5%
Simplified87.5%
Taylor expanded in x around 0 85.8%
mul-1-neg85.8%
associate-*r/87.5%
sub-neg87.5%
associate-*r/85.8%
associate-/l*87.5%
Simplified87.5%
if 1.15e16 < a Initial program 88.3%
+-commutative88.3%
associate--l+88.3%
sub-neg88.3%
distribute-frac-neg88.3%
*-commutative88.3%
distribute-rgt-neg-in88.3%
associate-/l*98.3%
sub-neg98.3%
distribute-neg-in98.3%
remove-double-neg98.3%
+-commutative98.3%
sub-neg98.3%
Simplified98.3%
Taylor expanded in t around 0 97.2%
associate-*r/97.2%
mul-1-neg97.2%
Simplified97.2%
Final simplification91.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (/ (- a t) z))))
(if (<= a -1.4e+142)
(+ x (- y t_1))
(if (<= a 3.1e+16) (- x t_1) (+ y (+ x (/ y (/ (- a) z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / ((a - t) / z);
double tmp;
if (a <= -1.4e+142) {
tmp = x + (y - t_1);
} else if (a <= 3.1e+16) {
tmp = x - t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = y / ((a - t) / z)
if (a <= (-1.4d+142)) then
tmp = x + (y - t_1)
else if (a <= 3.1d+16) then
tmp = x - t_1
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 t_1 = y / ((a - t) / z);
double tmp;
if (a <= -1.4e+142) {
tmp = x + (y - t_1);
} else if (a <= 3.1e+16) {
tmp = x - t_1;
} else {
tmp = y + (x + (y / (-a / z)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / ((a - t) / z) tmp = 0 if a <= -1.4e+142: tmp = x + (y - t_1) elif a <= 3.1e+16: tmp = x - t_1 else: tmp = y + (x + (y / (-a / z))) return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(Float64(a - t) / z)) tmp = 0.0 if (a <= -1.4e+142) tmp = Float64(x + Float64(y - t_1)); elseif (a <= 3.1e+16) tmp = Float64(x - t_1); else tmp = Float64(y + Float64(x + Float64(y / Float64(Float64(-a) / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / ((a - t) / z); tmp = 0.0; if (a <= -1.4e+142) tmp = x + (y - t_1); elseif (a <= 3.1e+16) tmp = x - t_1; else tmp = y + (x + (y / (-a / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e+142], N[(x + N[(y - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.1e+16], N[(x - t$95$1), $MachinePrecision], N[(y + N[(x + N[(y / N[((-a) / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\frac{a - t}{z}}\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{+142}:\\
\;\;\;\;x + \left(y - t_1\right)\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{+16}:\\
\;\;\;\;x - t_1\\
\mathbf{else}:\\
\;\;\;\;y + \left(x + \frac{y}{\frac{-a}{z}}\right)\\
\end{array}
\end{array}
if a < -1.4e142Initial program 83.4%
sub-neg83.4%
distribute-frac-neg83.4%
distribute-rgt-neg-out83.4%
associate-/l*94.4%
div-sub94.4%
associate-+r-94.4%
associate-/r/94.4%
distribute-rgt-neg-out94.4%
associate-/r/94.4%
distribute-frac-neg94.4%
associate-+l+94.4%
associate-+r-94.4%
distribute-frac-neg94.4%
Simplified94.4%
Taylor expanded in z around inf 83.2%
associate-/l*97.1%
Simplified97.1%
if -1.4e142 < a < 3.1e16Initial program 70.8%
sub-neg70.8%
distribute-frac-neg70.8%
distribute-rgt-neg-out70.8%
associate-/l*73.0%
div-sub72.7%
associate-+r-72.7%
associate-/r/73.4%
distribute-rgt-neg-out73.4%
associate-/r/72.7%
distribute-frac-neg72.7%
associate-+l+72.7%
associate-+r-80.1%
distribute-frac-neg80.1%
Simplified80.4%
Taylor expanded in y around 0 91.6%
Taylor expanded in z around inf 85.8%
mul-1-neg85.8%
associate-/l*87.5%
distribute-neg-frac87.5%
Simplified87.5%
Taylor expanded in x around 0 85.8%
mul-1-neg85.8%
associate-*r/87.5%
sub-neg87.5%
associate-*r/85.8%
associate-/l*87.5%
Simplified87.5%
if 3.1e16 < a Initial program 88.3%
+-commutative88.3%
associate--l+88.3%
sub-neg88.3%
distribute-frac-neg88.3%
*-commutative88.3%
distribute-rgt-neg-in88.3%
associate-/l*98.3%
sub-neg98.3%
distribute-neg-in98.3%
remove-double-neg98.3%
+-commutative98.3%
sub-neg98.3%
Simplified98.3%
Taylor expanded in t around 0 97.2%
associate-*r/97.2%
mul-1-neg97.2%
Simplified97.2%
Final simplification91.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.2e+191)
(+ x y)
(if (<= a -2e-6)
(- x (* y (/ z a)))
(if (<= a 5.8e+16) (+ x (* y (/ z t))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.2e+191) {
tmp = x + y;
} else if (a <= -2e-6) {
tmp = x - (y * (z / a));
} else if (a <= 5.8e+16) {
tmp = x + (y * (z / t));
} else {
tmp = x + 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 (a <= (-9.2d+191)) then
tmp = x + y
else if (a <= (-2d-6)) then
tmp = x - (y * (z / a))
else if (a <= 5.8d+16) then
tmp = x + (y * (z / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.2e+191) {
tmp = x + y;
} else if (a <= -2e-6) {
tmp = x - (y * (z / a));
} else if (a <= 5.8e+16) {
tmp = x + (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.2e+191: tmp = x + y elif a <= -2e-6: tmp = x - (y * (z / a)) elif a <= 5.8e+16: tmp = x + (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.2e+191) tmp = Float64(x + y); elseif (a <= -2e-6) tmp = Float64(x - Float64(y * Float64(z / a))); elseif (a <= 5.8e+16) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.2e+191) tmp = x + y; elseif (a <= -2e-6) tmp = x - (y * (z / a)); elseif (a <= 5.8e+16) tmp = x + (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.2e+191], N[(x + y), $MachinePrecision], If[LessEqual[a, -2e-6], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.8e+16], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{+191}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2 \cdot 10^{-6}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{+16}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -9.1999999999999997e191 or 5.8e16 < a Initial program 87.4%
+-commutative87.4%
associate--l+87.4%
sub-neg87.4%
distribute-frac-neg87.4%
*-commutative87.4%
distribute-rgt-neg-in87.4%
associate-/l*98.8%
sub-neg98.8%
distribute-neg-in98.8%
remove-double-neg98.8%
+-commutative98.8%
sub-neg98.8%
Simplified98.8%
Taylor expanded in a around inf 87.3%
+-commutative87.3%
Simplified87.3%
if -9.1999999999999997e191 < a < -1.99999999999999991e-6Initial program 67.6%
sub-neg67.6%
distribute-frac-neg67.6%
distribute-rgt-neg-out67.6%
associate-/l*71.4%
div-sub71.4%
associate-+r-71.4%
associate-/r/71.5%
distribute-rgt-neg-out71.5%
associate-/r/71.4%
distribute-frac-neg71.4%
associate-+l+71.4%
associate-+r-85.1%
distribute-frac-neg85.1%
Simplified85.1%
Taylor expanded in y around 0 91.3%
Taylor expanded in z around inf 77.6%
mul-1-neg77.6%
associate-/l*85.9%
distribute-neg-frac85.9%
Simplified85.9%
Taylor expanded in a around inf 70.2%
mul-1-neg70.2%
associate-/l*75.6%
unsub-neg75.6%
associate-/l*70.2%
associate-*r/75.6%
Simplified75.6%
if -1.99999999999999991e-6 < a < 5.8e16Initial program 72.1%
sub-neg72.1%
distribute-frac-neg72.1%
distribute-rgt-neg-out72.1%
associate-/l*73.7%
div-sub73.4%
associate-+r-73.4%
associate-/r/74.3%
distribute-rgt-neg-out74.3%
associate-/r/73.4%
distribute-frac-neg73.4%
associate-+l+73.4%
associate-+r-78.8%
distribute-frac-neg78.8%
Simplified79.1%
Taylor expanded in y around 0 91.7%
Taylor expanded in a around 0 78.7%
Final simplification81.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.8e+192) (not (<= a 1.2e+102))) (+ x y) (- x (/ y (/ (- a t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.8e+192) || !(a <= 1.2e+102)) {
tmp = x + y;
} 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 <= (-3.8d+192)) .or. (.not. (a <= 1.2d+102))) then
tmp = x + y
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 <= -3.8e+192) || !(a <= 1.2e+102)) {
tmp = x + y;
} else {
tmp = x - (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.8e+192) or not (a <= 1.2e+102): tmp = x + y else: tmp = x - (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.8e+192) || !(a <= 1.2e+102)) tmp = Float64(x + y); else tmp = Float64(x - Float64(y / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.8e+192) || ~((a <= 1.2e+102))) tmp = x + y; else tmp = x - (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.8e+192], N[Not[LessEqual[a, 1.2e+102]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{+192} \lor \neg \left(a \leq 1.2 \cdot 10^{+102}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if a < -3.7999999999999999e192 or 1.19999999999999997e102 < a Initial program 86.7%
+-commutative86.7%
associate--l+86.7%
sub-neg86.7%
distribute-frac-neg86.7%
*-commutative86.7%
distribute-rgt-neg-in86.7%
associate-/l*98.6%
sub-neg98.6%
distribute-neg-in98.6%
remove-double-neg98.6%
+-commutative98.6%
sub-neg98.6%
Simplified98.6%
Taylor expanded in a around inf 91.0%
+-commutative91.0%
Simplified91.0%
if -3.7999999999999999e192 < a < 1.19999999999999997e102Initial program 72.4%
sub-neg72.4%
distribute-frac-neg72.4%
distribute-rgt-neg-out72.4%
associate-/l*74.9%
div-sub74.6%
associate-+r-74.6%
associate-/r/75.3%
distribute-rgt-neg-out75.3%
associate-/r/74.6%
distribute-frac-neg74.6%
associate-+l+74.6%
associate-+r-81.2%
distribute-frac-neg81.2%
Simplified81.5%
Taylor expanded in y around 0 92.1%
Taylor expanded in z around inf 84.4%
mul-1-neg84.4%
associate-/l*86.9%
distribute-neg-frac86.9%
Simplified86.9%
Taylor expanded in x around 0 84.4%
mul-1-neg84.4%
associate-*r/86.8%
sub-neg86.8%
associate-*r/84.4%
associate-/l*86.9%
Simplified86.9%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.4e+142) (not (<= a 2.7e+16))) (- (+ x y) (* y (/ z a))) (- x (/ y (/ (- a t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.4e+142) || !(a <= 2.7e+16)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x - (y / ((a - t) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.4d+142)) .or. (.not. (a <= 2.7d+16))) then
tmp = (x + y) - (y * (z / a))
else
tmp = x - (y / ((a - t) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.4e+142) || !(a <= 2.7e+16)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x - (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.4e+142) or not (a <= 2.7e+16): tmp = (x + y) - (y * (z / a)) else: tmp = x - (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.4e+142) || !(a <= 2.7e+16)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x - Float64(y / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.4e+142) || ~((a <= 2.7e+16))) tmp = (x + y) - (y * (z / a)); else tmp = x - (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.4e+142], N[Not[LessEqual[a, 2.7e+16]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+142} \lor \neg \left(a \leq 2.7 \cdot 10^{+16}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if a < -1.4e142 or 2.7e16 < a Initial program 86.5%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in t around 0 97.1%
if -1.4e142 < a < 2.7e16Initial program 70.8%
sub-neg70.8%
distribute-frac-neg70.8%
distribute-rgt-neg-out70.8%
associate-/l*73.0%
div-sub72.7%
associate-+r-72.7%
associate-/r/73.4%
distribute-rgt-neg-out73.4%
associate-/r/72.7%
distribute-frac-neg72.7%
associate-+l+72.7%
associate-+r-80.1%
distribute-frac-neg80.1%
Simplified80.4%
Taylor expanded in y around 0 91.6%
Taylor expanded in z around inf 85.8%
mul-1-neg85.8%
associate-/l*87.5%
distribute-neg-frac87.5%
Simplified87.5%
Taylor expanded in x around 0 85.8%
mul-1-neg85.8%
associate-*r/87.5%
sub-neg87.5%
associate-*r/85.8%
associate-/l*87.5%
Simplified87.5%
Final simplification91.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.4e+163) (+ x y) (if (<= a 8e+101) (- x (* z (/ y (- a t)))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e+163) {
tmp = x + y;
} else if (a <= 8e+101) {
tmp = x - (z * (y / (a - t)));
} else {
tmp = x + 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 (a <= (-1.4d+163)) then
tmp = x + y
else if (a <= 8d+101) then
tmp = x - (z * (y / (a - t)))
else
tmp = x + y
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.4e+163) {
tmp = x + y;
} else if (a <= 8e+101) {
tmp = x - (z * (y / (a - t)));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.4e+163: tmp = x + y elif a <= 8e+101: tmp = x - (z * (y / (a - t))) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e+163) tmp = Float64(x + y); elseif (a <= 8e+101) tmp = Float64(x - Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.4e+163) tmp = x + y; elseif (a <= 8e+101) tmp = x - (z * (y / (a - t))); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e+163], N[(x + y), $MachinePrecision], If[LessEqual[a, 8e+101], N[(x - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+163}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 8 \cdot 10^{+101}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.40000000000000007e163 or 7.9999999999999998e101 < a Initial program 87.0%
+-commutative87.0%
associate--l+87.0%
sub-neg87.0%
distribute-frac-neg87.0%
*-commutative87.0%
distribute-rgt-neg-in87.0%
associate-/l*98.7%
sub-neg98.7%
distribute-neg-in98.7%
remove-double-neg98.7%
+-commutative98.7%
sub-neg98.7%
Simplified98.7%
Taylor expanded in a around inf 90.0%
+-commutative90.0%
Simplified90.0%
if -1.40000000000000007e163 < a < 7.9999999999999998e101Initial program 72.1%
sub-neg72.1%
distribute-frac-neg72.1%
distribute-rgt-neg-out72.1%
associate-/l*75.1%
div-sub74.8%
associate-+r-74.8%
associate-/r/75.5%
distribute-rgt-neg-out75.5%
associate-/r/74.8%
distribute-frac-neg74.8%
associate-+l+74.8%
associate-+r-81.5%
distribute-frac-neg81.5%
Simplified81.8%
Taylor expanded in y around 0 92.0%
Taylor expanded in z around inf 84.2%
mul-1-neg84.2%
associate-/l*86.7%
distribute-neg-frac86.7%
Simplified86.7%
Taylor expanded in x around 0 84.2%
mul-1-neg84.2%
associate-*r/86.7%
sub-neg86.7%
associate-*r/84.2%
associate-/l*86.7%
Simplified86.7%
associate-/r/86.3%
Applied egg-rr86.3%
Final simplification87.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -8e+59) (+ x y) (if (<= a 4.1e+15) (+ x (* y (/ z t))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8e+59) {
tmp = x + y;
} else if (a <= 4.1e+15) {
tmp = x + (y * (z / t));
} else {
tmp = x + 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 (a <= (-8d+59)) then
tmp = x + y
else if (a <= 4.1d+15) then
tmp = x + (y * (z / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8e+59) {
tmp = x + y;
} else if (a <= 4.1e+15) {
tmp = x + (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8e+59: tmp = x + y elif a <= 4.1e+15: tmp = x + (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8e+59) tmp = Float64(x + y); elseif (a <= 4.1e+15) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -8e+59) tmp = x + y; elseif (a <= 4.1e+15) tmp = x + (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8e+59], N[(x + y), $MachinePrecision], If[LessEqual[a, 4.1e+15], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{+59}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{+15}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -7.99999999999999977e59 or 4.1e15 < a Initial program 85.3%
+-commutative85.3%
associate--l+85.3%
sub-neg85.3%
distribute-frac-neg85.3%
*-commutative85.3%
distribute-rgt-neg-in85.3%
associate-/l*95.3%
sub-neg95.3%
distribute-neg-in95.3%
remove-double-neg95.3%
+-commutative95.3%
sub-neg95.3%
Simplified95.3%
Taylor expanded in a around inf 82.5%
+-commutative82.5%
Simplified82.5%
if -7.99999999999999977e59 < a < 4.1e15Initial program 70.4%
sub-neg70.4%
distribute-frac-neg70.4%
distribute-rgt-neg-out70.4%
associate-/l*72.8%
div-sub72.4%
associate-+r-72.4%
associate-/r/73.3%
distribute-rgt-neg-out73.3%
associate-/r/72.4%
distribute-frac-neg72.4%
associate-+l+72.4%
associate-+r-79.1%
distribute-frac-neg79.1%
Simplified79.5%
Taylor expanded in y around 0 91.6%
Taylor expanded in a around 0 76.5%
Final simplification79.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.2e+167) x (if (<= t 1.25e+189) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.2e+167) {
tmp = x;
} else if (t <= 1.25e+189) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-4.2d+167)) then
tmp = x
else if (t <= 1.25d+189) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.2e+167) {
tmp = x;
} else if (t <= 1.25e+189) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.2e+167: tmp = x elif t <= 1.25e+189: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.2e+167) tmp = x; elseif (t <= 1.25e+189) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.2e+167) tmp = x; elseif (t <= 1.25e+189) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.2e+167], x, If[LessEqual[t, 1.25e+189], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+167}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+189}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -4.1999999999999998e167 or 1.2500000000000001e189 < t Initial program 50.7%
+-commutative50.7%
associate--l+50.7%
sub-neg50.7%
distribute-frac-neg50.7%
*-commutative50.7%
distribute-rgt-neg-in50.7%
associate-/l*63.2%
sub-neg63.2%
distribute-neg-in63.2%
remove-double-neg63.2%
+-commutative63.2%
sub-neg63.2%
Simplified63.2%
Taylor expanded in y around 0 79.3%
if -4.1999999999999998e167 < t < 1.2500000000000001e189Initial program 83.8%
+-commutative83.8%
associate--l+83.8%
sub-neg83.8%
distribute-frac-neg83.8%
*-commutative83.8%
distribute-rgt-neg-in83.8%
associate-/l*87.6%
sub-neg87.6%
distribute-neg-in87.6%
remove-double-neg87.6%
+-commutative87.6%
sub-neg87.6%
Simplified87.6%
Taylor expanded in a around inf 61.9%
+-commutative61.9%
Simplified61.9%
Final simplification65.7%
(FPCore (x y z t a) :precision binary64 (if (<= x -5.5e-95) x (if (<= x 2.3e-48) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.5e-95) {
tmp = x;
} else if (x <= 2.3e-48) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-5.5d-95)) then
tmp = x
else if (x <= 2.3d-48) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.5e-95) {
tmp = x;
} else if (x <= 2.3e-48) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5.5e-95: tmp = x elif x <= 2.3e-48: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5.5e-95) tmp = x; elseif (x <= 2.3e-48) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -5.5e-95) tmp = x; elseif (x <= 2.3e-48) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5.5e-95], x, If[LessEqual[x, 2.3e-48], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{-95}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{-48}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -5.50000000000000003e-95 or 2.3000000000000001e-48 < x Initial program 81.5%
+-commutative81.5%
associate--l+81.5%
sub-neg81.5%
distribute-frac-neg81.5%
*-commutative81.5%
distribute-rgt-neg-in81.5%
associate-/l*86.8%
sub-neg86.8%
distribute-neg-in86.8%
remove-double-neg86.8%
+-commutative86.8%
sub-neg86.8%
Simplified86.8%
Taylor expanded in y around 0 70.6%
if -5.50000000000000003e-95 < x < 2.3000000000000001e-48Initial program 66.7%
+-commutative66.7%
associate--l+66.7%
sub-neg66.7%
distribute-frac-neg66.7%
*-commutative66.7%
distribute-rgt-neg-in66.7%
associate-/l*73.2%
sub-neg73.2%
distribute-neg-in73.2%
remove-double-neg73.2%
+-commutative73.2%
sub-neg73.2%
Simplified73.2%
Taylor expanded in t around 0 47.9%
mul-1-neg47.9%
sub-neg47.9%
associate--l+47.9%
+-commutative47.9%
Simplified47.9%
Taylor expanded in x around 0 42.6%
Taylor expanded in z around 0 36.5%
Final simplification58.9%
(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 76.4%
+-commutative76.4%
associate--l+76.4%
sub-neg76.4%
distribute-frac-neg76.4%
*-commutative76.4%
distribute-rgt-neg-in76.4%
associate-/l*82.2%
sub-neg82.2%
distribute-neg-in82.2%
remove-double-neg82.2%
+-commutative82.2%
sub-neg82.2%
Simplified82.2%
Taylor expanded in y around 0 51.0%
Final simplification51.0%
(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 2023271
(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))))