
(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 13 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
(let* ((t_1 (- (+ x y) (/ (* y (- z t)) (- a t)))))
(if (<= t_1 -1e-270)
(- (+ x y) (* (- z t) (/ y (- a t))))
(if (<= t_1 0.0)
(* y (- (+ (/ x y) (/ z t)) (/ a t)))
(if (<= t_1 4e+305)
t_1
(* z (+ (/ (+ (+ x y) (* y (/ t (- a t)))) z) (/ y (- t a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - ((y * (z - t)) / (a - t));
double tmp;
if (t_1 <= -1e-270) {
tmp = (x + y) - ((z - t) * (y / (a - t)));
} else if (t_1 <= 0.0) {
tmp = y * (((x / y) + (z / t)) - (a / t));
} else if (t_1 <= 4e+305) {
tmp = t_1;
} else {
tmp = z * ((((x + y) + (y * (t / (a - t)))) / z) + (y / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (x + y) - ((y * (z - t)) / (a - t))
if (t_1 <= (-1d-270)) then
tmp = (x + y) - ((z - t) * (y / (a - t)))
else if (t_1 <= 0.0d0) then
tmp = y * (((x / y) + (z / t)) - (a / t))
else if (t_1 <= 4d+305) then
tmp = t_1
else
tmp = z * ((((x + y) + (y * (t / (a - t)))) / z) + (y / (t - a)))
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) - ((y * (z - t)) / (a - t));
double tmp;
if (t_1 <= -1e-270) {
tmp = (x + y) - ((z - t) * (y / (a - t)));
} else if (t_1 <= 0.0) {
tmp = y * (((x / y) + (z / t)) - (a / t));
} else if (t_1 <= 4e+305) {
tmp = t_1;
} else {
tmp = z * ((((x + y) + (y * (t / (a - t)))) / z) + (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - ((y * (z - t)) / (a - t)) tmp = 0 if t_1 <= -1e-270: tmp = (x + y) - ((z - t) * (y / (a - t))) elif t_1 <= 0.0: tmp = y * (((x / y) + (z / t)) - (a / t)) elif t_1 <= 4e+305: tmp = t_1 else: tmp = z * ((((x + y) + (y * (t / (a - t)))) / z) + (y / (t - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(Float64(y * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_1 <= -1e-270) tmp = Float64(Float64(x + y) - Float64(Float64(z - t) * Float64(y / Float64(a - t)))); elseif (t_1 <= 0.0) tmp = Float64(y * Float64(Float64(Float64(x / y) + Float64(z / t)) - Float64(a / t))); elseif (t_1 <= 4e+305) tmp = t_1; else tmp = Float64(z * Float64(Float64(Float64(Float64(x + y) + Float64(y * Float64(t / Float64(a - t)))) / z) + Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - ((y * (z - t)) / (a - t)); tmp = 0.0; if (t_1 <= -1e-270) tmp = (x + y) - ((z - t) * (y / (a - t))); elseif (t_1 <= 0.0) tmp = y * (((x / y) + (z / t)) - (a / t)); elseif (t_1 <= 4e+305) tmp = t_1; else tmp = z * ((((x + y) + (y * (t / (a - t)))) / z) + (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-270], N[(N[(x + y), $MachinePrecision] - N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(y * N[(N[(N[(x / y), $MachinePrecision] + N[(z / t), $MachinePrecision]), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+305], t$95$1, N[(z * N[(N[(N[(N[(x + y), $MachinePrecision] + N[(y * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-270}:\\
\;\;\;\;\left(x + y\right) - \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;y \cdot \left(\left(\frac{x}{y} + \frac{z}{t}\right) - \frac{a}{t}\right)\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+305}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{\left(x + y\right) + y \cdot \frac{t}{a - t}}{z} + \frac{y}{t - a}\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1e-270Initial program 86.8%
associate-/l*92.4%
*-commutative92.4%
Applied egg-rr92.4%
if -1e-270 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 4.4%
Taylor expanded in t around inf 99.8%
sub-neg99.8%
mul-1-neg99.8%
unsub-neg99.8%
associate-/l*95.3%
mul-1-neg95.3%
remove-double-neg95.3%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in y around inf 100.0%
if 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 3.9999999999999998e305Initial program 99.3%
if 3.9999999999999998e305 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 45.9%
Taylor expanded in z around -inf 56.8%
Simplified86.5%
Final simplification94.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
(if (<= t_1 -1e-270)
(+ (+ x y) (* (- z t) (/ y (- t a))))
(if (or (<= t_1 0.0) (not (<= t_1 4e+305)))
(* y (- (+ (/ x y) (/ z t)) (/ a t)))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if (t_1 <= -1e-270) {
tmp = (x + y) + ((z - t) * (y / (t - a)));
} else if ((t_1 <= 0.0) || !(t_1 <= 4e+305)) {
tmp = y * (((x / y) + (z / 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) :: tmp
t_1 = (x + y) + ((y * (z - t)) / (t - a))
if (t_1 <= (-1d-270)) then
tmp = (x + y) + ((z - t) * (y / (t - a)))
else if ((t_1 <= 0.0d0) .or. (.not. (t_1 <= 4d+305))) then
tmp = y * (((x / y) + (z / 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 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if (t_1 <= -1e-270) {
tmp = (x + y) + ((z - t) * (y / (t - a)));
} else if ((t_1 <= 0.0) || !(t_1 <= 4e+305)) {
tmp = y * (((x / y) + (z / t)) - (a / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) + ((y * (z - t)) / (t - a)) tmp = 0 if t_1 <= -1e-270: tmp = (x + y) + ((z - t) * (y / (t - a))) elif (t_1 <= 0.0) or not (t_1 <= 4e+305): tmp = y * (((x / y) + (z / t)) - (a / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) + Float64(Float64(y * Float64(z - t)) / Float64(t - a))) tmp = 0.0 if (t_1 <= -1e-270) tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a)))); elseif ((t_1 <= 0.0) || !(t_1 <= 4e+305)) tmp = Float64(y * Float64(Float64(Float64(x / y) + Float64(z / t)) - Float64(a / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) + ((y * (z - t)) / (t - a)); tmp = 0.0; if (t_1 <= -1e-270) tmp = (x + y) + ((z - t) * (y / (t - a))); elseif ((t_1 <= 0.0) || ~((t_1 <= 4e+305))) tmp = y * (((x / y) + (z / t)) - (a / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-270], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 0.0], N[Not[LessEqual[t$95$1, 4e+305]], $MachinePrecision]], N[(y * N[(N[(N[(x / y), $MachinePrecision] + N[(z / t), $MachinePrecision]), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + \frac{y \cdot \left(z - t\right)}{t - a}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-270}:\\
\;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\
\mathbf{elif}\;t\_1 \leq 0 \lor \neg \left(t\_1 \leq 4 \cdot 10^{+305}\right):\\
\;\;\;\;y \cdot \left(\left(\frac{x}{y} + \frac{z}{t}\right) - \frac{a}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1e-270Initial program 86.8%
associate-/l*92.4%
*-commutative92.4%
Applied egg-rr92.4%
if -1e-270 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0 or 3.9999999999999998e305 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 26.9%
Taylor expanded in t around inf 72.2%
sub-neg72.2%
mul-1-neg72.2%
unsub-neg72.2%
associate-/l*69.7%
mul-1-neg69.7%
remove-double-neg69.7%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in y around inf 88.5%
if 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 3.9999999999999998e305Initial program 99.3%
Final simplification94.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- t a)))))
(if (<= a -1.26e-23)
(+ x y)
(if (<= a -4e-226)
t_1
(if (<= a 1.9e-305) x (if (<= a 5.2e-69) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / (t - a));
double tmp;
if (a <= -1.26e-23) {
tmp = x + y;
} else if (a <= -4e-226) {
tmp = t_1;
} else if (a <= 1.9e-305) {
tmp = x;
} else if (a <= 5.2e-69) {
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 = z * (y / (t - a))
if (a <= (-1.26d-23)) then
tmp = x + y
else if (a <= (-4d-226)) then
tmp = t_1
else if (a <= 1.9d-305) then
tmp = x
else if (a <= 5.2d-69) 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 = z * (y / (t - a));
double tmp;
if (a <= -1.26e-23) {
tmp = x + y;
} else if (a <= -4e-226) {
tmp = t_1;
} else if (a <= 1.9e-305) {
tmp = x;
} else if (a <= 5.2e-69) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / (t - a)) tmp = 0 if a <= -1.26e-23: tmp = x + y elif a <= -4e-226: tmp = t_1 elif a <= 1.9e-305: tmp = x elif a <= 5.2e-69: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(t - a))) tmp = 0.0 if (a <= -1.26e-23) tmp = Float64(x + y); elseif (a <= -4e-226) tmp = t_1; elseif (a <= 1.9e-305) tmp = x; elseif (a <= 5.2e-69) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / (t - a)); tmp = 0.0; if (a <= -1.26e-23) tmp = x + y; elseif (a <= -4e-226) tmp = t_1; elseif (a <= 1.9e-305) tmp = x; elseif (a <= 5.2e-69) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.26e-23], N[(x + y), $MachinePrecision], If[LessEqual[a, -4e-226], t$95$1, If[LessEqual[a, 1.9e-305], x, If[LessEqual[a, 5.2e-69], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{t - a}\\
\mathbf{if}\;a \leq -1.26 \cdot 10^{-23}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-305}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.25999999999999996e-23 or 5.2000000000000004e-69 < a Initial program 84.4%
Taylor expanded in a around inf 76.1%
+-commutative76.1%
Simplified76.1%
if -1.25999999999999996e-23 < a < -3.99999999999999969e-226 or 1.9e-305 < a < 5.2000000000000004e-69Initial program 74.8%
Taylor expanded in z around inf 52.4%
mul-1-neg52.4%
distribute-neg-frac252.4%
sub-neg52.4%
distribute-neg-in52.4%
remove-double-neg52.4%
+-commutative52.4%
sub-neg52.4%
associate-/l*56.7%
Simplified56.7%
clear-num56.5%
inv-pow56.5%
Applied egg-rr56.5%
unpow-156.5%
Simplified56.5%
un-div-inv56.6%
Applied egg-rr56.6%
associate-/r/57.7%
Simplified57.7%
if -3.99999999999999969e-226 < a < 1.9e-305Initial program 73.0%
Taylor expanded in x around inf 82.7%
Final simplification70.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- t a)))))
(if (<= a -5.1e-24)
(+ x y)
(if (<= a -1.65e-226)
t_1
(if (<= a 1.9e-306) x (if (<= a 1.3e-67) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (t - a));
double tmp;
if (a <= -5.1e-24) {
tmp = x + y;
} else if (a <= -1.65e-226) {
tmp = t_1;
} else if (a <= 1.9e-306) {
tmp = x;
} else if (a <= 1.3e-67) {
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 = y * (z / (t - a))
if (a <= (-5.1d-24)) then
tmp = x + y
else if (a <= (-1.65d-226)) then
tmp = t_1
else if (a <= 1.9d-306) then
tmp = x
else if (a <= 1.3d-67) 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 = y * (z / (t - a));
double tmp;
if (a <= -5.1e-24) {
tmp = x + y;
} else if (a <= -1.65e-226) {
tmp = t_1;
} else if (a <= 1.9e-306) {
tmp = x;
} else if (a <= 1.3e-67) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / (t - a)) tmp = 0 if a <= -5.1e-24: tmp = x + y elif a <= -1.65e-226: tmp = t_1 elif a <= 1.9e-306: tmp = x elif a <= 1.3e-67: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(t - a))) tmp = 0.0 if (a <= -5.1e-24) tmp = Float64(x + y); elseif (a <= -1.65e-226) tmp = t_1; elseif (a <= 1.9e-306) tmp = x; elseif (a <= 1.3e-67) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / (t - a)); tmp = 0.0; if (a <= -5.1e-24) tmp = x + y; elseif (a <= -1.65e-226) tmp = t_1; elseif (a <= 1.9e-306) tmp = x; elseif (a <= 1.3e-67) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.1e-24], N[(x + y), $MachinePrecision], If[LessEqual[a, -1.65e-226], t$95$1, If[LessEqual[a, 1.9e-306], x, If[LessEqual[a, 1.3e-67], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t - a}\\
\mathbf{if}\;a \leq -5.1 \cdot 10^{-24}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -1.65 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-306}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-67}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -5.10000000000000025e-24 or 1.2999999999999999e-67 < a Initial program 84.4%
Taylor expanded in a around inf 76.1%
+-commutative76.1%
Simplified76.1%
if -5.10000000000000025e-24 < a < -1.65e-226 or 1.9e-306 < a < 1.2999999999999999e-67Initial program 74.8%
Taylor expanded in z around inf 52.4%
mul-1-neg52.4%
distribute-neg-frac252.4%
sub-neg52.4%
distribute-neg-in52.4%
remove-double-neg52.4%
+-commutative52.4%
sub-neg52.4%
associate-/l*56.7%
Simplified56.7%
if -1.65e-226 < a < 1.9e-306Initial program 73.0%
Taylor expanded in x around inf 82.7%
Final simplification69.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.3e+53) (not (<= t 2.75e+39))) (+ (- x (* a (/ y t))) (* y (/ z t))) (+ (+ x y) (* (- z t) (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.3e+53) || !(t <= 2.75e+39)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + ((z - t) * (y / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-3.3d+53)) .or. (.not. (t <= 2.75d+39))) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else
tmp = (x + y) + ((z - t) * (y / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.3e+53) || !(t <= 2.75e+39)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + ((z - t) * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.3e+53) or not (t <= 2.75e+39): tmp = (x - (a * (y / t))) + (y * (z / t)) else: tmp = (x + y) + ((z - t) * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.3e+53) || !(t <= 2.75e+39)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.3e+53) || ~((t <= 2.75e+39))) tmp = (x - (a * (y / t))) + (y * (z / t)); else tmp = (x + y) + ((z - t) * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.3e+53], N[Not[LessEqual[t, 2.75e+39]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{+53} \lor \neg \left(t \leq 2.75 \cdot 10^{+39}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if t < -3.3000000000000002e53 or 2.7499999999999999e39 < t Initial program 60.9%
Taylor expanded in t around inf 77.5%
sub-neg77.5%
mul-1-neg77.5%
unsub-neg77.5%
associate-/l*80.3%
mul-1-neg80.3%
remove-double-neg80.3%
associate-/l*88.2%
Simplified88.2%
if -3.3000000000000002e53 < t < 2.7499999999999999e39Initial program 92.2%
associate-/l*93.4%
*-commutative93.4%
Applied egg-rr93.4%
Final simplification91.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.4e+46) (not (<= t 8.8e+38))) (+ (- x (* a (/ y t))) (* y (/ z t))) (+ (+ x y) (/ (* y z) (- t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.4e+46) || !(t <= 8.8e+38)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + ((y * z) / (t - a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.4d+46)) .or. (.not. (t <= 8.8d+38))) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else
tmp = (x + y) + ((y * z) / (t - a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.4e+46) || !(t <= 8.8e+38)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + ((y * z) / (t - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.4e+46) or not (t <= 8.8e+38): tmp = (x - (a * (y / t))) + (y * (z / t)) else: tmp = (x + y) + ((y * z) / (t - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.4e+46) || !(t <= 8.8e+38)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = Float64(Float64(x + y) + Float64(Float64(y * z) / Float64(t - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.4e+46) || ~((t <= 8.8e+38))) tmp = (x - (a * (y / t))) + (y * (z / t)); else tmp = (x + y) + ((y * z) / (t - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.4e+46], N[Not[LessEqual[t, 8.8e+38]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{+46} \lor \neg \left(t \leq 8.8 \cdot 10^{+38}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \frac{y \cdot z}{t - a}\\
\end{array}
\end{array}
if t < -1.40000000000000009e46 or 8.80000000000000026e38 < t Initial program 60.7%
Taylor expanded in t around inf 77.0%
sub-neg77.0%
mul-1-neg77.0%
unsub-neg77.0%
associate-/l*79.7%
mul-1-neg79.7%
remove-double-neg79.7%
associate-/l*87.5%
Simplified87.5%
if -1.40000000000000009e46 < t < 8.80000000000000026e38Initial program 92.7%
Taylor expanded in z around inf 91.9%
Final simplification90.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.65e+46) (not (<= t 1.7e+39))) (+ x (* y (/ z t))) (+ (+ x y) (/ (* y z) (- t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.65e+46) || !(t <= 1.7e+39)) {
tmp = x + (y * (z / t));
} else {
tmp = (x + y) + ((y * z) / (t - a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.65d+46)) .or. (.not. (t <= 1.7d+39))) then
tmp = x + (y * (z / t))
else
tmp = (x + y) + ((y * z) / (t - a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.65e+46) || !(t <= 1.7e+39)) {
tmp = x + (y * (z / t));
} else {
tmp = (x + y) + ((y * z) / (t - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.65e+46) or not (t <= 1.7e+39): tmp = x + (y * (z / t)) else: tmp = (x + y) + ((y * z) / (t - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.65e+46) || !(t <= 1.7e+39)) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(Float64(x + y) + Float64(Float64(y * z) / Float64(t - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.65e+46) || ~((t <= 1.7e+39))) tmp = x + (y * (z / t)); else tmp = (x + y) + ((y * z) / (t - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.65e+46], N[Not[LessEqual[t, 1.7e+39]], $MachinePrecision]], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+46} \lor \neg \left(t \leq 1.7 \cdot 10^{+39}\right):\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \frac{y \cdot z}{t - a}\\
\end{array}
\end{array}
if t < -1.6499999999999999e46 or 1.6999999999999999e39 < t Initial program 60.7%
Taylor expanded in t around inf 77.0%
sub-neg77.0%
mul-1-neg77.0%
unsub-neg77.0%
associate-/l*79.7%
mul-1-neg79.7%
remove-double-neg79.7%
associate-/l*87.5%
Simplified87.5%
Taylor expanded in a around 0 75.6%
associate-*r/83.5%
Simplified83.5%
if -1.6499999999999999e46 < t < 1.6999999999999999e39Initial program 92.7%
Taylor expanded in z around inf 91.9%
Final simplification88.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.9e-148) (+ x y) (if (<= a 2.6e-305) x (if (<= a 1.15e-138) (* y (/ z t)) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e-148) {
tmp = x + y;
} else if (a <= 2.6e-305) {
tmp = x;
} else if (a <= 1.15e-138) {
tmp = 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 <= (-2.9d-148)) then
tmp = x + y
else if (a <= 2.6d-305) then
tmp = x
else if (a <= 1.15d-138) then
tmp = 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 <= -2.9e-148) {
tmp = x + y;
} else if (a <= 2.6e-305) {
tmp = x;
} else if (a <= 1.15e-138) {
tmp = y * (z / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.9e-148: tmp = x + y elif a <= 2.6e-305: tmp = x elif a <= 1.15e-138: tmp = y * (z / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.9e-148) tmp = Float64(x + y); elseif (a <= 2.6e-305) tmp = x; elseif (a <= 1.15e-138) tmp = 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 <= -2.9e-148) tmp = x + y; elseif (a <= 2.6e-305) tmp = x; elseif (a <= 1.15e-138) tmp = y * (z / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.9e-148], N[(x + y), $MachinePrecision], If[LessEqual[a, 2.6e-305], x, If[LessEqual[a, 1.15e-138], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{-148}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-305}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-138}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.8999999999999998e-148 or 1.14999999999999995e-138 < a Initial program 84.6%
Taylor expanded in a around inf 69.6%
+-commutative69.6%
Simplified69.6%
if -2.8999999999999998e-148 < a < 2.6000000000000002e-305Initial program 73.2%
Taylor expanded in x around inf 59.1%
if 2.6000000000000002e-305 < a < 1.14999999999999995e-138Initial program 63.9%
Taylor expanded in z around inf 53.7%
mul-1-neg53.7%
distribute-neg-frac253.7%
sub-neg53.7%
distribute-neg-in53.7%
remove-double-neg53.7%
+-commutative53.7%
sub-neg53.7%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in t around inf 51.7%
associate-*r/59.9%
Simplified59.9%
Final simplification67.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.1e-24) (not (<= a 7.2e-60))) (- (+ x y) (* y (/ z a))) (+ x (/ (* y (- z a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.1e-24) || !(a <= 7.2e-60)) {
tmp = (x + y) - (y * (z / a));
} 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 <= (-5.1d-24)) .or. (.not. (a <= 7.2d-60))) then
tmp = (x + y) - (y * (z / a))
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 <= -5.1e-24) || !(a <= 7.2e-60)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + ((y * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.1e-24) or not (a <= 7.2e-60): tmp = (x + y) - (y * (z / a)) else: tmp = x + ((y * (z - a)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.1e-24) || !(a <= 7.2e-60)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.1e-24) || ~((a <= 7.2e-60))) tmp = (x + y) - (y * (z / a)); else tmp = x + ((y * (z - a)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.1e-24], N[Not[LessEqual[a, 7.2e-60]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.1 \cdot 10^{-24} \lor \neg \left(a \leq 7.2 \cdot 10^{-60}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if a < -5.10000000000000025e-24 or 7.2e-60 < a Initial program 84.9%
Taylor expanded in t around 0 82.6%
+-commutative82.6%
associate-/l*87.4%
Simplified87.4%
if -5.10000000000000025e-24 < a < 7.2e-60Initial program 73.9%
associate-/l*75.9%
*-commutative75.9%
Applied egg-rr75.9%
Taylor expanded in t around -inf 85.6%
neg-mul-185.6%
sub-neg85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y around 0 85.6%
Final simplification86.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.6e-24) (not (<= a 7e-59))) (+ x y) (+ x (/ (* y (- z a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.6e-24) || !(a <= 7e-59)) {
tmp = x + y;
} 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 <= (-5.6d-24)) .or. (.not. (a <= 7d-59))) then
tmp = x + y
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 <= -5.6e-24) || !(a <= 7e-59)) {
tmp = x + y;
} else {
tmp = x + ((y * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.6e-24) or not (a <= 7e-59): tmp = x + y else: tmp = x + ((y * (z - a)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.6e-24) || !(a <= 7e-59)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.6e-24) || ~((a <= 7e-59))) tmp = x + y; else tmp = x + ((y * (z - a)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.6e-24], N[Not[LessEqual[a, 7e-59]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.6 \cdot 10^{-24} \lor \neg \left(a \leq 7 \cdot 10^{-59}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if a < -5.6000000000000003e-24 or 7.0000000000000002e-59 < a Initial program 84.9%
Taylor expanded in a around inf 76.5%
+-commutative76.5%
Simplified76.5%
if -5.6000000000000003e-24 < a < 7.0000000000000002e-59Initial program 73.9%
associate-/l*75.9%
*-commutative75.9%
Applied egg-rr75.9%
Taylor expanded in t around -inf 85.6%
neg-mul-185.6%
sub-neg85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y around 0 85.6%
Final simplification80.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.3e-23) (not (<= a 2e-67))) (+ x y) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.3e-23) || !(a <= 2e-67)) {
tmp = x + y;
} else {
tmp = x + (y * (z / 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.3d-23)) .or. (.not. (a <= 2d-67))) then
tmp = x + y
else
tmp = x + (y * (z / 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.3e-23) || !(a <= 2e-67)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.3e-23) or not (a <= 2e-67): tmp = x + y else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.3e-23) || !(a <= 2e-67)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.3e-23) || ~((a <= 2e-67))) tmp = x + y; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.3e-23], N[Not[LessEqual[a, 2e-67]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.3 \cdot 10^{-23} \lor \neg \left(a \leq 2 \cdot 10^{-67}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -1.3e-23 or 1.99999999999999989e-67 < a Initial program 84.4%
Taylor expanded in a around inf 76.1%
+-commutative76.1%
Simplified76.1%
if -1.3e-23 < a < 1.99999999999999989e-67Initial program 74.6%
Taylor expanded in t around inf 85.4%
sub-neg85.4%
mul-1-neg85.4%
unsub-neg85.4%
associate-/l*81.6%
mul-1-neg81.6%
remove-double-neg81.6%
associate-/l*83.6%
Simplified83.6%
Taylor expanded in a around 0 84.3%
associate-*r/86.2%
Simplified86.2%
Final simplification80.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3e-147) (not (<= a 7.5e-107))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e-147) || !(a <= 7.5e-107)) {
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 ((a <= (-3d-147)) .or. (.not. (a <= 7.5d-107))) 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 ((a <= -3e-147) || !(a <= 7.5e-107)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3e-147) or not (a <= 7.5e-107): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3e-147) || !(a <= 7.5e-107)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3e-147) || ~((a <= 7.5e-107))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3e-147], N[Not[LessEqual[a, 7.5e-107]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-147} \lor \neg \left(a \leq 7.5 \cdot 10^{-107}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.0000000000000002e-147 or 7.50000000000000047e-107 < a Initial program 84.6%
Taylor expanded in a around inf 70.1%
+-commutative70.1%
Simplified70.1%
if -3.0000000000000002e-147 < a < 7.50000000000000047e-107Initial program 70.0%
Taylor expanded in x around inf 49.0%
Final simplification64.1%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 80.4%
Taylor expanded in x around inf 46.6%
(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 2024135
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -13664970889390727/100000000000000000000000) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 14754293444577233/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)))))
(- (+ x y) (/ (* (- z t) y) (- a t))))