
(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 16 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 (- (+ 1.0 (/ t (- a t))) (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((1.0 + (t / (a - t))) - (z / (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 * ((1.0d0 + (t / (a - t))) - (z / (a - t))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((1.0 + (t / (a - t))) - (z / (a - t))));
}
def code(x, y, z, t, a): return x + (y * ((1.0 + (t / (a - t))) - (z / (a - t))))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(1.0 + Float64(t / Float64(a - t))) - Float64(z / Float64(a - t))))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((1.0 + (t / (a - t))) - (z / (a - t)))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(1.0 + N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \left(\left(1 + \frac{t}{a - t}\right) - \frac{z}{a - t}\right)
\end{array}
Initial program 79.7%
associate--l+84.0%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in y around 0 95.7%
Final simplification95.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (+ x y) (/ (* y (- t z)) (- a t)))))
(if (<= t_1 (- INFINITY))
(- x (* z (/ y (- a t))))
(if (<= t_1 -2e-275)
t_1
(if (<= t_1 0.0)
(- x (/ y (/ t (- a z))))
(+ x (+ y (/ (- t z) (/ (- a t) y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) + ((y * (t - z)) / (a - t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x - (z * (y / (a - t)));
} else if (t_1 <= -2e-275) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = x - (y / (t / (a - z)));
} else {
tmp = x + (y + ((t - z) / ((a - t) / y)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) + ((y * (t - z)) / (a - t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x - (z * (y / (a - t)));
} else if (t_1 <= -2e-275) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = x - (y / (t / (a - z)));
} else {
tmp = x + (y + ((t - z) / ((a - t) / y)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) + ((y * (t - z)) / (a - t)) tmp = 0 if t_1 <= -math.inf: tmp = x - (z * (y / (a - t))) elif t_1 <= -2e-275: tmp = t_1 elif t_1 <= 0.0: tmp = x - (y / (t / (a - z))) else: tmp = x + (y + ((t - z) / ((a - t) / y))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) + Float64(Float64(y * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x - Float64(z * Float64(y / Float64(a - t)))); elseif (t_1 <= -2e-275) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(x - Float64(y / Float64(t / Float64(a - z)))); else tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) + ((y * (t - z)) / (a - t)); tmp = 0.0; if (t_1 <= -Inf) tmp = x - (z * (y / (a - t))); elseif (t_1 <= -2e-275) tmp = t_1; elseif (t_1 <= 0.0) tmp = x - (y / (t / (a - z))); else tmp = x + (y + ((t - z) / ((a - t) / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-275], t$95$1, If[LessEqual[t$95$1, 0.0], N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -inf.0Initial program 50.3%
associate--l+50.3%
associate-/l*83.0%
Simplified83.0%
Taylor expanded in z around inf 54.4%
associate-*r/54.4%
associate-*r*54.4%
neg-mul-154.4%
Simplified54.4%
Taylor expanded in x around 0 54.4%
mul-1-neg54.4%
sub-neg54.4%
*-commutative54.4%
associate-*r/87.1%
Simplified87.1%
if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.99999999999999987e-275Initial program 98.0%
if -1.99999999999999987e-275 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 4.2%
*-commutative4.2%
associate-/l*4.2%
associate-/r/4.3%
Simplified4.3%
clear-num4.5%
inv-pow4.5%
Applied egg-rr4.5%
unpow-14.5%
Simplified4.5%
Taylor expanded in t around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
*-commutative99.6%
cancel-sign-sub-inv99.6%
mul-1-neg99.6%
distribute-rgt-in99.6%
associate-/l*99.8%
mul-1-neg99.8%
sub-neg99.8%
Simplified99.8%
if 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 86.6%
associate--l+86.6%
associate-/l*93.9%
Simplified93.9%
Final simplification95.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (+ x y) (/ (* y (- t z)) (- a t)))))
(if (<= t_1 -2e-275)
(- (+ x y) (/ (/ (- z t) (- a t)) (/ 1.0 y)))
(if (<= t_1 0.0)
(- x (/ y (/ t (- a z))))
(+ x (+ y (/ (- t z) (/ (- a t) y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) + ((y * (t - z)) / (a - t));
double tmp;
if (t_1 <= -2e-275) {
tmp = (x + y) - (((z - t) / (a - t)) / (1.0 / y));
} else if (t_1 <= 0.0) {
tmp = x - (y / (t / (a - z)));
} else {
tmp = x + (y + ((t - z) / ((a - t) / 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) + ((y * (t - z)) / (a - t))
if (t_1 <= (-2d-275)) then
tmp = (x + y) - (((z - t) / (a - t)) / (1.0d0 / y))
else if (t_1 <= 0.0d0) then
tmp = x - (y / (t / (a - z)))
else
tmp = x + (y + ((t - z) / ((a - t) / 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) + ((y * (t - z)) / (a - t));
double tmp;
if (t_1 <= -2e-275) {
tmp = (x + y) - (((z - t) / (a - t)) / (1.0 / y));
} else if (t_1 <= 0.0) {
tmp = x - (y / (t / (a - z)));
} else {
tmp = x + (y + ((t - z) / ((a - t) / y)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) + ((y * (t - z)) / (a - t)) tmp = 0 if t_1 <= -2e-275: tmp = (x + y) - (((z - t) / (a - t)) / (1.0 / y)) elif t_1 <= 0.0: tmp = x - (y / (t / (a - z))) else: tmp = x + (y + ((t - z) / ((a - t) / y))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) + Float64(Float64(y * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if (t_1 <= -2e-275) tmp = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) / Float64(a - t)) / Float64(1.0 / y))); elseif (t_1 <= 0.0) tmp = Float64(x - Float64(y / Float64(t / Float64(a - z)))); else tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) + ((y * (t - z)) / (a - t)); tmp = 0.0; if (t_1 <= -2e-275) tmp = (x + y) - (((z - t) / (a - t)) / (1.0 / y)); elseif (t_1 <= 0.0) tmp = x - (y / (t / (a - z))); else tmp = x + (y + ((t - z) / ((a - t) / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-275], N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(x - N[(y / N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;\left(x + y\right) - \frac{\frac{z - t}{a - t}}{\frac{1}{y}}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.99999999999999987e-275Initial program 88.5%
*-commutative88.5%
associate-/l*93.8%
associate-/r/91.0%
Simplified91.0%
associate-*l/88.5%
*-commutative88.5%
associate-/l*91.0%
div-inv90.9%
associate-/r*92.6%
Applied egg-rr92.6%
if -1.99999999999999987e-275 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 4.2%
*-commutative4.2%
associate-/l*4.2%
associate-/r/4.3%
Simplified4.3%
clear-num4.5%
inv-pow4.5%
Applied egg-rr4.5%
unpow-14.5%
Simplified4.5%
Taylor expanded in t around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
*-commutative99.6%
cancel-sign-sub-inv99.6%
mul-1-neg99.6%
distribute-rgt-in99.6%
associate-/l*99.8%
mul-1-neg99.8%
sub-neg99.8%
Simplified99.8%
if 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 86.6%
associate--l+86.6%
associate-/l*93.9%
Simplified93.9%
Final simplification93.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ z (- a t))))
(if (<= a -1.95e-78)
(+ x (* y (- 1.0 t_1)))
(if (<= a 2.4e+39)
(- x (* y t_1))
(+ x (+ y (/ (- t z) (/ (- a t) y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z / (a - t);
double tmp;
if (a <= -1.95e-78) {
tmp = x + (y * (1.0 - t_1));
} else if (a <= 2.4e+39) {
tmp = x - (y * t_1);
} else {
tmp = x + (y + ((t - z) / ((a - t) / 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 / (a - t)
if (a <= (-1.95d-78)) then
tmp = x + (y * (1.0d0 - t_1))
else if (a <= 2.4d+39) then
tmp = x - (y * t_1)
else
tmp = x + (y + ((t - z) / ((a - t) / 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 / (a - t);
double tmp;
if (a <= -1.95e-78) {
tmp = x + (y * (1.0 - t_1));
} else if (a <= 2.4e+39) {
tmp = x - (y * t_1);
} else {
tmp = x + (y + ((t - z) / ((a - t) / y)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z / (a - t) tmp = 0 if a <= -1.95e-78: tmp = x + (y * (1.0 - t_1)) elif a <= 2.4e+39: tmp = x - (y * t_1) else: tmp = x + (y + ((t - z) / ((a - t) / y))) return tmp
function code(x, y, z, t, a) t_1 = Float64(z / Float64(a - t)) tmp = 0.0 if (a <= -1.95e-78) tmp = Float64(x + Float64(y * Float64(1.0 - t_1))); elseif (a <= 2.4e+39) tmp = Float64(x - Float64(y * t_1)); else tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z / (a - t); tmp = 0.0; if (a <= -1.95e-78) tmp = x + (y * (1.0 - t_1)); elseif (a <= 2.4e+39) tmp = x - (y * t_1); else tmp = x + (y + ((t - z) / ((a - t) / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.95e-78], N[(x + N[(y * N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.4e+39], N[(x - N[(y * t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{a - t}\\
\mathbf{if}\;a \leq -1.95 \cdot 10^{-78}:\\
\;\;\;\;x + y \cdot \left(1 - t\_1\right)\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{+39}:\\
\;\;\;\;x - y \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\end{array}
\end{array}
if a < -1.9500000000000001e-78Initial program 90.5%
associate--l+91.7%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in y around 0 99.9%
Taylor expanded in t around 0 95.5%
if -1.9500000000000001e-78 < a < 2.4000000000000001e39Initial program 70.5%
associate--l+78.8%
associate-/l*78.4%
Simplified78.4%
Taylor expanded in y around 0 91.8%
Taylor expanded in t around inf 90.4%
if 2.4000000000000001e39 < a Initial program 84.0%
associate--l+84.0%
associate-/l*96.2%
Simplified96.2%
Final simplification93.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.6e-78) (not (<= a 4.8e+96))) (+ x (* y (- 1.0 (/ z (- a t))))) (- x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.6e-78) || !(a <= 4.8e+96)) {
tmp = x + (y * (1.0 - (z / (a - t))));
} else {
tmp = x - (z * (y / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-7.6d-78)) .or. (.not. (a <= 4.8d+96))) then
tmp = x + (y * (1.0d0 - (z / (a - t))))
else
tmp = x - (z * (y / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.6e-78) || !(a <= 4.8e+96)) {
tmp = x + (y * (1.0 - (z / (a - t))));
} else {
tmp = x - (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.6e-78) or not (a <= 4.8e+96): tmp = x + (y * (1.0 - (z / (a - t)))) else: tmp = x - (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.6e-78) || !(a <= 4.8e+96)) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(z / Float64(a - t))))); else tmp = Float64(x - Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.6e-78) || ~((a <= 4.8e+96))) tmp = x + (y * (1.0 - (z / (a - t)))); else tmp = x - (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.6e-78], N[Not[LessEqual[a, 4.8e+96]], $MachinePrecision]], N[(x + N[(y * N[(1.0 - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.6 \cdot 10^{-78} \lor \neg \left(a \leq 4.8 \cdot 10^{+96}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{a - t}\right)\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if a < -7.5999999999999998e-78 or 4.79999999999999986e96 < a Initial program 87.1%
associate--l+87.9%
associate-/l*94.6%
Simplified94.6%
Taylor expanded in y around 0 99.1%
Taylor expanded in t around 0 94.8%
if -7.5999999999999998e-78 < a < 4.79999999999999986e96Initial program 72.6%
associate--l+80.3%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in z around inf 90.3%
associate-*r/90.3%
associate-*r*90.3%
neg-mul-190.3%
Simplified90.3%
Taylor expanded in x around 0 90.3%
mul-1-neg90.3%
sub-neg90.3%
*-commutative90.3%
associate-*r/90.8%
Simplified90.8%
Final simplification92.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- a t)))))
(if (<= a -7.6e-78)
(+ x (* y (- 1.0 (/ z (- a t)))))
(if (<= a 4.2e+98) (- x t_1) (+ x (- y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / (a - t));
double tmp;
if (a <= -7.6e-78) {
tmp = x + (y * (1.0 - (z / (a - t))));
} else if (a <= 4.2e+98) {
tmp = x - t_1;
} else {
tmp = x + (y - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = z * (y / (a - t))
if (a <= (-7.6d-78)) then
tmp = x + (y * (1.0d0 - (z / (a - t))))
else if (a <= 4.2d+98) then
tmp = x - t_1
else
tmp = x + (y - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / (a - t));
double tmp;
if (a <= -7.6e-78) {
tmp = x + (y * (1.0 - (z / (a - t))));
} else if (a <= 4.2e+98) {
tmp = x - t_1;
} else {
tmp = x + (y - t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / (a - t)) tmp = 0 if a <= -7.6e-78: tmp = x + (y * (1.0 - (z / (a - t)))) elif a <= 4.2e+98: tmp = x - t_1 else: tmp = x + (y - t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(a - t))) tmp = 0.0 if (a <= -7.6e-78) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(z / Float64(a - t))))); elseif (a <= 4.2e+98) tmp = Float64(x - t_1); else tmp = Float64(x + Float64(y - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / (a - t)); tmp = 0.0; if (a <= -7.6e-78) tmp = x + (y * (1.0 - (z / (a - t)))); elseif (a <= 4.2e+98) tmp = x - t_1; else tmp = x + (y - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.6e-78], N[(x + N[(y * N[(1.0 - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e+98], N[(x - t$95$1), $MachinePrecision], N[(x + N[(y - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{a - t}\\
\mathbf{if}\;a \leq -7.6 \cdot 10^{-78}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{a - t}\right)\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{+98}:\\
\;\;\;\;x - t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - t\_1\right)\\
\end{array}
\end{array}
if a < -7.5999999999999998e-78Initial program 90.5%
associate--l+91.7%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in y around 0 99.9%
Taylor expanded in t around 0 95.5%
if -7.5999999999999998e-78 < a < 4.20000000000000008e98Initial program 72.6%
associate--l+80.3%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in z around inf 90.3%
associate-*r/90.3%
associate-*r*90.3%
neg-mul-190.3%
Simplified90.3%
Taylor expanded in x around 0 90.3%
mul-1-neg90.3%
sub-neg90.3%
*-commutative90.3%
associate-*r/90.8%
Simplified90.8%
if 4.20000000000000008e98 < a Initial program 80.8%
associate--l+80.8%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in z around inf 82.9%
associate-*l/93.5%
*-commutative93.5%
Simplified93.5%
Final simplification92.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ z (- a t))))
(if (<= a -6.5e-78)
(+ x (* y (- 1.0 t_1)))
(if (<= a 8.2e+96) (- x (* y t_1)) (+ x (- y (* z (/ y (- a t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z / (a - t);
double tmp;
if (a <= -6.5e-78) {
tmp = x + (y * (1.0 - t_1));
} else if (a <= 8.2e+96) {
tmp = x - (y * t_1);
} else {
tmp = x + (y - (z * (y / (a - t))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = z / (a - t)
if (a <= (-6.5d-78)) then
tmp = x + (y * (1.0d0 - t_1))
else if (a <= 8.2d+96) then
tmp = x - (y * t_1)
else
tmp = x + (y - (z * (y / (a - t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = z / (a - t);
double tmp;
if (a <= -6.5e-78) {
tmp = x + (y * (1.0 - t_1));
} else if (a <= 8.2e+96) {
tmp = x - (y * t_1);
} else {
tmp = x + (y - (z * (y / (a - t))));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z / (a - t) tmp = 0 if a <= -6.5e-78: tmp = x + (y * (1.0 - t_1)) elif a <= 8.2e+96: tmp = x - (y * t_1) else: tmp = x + (y - (z * (y / (a - t)))) return tmp
function code(x, y, z, t, a) t_1 = Float64(z / Float64(a - t)) tmp = 0.0 if (a <= -6.5e-78) tmp = Float64(x + Float64(y * Float64(1.0 - t_1))); elseif (a <= 8.2e+96) tmp = Float64(x - Float64(y * t_1)); else tmp = Float64(x + Float64(y - Float64(z * Float64(y / Float64(a - t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z / (a - t); tmp = 0.0; if (a <= -6.5e-78) tmp = x + (y * (1.0 - t_1)); elseif (a <= 8.2e+96) tmp = x - (y * t_1); else tmp = x + (y - (z * (y / (a - t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.5e-78], N[(x + N[(y * N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.2e+96], N[(x - N[(y * t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{a - t}\\
\mathbf{if}\;a \leq -6.5 \cdot 10^{-78}:\\
\;\;\;\;x + y \cdot \left(1 - t\_1\right)\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{+96}:\\
\;\;\;\;x - y \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z \cdot \frac{y}{a - t}\right)\\
\end{array}
\end{array}
if a < -6.5000000000000003e-78Initial program 90.5%
associate--l+91.7%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in y around 0 99.9%
Taylor expanded in t around 0 95.5%
if -6.5000000000000003e-78 < a < 8.19999999999999996e96Initial program 72.6%
associate--l+80.3%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in y around 0 92.3%
Taylor expanded in t around inf 91.1%
if 8.19999999999999996e96 < a Initial program 80.8%
associate--l+80.8%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in z around inf 82.9%
associate-*l/93.5%
*-commutative93.5%
Simplified93.5%
Final simplification92.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.2e+28) (not (<= a 2.1e+121))) (+ x y) (- x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.2e+28) || !(a <= 2.1e+121)) {
tmp = x + y;
} else {
tmp = x - (z * (y / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-3.2d+28)) .or. (.not. (a <= 2.1d+121))) then
tmp = x + y
else
tmp = x - (z * (y / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.2e+28) || !(a <= 2.1e+121)) {
tmp = x + y;
} else {
tmp = x - (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.2e+28) or not (a <= 2.1e+121): tmp = x + y else: tmp = x - (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.2e+28) || !(a <= 2.1e+121)) tmp = Float64(x + y); else tmp = Float64(x - Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.2e+28) || ~((a <= 2.1e+121))) tmp = x + y; else tmp = x - (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.2e+28], N[Not[LessEqual[a, 2.1e+121]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+28} \lor \neg \left(a \leq 2.1 \cdot 10^{+121}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if a < -3.2e28 or 2.1000000000000002e121 < a Initial program 87.4%
*-commutative87.4%
associate-/l*98.1%
associate-/r/95.5%
Simplified95.5%
Taylor expanded in a around inf 88.4%
+-commutative88.4%
Simplified88.4%
if -3.2e28 < a < 2.1000000000000002e121Initial program 74.3%
associate--l+81.7%
associate-/l*81.2%
Simplified81.2%
Taylor expanded in z around inf 89.7%
associate-*r/89.7%
associate-*r*89.7%
neg-mul-189.7%
Simplified89.7%
Taylor expanded in x around 0 89.7%
mul-1-neg89.7%
sub-neg89.7%
*-commutative89.7%
associate-*r/90.1%
Simplified90.1%
Final simplification89.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.18e+24) (not (<= a 1.76e+121))) (- (+ x y) (/ y (/ a z))) (- x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.18e+24) || !(a <= 1.76e+121)) {
tmp = (x + y) - (y / (a / z));
} else {
tmp = x - (z * (y / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.18d+24)) .or. (.not. (a <= 1.76d+121))) then
tmp = (x + y) - (y / (a / z))
else
tmp = x - (z * (y / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.18e+24) || !(a <= 1.76e+121)) {
tmp = (x + y) - (y / (a / z));
} else {
tmp = x - (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.18e+24) or not (a <= 1.76e+121): tmp = (x + y) - (y / (a / z)) else: tmp = x - (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.18e+24) || !(a <= 1.76e+121)) tmp = Float64(Float64(x + y) - Float64(y / Float64(a / z))); else tmp = Float64(x - Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.18e+24) || ~((a <= 1.76e+121))) tmp = (x + y) - (y / (a / z)); else tmp = x - (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.18e+24], N[Not[LessEqual[a, 1.76e+121]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.18 \cdot 10^{+24} \lor \neg \left(a \leq 1.76 \cdot 10^{+121}\right):\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if a < -1.17999999999999997e24 or 1.7600000000000001e121 < a Initial program 87.4%
*-commutative87.4%
associate-/l*98.1%
associate-/r/95.5%
Simplified95.5%
Taylor expanded in t around 0 90.0%
+-commutative90.0%
associate-/l*95.3%
Simplified95.3%
if -1.17999999999999997e24 < a < 1.7600000000000001e121Initial program 74.3%
associate--l+81.7%
associate-/l*81.2%
Simplified81.2%
Taylor expanded in z around inf 89.7%
associate-*r/89.7%
associate-*r*89.7%
neg-mul-189.7%
Simplified89.7%
Taylor expanded in x around 0 89.7%
mul-1-neg89.7%
sub-neg89.7%
*-commutative89.7%
associate-*r/90.1%
Simplified90.1%
Final simplification92.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.7e+27) (- (+ x y) (/ (* y z) a)) (if (<= a 1.6e+125) (- x (* z (/ y (- a t)))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e+27) {
tmp = (x + y) - ((y * z) / a);
} else if (a <= 1.6e+125) {
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.7d+27)) then
tmp = (x + y) - ((y * z) / a)
else if (a <= 1.6d+125) 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.7e+27) {
tmp = (x + y) - ((y * z) / a);
} else if (a <= 1.6e+125) {
tmp = x - (z * (y / (a - t)));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.7e+27: tmp = (x + y) - ((y * z) / a) elif a <= 1.6e+125: 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.7e+27) tmp = Float64(Float64(x + y) - Float64(Float64(y * z) / a)); elseif (a <= 1.6e+125) 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.7e+27) tmp = (x + y) - ((y * z) / a); elseif (a <= 1.6e+125) 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.7e+27], N[(N[(x + y), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e+125], 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.7 \cdot 10^{+27}:\\
\;\;\;\;\left(x + y\right) - \frac{y \cdot z}{a}\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{+125}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.7e27Initial program 92.8%
*-commutative92.8%
associate-/l*100.0%
associate-/r/95.9%
Simplified95.9%
Taylor expanded in t around 0 95.6%
if -1.7e27 < a < 1.59999999999999992e125Initial program 74.3%
associate--l+81.7%
associate-/l*81.2%
Simplified81.2%
Taylor expanded in z around inf 89.7%
associate-*r/89.7%
associate-*r*89.7%
neg-mul-189.7%
Simplified89.7%
Taylor expanded in x around 0 89.7%
mul-1-neg89.7%
sub-neg89.7%
*-commutative89.7%
associate-*r/90.1%
Simplified90.1%
if 1.59999999999999992e125 < a Initial program 77.7%
*-commutative77.7%
associate-/l*94.7%
associate-/r/94.7%
Simplified94.7%
Taylor expanded in a around inf 87.6%
+-commutative87.6%
Simplified87.6%
Final simplification91.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.1e+20) (not (<= a 5.2e+41))) (+ x y) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.1e+20) || !(a <= 5.2e+41)) {
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.1d+20)) .or. (.not. (a <= 5.2d+41))) 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.1e+20) || !(a <= 5.2e+41)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.1e+20) or not (a <= 5.2e+41): tmp = x + y else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.1e+20) || !(a <= 5.2e+41)) 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.1e+20) || ~((a <= 5.2e+41))) 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.1e+20], N[Not[LessEqual[a, 5.2e+41]], $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.1 \cdot 10^{+20} \lor \neg \left(a \leq 5.2 \cdot 10^{+41}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -1.1e20 or 5.2000000000000001e41 < a Initial program 89.1%
*-commutative89.1%
associate-/l*98.3%
associate-/r/96.0%
Simplified96.0%
Taylor expanded in a around inf 86.6%
+-commutative86.6%
Simplified86.6%
if -1.1e20 < a < 5.2000000000000001e41Initial program 71.2%
associate--l+79.5%
associate-/l*79.0%
Simplified79.0%
Taylor expanded in y around 0 92.6%
Taylor expanded in t around inf 89.0%
associate-*r/89.0%
neg-mul-189.0%
Simplified89.0%
Taylor expanded in a around 0 77.7%
Final simplification81.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.85e+21) (not (<= a 2.5e+39))) (+ x y) (+ x (* z (/ y t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.85e+21) || !(a <= 2.5e+39)) {
tmp = x + y;
} else {
tmp = x + (z * (y / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.85d+21)) .or. (.not. (a <= 2.5d+39))) then
tmp = x + y
else
tmp = x + (z * (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.85e+21) || !(a <= 2.5e+39)) {
tmp = x + y;
} else {
tmp = x + (z * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.85e+21) or not (a <= 2.5e+39): tmp = x + y else: tmp = x + (z * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.85e+21) || !(a <= 2.5e+39)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.85e+21) || ~((a <= 2.5e+39))) tmp = x + y; else tmp = x + (z * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.85e+21], N[Not[LessEqual[a, 2.5e+39]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.85 \cdot 10^{+21} \lor \neg \left(a \leq 2.5 \cdot 10^{+39}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -1.85e21 or 2.50000000000000008e39 < a Initial program 89.1%
*-commutative89.1%
associate-/l*98.3%
associate-/r/96.0%
Simplified96.0%
Taylor expanded in a around inf 86.6%
+-commutative86.6%
Simplified86.6%
if -1.85e21 < a < 2.50000000000000008e39Initial program 71.2%
associate--l+79.5%
associate-/l*79.0%
Simplified79.0%
Taylor expanded in z around inf 88.4%
associate-*r/88.4%
associate-*r*88.4%
neg-mul-188.4%
Simplified88.4%
Taylor expanded in x around 0 88.4%
mul-1-neg88.4%
sub-neg88.4%
*-commutative88.4%
associate-*r/88.9%
Simplified88.9%
clear-num88.8%
un-div-inv88.9%
Applied egg-rr88.9%
Taylor expanded in a around 0 77.5%
sub-neg77.5%
mul-1-neg77.5%
associate-/l*78.2%
remove-double-neg78.2%
associate-/r/78.0%
Simplified78.0%
Final simplification82.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -9.5e+20) (not (<= a 6.2e+39))) (+ x y) (+ x (/ y (/ t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9.5e+20) || !(a <= 6.2e+39)) {
tmp = x + y;
} 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 <= (-9.5d+20)) .or. (.not. (a <= 6.2d+39))) then
tmp = x + y
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 <= -9.5e+20) || !(a <= 6.2e+39)) {
tmp = x + y;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -9.5e+20) or not (a <= 6.2e+39): tmp = x + y else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -9.5e+20) || !(a <= 6.2e+39)) tmp = Float64(x + y); 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 <= -9.5e+20) || ~((a <= 6.2e+39))) tmp = x + y; else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -9.5e+20], N[Not[LessEqual[a, 6.2e+39]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{+20} \lor \neg \left(a \leq 6.2 \cdot 10^{+39}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if a < -9.5e20 or 6.2000000000000005e39 < a Initial program 89.1%
*-commutative89.1%
associate-/l*98.3%
associate-/r/96.0%
Simplified96.0%
Taylor expanded in a around inf 86.6%
+-commutative86.6%
Simplified86.6%
if -9.5e20 < a < 6.2000000000000005e39Initial program 71.2%
associate--l+79.5%
associate-/l*79.0%
Simplified79.0%
Taylor expanded in z around inf 88.4%
associate-*r/88.4%
associate-*r*88.4%
neg-mul-188.4%
Simplified88.4%
Taylor expanded in a around 0 77.5%
+-commutative77.5%
associate-/l*78.2%
Simplified78.2%
Final simplification82.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.9e-95) (not (<= a 1.76e+121))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.9e-95) || !(a <= 1.76e+121)) {
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 <= (-1.9d-95)) .or. (.not. (a <= 1.76d+121))) 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 <= -1.9e-95) || !(a <= 1.76e+121)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.9e-95) or not (a <= 1.76e+121): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.9e-95) || !(a <= 1.76e+121)) 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 <= -1.9e-95) || ~((a <= 1.76e+121))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.9e-95], N[Not[LessEqual[a, 1.76e+121]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{-95} \lor \neg \left(a \leq 1.76 \cdot 10^{+121}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.8999999999999999e-95 or 1.7600000000000001e121 < a Initial program 86.1%
*-commutative86.1%
associate-/l*96.0%
associate-/r/93.8%
Simplified93.8%
Taylor expanded in a around inf 83.2%
+-commutative83.2%
Simplified83.2%
if -1.8999999999999999e-95 < a < 1.7600000000000001e121Initial program 73.8%
*-commutative73.8%
associate-/l*72.5%
associate-/r/72.2%
Simplified72.2%
Taylor expanded in x around inf 53.7%
Final simplification68.0%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.6e+227) y (if (<= y 9.6e+146) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.6e+227) {
tmp = y;
} else if (y <= 9.6e+146) {
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.6d+227)) then
tmp = y
else if (y <= 9.6d+146) 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.6e+227) {
tmp = y;
} else if (y <= 9.6e+146) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.6e+227: tmp = y elif y <= 9.6e+146: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.6e+227) tmp = y; elseif (y <= 9.6e+146) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.6e+227) tmp = y; elseif (y <= 9.6e+146) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.6e+227], y, If[LessEqual[y, 9.6e+146], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+227}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{+146}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.59999999999999994e227 or 9.6000000000000008e146 < y Initial program 54.1%
*-commutative54.1%
associate-/l*67.3%
associate-/r/63.0%
Simplified63.0%
Taylor expanded in x around 0 47.1%
Taylor expanded in a around inf 38.0%
if -1.59999999999999994e227 < y < 9.6000000000000008e146Initial program 84.8%
*-commutative84.8%
associate-/l*87.2%
associate-/r/86.5%
Simplified86.5%
Taylor expanded in x around inf 61.4%
Final simplification57.5%
(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 79.7%
*-commutative79.7%
associate-/l*83.9%
associate-/r/82.6%
Simplified82.6%
Taylor expanded in x around inf 53.6%
Final simplification53.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 2024034
(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))))