
(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 15 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 (+ (* y (- (+ 1.0 (/ t (- a t))) (/ z (- a t)))) x))
double code(double x, double y, double z, double t, double a) {
return (y * ((1.0 + (t / (a - t))) - (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 * ((1.0d0 + (t / (a - t))) - (z / (a - t)))) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (y * ((1.0 + (t / (a - t))) - (z / (a - t)))) + x;
}
def code(x, y, z, t, a): return (y * ((1.0 + (t / (a - t))) - (z / (a - t)))) + x
function code(x, y, z, t, a) return Float64(Float64(y * Float64(Float64(1.0 + Float64(t / Float64(a - t))) - Float64(z / Float64(a - t)))) + x) end
function tmp = code(x, y, z, t, a) tmp = (y * ((1.0 + (t / (a - t))) - (z / (a - t)))) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(y * N[(N[(1.0 + N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(\left(1 + \frac{t}{a - t}\right) - \frac{z}{a - t}\right) + x
\end{array}
Initial program 77.1%
associate--l+79.8%
sub-neg79.8%
+-commutative79.8%
associate-/l*88.6%
distribute-neg-frac88.6%
associate-/r/90.8%
fma-def90.8%
sub-neg90.8%
+-commutative90.8%
distribute-neg-in90.8%
unsub-neg90.8%
remove-double-neg90.8%
Simplified90.8%
Taylor expanded in y around 0 94.5%
Final simplification94.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.45e-235)
(+ x (+ y (/ (- t z) (/ (- a t) y))))
(if (<= a 19000000000000.0)
(- x (* y (/ z (- a t))))
(+ (+ y x) (* y (/ (- t z) (- a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.45e-235) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else if (a <= 19000000000000.0) {
tmp = x - (y * (z / (a - t)));
} else {
tmp = (y + x) + (y * ((t - z) / (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.45d-235)) then
tmp = x + (y + ((t - z) / ((a - t) / y)))
else if (a <= 19000000000000.0d0) then
tmp = x - (y * (z / (a - t)))
else
tmp = (y + x) + (y * ((t - z) / (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.45e-235) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else if (a <= 19000000000000.0) {
tmp = x - (y * (z / (a - t)));
} else {
tmp = (y + x) + (y * ((t - z) / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.45e-235: tmp = x + (y + ((t - z) / ((a - t) / y))) elif a <= 19000000000000.0: tmp = x - (y * (z / (a - t))) else: tmp = (y + x) + (y * ((t - z) / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.45e-235) tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); elseif (a <= 19000000000000.0) tmp = Float64(x - Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(Float64(y + x) + Float64(y * Float64(Float64(t - z) / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.45e-235) tmp = x + (y + ((t - z) / ((a - t) / y))); elseif (a <= 19000000000000.0) tmp = x - (y * (z / (a - t))); else tmp = (y + x) + (y * ((t - z) / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.45e-235], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 19000000000000.0], N[(x - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + x), $MachinePrecision] + N[(y * N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{-235}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\mathbf{elif}\;a \leq 19000000000000:\\
\;\;\;\;x - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;\left(y + x\right) + y \cdot \frac{t - z}{a - t}\\
\end{array}
\end{array}
if a < -1.45000000000000004e-235Initial program 79.2%
associate--l+80.2%
associate-/l*93.1%
Simplified93.1%
if -1.45000000000000004e-235 < a < 1.9e13Initial program 72.6%
associate--l+79.7%
sub-neg79.7%
+-commutative79.7%
associate-/l*81.2%
distribute-neg-frac81.2%
associate-/r/89.1%
fma-def89.0%
sub-neg89.0%
+-commutative89.0%
distribute-neg-in89.0%
unsub-neg89.0%
remove-double-neg89.0%
Simplified89.0%
Taylor expanded in y around 0 97.2%
Taylor expanded in t around inf 95.3%
if 1.9e13 < a Initial program 79.3%
associate-*l/91.7%
Simplified91.7%
Final simplification93.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.2e-21) (not (<= a 5.8e+19))) (+ x (- y (/ y (/ (- a t) z)))) (- x (/ (* y z) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.2e-21) || !(a <= 5.8e+19)) {
tmp = x + (y - (y / ((a - t) / z)));
} else {
tmp = x - ((y * z) / (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 <= (-6.2d-21)) .or. (.not. (a <= 5.8d+19))) then
tmp = x + (y - (y / ((a - t) / z)))
else
tmp = x - ((y * z) / (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 <= -6.2e-21) || !(a <= 5.8e+19)) {
tmp = x + (y - (y / ((a - t) / z)));
} else {
tmp = x - ((y * z) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6.2e-21) or not (a <= 5.8e+19): tmp = x + (y - (y / ((a - t) / z))) else: tmp = x - ((y * z) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6.2e-21) || !(a <= 5.8e+19)) tmp = Float64(x + Float64(y - Float64(y / Float64(Float64(a - t) / z)))); else tmp = Float64(x - Float64(Float64(y * z) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6.2e-21) || ~((a <= 5.8e+19))) tmp = x + (y - (y / ((a - t) / z))); else tmp = x - ((y * z) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.2e-21], N[Not[LessEqual[a, 5.8e+19]], $MachinePrecision]], N[(x + N[(y - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.2 \cdot 10^{-21} \lor \neg \left(a \leq 5.8 \cdot 10^{+19}\right):\\
\;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\end{array}
\end{array}
if a < -6.1999999999999997e-21 or 5.8e19 < a Initial program 79.0%
associate--l+79.1%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in z around inf 82.6%
associate-/l*92.8%
Simplified92.8%
if -6.1999999999999997e-21 < a < 5.8e19Initial program 75.0%
associate--l+80.6%
sub-neg80.6%
+-commutative80.6%
associate-/l*83.8%
distribute-neg-frac83.8%
associate-/r/86.8%
fma-def86.8%
sub-neg86.8%
+-commutative86.8%
distribute-neg-in86.8%
unsub-neg86.8%
remove-double-neg86.8%
Simplified86.8%
Taylor expanded in z around inf 90.9%
associate-*r/90.9%
associate-*r*90.9%
neg-mul-190.9%
Simplified90.9%
Final simplification91.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -7.5e-127)
(+ x (+ y (/ (- t z) (/ (- a t) y))))
(if (<= a 2200000000000.0)
(- x (/ (* y z) (- a t)))
(+ x (- y (/ y (/ (- a t) z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.5e-127) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else if (a <= 2200000000000.0) {
tmp = x - ((y * z) / (a - t));
} else {
tmp = x + (y - (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 <= (-7.5d-127)) then
tmp = x + (y + ((t - z) / ((a - t) / y)))
else if (a <= 2200000000000.0d0) then
tmp = x - ((y * z) / (a - t))
else
tmp = x + (y - (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 <= -7.5e-127) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else if (a <= 2200000000000.0) {
tmp = x - ((y * z) / (a - t));
} else {
tmp = x + (y - (y / ((a - t) / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.5e-127: tmp = x + (y + ((t - z) / ((a - t) / y))) elif a <= 2200000000000.0: tmp = x - ((y * z) / (a - t)) else: tmp = x + (y - (y / ((a - t) / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.5e-127) tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); elseif (a <= 2200000000000.0) tmp = Float64(x - Float64(Float64(y * z) / Float64(a - t))); else tmp = Float64(x + Float64(y - 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 <= -7.5e-127) tmp = x + (y + ((t - z) / ((a - t) / y))); elseif (a <= 2200000000000.0) tmp = x - ((y * z) / (a - t)); else tmp = x + (y - (y / ((a - t) / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.5e-127], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2200000000000.0], N[(x - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-127}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\mathbf{elif}\;a \leq 2200000000000:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z}}\right)\\
\end{array}
\end{array}
if a < -7.5000000000000004e-127Initial program 80.9%
associate--l+80.9%
associate-/l*95.3%
Simplified95.3%
if -7.5000000000000004e-127 < a < 2.2e12Initial program 73.2%
associate--l+79.3%
sub-neg79.3%
+-commutative79.3%
associate-/l*83.0%
distribute-neg-frac83.0%
associate-/r/87.1%
fma-def87.1%
sub-neg87.1%
+-commutative87.1%
distribute-neg-in87.1%
unsub-neg87.1%
remove-double-neg87.1%
Simplified87.1%
Taylor expanded in z around inf 91.5%
associate-*r/91.5%
associate-*r*91.5%
neg-mul-191.5%
Simplified91.5%
if 2.2e12 < a Initial program 79.3%
associate--l+79.2%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in z around inf 83.7%
associate-/l*91.0%
Simplified91.0%
Final simplification92.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.75e-235)
(+ x (+ y (/ (- t z) (/ (- a t) y))))
(if (<= a 3.4e+15)
(- x (* y (/ z (- a t))))
(+ x (- y (/ y (/ (- a t) z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.75e-235) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else if (a <= 3.4e+15) {
tmp = x - (y * (z / (a - t)));
} else {
tmp = x + (y - (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 <= (-2.75d-235)) then
tmp = x + (y + ((t - z) / ((a - t) / y)))
else if (a <= 3.4d+15) then
tmp = x - (y * (z / (a - t)))
else
tmp = x + (y - (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 <= -2.75e-235) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else if (a <= 3.4e+15) {
tmp = x - (y * (z / (a - t)));
} else {
tmp = x + (y - (y / ((a - t) / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.75e-235: tmp = x + (y + ((t - z) / ((a - t) / y))) elif a <= 3.4e+15: tmp = x - (y * (z / (a - t))) else: tmp = x + (y - (y / ((a - t) / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.75e-235) tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); elseif (a <= 3.4e+15) tmp = Float64(x - Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(x + Float64(y - 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 <= -2.75e-235) tmp = x + (y + ((t - z) / ((a - t) / y))); elseif (a <= 3.4e+15) tmp = x - (y * (z / (a - t))); else tmp = x + (y - (y / ((a - t) / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.75e-235], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e+15], N[(x - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.75 \cdot 10^{-235}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{+15}:\\
\;\;\;\;x - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z}}\right)\\
\end{array}
\end{array}
if a < -2.7499999999999999e-235Initial program 79.2%
associate--l+80.2%
associate-/l*93.1%
Simplified93.1%
if -2.7499999999999999e-235 < a < 3.4e15Initial program 72.6%
associate--l+79.7%
sub-neg79.7%
+-commutative79.7%
associate-/l*81.2%
distribute-neg-frac81.2%
associate-/r/89.1%
fma-def89.0%
sub-neg89.0%
+-commutative89.0%
distribute-neg-in89.0%
unsub-neg89.0%
remove-double-neg89.0%
Simplified89.0%
Taylor expanded in y around 0 97.2%
Taylor expanded in t around inf 95.3%
if 3.4e15 < a Initial program 79.3%
associate--l+79.2%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in z around inf 83.7%
associate-/l*91.0%
Simplified91.0%
Final simplification93.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.5e-119) (not (<= a 4.5e+26))) (+ y (- x (/ y (/ a z)))) (+ x (/ y (/ t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.5e-119) || !(a <= 4.5e+26)) {
tmp = y + (x - (y / (a / z)));
} else {
tmp = x + (y / (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.5d-119)) .or. (.not. (a <= 4.5d+26))) then
tmp = y + (x - (y / (a / z)))
else
tmp = x + (y / (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.5e-119) || !(a <= 4.5e+26)) {
tmp = y + (x - (y / (a / z)));
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.5e-119) or not (a <= 4.5e+26): tmp = y + (x - (y / (a / z))) else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.5e-119) || !(a <= 4.5e+26)) tmp = Float64(y + Float64(x - Float64(y / Float64(a / z)))); else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.5e-119) || ~((a <= 4.5e+26))) tmp = y + (x - (y / (a / z))); else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.5e-119], N[Not[LessEqual[a, 4.5e+26]], $MachinePrecision]], N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{-119} \lor \neg \left(a \leq 4.5 \cdot 10^{+26}\right):\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if a < -1.5000000000000001e-119 or 4.49999999999999978e26 < a Initial program 79.7%
associate--l+79.7%
sub-neg79.7%
+-commutative79.7%
associate-/l*92.8%
distribute-neg-frac92.8%
associate-/r/93.5%
fma-def93.5%
sub-neg93.5%
+-commutative93.5%
distribute-neg-in93.5%
unsub-neg93.5%
remove-double-neg93.5%
Simplified93.5%
Taylor expanded in t around 0 80.9%
mul-1-neg80.9%
sub-neg80.9%
associate-/l*88.8%
Simplified88.8%
if -1.5000000000000001e-119 < a < 4.49999999999999978e26Initial program 73.9%
associate--l+79.8%
sub-neg79.8%
+-commutative79.8%
associate-/l*83.4%
distribute-neg-frac83.4%
associate-/r/87.5%
fma-def87.4%
sub-neg87.4%
+-commutative87.4%
distribute-neg-in87.4%
unsub-neg87.4%
remove-double-neg87.4%
Simplified87.4%
Taylor expanded in y around 0 94.0%
Taylor expanded in a around 0 80.2%
associate-/l*82.3%
Simplified82.3%
Final simplification85.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.26e-120) (not (<= a 4.3e+27))) (+ y (- x (/ y (/ a z)))) (- x (/ y (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.26e-120) || !(a <= 4.3e+27)) {
tmp = y + (x - (y / (a / z)));
} else {
tmp = x - (y / (t / (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.26d-120)) .or. (.not. (a <= 4.3d+27))) then
tmp = y + (x - (y / (a / z)))
else
tmp = x - (y / (t / (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.26e-120) || !(a <= 4.3e+27)) {
tmp = y + (x - (y / (a / z)));
} else {
tmp = x - (y / (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.26e-120) or not (a <= 4.3e+27): tmp = y + (x - (y / (a / z))) else: tmp = x - (y / (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.26e-120) || !(a <= 4.3e+27)) tmp = Float64(y + Float64(x - Float64(y / Float64(a / z)))); else tmp = Float64(x - Float64(y / Float64(t / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.26e-120) || ~((a <= 4.3e+27))) tmp = y + (x - (y / (a / z))); else tmp = x - (y / (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.26e-120], N[Not[LessEqual[a, 4.3e+27]], $MachinePrecision]], N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.26 \cdot 10^{-120} \lor \neg \left(a \leq 4.3 \cdot 10^{+27}\right):\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\
\end{array}
\end{array}
if a < -1.25999999999999992e-120 or 4.30000000000000008e27 < a Initial program 80.3%
associate--l+80.3%
sub-neg80.3%
+-commutative80.3%
associate-/l*93.5%
distribute-neg-frac93.5%
associate-/r/94.1%
fma-def94.2%
sub-neg94.2%
+-commutative94.2%
distribute-neg-in94.2%
unsub-neg94.2%
remove-double-neg94.2%
Simplified94.2%
Taylor expanded in t around 0 81.4%
mul-1-neg81.4%
sub-neg81.4%
associate-/l*89.4%
Simplified89.4%
if -1.25999999999999992e-120 < a < 4.30000000000000008e27Initial program 73.3%
associate--l+79.2%
sub-neg79.2%
+-commutative79.2%
associate-/l*82.7%
distribute-neg-frac82.7%
associate-/r/86.7%
fma-def86.7%
sub-neg86.7%
+-commutative86.7%
distribute-neg-in86.7%
unsub-neg86.7%
remove-double-neg86.7%
Simplified86.7%
Taylor expanded in y around 0 93.2%
Taylor expanded in t around inf 82.3%
fma-def82.3%
+-commutative82.3%
mul-1-neg82.3%
sub-neg82.3%
*-commutative82.3%
fma-def82.3%
+-commutative82.3%
mul-1-neg82.3%
unsub-neg82.3%
associate-/l*83.6%
Simplified83.6%
Final simplification86.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.5e-119) (- (+ y x) (* y (/ z a))) (if (<= a 5.8e+26) (- x (/ y (/ t (- a z)))) (+ y (- x (/ y (/ a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.5e-119) {
tmp = (y + x) - (y * (z / a));
} else if (a <= 5.8e+26) {
tmp = x - (y / (t / (a - 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.5d-119)) then
tmp = (y + x) - (y * (z / a))
else if (a <= 5.8d+26) then
tmp = x - (y / (t / (a - 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.5e-119) {
tmp = (y + x) - (y * (z / a));
} else if (a <= 5.8e+26) {
tmp = x - (y / (t / (a - z)));
} else {
tmp = y + (x - (y / (a / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.5e-119: tmp = (y + x) - (y * (z / a)) elif a <= 5.8e+26: tmp = x - (y / (t / (a - z))) else: tmp = y + (x - (y / (a / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.5e-119) tmp = Float64(Float64(y + x) - Float64(y * Float64(z / a))); elseif (a <= 5.8e+26) tmp = Float64(x - Float64(y / Float64(t / Float64(a - z)))); 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 (a <= -1.5e-119) tmp = (y + x) - (y * (z / a)); elseif (a <= 5.8e+26) tmp = x - (y / (t / (a - z))); else tmp = y + (x - (y / (a / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.5e-119], N[(N[(y + x), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.8e+26], N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $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.5 \cdot 10^{-119}:\\
\;\;\;\;\left(y + x\right) - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{+26}:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\
\mathbf{else}:\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\end{array}
\end{array}
if a < -1.5000000000000001e-119Initial program 80.9%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in t around 0 88.5%
if -1.5000000000000001e-119 < a < 5.8e26Initial program 73.3%
associate--l+79.2%
sub-neg79.2%
+-commutative79.2%
associate-/l*82.7%
distribute-neg-frac82.7%
associate-/r/86.7%
fma-def86.7%
sub-neg86.7%
+-commutative86.7%
distribute-neg-in86.7%
unsub-neg86.7%
remove-double-neg86.7%
Simplified86.7%
Taylor expanded in y around 0 93.2%
Taylor expanded in t around inf 82.3%
fma-def82.3%
+-commutative82.3%
mul-1-neg82.3%
sub-neg82.3%
*-commutative82.3%
fma-def82.3%
+-commutative82.3%
mul-1-neg82.3%
unsub-neg82.3%
associate-/l*83.6%
Simplified83.6%
if 5.8e26 < a Initial program 79.5%
associate--l+79.5%
sub-neg79.5%
+-commutative79.5%
associate-/l*91.1%
distribute-neg-frac91.1%
associate-/r/92.7%
fma-def92.7%
sub-neg92.7%
+-commutative92.7%
distribute-neg-in92.7%
unsub-neg92.7%
remove-double-neg92.7%
Simplified92.7%
Taylor expanded in t around 0 82.6%
mul-1-neg82.6%
sub-neg82.6%
associate-/l*90.5%
Simplified90.5%
Final simplification86.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.5e-119) (- (+ y x) (* y (/ z a))) (if (<= a 4.7e+26) (- x (/ y (/ t (- a z)))) (- (+ y x) (/ z (/ a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.5e-119) {
tmp = (y + x) - (y * (z / a));
} else if (a <= 4.7e+26) {
tmp = x - (y / (t / (a - z)));
} else {
tmp = (y + x) - (z / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.5d-119)) then
tmp = (y + x) - (y * (z / a))
else if (a <= 4.7d+26) then
tmp = x - (y / (t / (a - z)))
else
tmp = (y + x) - (z / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.5e-119) {
tmp = (y + x) - (y * (z / a));
} else if (a <= 4.7e+26) {
tmp = x - (y / (t / (a - z)));
} else {
tmp = (y + x) - (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.5e-119: tmp = (y + x) - (y * (z / a)) elif a <= 4.7e+26: tmp = x - (y / (t / (a - z))) else: tmp = (y + x) - (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.5e-119) tmp = Float64(Float64(y + x) - Float64(y * Float64(z / a))); elseif (a <= 4.7e+26) tmp = Float64(x - Float64(y / Float64(t / Float64(a - z)))); else tmp = Float64(Float64(y + x) - Float64(z / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.5e-119) tmp = (y + x) - (y * (z / a)); elseif (a <= 4.7e+26) tmp = x - (y / (t / (a - z))); else tmp = (y + x) - (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.5e-119], N[(N[(y + x), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.7e+26], N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + x), $MachinePrecision] - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{-119}:\\
\;\;\;\;\left(y + x\right) - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq 4.7 \cdot 10^{+26}:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\
\mathbf{else}:\\
\;\;\;\;\left(y + x\right) - \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if a < -1.5000000000000001e-119Initial program 80.9%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in t around 0 88.5%
if -1.5000000000000001e-119 < a < 4.6999999999999998e26Initial program 73.3%
associate--l+79.2%
sub-neg79.2%
+-commutative79.2%
associate-/l*82.7%
distribute-neg-frac82.7%
associate-/r/86.7%
fma-def86.7%
sub-neg86.7%
+-commutative86.7%
distribute-neg-in86.7%
unsub-neg86.7%
remove-double-neg86.7%
Simplified86.7%
Taylor expanded in y around 0 93.2%
Taylor expanded in t around inf 82.3%
fma-def82.3%
+-commutative82.3%
mul-1-neg82.3%
sub-neg82.3%
*-commutative82.3%
fma-def82.3%
+-commutative82.3%
mul-1-neg82.3%
unsub-neg82.3%
associate-/l*83.6%
Simplified83.6%
if 4.6999999999999998e26 < a Initial program 79.5%
associate-*l/92.7%
Simplified92.7%
Taylor expanded in z around inf 91.9%
Taylor expanded in a around inf 82.6%
*-commutative82.6%
associate-/l*90.5%
Simplified90.5%
Final simplification86.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.6) (+ y (- x (/ y (/ a z)))) (if (<= a 4.5e+26) (- x (/ (* y z) (- a t))) (- (+ y x) (/ z (/ a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.6) {
tmp = y + (x - (y / (a / z)));
} else if (a <= 4.5e+26) {
tmp = x - ((y * z) / (a - t));
} else {
tmp = (y + x) - (z / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.6d0)) then
tmp = y + (x - (y / (a / z)))
else if (a <= 4.5d+26) then
tmp = x - ((y * z) / (a - t))
else
tmp = (y + x) - (z / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.6) {
tmp = y + (x - (y / (a / z)));
} else if (a <= 4.5e+26) {
tmp = x - ((y * z) / (a - t));
} else {
tmp = (y + x) - (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.6: tmp = y + (x - (y / (a / z))) elif a <= 4.5e+26: tmp = x - ((y * z) / (a - t)) else: tmp = (y + x) - (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.6) tmp = Float64(y + Float64(x - Float64(y / Float64(a / z)))); elseif (a <= 4.5e+26) tmp = Float64(x - Float64(Float64(y * z) / Float64(a - t))); else tmp = Float64(Float64(y + x) - Float64(z / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.6) tmp = y + (x - (y / (a / z))); elseif (a <= 4.5e+26) tmp = x - ((y * z) / (a - t)); else tmp = (y + x) - (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.6], N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e+26], N[(x - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + x), $MachinePrecision] - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6:\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{+26}:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;\left(y + x\right) - \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if a < -2.60000000000000009Initial program 78.8%
associate--l+78.9%
sub-neg78.9%
+-commutative78.9%
associate-/l*96.0%
distribute-neg-frac96.0%
associate-/r/97.4%
fma-def97.4%
sub-neg97.4%
+-commutative97.4%
distribute-neg-in97.4%
unsub-neg97.4%
remove-double-neg97.4%
Simplified97.4%
Taylor expanded in t around 0 80.2%
mul-1-neg80.2%
sub-neg80.2%
associate-/l*91.1%
Simplified91.1%
if -2.60000000000000009 < a < 4.49999999999999978e26Initial program 75.6%
associate--l+81.0%
sub-neg81.0%
+-commutative81.0%
associate-/l*84.2%
distribute-neg-frac84.2%
associate-/r/87.1%
fma-def87.1%
sub-neg87.1%
+-commutative87.1%
distribute-neg-in87.1%
unsub-neg87.1%
remove-double-neg87.1%
Simplified87.1%
Taylor expanded in z around inf 90.3%
associate-*r/90.3%
associate-*r*90.3%
neg-mul-190.3%
Simplified90.3%
if 4.49999999999999978e26 < a Initial program 78.2%
associate-*l/91.3%
Simplified91.3%
Taylor expanded in z around inf 90.5%
Taylor expanded in a around inf 81.4%
*-commutative81.4%
associate-/l*89.1%
Simplified89.1%
Final simplification90.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -0.00024) (not (<= a 2.25e+74))) (+ y x) (+ x (/ y (/ t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -0.00024) || !(a <= 2.25e+74)) {
tmp = y + x;
} else {
tmp = x + (y / (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 <= (-0.00024d0)) .or. (.not. (a <= 2.25d+74))) then
tmp = y + x
else
tmp = x + (y / (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 <= -0.00024) || !(a <= 2.25e+74)) {
tmp = y + x;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -0.00024) or not (a <= 2.25e+74): tmp = y + x else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -0.00024) || !(a <= 2.25e+74)) tmp = Float64(y + x); else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -0.00024) || ~((a <= 2.25e+74))) tmp = y + x; else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -0.00024], N[Not[LessEqual[a, 2.25e+74]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.00024 \lor \neg \left(a \leq 2.25 \cdot 10^{+74}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if a < -2.40000000000000006e-4 or 2.25e74 < a Initial program 78.9%
associate--l+78.9%
sub-neg78.9%
+-commutative78.9%
associate-/l*94.2%
distribute-neg-frac94.2%
associate-/r/95.7%
fma-def95.7%
sub-neg95.7%
+-commutative95.7%
distribute-neg-in95.7%
unsub-neg95.7%
remove-double-neg95.7%
Simplified95.7%
Taylor expanded in a around inf 83.3%
if -2.40000000000000006e-4 < a < 2.25e74Initial program 75.5%
associate--l+80.5%
sub-neg80.5%
+-commutative80.5%
associate-/l*83.5%
distribute-neg-frac83.5%
associate-/r/86.3%
fma-def86.3%
sub-neg86.3%
+-commutative86.3%
distribute-neg-in86.3%
unsub-neg86.3%
remove-double-neg86.3%
Simplified86.3%
Taylor expanded in y around 0 92.7%
Taylor expanded in a around 0 75.7%
associate-/l*78.2%
Simplified78.2%
Final simplification80.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.15e-163) (+ y x) (if (<= a 2.8e-184) (* z (/ y t)) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.15e-163) {
tmp = y + x;
} else if (a <= 2.8e-184) {
tmp = 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) :: tmp
if (a <= (-1.15d-163)) then
tmp = y + x
else if (a <= 2.8d-184) then
tmp = 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 tmp;
if (a <= -1.15e-163) {
tmp = y + x;
} else if (a <= 2.8e-184) {
tmp = z * (y / t);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.15e-163: tmp = y + x elif a <= 2.8e-184: tmp = z * (y / t) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.15e-163) tmp = Float64(y + x); elseif (a <= 2.8e-184) tmp = Float64(z * Float64(y / 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.15e-163) tmp = y + x; elseif (a <= 2.8e-184) tmp = z * (y / t); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.15e-163], N[(y + x), $MachinePrecision], If[LessEqual[a, 2.8e-184], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{-163}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-184}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -1.15e-163 or 2.7999999999999998e-184 < a Initial program 77.5%
associate--l+80.2%
sub-neg80.2%
+-commutative80.2%
associate-/l*90.0%
distribute-neg-frac90.0%
associate-/r/92.5%
fma-def92.5%
sub-neg92.5%
+-commutative92.5%
distribute-neg-in92.5%
unsub-neg92.5%
remove-double-neg92.5%
Simplified92.5%
Taylor expanded in a around inf 71.0%
if -1.15e-163 < a < 2.7999999999999998e-184Initial program 75.9%
associate--l+78.7%
sub-neg78.7%
+-commutative78.7%
associate-/l*84.6%
distribute-neg-frac84.6%
associate-/r/86.0%
fma-def86.0%
sub-neg86.0%
+-commutative86.0%
distribute-neg-in86.0%
unsub-neg86.0%
remove-double-neg86.0%
Simplified86.0%
Taylor expanded in y around 0 93.1%
Taylor expanded in t around inf 84.4%
fma-def84.4%
+-commutative84.4%
mul-1-neg84.4%
sub-neg84.4%
*-commutative84.4%
fma-def84.4%
+-commutative84.4%
mul-1-neg84.4%
unsub-neg84.4%
associate-/l*83.9%
Simplified83.9%
Taylor expanded in z around inf 50.7%
associate-/l*52.3%
Simplified52.3%
associate-/r/52.8%
Applied egg-rr52.8%
Final simplification66.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.2e-119) (+ y x) (if (<= a 6.8e+18) x (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.2e-119) {
tmp = y + x;
} else if (a <= 6.8e+18) {
tmp = x;
} 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.2d-119)) then
tmp = y + x
else if (a <= 6.8d+18) then
tmp = x
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.2e-119) {
tmp = y + x;
} else if (a <= 6.8e+18) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.2e-119: tmp = y + x elif a <= 6.8e+18: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.2e-119) tmp = Float64(y + x); elseif (a <= 6.8e+18) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.2e-119) tmp = y + x; elseif (a <= 6.8e+18) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.2e-119], N[(y + x), $MachinePrecision], If[LessEqual[a, 6.8e+18], x, N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{-119}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{+18}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -1.20000000000000004e-119 or 6.8e18 < a Initial program 80.2%
associate--l+80.2%
sub-neg80.2%
+-commutative80.2%
associate-/l*93.0%
distribute-neg-frac93.0%
associate-/r/93.6%
fma-def93.6%
sub-neg93.6%
+-commutative93.6%
distribute-neg-in93.6%
unsub-neg93.6%
remove-double-neg93.6%
Simplified93.6%
Taylor expanded in a around inf 77.1%
if -1.20000000000000004e-119 < a < 6.8e18Initial program 73.2%
associate--l+79.3%
sub-neg79.3%
+-commutative79.3%
associate-/l*83.0%
distribute-neg-frac83.0%
associate-/r/87.1%
fma-def87.1%
sub-neg87.1%
+-commutative87.1%
distribute-neg-in87.1%
unsub-neg87.1%
remove-double-neg87.1%
Simplified87.1%
Taylor expanded in x around inf 45.4%
Final simplification63.1%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.5e+122) y (if (<= y 5.4e+120) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.5e+122) {
tmp = y;
} else if (y <= 5.4e+120) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.5d+122)) then
tmp = y
else if (y <= 5.4d+120) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.5e+122) {
tmp = y;
} else if (y <= 5.4e+120) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.5e+122: tmp = y elif y <= 5.4e+120: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.5e+122) tmp = y; elseif (y <= 5.4e+120) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.5e+122) tmp = y; elseif (y <= 5.4e+120) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.5e+122], y, If[LessEqual[y, 5.4e+120], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+122}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+120}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.49999999999999993e122 or 5.3999999999999999e120 < y Initial program 61.4%
associate-*l/84.2%
Simplified84.2%
Taylor expanded in z around inf 81.4%
Taylor expanded in x around 0 60.7%
associate-*r/70.7%
Simplified70.7%
Taylor expanded in z around 0 33.4%
if -1.49999999999999993e122 < y < 5.3999999999999999e120Initial program 84.9%
associate--l+88.9%
sub-neg88.9%
+-commutative88.9%
associate-/l*90.8%
distribute-neg-frac90.8%
associate-/r/92.9%
fma-def92.9%
sub-neg92.9%
+-commutative92.9%
distribute-neg-in92.9%
unsub-neg92.9%
remove-double-neg92.9%
Simplified92.9%
Taylor expanded in x around inf 63.7%
Final simplification53.6%
(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+79.8%
sub-neg79.8%
+-commutative79.8%
associate-/l*88.6%
distribute-neg-frac88.6%
associate-/r/90.8%
fma-def90.8%
sub-neg90.8%
+-commutative90.8%
distribute-neg-in90.8%
unsub-neg90.8%
remove-double-neg90.8%
Simplified90.8%
Taylor expanded in x around inf 47.9%
Final simplification47.9%
(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 2023195
(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))))