
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
(if (or (<= t_1 -4e-168) (not (<= t_1 0.0)))
(fma (- z t) (/ y (- t a)) (+ x y))
(+ x (/ (* y (- z a)) t)))))
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 <= -4e-168) || !(t_1 <= 0.0)) {
tmp = fma((z - t), (y / (t - a)), (x + y));
} else {
tmp = x + ((y * (z - a)) / t);
}
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 <= -4e-168) || !(t_1 <= 0.0)) tmp = fma(Float64(z - t), Float64(y / Float64(t - a)), Float64(x + y)); else tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); end return 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[Or[LessEqual[t$95$1, -4e-168], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\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 -4 \cdot 10^{-168} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -4.0000000000000002e-168 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 79.2%
sub-neg79.2%
+-commutative79.2%
distribute-frac-neg79.2%
distribute-rgt-neg-out79.2%
associate-/l*90.7%
fma-define90.7%
distribute-frac-neg90.7%
distribute-neg-frac290.7%
sub-neg90.7%
distribute-neg-in90.7%
remove-double-neg90.7%
+-commutative90.7%
sub-neg90.7%
Simplified90.7%
if -4.0000000000000002e-168 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 23.4%
Taylor expanded in t around inf 92.4%
associate--l+92.4%
distribute-lft-out--92.4%
div-sub92.4%
mul-1-neg92.4%
unsub-neg92.4%
*-commutative92.4%
distribute-lft-out--92.4%
Simplified92.4%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
(if (or (<= t_1 -4e-168) (not (<= t_1 0.0)))
(+ (/ (- z t) (/ (- t a) y)) (+ x y))
(+ x (/ (* y (- z a)) t)))))
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 <= -4e-168) || !(t_1 <= 0.0)) {
tmp = ((z - t) / ((t - a) / y)) + (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) :: t_1
real(8) :: tmp
t_1 = (x + y) + ((y * (z - t)) / (t - a))
if ((t_1 <= (-4d-168)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = ((z - t) / ((t - a) / y)) + (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 t_1 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if ((t_1 <= -4e-168) || !(t_1 <= 0.0)) {
tmp = ((z - t) / ((t - a) / y)) + (x + y);
} else {
tmp = x + ((y * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) + ((y * (z - t)) / (t - a)) tmp = 0 if (t_1 <= -4e-168) or not (t_1 <= 0.0): tmp = ((z - t) / ((t - a) / y)) + (x + y) else: tmp = x + ((y * (z - a)) / t) 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 <= -4e-168) || !(t_1 <= 0.0)) tmp = Float64(Float64(Float64(z - t) / Float64(Float64(t - a) / y)) + 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) t_1 = (x + y) + ((y * (z - t)) / (t - a)); tmp = 0.0; if ((t_1 <= -4e-168) || ~((t_1 <= 0.0))) tmp = ((z - t) / ((t - a) / y)) + (x + y); else tmp = x + ((y * (z - a)) / t); 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[Or[LessEqual[t$95$1, -4e-168], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(z - t), $MachinePrecision] / N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\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 -4 \cdot 10^{-168} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\frac{z - t}{\frac{t - a}{y}} + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -4.0000000000000002e-168 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 79.2%
sub-neg79.2%
+-commutative79.2%
distribute-frac-neg79.2%
distribute-rgt-neg-out79.2%
associate-/l*90.7%
fma-define90.7%
distribute-frac-neg90.7%
distribute-neg-frac290.7%
sub-neg90.7%
distribute-neg-in90.7%
remove-double-neg90.7%
+-commutative90.7%
sub-neg90.7%
Simplified90.7%
fma-undefine90.7%
clear-num90.3%
un-div-inv90.3%
+-commutative90.3%
Applied egg-rr90.3%
if -4.0000000000000002e-168 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 23.4%
Taylor expanded in t around inf 92.4%
associate--l+92.4%
distribute-lft-out--92.4%
div-sub92.4%
mul-1-neg92.4%
unsub-neg92.4%
*-commutative92.4%
distribute-lft-out--92.4%
Simplified92.4%
Final simplification90.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (+ x y) (* t (/ y (- a t))))) (t_2 (- (+ x y) (/ (* y z) a))))
(if (<= a -9e+204)
t_1
(if (<= a -2.1e+172)
(* y (+ 1.0 (/ (- z t) (- t a))))
(if (<= a -740000000.0)
t_2
(if (<= a 8.8e-91)
(+ x (/ (* y (- z a)) t))
(if (<= a 2.45e+175) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) + (t * (y / (a - t)));
double t_2 = (x + y) - ((y * z) / a);
double tmp;
if (a <= -9e+204) {
tmp = t_1;
} else if (a <= -2.1e+172) {
tmp = y * (1.0 + ((z - t) / (t - a)));
} else if (a <= -740000000.0) {
tmp = t_2;
} else if (a <= 8.8e-91) {
tmp = x + ((y * (z - a)) / t);
} else if (a <= 2.45e+175) {
tmp = t_2;
} 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 = (x + y) + (t * (y / (a - t)))
t_2 = (x + y) - ((y * z) / a)
if (a <= (-9d+204)) then
tmp = t_1
else if (a <= (-2.1d+172)) then
tmp = y * (1.0d0 + ((z - t) / (t - a)))
else if (a <= (-740000000.0d0)) then
tmp = t_2
else if (a <= 8.8d-91) then
tmp = x + ((y * (z - a)) / t)
else if (a <= 2.45d+175) then
tmp = t_2
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) + (t * (y / (a - t)));
double t_2 = (x + y) - ((y * z) / a);
double tmp;
if (a <= -9e+204) {
tmp = t_1;
} else if (a <= -2.1e+172) {
tmp = y * (1.0 + ((z - t) / (t - a)));
} else if (a <= -740000000.0) {
tmp = t_2;
} else if (a <= 8.8e-91) {
tmp = x + ((y * (z - a)) / t);
} else if (a <= 2.45e+175) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) + (t * (y / (a - t))) t_2 = (x + y) - ((y * z) / a) tmp = 0 if a <= -9e+204: tmp = t_1 elif a <= -2.1e+172: tmp = y * (1.0 + ((z - t) / (t - a))) elif a <= -740000000.0: tmp = t_2 elif a <= 8.8e-91: tmp = x + ((y * (z - a)) / t) elif a <= 2.45e+175: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) + Float64(t * Float64(y / Float64(a - t)))) t_2 = Float64(Float64(x + y) - Float64(Float64(y * z) / a)) tmp = 0.0 if (a <= -9e+204) tmp = t_1; elseif (a <= -2.1e+172) tmp = Float64(y * Float64(1.0 + Float64(Float64(z - t) / Float64(t - a)))); elseif (a <= -740000000.0) tmp = t_2; elseif (a <= 8.8e-91) tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); elseif (a <= 2.45e+175) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) + (t * (y / (a - t))); t_2 = (x + y) - ((y * z) / a); tmp = 0.0; if (a <= -9e+204) tmp = t_1; elseif (a <= -2.1e+172) tmp = y * (1.0 + ((z - t) / (t - a))); elseif (a <= -740000000.0) tmp = t_2; elseif (a <= 8.8e-91) tmp = x + ((y * (z - a)) / t); elseif (a <= 2.45e+175) tmp = t_2; 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[(t * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9e+204], t$95$1, If[LessEqual[a, -2.1e+172], N[(y * N[(1.0 + N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -740000000.0], t$95$2, If[LessEqual[a, 8.8e-91], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.45e+175], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + t \cdot \frac{y}{a - t}\\
t_2 := \left(x + y\right) - \frac{y \cdot z}{a}\\
\mathbf{if}\;a \leq -9 \cdot 10^{+204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.1 \cdot 10^{+172}:\\
\;\;\;\;y \cdot \left(1 + \frac{z - t}{t - a}\right)\\
\mathbf{elif}\;a \leq -740000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{-91}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\mathbf{elif}\;a \leq 2.45 \cdot 10^{+175}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -9.00000000000000004e204 or 2.45e175 < a Initial program 71.9%
sub-neg71.9%
+-commutative71.9%
distribute-frac-neg71.9%
distribute-rgt-neg-out71.9%
associate-/l*98.7%
fma-define98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
sub-neg98.6%
distribute-neg-in98.6%
remove-double-neg98.6%
+-commutative98.6%
sub-neg98.6%
Simplified98.6%
fma-undefine98.7%
clear-num98.7%
un-div-inv98.5%
+-commutative98.5%
Applied egg-rr98.5%
Taylor expanded in z around 0 79.4%
associate-+r+79.4%
+-commutative79.4%
mul-1-neg79.4%
unsub-neg79.4%
associate-/l*94.3%
Simplified94.3%
if -9.00000000000000004e204 < a < -2.1000000000000001e172Initial program 36.4%
sub-neg36.4%
+-commutative36.4%
distribute-frac-neg36.4%
distribute-rgt-neg-out36.4%
associate-/l*81.0%
fma-define80.7%
distribute-frac-neg80.7%
distribute-neg-frac280.7%
sub-neg80.7%
distribute-neg-in80.7%
remove-double-neg80.7%
+-commutative80.7%
sub-neg80.7%
Simplified80.7%
fma-undefine81.0%
clear-num74.3%
un-div-inv74.3%
+-commutative74.3%
Applied egg-rr74.3%
Taylor expanded in y around inf 83.1%
associate--l+83.1%
div-sub83.1%
Simplified83.1%
if -2.1000000000000001e172 < a < -7.4e8 or 8.8000000000000003e-91 < a < 2.45e175Initial program 73.4%
Taylor expanded in t around 0 68.9%
+-commutative68.9%
Simplified68.9%
if -7.4e8 < a < 8.8000000000000003e-91Initial program 77.5%
Taylor expanded in t around inf 85.4%
associate--l+85.4%
distribute-lft-out--85.4%
div-sub85.4%
mul-1-neg85.4%
unsub-neg85.4%
*-commutative85.4%
distribute-lft-out--85.4%
Simplified85.4%
Final simplification81.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9e+204)
(+ x y)
(if (<= a -2.1e+172)
(* y (/ z (- t a)))
(if (<= a -9.5e-10)
(+ x y)
(if (<= a -7.2e-214)
x
(if (<= a 5e-112) (/ (* y z) (- t a)) (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9e+204) {
tmp = x + y;
} else if (a <= -2.1e+172) {
tmp = y * (z / (t - a));
} else if (a <= -9.5e-10) {
tmp = x + y;
} else if (a <= -7.2e-214) {
tmp = x;
} else if (a <= 5e-112) {
tmp = (y * z) / (t - a);
} 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 <= (-9d+204)) then
tmp = x + y
else if (a <= (-2.1d+172)) then
tmp = y * (z / (t - a))
else if (a <= (-9.5d-10)) then
tmp = x + y
else if (a <= (-7.2d-214)) then
tmp = x
else if (a <= 5d-112) then
tmp = (y * z) / (t - a)
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 <= -9e+204) {
tmp = x + y;
} else if (a <= -2.1e+172) {
tmp = y * (z / (t - a));
} else if (a <= -9.5e-10) {
tmp = x + y;
} else if (a <= -7.2e-214) {
tmp = x;
} else if (a <= 5e-112) {
tmp = (y * z) / (t - a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9e+204: tmp = x + y elif a <= -2.1e+172: tmp = y * (z / (t - a)) elif a <= -9.5e-10: tmp = x + y elif a <= -7.2e-214: tmp = x elif a <= 5e-112: tmp = (y * z) / (t - a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9e+204) tmp = Float64(x + y); elseif (a <= -2.1e+172) tmp = Float64(y * Float64(z / Float64(t - a))); elseif (a <= -9.5e-10) tmp = Float64(x + y); elseif (a <= -7.2e-214) tmp = x; elseif (a <= 5e-112) tmp = Float64(Float64(y * z) / Float64(t - a)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9e+204) tmp = x + y; elseif (a <= -2.1e+172) tmp = y * (z / (t - a)); elseif (a <= -9.5e-10) tmp = x + y; elseif (a <= -7.2e-214) tmp = x; elseif (a <= 5e-112) tmp = (y * z) / (t - a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9e+204], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.1e+172], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -9.5e-10], N[(x + y), $MachinePrecision], If[LessEqual[a, -7.2e-214], x, If[LessEqual[a, 5e-112], N[(N[(y * z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9 \cdot 10^{+204}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.1 \cdot 10^{+172}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{elif}\;a \leq -9.5 \cdot 10^{-10}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -7.2 \cdot 10^{-214}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 5 \cdot 10^{-112}:\\
\;\;\;\;\frac{y \cdot z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -9.00000000000000004e204 or -2.1000000000000001e172 < a < -9.50000000000000028e-10 or 5.00000000000000044e-112 < a Initial program 73.2%
Taylor expanded in a around inf 72.9%
+-commutative72.9%
Simplified72.9%
if -9.00000000000000004e204 < a < -2.1000000000000001e172Initial program 36.4%
Taylor expanded in z around inf 35.8%
mul-1-neg35.8%
associate-/l*81.2%
distribute-rgt-neg-in81.2%
distribute-neg-frac281.2%
sub0-neg81.2%
associate--r-81.2%
neg-sub081.2%
Simplified81.2%
Taylor expanded in z around 0 81.2%
if -9.50000000000000028e-10 < a < -7.2e-214Initial program 78.6%
Taylor expanded in x around inf 64.0%
if -7.2e-214 < a < 5.00000000000000044e-112Initial program 75.8%
sub-neg75.8%
+-commutative75.8%
distribute-frac-neg75.8%
distribute-rgt-neg-out75.8%
associate-/l*79.4%
fma-define79.4%
distribute-frac-neg79.4%
distribute-neg-frac279.4%
sub-neg79.4%
distribute-neg-in79.4%
remove-double-neg79.4%
+-commutative79.4%
sub-neg79.4%
Simplified79.4%
Taylor expanded in z around inf 65.5%
Final simplification70.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9e+204)
(+ x y)
(if (<= a -2.1e+172)
(* y (+ 1.0 (/ (- z t) (- t a))))
(if (or (<= a -12200000000.0) (not (<= a 7e-92)))
(- (+ 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 <= -9e+204) {
tmp = x + y;
} else if (a <= -2.1e+172) {
tmp = y * (1.0 + ((z - t) / (t - a)));
} else if ((a <= -12200000000.0) || !(a <= 7e-92)) {
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 <= (-9d+204)) then
tmp = x + y
else if (a <= (-2.1d+172)) then
tmp = y * (1.0d0 + ((z - t) / (t - a)))
else if ((a <= (-12200000000.0d0)) .or. (.not. (a <= 7d-92))) 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 <= -9e+204) {
tmp = x + y;
} else if (a <= -2.1e+172) {
tmp = y * (1.0 + ((z - t) / (t - a)));
} else if ((a <= -12200000000.0) || !(a <= 7e-92)) {
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 <= -9e+204: tmp = x + y elif a <= -2.1e+172: tmp = y * (1.0 + ((z - t) / (t - a))) elif (a <= -12200000000.0) or not (a <= 7e-92): 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 <= -9e+204) tmp = Float64(x + y); elseif (a <= -2.1e+172) tmp = Float64(y * Float64(1.0 + Float64(Float64(z - t) / Float64(t - a)))); elseif ((a <= -12200000000.0) || !(a <= 7e-92)) tmp = Float64(Float64(x + y) - Float64(Float64(y * 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 <= -9e+204) tmp = x + y; elseif (a <= -2.1e+172) tmp = y * (1.0 + ((z - t) / (t - a))); elseif ((a <= -12200000000.0) || ~((a <= 7e-92))) 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[LessEqual[a, -9e+204], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.1e+172], N[(y * N[(1.0 + N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -12200000000.0], N[Not[LessEqual[a, 7e-92]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / a), $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 -9 \cdot 10^{+204}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.1 \cdot 10^{+172}:\\
\;\;\;\;y \cdot \left(1 + \frac{z - t}{t - a}\right)\\
\mathbf{elif}\;a \leq -12200000000 \lor \neg \left(a \leq 7 \cdot 10^{-92}\right):\\
\;\;\;\;\left(x + y\right) - \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if a < -9.00000000000000004e204Initial program 77.9%
Taylor expanded in a around inf 96.5%
+-commutative96.5%
Simplified96.5%
if -9.00000000000000004e204 < a < -2.1000000000000001e172Initial program 36.4%
sub-neg36.4%
+-commutative36.4%
distribute-frac-neg36.4%
distribute-rgt-neg-out36.4%
associate-/l*81.0%
fma-define80.7%
distribute-frac-neg80.7%
distribute-neg-frac280.7%
sub-neg80.7%
distribute-neg-in80.7%
remove-double-neg80.7%
+-commutative80.7%
sub-neg80.7%
Simplified80.7%
fma-undefine81.0%
clear-num74.3%
un-div-inv74.3%
+-commutative74.3%
Applied egg-rr74.3%
Taylor expanded in y around inf 83.1%
associate--l+83.1%
div-sub83.1%
Simplified83.1%
if -2.1000000000000001e172 < a < -1.22e10 or 7e-92 < a Initial program 71.4%
Taylor expanded in t around 0 71.3%
+-commutative71.3%
Simplified71.3%
if -1.22e10 < a < 7e-92Initial program 77.5%
Taylor expanded in t around inf 85.4%
associate--l+85.4%
distribute-lft-out--85.4%
div-sub85.4%
mul-1-neg85.4%
unsub-neg85.4%
*-commutative85.4%
distribute-lft-out--85.4%
Simplified85.4%
Final simplification80.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9e+204)
(+ x y)
(if (<= a -2.1e+172)
(* y (/ z (- t a)))
(if (or (<= a -88000000.0) (not (<= a 1.75e-87)))
(- (+ 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 <= -9e+204) {
tmp = x + y;
} else if (a <= -2.1e+172) {
tmp = y * (z / (t - a));
} else if ((a <= -88000000.0) || !(a <= 1.75e-87)) {
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 <= (-9d+204)) then
tmp = x + y
else if (a <= (-2.1d+172)) then
tmp = y * (z / (t - a))
else if ((a <= (-88000000.0d0)) .or. (.not. (a <= 1.75d-87))) 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 <= -9e+204) {
tmp = x + y;
} else if (a <= -2.1e+172) {
tmp = y * (z / (t - a));
} else if ((a <= -88000000.0) || !(a <= 1.75e-87)) {
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 <= -9e+204: tmp = x + y elif a <= -2.1e+172: tmp = y * (z / (t - a)) elif (a <= -88000000.0) or not (a <= 1.75e-87): 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 <= -9e+204) tmp = Float64(x + y); elseif (a <= -2.1e+172) tmp = Float64(y * Float64(z / Float64(t - a))); elseif ((a <= -88000000.0) || !(a <= 1.75e-87)) tmp = Float64(Float64(x + y) - Float64(Float64(y * 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 <= -9e+204) tmp = x + y; elseif (a <= -2.1e+172) tmp = y * (z / (t - a)); elseif ((a <= -88000000.0) || ~((a <= 1.75e-87))) 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[LessEqual[a, -9e+204], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.1e+172], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -88000000.0], N[Not[LessEqual[a, 1.75e-87]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / a), $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 -9 \cdot 10^{+204}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.1 \cdot 10^{+172}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{elif}\;a \leq -88000000 \lor \neg \left(a \leq 1.75 \cdot 10^{-87}\right):\\
\;\;\;\;\left(x + y\right) - \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if a < -9.00000000000000004e204Initial program 77.9%
Taylor expanded in a around inf 96.5%
+-commutative96.5%
Simplified96.5%
if -9.00000000000000004e204 < a < -2.1000000000000001e172Initial program 36.4%
Taylor expanded in z around inf 35.8%
mul-1-neg35.8%
associate-/l*81.2%
distribute-rgt-neg-in81.2%
distribute-neg-frac281.2%
sub0-neg81.2%
associate--r-81.2%
neg-sub081.2%
Simplified81.2%
Taylor expanded in z around 0 81.2%
if -2.1000000000000001e172 < a < -8.8e7 or 1.75000000000000006e-87 < a Initial program 71.4%
Taylor expanded in t around 0 71.3%
+-commutative71.3%
Simplified71.3%
if -8.8e7 < a < 1.75000000000000006e-87Initial program 77.5%
Taylor expanded in t around inf 85.4%
associate--l+85.4%
distribute-lft-out--85.4%
div-sub85.4%
mul-1-neg85.4%
unsub-neg85.4%
*-commutative85.4%
distribute-lft-out--85.4%
Simplified85.4%
Final simplification80.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9e+204)
(+ x y)
(if (<= a -2.1e+172)
(* y (/ z (- t a)))
(if (or (<= a -4500000000.0) (not (<= a 1.8e-110)))
(+ x y)
(+ x (/ (* y (- z a)) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9e+204) {
tmp = x + y;
} else if (a <= -2.1e+172) {
tmp = y * (z / (t - a));
} else if ((a <= -4500000000.0) || !(a <= 1.8e-110)) {
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 <= (-9d+204)) then
tmp = x + y
else if (a <= (-2.1d+172)) then
tmp = y * (z / (t - a))
else if ((a <= (-4500000000.0d0)) .or. (.not. (a <= 1.8d-110))) 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 <= -9e+204) {
tmp = x + y;
} else if (a <= -2.1e+172) {
tmp = y * (z / (t - a));
} else if ((a <= -4500000000.0) || !(a <= 1.8e-110)) {
tmp = x + y;
} else {
tmp = x + ((y * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9e+204: tmp = x + y elif a <= -2.1e+172: tmp = y * (z / (t - a)) elif (a <= -4500000000.0) or not (a <= 1.8e-110): tmp = x + y else: tmp = x + ((y * (z - a)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9e+204) tmp = Float64(x + y); elseif (a <= -2.1e+172) tmp = Float64(y * Float64(z / Float64(t - a))); elseif ((a <= -4500000000.0) || !(a <= 1.8e-110)) 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 <= -9e+204) tmp = x + y; elseif (a <= -2.1e+172) tmp = y * (z / (t - a)); elseif ((a <= -4500000000.0) || ~((a <= 1.8e-110))) tmp = x + y; else tmp = x + ((y * (z - a)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9e+204], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.1e+172], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -4500000000.0], N[Not[LessEqual[a, 1.8e-110]], $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 -9 \cdot 10^{+204}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.1 \cdot 10^{+172}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{elif}\;a \leq -4500000000 \lor \neg \left(a \leq 1.8 \cdot 10^{-110}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if a < -9.00000000000000004e204 or -2.1000000000000001e172 < a < -4.5e9 or 1.79999999999999997e-110 < a Initial program 73.5%
Taylor expanded in a around inf 73.2%
+-commutative73.2%
Simplified73.2%
if -9.00000000000000004e204 < a < -2.1000000000000001e172Initial program 36.4%
Taylor expanded in z around inf 35.8%
mul-1-neg35.8%
associate-/l*81.2%
distribute-rgt-neg-in81.2%
distribute-neg-frac281.2%
sub0-neg81.2%
associate--r-81.2%
neg-sub081.2%
Simplified81.2%
Taylor expanded in z around 0 81.2%
if -4.5e9 < a < 1.79999999999999997e-110Initial program 76.5%
Taylor expanded in t around inf 84.8%
associate--l+84.8%
distribute-lft-out--84.8%
div-sub84.8%
mul-1-neg84.8%
unsub-neg84.8%
*-commutative84.8%
distribute-lft-out--84.8%
Simplified84.8%
Final simplification77.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- t a)))))
(if (<= z -3e+148)
t_1
(if (<= z -1.86e+109)
x
(if (or (<= z -1.9e+51) (not (<= z 9.5e+109))) 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 (z <= -3e+148) {
tmp = t_1;
} else if (z <= -1.86e+109) {
tmp = x;
} else if ((z <= -1.9e+51) || !(z <= 9.5e+109)) {
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 (z <= (-3d+148)) then
tmp = t_1
else if (z <= (-1.86d+109)) then
tmp = x
else if ((z <= (-1.9d+51)) .or. (.not. (z <= 9.5d+109))) 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 (z <= -3e+148) {
tmp = t_1;
} else if (z <= -1.86e+109) {
tmp = x;
} else if ((z <= -1.9e+51) || !(z <= 9.5e+109)) {
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 z <= -3e+148: tmp = t_1 elif z <= -1.86e+109: tmp = x elif (z <= -1.9e+51) or not (z <= 9.5e+109): 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 (z <= -3e+148) tmp = t_1; elseif (z <= -1.86e+109) tmp = x; elseif ((z <= -1.9e+51) || !(z <= 9.5e+109)) 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 (z <= -3e+148) tmp = t_1; elseif (z <= -1.86e+109) tmp = x; elseif ((z <= -1.9e+51) || ~((z <= 9.5e+109))) 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[z, -3e+148], t$95$1, If[LessEqual[z, -1.86e+109], x, If[Or[LessEqual[z, -1.9e+51], N[Not[LessEqual[z, 9.5e+109]], $MachinePrecision]], t$95$1, N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t - a}\\
\mathbf{if}\;z \leq -3 \cdot 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.86 \cdot 10^{+109}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{+51} \lor \neg \left(z \leq 9.5 \cdot 10^{+109}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -3.00000000000000015e148 or -1.86000000000000008e109 < z < -1.8999999999999999e51 or 9.49999999999999972e109 < z Initial program 71.5%
Taylor expanded in z around inf 46.3%
mul-1-neg46.3%
associate-/l*58.9%
distribute-rgt-neg-in58.9%
distribute-neg-frac258.9%
sub0-neg58.9%
associate--r-58.9%
neg-sub058.9%
Simplified58.9%
Taylor expanded in z around 0 58.9%
if -3.00000000000000015e148 < z < -1.86000000000000008e109Initial program 72.3%
Taylor expanded in x around inf 87.7%
if -1.8999999999999999e51 < z < 9.49999999999999972e109Initial program 75.3%
Taylor expanded in a around inf 71.4%
+-commutative71.4%
Simplified71.4%
Final simplification67.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.2e-11) (+ x y) (if (<= a -1.7e-216) x (if (<= a 3.1e-112) (* z (/ y t)) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.2e-11) {
tmp = x + y;
} else if (a <= -1.7e-216) {
tmp = x;
} else if (a <= 3.1e-112) {
tmp = z * (y / t);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5.2d-11)) then
tmp = x + y
else if (a <= (-1.7d-216)) then
tmp = x
else if (a <= 3.1d-112) then
tmp = z * (y / t)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.2e-11) {
tmp = x + y;
} else if (a <= -1.7e-216) {
tmp = x;
} else if (a <= 3.1e-112) {
tmp = z * (y / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.2e-11: tmp = x + y elif a <= -1.7e-216: tmp = x elif a <= 3.1e-112: tmp = z * (y / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.2e-11) tmp = Float64(x + y); elseif (a <= -1.7e-216) tmp = x; elseif (a <= 3.1e-112) tmp = Float64(z * Float64(y / t)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.2e-11) tmp = x + y; elseif (a <= -1.7e-216) tmp = x; elseif (a <= 3.1e-112) tmp = z * (y / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.2e-11], N[(x + y), $MachinePrecision], If[LessEqual[a, -1.7e-216], x, If[LessEqual[a, 3.1e-112], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{-11}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-216}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-112}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -5.2000000000000001e-11 or 3.0999999999999998e-112 < a Initial program 71.8%
Taylor expanded in a around inf 70.4%
+-commutative70.4%
Simplified70.4%
if -5.2000000000000001e-11 < a < -1.6999999999999999e-216Initial program 78.6%
Taylor expanded in x around inf 64.0%
if -1.6999999999999999e-216 < a < 3.0999999999999998e-112Initial program 75.8%
Taylor expanded in z around inf 65.5%
mul-1-neg65.5%
associate-/l*61.9%
distribute-rgt-neg-in61.9%
distribute-neg-frac261.9%
sub0-neg61.9%
associate--r-61.9%
neg-sub061.9%
Simplified61.9%
Taylor expanded in a around 0 55.8%
*-commutative55.8%
associate-/l*61.3%
Applied egg-rr61.3%
Final simplification67.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -56000000.0) (not (<= a 7.5e-88))) (- (+ x y) (* z (/ y a))) (+ x (/ (* y (- z a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -56000000.0) || !(a <= 7.5e-88)) {
tmp = (x + y) - (z * (y / 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 <= (-56000000.0d0)) .or. (.not. (a <= 7.5d-88))) then
tmp = (x + y) - (z * (y / 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 <= -56000000.0) || !(a <= 7.5e-88)) {
tmp = (x + y) - (z * (y / a));
} else {
tmp = x + ((y * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -56000000.0) or not (a <= 7.5e-88): tmp = (x + y) - (z * (y / a)) else: tmp = x + ((y * (z - a)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -56000000.0) || !(a <= 7.5e-88)) tmp = Float64(Float64(x + y) - Float64(z * Float64(y / 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 <= -56000000.0) || ~((a <= 7.5e-88))) tmp = (x + y) - (z * (y / a)); else tmp = x + ((y * (z - a)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -56000000.0], N[Not[LessEqual[a, 7.5e-88]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(z * N[(y / 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 -56000000 \lor \neg \left(a \leq 7.5 \cdot 10^{-88}\right):\\
\;\;\;\;\left(x + y\right) - z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if a < -5.6e7 or 7.50000000000000041e-88 < a Initial program 71.3%
Taylor expanded in t around 0 73.1%
+-commutative73.1%
Simplified73.1%
*-commutative73.1%
*-un-lft-identity73.1%
times-frac81.5%
Applied egg-rr81.5%
if -5.6e7 < a < 7.50000000000000041e-88Initial program 77.5%
Taylor expanded in t around inf 85.4%
associate--l+85.4%
distribute-lft-out--85.4%
div-sub85.4%
mul-1-neg85.4%
unsub-neg85.4%
*-commutative85.4%
distribute-lft-out--85.4%
Simplified85.4%
Final simplification83.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.5e-166) (not (<= a 4.8e-112))) (+ x y) (* y (/ z t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.5e-166) || !(a <= 4.8e-112)) {
tmp = x + y;
} else {
tmp = 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 <= (-8.5d-166)) .or. (.not. (a <= 4.8d-112))) then
tmp = x + y
else
tmp = 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 <= -8.5e-166) || !(a <= 4.8e-112)) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8.5e-166) or not (a <= 4.8e-112): tmp = x + y else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8.5e-166) || !(a <= 4.8e-112)) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -8.5e-166) || ~((a <= 4.8e-112))) tmp = x + y; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8.5e-166], N[Not[LessEqual[a, 4.8e-112]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{-166} \lor \neg \left(a \leq 4.8 \cdot 10^{-112}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -8.5e-166 or 4.8000000000000001e-112 < a Initial program 72.7%
Taylor expanded in a around inf 68.8%
+-commutative68.8%
Simplified68.8%
if -8.5e-166 < a < 4.8000000000000001e-112Initial program 76.6%
Taylor expanded in z around inf 60.5%
mul-1-neg60.5%
associate-/l*59.2%
distribute-rgt-neg-in59.2%
distribute-neg-frac259.2%
sub0-neg59.2%
associate--r-59.2%
neg-sub059.2%
Simplified59.2%
Taylor expanded in a around 0 53.3%
Final simplification64.6%
(FPCore (x y z t a) :precision binary64 (if (<= t 7.4e+168) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 7.4e+168) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 7.4d+168) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 7.4e+168) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 7.4e+168: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 7.4e+168) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 7.4e+168) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 7.4e+168], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.4 \cdot 10^{+168}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < 7.40000000000000018e168Initial program 77.1%
Taylor expanded in a around inf 59.3%
+-commutative59.3%
Simplified59.3%
if 7.40000000000000018e168 < t Initial program 44.6%
Taylor expanded in x around inf 78.2%
Final simplification61.2%
(FPCore (x y z t a) :precision binary64 (if (<= y 1.6e+77) x y))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.6e+77) {
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+77) 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+77) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 1.6e+77: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 1.6e+77) 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+77) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.6e+77], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.6 \cdot 10^{+77}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 1.6000000000000001e77Initial program 77.9%
Taylor expanded in x around inf 57.6%
if 1.6000000000000001e77 < y Initial program 55.2%
Taylor expanded in t around 0 56.6%
+-commutative56.6%
Simplified56.6%
Taylor expanded in x around 0 47.0%
Taylor expanded in z around 0 33.9%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 73.8%
Taylor expanded in x around inf 50.2%
(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 2024097
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(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))))