
(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
(let* ((t_1 (/ y (- t a))) (t_2 (- (+ x y) (/ (* y (- z t)) (- a t)))))
(if (<= t_2 -2e-70)
(fma (- z t) t_1 (+ x y))
(if (<= t_2 1e-234)
(+ x (* y (- (/ z t) (/ a t))))
(if (<= t_2 5e+302)
(- (+ x y) (/ 1.0 (* (- a t) (/ (/ 1.0 y) (- z t)))))
(* z (+ t_1 (/ (+ x (- y (* t t_1))) z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (t - a);
double t_2 = (x + y) - ((y * (z - t)) / (a - t));
double tmp;
if (t_2 <= -2e-70) {
tmp = fma((z - t), t_1, (x + y));
} else if (t_2 <= 1e-234) {
tmp = x + (y * ((z / t) - (a / t)));
} else if (t_2 <= 5e+302) {
tmp = (x + y) - (1.0 / ((a - t) * ((1.0 / y) / (z - t))));
} else {
tmp = z * (t_1 + ((x + (y - (t * t_1))) / z));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y / Float64(t - a)) t_2 = Float64(Float64(x + y) - Float64(Float64(y * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -2e-70) tmp = fma(Float64(z - t), t_1, Float64(x + y)); elseif (t_2 <= 1e-234) tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t)))); elseif (t_2 <= 5e+302) tmp = Float64(Float64(x + y) - Float64(1.0 / Float64(Float64(a - t) * Float64(Float64(1.0 / y) / Float64(z - t))))); else tmp = Float64(z * Float64(t_1 + Float64(Float64(x + Float64(y - Float64(t * t_1))) / z))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-70], N[(N[(z - t), $MachinePrecision] * t$95$1 + N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-234], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+302], N[(N[(x + y), $MachinePrecision] - N[(1.0 / N[(N[(a - t), $MachinePrecision] * N[(N[(1.0 / y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(t$95$1 + N[(N[(x + N[(y - N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{t - a}\\
t_2 := \left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-70}:\\
\;\;\;\;\mathsf{fma}\left(z - t, t\_1, x + y\right)\\
\mathbf{elif}\;t\_2 \leq 10^{-234}:\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\left(x + y\right) - \frac{1}{\left(a - t\right) \cdot \frac{\frac{1}{y}}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(t\_1 + \frac{x + \left(y - t \cdot t\_1\right)}{z}\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.99999999999999999e-70Initial program 78.9%
sub-neg78.9%
+-commutative78.9%
distribute-frac-neg78.9%
distribute-rgt-neg-out78.9%
associate-/l*87.8%
fma-define88.0%
distribute-frac-neg88.0%
distribute-neg-frac288.0%
sub-neg88.0%
distribute-neg-in88.0%
remove-double-neg88.0%
+-commutative88.0%
sub-neg88.0%
Simplified88.0%
if -1.99999999999999999e-70 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999996e-235Initial program 24.9%
sub-neg24.9%
+-commutative24.9%
distribute-frac-neg24.9%
distribute-rgt-neg-out24.9%
associate-/l*25.1%
fma-define24.9%
distribute-frac-neg24.9%
distribute-neg-frac224.9%
sub-neg24.9%
distribute-neg-in24.9%
remove-double-neg24.9%
+-commutative24.9%
sub-neg24.9%
Simplified24.9%
Taylor expanded in t around inf 75.2%
associate-+r+92.4%
distribute-rgt1-in92.4%
metadata-eval92.4%
associate-/l*92.5%
associate-/l*85.4%
Simplified85.4%
Taylor expanded in y around 0 94.0%
if 9.9999999999999996e-235 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 5e302Initial program 97.5%
clear-num97.5%
inv-pow97.5%
*-commutative97.5%
Applied egg-rr97.5%
unpow-197.5%
associate-/r*93.1%
Simplified93.1%
div-inv93.1%
*-un-lft-identity93.1%
times-frac97.6%
Applied egg-rr97.6%
if 5e302 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 40.5%
sub-neg40.5%
+-commutative40.5%
distribute-frac-neg40.5%
distribute-rgt-neg-out40.5%
associate-/l*69.0%
fma-define69.5%
distribute-frac-neg69.5%
distribute-neg-frac269.5%
sub-neg69.5%
distribute-neg-in69.5%
remove-double-neg69.5%
+-commutative69.5%
sub-neg69.5%
Simplified69.5%
Taylor expanded in z around -inf 49.0%
mul-1-neg49.0%
*-commutative49.0%
distribute-rgt-neg-in49.0%
Simplified76.9%
Final simplification89.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (/ (* y (- z t)) (- a t)))) (t_2 (/ y (- t a))))
(if (<= t_1 -2e-163)
(+ (+ x y) (/ -1.0 (/ (/ (- a t) y) (- z t))))
(if (<= t_1 1e-234)
(+ x (* y (- (/ z t) (/ a t))))
(if (<= t_1 5e+302)
(- (+ x y) (/ 1.0 (* (- a t) (/ (/ 1.0 y) (- z t)))))
(* z (+ t_2 (/ (+ x (- y (* t t_2))) z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - ((y * (z - t)) / (a - t));
double t_2 = y / (t - a);
double tmp;
if (t_1 <= -2e-163) {
tmp = (x + y) + (-1.0 / (((a - t) / y) / (z - t)));
} else if (t_1 <= 1e-234) {
tmp = x + (y * ((z / t) - (a / t)));
} else if (t_1 <= 5e+302) {
tmp = (x + y) - (1.0 / ((a - t) * ((1.0 / y) / (z - t))));
} else {
tmp = z * (t_2 + ((x + (y - (t * t_2))) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + y) - ((y * (z - t)) / (a - t))
t_2 = y / (t - a)
if (t_1 <= (-2d-163)) then
tmp = (x + y) + ((-1.0d0) / (((a - t) / y) / (z - t)))
else if (t_1 <= 1d-234) then
tmp = x + (y * ((z / t) - (a / t)))
else if (t_1 <= 5d+302) then
tmp = (x + y) - (1.0d0 / ((a - t) * ((1.0d0 / y) / (z - t))))
else
tmp = z * (t_2 + ((x + (y - (t * t_2))) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - ((y * (z - t)) / (a - t));
double t_2 = y / (t - a);
double tmp;
if (t_1 <= -2e-163) {
tmp = (x + y) + (-1.0 / (((a - t) / y) / (z - t)));
} else if (t_1 <= 1e-234) {
tmp = x + (y * ((z / t) - (a / t)));
} else if (t_1 <= 5e+302) {
tmp = (x + y) - (1.0 / ((a - t) * ((1.0 / y) / (z - t))));
} else {
tmp = z * (t_2 + ((x + (y - (t * t_2))) / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - ((y * (z - t)) / (a - t)) t_2 = y / (t - a) tmp = 0 if t_1 <= -2e-163: tmp = (x + y) + (-1.0 / (((a - t) / y) / (z - t))) elif t_1 <= 1e-234: tmp = x + (y * ((z / t) - (a / t))) elif t_1 <= 5e+302: tmp = (x + y) - (1.0 / ((a - t) * ((1.0 / y) / (z - t)))) else: tmp = z * (t_2 + ((x + (y - (t * t_2))) / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(Float64(y * Float64(z - t)) / Float64(a - t))) t_2 = Float64(y / Float64(t - a)) tmp = 0.0 if (t_1 <= -2e-163) tmp = Float64(Float64(x + y) + Float64(-1.0 / Float64(Float64(Float64(a - t) / y) / Float64(z - t)))); elseif (t_1 <= 1e-234) tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t)))); elseif (t_1 <= 5e+302) tmp = Float64(Float64(x + y) - Float64(1.0 / Float64(Float64(a - t) * Float64(Float64(1.0 / y) / Float64(z - t))))); else tmp = Float64(z * Float64(t_2 + Float64(Float64(x + Float64(y - Float64(t * t_2))) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - ((y * (z - t)) / (a - t)); t_2 = y / (t - a); tmp = 0.0; if (t_1 <= -2e-163) tmp = (x + y) + (-1.0 / (((a - t) / y) / (z - t))); elseif (t_1 <= 1e-234) tmp = x + (y * ((z / t) - (a / t))); elseif (t_1 <= 5e+302) tmp = (x + y) - (1.0 / ((a - t) * ((1.0 / y) / (z - t)))); else tmp = z * (t_2 + ((x + (y - (t * t_2))) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-163], N[(N[(x + y), $MachinePrecision] + N[(-1.0 / N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-234], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+302], N[(N[(x + y), $MachinePrecision] - N[(1.0 / N[(N[(a - t), $MachinePrecision] * N[(N[(1.0 / y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(t$95$2 + N[(N[(x + N[(y - N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t}\\
t_2 := \frac{y}{t - a}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-163}:\\
\;\;\;\;\left(x + y\right) + \frac{-1}{\frac{\frac{a - t}{y}}{z - t}}\\
\mathbf{elif}\;t\_1 \leq 10^{-234}:\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\left(x + y\right) - \frac{1}{\left(a - t\right) \cdot \frac{\frac{1}{y}}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(t\_2 + \frac{x + \left(y - t \cdot t\_2\right)}{z}\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.99999999999999985e-163Initial program 78.8%
clear-num78.8%
inv-pow78.8%
*-commutative78.8%
Applied egg-rr78.8%
unpow-178.8%
associate-/r*87.5%
Simplified87.5%
if -1.99999999999999985e-163 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999996e-235Initial program 17.9%
sub-neg17.9%
+-commutative17.9%
distribute-frac-neg17.9%
distribute-rgt-neg-out17.9%
associate-/l*18.1%
fma-define17.9%
distribute-frac-neg17.9%
distribute-neg-frac217.9%
sub-neg17.9%
distribute-neg-in17.9%
remove-double-neg17.9%
+-commutative17.9%
sub-neg17.9%
Simplified17.9%
Taylor expanded in t around inf 75.1%
associate-+r+94.6%
distribute-rgt1-in94.6%
metadata-eval94.6%
associate-/l*94.8%
associate-/l*86.7%
Simplified86.7%
Taylor expanded in y around 0 96.5%
if 9.9999999999999996e-235 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 5e302Initial program 97.5%
clear-num97.5%
inv-pow97.5%
*-commutative97.5%
Applied egg-rr97.5%
unpow-197.5%
associate-/r*93.1%
Simplified93.1%
div-inv93.1%
*-un-lft-identity93.1%
times-frac97.6%
Applied egg-rr97.6%
if 5e302 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 40.5%
sub-neg40.5%
+-commutative40.5%
distribute-frac-neg40.5%
distribute-rgt-neg-out40.5%
associate-/l*69.0%
fma-define69.5%
distribute-frac-neg69.5%
distribute-neg-frac269.5%
sub-neg69.5%
distribute-neg-in69.5%
remove-double-neg69.5%
+-commutative69.5%
sub-neg69.5%
Simplified69.5%
Taylor expanded in z around -inf 49.0%
mul-1-neg49.0%
*-commutative49.0%
distribute-rgt-neg-in49.0%
Simplified76.9%
Final simplification89.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (/ (* y (- z t)) (- a t)))))
(if (<= t_1 -2e-163)
(+ (+ x y) (/ -1.0 (/ (/ (- a t) y) (- z t))))
(if (or (<= t_1 1e-234) (not (<= t_1 5e+302)))
(+ x (* y (- (/ z t) (/ a t))))
(- (+ x y) (/ 1.0 (* (- a t) (/ (/ 1.0 y) (- z t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - ((y * (z - t)) / (a - t));
double tmp;
if (t_1 <= -2e-163) {
tmp = (x + y) + (-1.0 / (((a - t) / y) / (z - t)));
} else if ((t_1 <= 1e-234) || !(t_1 <= 5e+302)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = (x + y) - (1.0 / ((a - t) * ((1.0 / 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) :: t_1
real(8) :: tmp
t_1 = (x + y) - ((y * (z - t)) / (a - t))
if (t_1 <= (-2d-163)) then
tmp = (x + y) + ((-1.0d0) / (((a - t) / y) / (z - t)))
else if ((t_1 <= 1d-234) .or. (.not. (t_1 <= 5d+302))) then
tmp = x + (y * ((z / t) - (a / t)))
else
tmp = (x + y) - (1.0d0 / ((a - t) * ((1.0d0 / y) / (z - 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)) / (a - t));
double tmp;
if (t_1 <= -2e-163) {
tmp = (x + y) + (-1.0 / (((a - t) / y) / (z - t)));
} else if ((t_1 <= 1e-234) || !(t_1 <= 5e+302)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = (x + y) - (1.0 / ((a - t) * ((1.0 / y) / (z - t))));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - ((y * (z - t)) / (a - t)) tmp = 0 if t_1 <= -2e-163: tmp = (x + y) + (-1.0 / (((a - t) / y) / (z - t))) elif (t_1 <= 1e-234) or not (t_1 <= 5e+302): tmp = x + (y * ((z / t) - (a / t))) else: tmp = (x + y) - (1.0 / ((a - t) * ((1.0 / y) / (z - t)))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(Float64(y * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_1 <= -2e-163) tmp = Float64(Float64(x + y) + Float64(-1.0 / Float64(Float64(Float64(a - t) / y) / Float64(z - t)))); elseif ((t_1 <= 1e-234) || !(t_1 <= 5e+302)) tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t)))); else tmp = Float64(Float64(x + y) - Float64(1.0 / Float64(Float64(a - t) * Float64(Float64(1.0 / y) / Float64(z - t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - ((y * (z - t)) / (a - t)); tmp = 0.0; if (t_1 <= -2e-163) tmp = (x + y) + (-1.0 / (((a - t) / y) / (z - t))); elseif ((t_1 <= 1e-234) || ~((t_1 <= 5e+302))) tmp = x + (y * ((z / t) - (a / t))); else tmp = (x + y) - (1.0 / ((a - t) * ((1.0 / y) / (z - 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[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-163], N[(N[(x + y), $MachinePrecision] + N[(-1.0 / N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 1e-234], N[Not[LessEqual[t$95$1, 5e+302]], $MachinePrecision]], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(1.0 / N[(N[(a - t), $MachinePrecision] * N[(N[(1.0 / y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-163}:\\
\;\;\;\;\left(x + y\right) + \frac{-1}{\frac{\frac{a - t}{y}}{z - t}}\\
\mathbf{elif}\;t\_1 \leq 10^{-234} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+302}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{1}{\left(a - t\right) \cdot \frac{\frac{1}{y}}{z - t}}\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.99999999999999985e-163Initial program 78.8%
clear-num78.8%
inv-pow78.8%
*-commutative78.8%
Applied egg-rr78.8%
unpow-178.8%
associate-/r*87.5%
Simplified87.5%
if -1.99999999999999985e-163 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999996e-235 or 5e302 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 30.1%
sub-neg30.1%
+-commutative30.1%
distribute-frac-neg30.1%
distribute-rgt-neg-out30.1%
associate-/l*45.6%
fma-define45.7%
distribute-frac-neg45.7%
distribute-neg-frac245.7%
sub-neg45.7%
distribute-neg-in45.7%
remove-double-neg45.7%
+-commutative45.7%
sub-neg45.7%
Simplified45.7%
Taylor expanded in t around inf 61.8%
associate-+r+73.7%
distribute-rgt1-in73.7%
metadata-eval73.7%
associate-/l*76.8%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in y around 0 85.6%
if 9.9999999999999996e-235 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 5e302Initial program 97.5%
clear-num97.5%
inv-pow97.5%
*-commutative97.5%
Applied egg-rr97.5%
unpow-197.5%
associate-/r*93.1%
Simplified93.1%
div-inv93.1%
*-un-lft-identity93.1%
times-frac97.6%
Applied egg-rr97.6%
Final simplification89.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (/ (* y (- z t)) (- a t)))))
(if (<= t_1 -2e-163)
(- (+ x y) (* (/ y (- t a)) (- t z)))
(if (or (<= t_1 1e-234) (not (<= t_1 5e+302)))
(+ x (* y (- (/ z t) (/ a t))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - ((y * (z - t)) / (a - t));
double tmp;
if (t_1 <= -2e-163) {
tmp = (x + y) - ((y / (t - a)) * (t - z));
} else if ((t_1 <= 1e-234) || !(t_1 <= 5e+302)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (x + y) - ((y * (z - t)) / (a - t))
if (t_1 <= (-2d-163)) then
tmp = (x + y) - ((y / (t - a)) * (t - z))
else if ((t_1 <= 1d-234) .or. (.not. (t_1 <= 5d+302))) then
tmp = x + (y * ((z / t) - (a / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - ((y * (z - t)) / (a - t));
double tmp;
if (t_1 <= -2e-163) {
tmp = (x + y) - ((y / (t - a)) * (t - z));
} else if ((t_1 <= 1e-234) || !(t_1 <= 5e+302)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - ((y * (z - t)) / (a - t)) tmp = 0 if t_1 <= -2e-163: tmp = (x + y) - ((y / (t - a)) * (t - z)) elif (t_1 <= 1e-234) or not (t_1 <= 5e+302): tmp = x + (y * ((z / t) - (a / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(Float64(y * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_1 <= -2e-163) tmp = Float64(Float64(x + y) - Float64(Float64(y / Float64(t - a)) * Float64(t - z))); elseif ((t_1 <= 1e-234) || !(t_1 <= 5e+302)) tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - ((y * (z - t)) / (a - t)); tmp = 0.0; if (t_1 <= -2e-163) tmp = (x + y) - ((y / (t - a)) * (t - z)); elseif ((t_1 <= 1e-234) || ~((t_1 <= 5e+302))) tmp = x + (y * ((z / t) - (a / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-163], N[(N[(x + y), $MachinePrecision] - N[(N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 1e-234], N[Not[LessEqual[t$95$1, 5e+302]], $MachinePrecision]], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-163}:\\
\;\;\;\;\left(x + y\right) - \frac{y}{t - a} \cdot \left(t - z\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-234} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+302}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.99999999999999985e-163Initial program 78.8%
associate-/l*87.4%
*-commutative87.4%
Applied egg-rr87.4%
if -1.99999999999999985e-163 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999996e-235 or 5e302 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 30.1%
sub-neg30.1%
+-commutative30.1%
distribute-frac-neg30.1%
distribute-rgt-neg-out30.1%
associate-/l*45.6%
fma-define45.7%
distribute-frac-neg45.7%
distribute-neg-frac245.7%
sub-neg45.7%
distribute-neg-in45.7%
remove-double-neg45.7%
+-commutative45.7%
sub-neg45.7%
Simplified45.7%
Taylor expanded in t around inf 61.8%
associate-+r+73.7%
distribute-rgt1-in73.7%
metadata-eval73.7%
associate-/l*76.8%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in y around 0 85.6%
if 9.9999999999999996e-235 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 5e302Initial program 97.5%
Final simplification89.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (/ (* y (- z t)) (- a t)))))
(if (<= t_1 -2e-163)
(+ (+ x y) (/ -1.0 (/ (/ (- a t) y) (- z t))))
(if (or (<= t_1 1e-234) (not (<= t_1 5e+302)))
(+ x (* y (- (/ z t) (/ a t))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - ((y * (z - t)) / (a - t));
double tmp;
if (t_1 <= -2e-163) {
tmp = (x + y) + (-1.0 / (((a - t) / y) / (z - t)));
} else if ((t_1 <= 1e-234) || !(t_1 <= 5e+302)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (x + y) - ((y * (z - t)) / (a - t))
if (t_1 <= (-2d-163)) then
tmp = (x + y) + ((-1.0d0) / (((a - t) / y) / (z - t)))
else if ((t_1 <= 1d-234) .or. (.not. (t_1 <= 5d+302))) then
tmp = x + (y * ((z / t) - (a / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - ((y * (z - t)) / (a - t));
double tmp;
if (t_1 <= -2e-163) {
tmp = (x + y) + (-1.0 / (((a - t) / y) / (z - t)));
} else if ((t_1 <= 1e-234) || !(t_1 <= 5e+302)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - ((y * (z - t)) / (a - t)) tmp = 0 if t_1 <= -2e-163: tmp = (x + y) + (-1.0 / (((a - t) / y) / (z - t))) elif (t_1 <= 1e-234) or not (t_1 <= 5e+302): tmp = x + (y * ((z / t) - (a / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(Float64(y * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_1 <= -2e-163) tmp = Float64(Float64(x + y) + Float64(-1.0 / Float64(Float64(Float64(a - t) / y) / Float64(z - t)))); elseif ((t_1 <= 1e-234) || !(t_1 <= 5e+302)) tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - ((y * (z - t)) / (a - t)); tmp = 0.0; if (t_1 <= -2e-163) tmp = (x + y) + (-1.0 / (((a - t) / y) / (z - t))); elseif ((t_1 <= 1e-234) || ~((t_1 <= 5e+302))) tmp = x + (y * ((z / t) - (a / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-163], N[(N[(x + y), $MachinePrecision] + N[(-1.0 / N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 1e-234], N[Not[LessEqual[t$95$1, 5e+302]], $MachinePrecision]], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-163}:\\
\;\;\;\;\left(x + y\right) + \frac{-1}{\frac{\frac{a - t}{y}}{z - t}}\\
\mathbf{elif}\;t\_1 \leq 10^{-234} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+302}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.99999999999999985e-163Initial program 78.8%
clear-num78.8%
inv-pow78.8%
*-commutative78.8%
Applied egg-rr78.8%
unpow-178.8%
associate-/r*87.5%
Simplified87.5%
if -1.99999999999999985e-163 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999996e-235 or 5e302 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 30.1%
sub-neg30.1%
+-commutative30.1%
distribute-frac-neg30.1%
distribute-rgt-neg-out30.1%
associate-/l*45.6%
fma-define45.7%
distribute-frac-neg45.7%
distribute-neg-frac245.7%
sub-neg45.7%
distribute-neg-in45.7%
remove-double-neg45.7%
+-commutative45.7%
sub-neg45.7%
Simplified45.7%
Taylor expanded in t around inf 61.8%
associate-+r+73.7%
distribute-rgt1-in73.7%
metadata-eval73.7%
associate-/l*76.8%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in y around 0 85.6%
if 9.9999999999999996e-235 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 5e302Initial program 97.5%
Final simplification89.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z t))))
(if (<= a -2.9e-68)
(+ x y)
(if (<= a -3.6e-91)
(* y (/ (- z) a))
(if (<= a -1.7e-149)
x
(if (<= a -4.1e-169)
t_1
(if (<= a -4.2e-286) x (if (<= a 1.45e-186) t_1 (+ x y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / t);
double tmp;
if (a <= -2.9e-68) {
tmp = x + y;
} else if (a <= -3.6e-91) {
tmp = y * (-z / a);
} else if (a <= -1.7e-149) {
tmp = x;
} else if (a <= -4.1e-169) {
tmp = t_1;
} else if (a <= -4.2e-286) {
tmp = x;
} else if (a <= 1.45e-186) {
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)
if (a <= (-2.9d-68)) then
tmp = x + y
else if (a <= (-3.6d-91)) then
tmp = y * (-z / a)
else if (a <= (-1.7d-149)) then
tmp = x
else if (a <= (-4.1d-169)) then
tmp = t_1
else if (a <= (-4.2d-286)) then
tmp = x
else if (a <= 1.45d-186) 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);
double tmp;
if (a <= -2.9e-68) {
tmp = x + y;
} else if (a <= -3.6e-91) {
tmp = y * (-z / a);
} else if (a <= -1.7e-149) {
tmp = x;
} else if (a <= -4.1e-169) {
tmp = t_1;
} else if (a <= -4.2e-286) {
tmp = x;
} else if (a <= 1.45e-186) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / t) tmp = 0 if a <= -2.9e-68: tmp = x + y elif a <= -3.6e-91: tmp = y * (-z / a) elif a <= -1.7e-149: tmp = x elif a <= -4.1e-169: tmp = t_1 elif a <= -4.2e-286: tmp = x elif a <= 1.45e-186: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / t)) tmp = 0.0 if (a <= -2.9e-68) tmp = Float64(x + y); elseif (a <= -3.6e-91) tmp = Float64(y * Float64(Float64(-z) / a)); elseif (a <= -1.7e-149) tmp = x; elseif (a <= -4.1e-169) tmp = t_1; elseif (a <= -4.2e-286) tmp = x; elseif (a <= 1.45e-186) 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); tmp = 0.0; if (a <= -2.9e-68) tmp = x + y; elseif (a <= -3.6e-91) tmp = y * (-z / a); elseif (a <= -1.7e-149) tmp = x; elseif (a <= -4.1e-169) tmp = t_1; elseif (a <= -4.2e-286) tmp = x; elseif (a <= 1.45e-186) 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 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.9e-68], N[(x + y), $MachinePrecision], If[LessEqual[a, -3.6e-91], N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.7e-149], x, If[LessEqual[a, -4.1e-169], t$95$1, If[LessEqual[a, -4.2e-286], x, If[LessEqual[a, 1.45e-186], t$95$1, N[(x + y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t}\\
\mathbf{if}\;a \leq -2.9 \cdot 10^{-68}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -3.6 \cdot 10^{-91}:\\
\;\;\;\;y \cdot \frac{-z}{a}\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-149}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -4.1 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -4.2 \cdot 10^{-286}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{-186}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.9e-68 or 1.4500000000000001e-186 < a Initial program 73.7%
Taylor expanded in a around inf 66.3%
+-commutative66.3%
Simplified66.3%
if -2.9e-68 < a < -3.6e-91Initial program 85.9%
sub-neg85.9%
+-commutative85.9%
distribute-frac-neg85.9%
distribute-rgt-neg-out85.9%
associate-/l*86.2%
fma-define85.9%
distribute-frac-neg85.9%
distribute-neg-frac285.9%
sub-neg85.9%
distribute-neg-in85.9%
remove-double-neg85.9%
+-commutative85.9%
sub-neg85.9%
Simplified85.9%
Taylor expanded in z around inf 99.8%
Taylor expanded in t around 0 72.5%
mul-1-neg72.5%
associate-/l*71.9%
Simplified71.9%
if -3.6e-91 < a < -1.6999999999999999e-149 or -4.0999999999999998e-169 < a < -4.19999999999999977e-286Initial program 67.6%
Taylor expanded in x around inf 62.7%
if -1.6999999999999999e-149 < a < -4.0999999999999998e-169 or -4.19999999999999977e-286 < a < 1.4500000000000001e-186Initial program 65.8%
sub-neg65.8%
+-commutative65.8%
distribute-frac-neg65.8%
distribute-rgt-neg-out65.8%
associate-/l*62.0%
fma-define62.5%
distribute-frac-neg62.5%
distribute-neg-frac262.5%
sub-neg62.5%
distribute-neg-in62.5%
remove-double-neg62.5%
+-commutative62.5%
sub-neg62.5%
Simplified62.5%
Taylor expanded in z around inf 69.3%
Taylor expanded in t around inf 59.4%
associate-*r/60.2%
Simplified60.2%
Final simplification65.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z t))))
(if (<= a -9e-68)
(+ x y)
(if (<= a -3.4e-91)
(/ (* y (- z)) a)
(if (<= a -6e-150)
x
(if (<= a -5.5e-170)
t_1
(if (<= a -4.9e-286) x (if (<= a 3.6e-189) t_1 (+ x y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / t);
double tmp;
if (a <= -9e-68) {
tmp = x + y;
} else if (a <= -3.4e-91) {
tmp = (y * -z) / a;
} else if (a <= -6e-150) {
tmp = x;
} else if (a <= -5.5e-170) {
tmp = t_1;
} else if (a <= -4.9e-286) {
tmp = x;
} else if (a <= 3.6e-189) {
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)
if (a <= (-9d-68)) then
tmp = x + y
else if (a <= (-3.4d-91)) then
tmp = (y * -z) / a
else if (a <= (-6d-150)) then
tmp = x
else if (a <= (-5.5d-170)) then
tmp = t_1
else if (a <= (-4.9d-286)) then
tmp = x
else if (a <= 3.6d-189) 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);
double tmp;
if (a <= -9e-68) {
tmp = x + y;
} else if (a <= -3.4e-91) {
tmp = (y * -z) / a;
} else if (a <= -6e-150) {
tmp = x;
} else if (a <= -5.5e-170) {
tmp = t_1;
} else if (a <= -4.9e-286) {
tmp = x;
} else if (a <= 3.6e-189) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / t) tmp = 0 if a <= -9e-68: tmp = x + y elif a <= -3.4e-91: tmp = (y * -z) / a elif a <= -6e-150: tmp = x elif a <= -5.5e-170: tmp = t_1 elif a <= -4.9e-286: tmp = x elif a <= 3.6e-189: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / t)) tmp = 0.0 if (a <= -9e-68) tmp = Float64(x + y); elseif (a <= -3.4e-91) tmp = Float64(Float64(y * Float64(-z)) / a); elseif (a <= -6e-150) tmp = x; elseif (a <= -5.5e-170) tmp = t_1; elseif (a <= -4.9e-286) tmp = x; elseif (a <= 3.6e-189) 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); tmp = 0.0; if (a <= -9e-68) tmp = x + y; elseif (a <= -3.4e-91) tmp = (y * -z) / a; elseif (a <= -6e-150) tmp = x; elseif (a <= -5.5e-170) tmp = t_1; elseif (a <= -4.9e-286) tmp = x; elseif (a <= 3.6e-189) 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 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9e-68], N[(x + y), $MachinePrecision], If[LessEqual[a, -3.4e-91], N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -6e-150], x, If[LessEqual[a, -5.5e-170], t$95$1, If[LessEqual[a, -4.9e-286], x, If[LessEqual[a, 3.6e-189], t$95$1, N[(x + y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t}\\
\mathbf{if}\;a \leq -9 \cdot 10^{-68}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{-91}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\
\mathbf{elif}\;a \leq -6 \cdot 10^{-150}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -5.5 \cdot 10^{-170}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -4.9 \cdot 10^{-286}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-189}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -8.99999999999999998e-68 or 3.60000000000000017e-189 < a Initial program 73.7%
Taylor expanded in a around inf 66.3%
+-commutative66.3%
Simplified66.3%
if -8.99999999999999998e-68 < a < -3.40000000000000027e-91Initial program 85.9%
sub-neg85.9%
+-commutative85.9%
distribute-frac-neg85.9%
distribute-rgt-neg-out85.9%
associate-/l*86.2%
fma-define85.9%
distribute-frac-neg85.9%
distribute-neg-frac285.9%
sub-neg85.9%
distribute-neg-in85.9%
remove-double-neg85.9%
+-commutative85.9%
sub-neg85.9%
Simplified85.9%
Taylor expanded in z around inf 99.8%
associate-/l*86.1%
Simplified86.1%
Taylor expanded in t around 0 72.5%
associate-*r/72.5%
mul-1-neg72.5%
distribute-rgt-neg-out72.5%
Simplified72.5%
if -3.40000000000000027e-91 < a < -6.0000000000000003e-150 or -5.50000000000000018e-170 < a < -4.9000000000000001e-286Initial program 67.6%
Taylor expanded in x around inf 62.7%
if -6.0000000000000003e-150 < a < -5.50000000000000018e-170 or -4.9000000000000001e-286 < a < 3.60000000000000017e-189Initial program 65.8%
sub-neg65.8%
+-commutative65.8%
distribute-frac-neg65.8%
distribute-rgt-neg-out65.8%
associate-/l*62.0%
fma-define62.5%
distribute-frac-neg62.5%
distribute-neg-frac262.5%
sub-neg62.5%
distribute-neg-in62.5%
remove-double-neg62.5%
+-commutative62.5%
sub-neg62.5%
Simplified62.5%
Taylor expanded in z around inf 69.3%
Taylor expanded in t around inf 59.4%
associate-*r/60.2%
Simplified60.2%
Final simplification65.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- t a)))))
(if (<= a -2.2e-67)
(+ x y)
(if (<= a -1.7e-92)
t_1
(if (<= a -4e-286) x (if (<= a 2.05e-184) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (t - a));
double tmp;
if (a <= -2.2e-67) {
tmp = x + y;
} else if (a <= -1.7e-92) {
tmp = t_1;
} else if (a <= -4e-286) {
tmp = x;
} else if (a <= 2.05e-184) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z / (t - a))
if (a <= (-2.2d-67)) then
tmp = x + y
else if (a <= (-1.7d-92)) then
tmp = t_1
else if (a <= (-4d-286)) then
tmp = x
else if (a <= 2.05d-184) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (t - a));
double tmp;
if (a <= -2.2e-67) {
tmp = x + y;
} else if (a <= -1.7e-92) {
tmp = t_1;
} else if (a <= -4e-286) {
tmp = x;
} else if (a <= 2.05e-184) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / (t - a)) tmp = 0 if a <= -2.2e-67: tmp = x + y elif a <= -1.7e-92: tmp = t_1 elif a <= -4e-286: tmp = x elif a <= 2.05e-184: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(t - a))) tmp = 0.0 if (a <= -2.2e-67) tmp = Float64(x + y); elseif (a <= -1.7e-92) tmp = t_1; elseif (a <= -4e-286) tmp = x; elseif (a <= 2.05e-184) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / (t - a)); tmp = 0.0; if (a <= -2.2e-67) tmp = x + y; elseif (a <= -1.7e-92) tmp = t_1; elseif (a <= -4e-286) tmp = x; elseif (a <= 2.05e-184) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.2e-67], N[(x + y), $MachinePrecision], If[LessEqual[a, -1.7e-92], t$95$1, If[LessEqual[a, -4e-286], x, If[LessEqual[a, 2.05e-184], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t - a}\\
\mathbf{if}\;a \leq -2.2 \cdot 10^{-67}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-286}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.05 \cdot 10^{-184}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.2000000000000001e-67 or 2.05e-184 < a Initial program 73.7%
Taylor expanded in a around inf 66.3%
+-commutative66.3%
Simplified66.3%
if -2.2000000000000001e-67 < a < -1.7000000000000001e-92 or -4.0000000000000002e-286 < a < 2.05e-184Initial program 67.4%
sub-neg67.4%
+-commutative67.4%
distribute-frac-neg67.4%
distribute-rgt-neg-out67.4%
associate-/l*63.6%
fma-define63.9%
distribute-frac-neg63.9%
distribute-neg-frac263.9%
sub-neg63.9%
distribute-neg-in63.9%
remove-double-neg63.9%
+-commutative63.9%
sub-neg63.9%
Simplified63.9%
Taylor expanded in z around inf 76.1%
associate-/l*74.5%
Simplified74.5%
if -1.7000000000000001e-92 < a < -4.0000000000000002e-286Initial program 69.0%
Taylor expanded in x around inf 58.5%
Final simplification66.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.1e+43) (not (<= t 9.8e+19))) (+ x (* y (- (/ z t) (/ a t)))) (- (+ x y) (* (/ y (- t a)) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.1e+43) || !(t <= 9.8e+19)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = (x + y) - ((y / (t - a)) * (t - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2.1d+43)) .or. (.not. (t <= 9.8d+19))) then
tmp = x + (y * ((z / t) - (a / t)))
else
tmp = (x + y) - ((y / (t - a)) * (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.1e+43) || !(t <= 9.8e+19)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = (x + y) - ((y / (t - a)) * (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.1e+43) or not (t <= 9.8e+19): tmp = x + (y * ((z / t) - (a / t))) else: tmp = (x + y) - ((y / (t - a)) * (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.1e+43) || !(t <= 9.8e+19)) tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t)))); else tmp = Float64(Float64(x + y) - Float64(Float64(y / Float64(t - a)) * Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.1e+43) || ~((t <= 9.8e+19))) tmp = x + (y * ((z / t) - (a / t))); else tmp = (x + y) - ((y / (t - a)) * (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.1e+43], N[Not[LessEqual[t, 9.8e+19]], $MachinePrecision]], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+43} \lor \neg \left(t \leq 9.8 \cdot 10^{+19}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{y}{t - a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if t < -2.10000000000000002e43 or 9.8e19 < t Initial program 49.0%
sub-neg49.0%
+-commutative49.0%
distribute-frac-neg49.0%
distribute-rgt-neg-out49.0%
associate-/l*62.2%
fma-define62.5%
distribute-frac-neg62.5%
distribute-neg-frac262.5%
sub-neg62.5%
distribute-neg-in62.5%
remove-double-neg62.5%
+-commutative62.5%
sub-neg62.5%
Simplified62.5%
Taylor expanded in t around inf 66.9%
associate-+r+75.4%
distribute-rgt1-in75.4%
metadata-eval75.4%
associate-/l*79.8%
associate-/l*85.0%
Simplified85.0%
Taylor expanded in y around 0 86.2%
if -2.10000000000000002e43 < t < 9.8e19Initial program 88.4%
associate-/l*90.5%
*-commutative90.5%
Applied egg-rr90.5%
Final simplification88.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.5e+42) (not (<= t 4e-50))) (+ x (* y (- (/ z t) (/ a t)))) (- (+ x y) (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.5e+42) || !(t <= 4e-50)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = (x + y) - (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.5d+42)) .or. (.not. (t <= 4d-50))) then
tmp = x + (y * ((z / t) - (a / t)))
else
tmp = (x + y) - (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.5e+42) || !(t <= 4e-50)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = (x + y) - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.5e+42) or not (t <= 4e-50): tmp = x + (y * ((z / t) - (a / t))) else: tmp = (x + y) - (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.5e+42) || !(t <= 4e-50)) tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t)))); else tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.5e+42) || ~((t <= 4e-50))) tmp = x + (y * ((z / t) - (a / t))); else tmp = (x + y) - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.5e+42], N[Not[LessEqual[t, 4e-50]], $MachinePrecision]], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+42} \lor \neg \left(t \leq 4 \cdot 10^{-50}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -1.50000000000000014e42 or 4.00000000000000003e-50 < t Initial program 53.3%
sub-neg53.3%
+-commutative53.3%
distribute-frac-neg53.3%
distribute-rgt-neg-out53.3%
associate-/l*66.2%
fma-define66.4%
distribute-frac-neg66.4%
distribute-neg-frac266.4%
sub-neg66.4%
distribute-neg-in66.4%
remove-double-neg66.4%
+-commutative66.4%
sub-neg66.4%
Simplified66.4%
Taylor expanded in t around inf 67.8%
associate-+r+75.0%
distribute-rgt1-in75.0%
metadata-eval75.0%
associate-/l*78.1%
associate-/l*82.5%
Simplified82.5%
Taylor expanded in y around 0 83.6%
if -1.50000000000000014e42 < t < 4.00000000000000003e-50Initial program 89.7%
Taylor expanded in t around 0 82.9%
+-commutative82.9%
associate-/l*85.1%
Simplified85.1%
Final simplification84.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.5e-14) (+ x y) (if (<= a -5e-286) x (if (<= a 2.8e-187) (* y (/ z t)) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.5e-14) {
tmp = x + y;
} else if (a <= -5e-286) {
tmp = x;
} else if (a <= 2.8e-187) {
tmp = y * (z / t);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-6.5d-14)) then
tmp = x + y
else if (a <= (-5d-286)) then
tmp = x
else if (a <= 2.8d-187) then
tmp = y * (z / t)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.5e-14) {
tmp = x + y;
} else if (a <= -5e-286) {
tmp = x;
} else if (a <= 2.8e-187) {
tmp = y * (z / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.5e-14: tmp = x + y elif a <= -5e-286: tmp = x elif a <= 2.8e-187: tmp = y * (z / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.5e-14) tmp = Float64(x + y); elseif (a <= -5e-286) tmp = x; elseif (a <= 2.8e-187) tmp = Float64(y * Float64(z / t)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.5e-14) tmp = x + y; elseif (a <= -5e-286) tmp = x; elseif (a <= 2.8e-187) tmp = y * (z / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.5e-14], N[(x + y), $MachinePrecision], If[LessEqual[a, -5e-286], x, If[LessEqual[a, 2.8e-187], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{-14}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -5 \cdot 10^{-286}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-187}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -6.5000000000000001e-14 or 2.8e-187 < a Initial program 73.5%
Taylor expanded in a around inf 66.2%
+-commutative66.2%
Simplified66.2%
if -6.5000000000000001e-14 < a < -5.00000000000000037e-286Initial program 72.3%
Taylor expanded in x around inf 56.6%
if -5.00000000000000037e-286 < a < 2.8e-187Initial program 63.2%
sub-neg63.2%
+-commutative63.2%
distribute-frac-neg63.2%
distribute-rgt-neg-out63.2%
associate-/l*58.5%
fma-define59.0%
distribute-frac-neg59.0%
distribute-neg-frac259.0%
sub-neg59.0%
distribute-neg-in59.0%
remove-double-neg59.0%
+-commutative59.0%
sub-neg59.0%
Simplified59.0%
Taylor expanded in z around inf 70.8%
Taylor expanded in t around inf 58.3%
associate-*r/59.3%
Simplified59.3%
Final simplification63.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1500000.0) (not (<= a 2e+73))) (+ x y) (- x (/ (* y (- a z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1500000.0) || !(a <= 2e+73)) {
tmp = x + y;
} else {
tmp = x - ((y * (a - 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 <= (-1500000.0d0)) .or. (.not. (a <= 2d+73))) then
tmp = x + y
else
tmp = x - ((y * (a - 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 <= -1500000.0) || !(a <= 2e+73)) {
tmp = x + y;
} else {
tmp = x - ((y * (a - z)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1500000.0) or not (a <= 2e+73): tmp = x + y else: tmp = x - ((y * (a - z)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1500000.0) || !(a <= 2e+73)) tmp = Float64(x + y); else tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1500000.0) || ~((a <= 2e+73))) tmp = x + y; else tmp = x - ((y * (a - z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1500000.0], N[Not[LessEqual[a, 2e+73]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1500000 \lor \neg \left(a \leq 2 \cdot 10^{+73}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\end{array}
\end{array}
if a < -1.5e6 or 1.99999999999999997e73 < a Initial program 75.3%
Taylor expanded in a around inf 78.2%
+-commutative78.2%
Simplified78.2%
if -1.5e6 < a < 1.99999999999999997e73Initial program 69.7%
Taylor expanded in t around inf 74.4%
associate--l+74.4%
distribute-lft-out--74.4%
div-sub75.0%
mul-1-neg75.0%
unsub-neg75.0%
*-commutative75.0%
distribute-lft-out--75.1%
Simplified75.1%
Final simplification76.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -9.8e-11) (not (<= a 9e-22))) (- (+ x y) (* y (/ z a))) (- x (/ (* y (- a z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9.8e-11) || !(a <= 9e-22)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x - ((y * (a - 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 <= (-9.8d-11)) .or. (.not. (a <= 9d-22))) then
tmp = (x + y) - (y * (z / a))
else
tmp = x - ((y * (a - 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 <= -9.8e-11) || !(a <= 9e-22)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x - ((y * (a - z)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -9.8e-11) or not (a <= 9e-22): tmp = (x + y) - (y * (z / a)) else: tmp = x - ((y * (a - z)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -9.8e-11) || !(a <= 9e-22)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -9.8e-11) || ~((a <= 9e-22))) tmp = (x + y) - (y * (z / a)); else tmp = x - ((y * (a - z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -9.8e-11], N[Not[LessEqual[a, 9e-22]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.8 \cdot 10^{-11} \lor \neg \left(a \leq 9 \cdot 10^{-22}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\end{array}
\end{array}
if a < -9.7999999999999998e-11 or 8.99999999999999973e-22 < a Initial program 76.2%
Taylor expanded in t around 0 79.1%
+-commutative79.1%
associate-/l*88.3%
Simplified88.3%
if -9.7999999999999998e-11 < a < 8.99999999999999973e-22Initial program 67.9%
Taylor expanded in t around inf 77.8%
associate--l+77.8%
distribute-lft-out--77.8%
div-sub78.6%
mul-1-neg78.6%
unsub-neg78.6%
*-commutative78.6%
distribute-lft-out--78.6%
Simplified78.6%
Final simplification83.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.5e+18) (not (<= a 9.5e-40))) (+ x y) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.5e+18) || !(a <= 9.5e-40)) {
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 <= (-2.5d+18)) .or. (.not. (a <= 9.5d-40))) 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 <= -2.5e+18) || !(a <= 9.5e-40)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.5e+18) or not (a <= 9.5e-40): tmp = x + y else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.5e+18) || !(a <= 9.5e-40)) 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 <= -2.5e+18) || ~((a <= 9.5e-40))) tmp = x + y; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.5e+18], N[Not[LessEqual[a, 9.5e-40]], $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 -2.5 \cdot 10^{+18} \lor \neg \left(a \leq 9.5 \cdot 10^{-40}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -2.5e18 or 9.5000000000000006e-40 < a Initial program 74.8%
Taylor expanded in a around inf 73.1%
+-commutative73.1%
Simplified73.1%
if -2.5e18 < a < 9.5000000000000006e-40Initial program 69.3%
sub-neg69.3%
+-commutative69.3%
distribute-frac-neg69.3%
distribute-rgt-neg-out69.3%
associate-/l*68.6%
fma-define68.7%
distribute-frac-neg68.7%
distribute-neg-frac268.7%
sub-neg68.7%
distribute-neg-in68.7%
remove-double-neg68.7%
+-commutative68.7%
sub-neg68.7%
Simplified68.7%
Taylor expanded in t around inf 68.1%
associate-+r+77.6%
distribute-rgt1-in77.6%
metadata-eval77.6%
associate-/l*79.2%
associate-/l*75.3%
Simplified75.3%
Taylor expanded in a around 0 74.1%
associate-*r/75.7%
Simplified75.7%
Final simplification74.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.1e-13) (not (<= a 1.5e-128))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.1e-13) || !(a <= 1.5e-128)) {
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.1d-13)) .or. (.not. (a <= 1.5d-128))) 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.1e-13) || !(a <= 1.5e-128)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.1e-13) or not (a <= 1.5e-128): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.1e-13) || !(a <= 1.5e-128)) 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.1e-13) || ~((a <= 1.5e-128))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.1e-13], N[Not[LessEqual[a, 1.5e-128]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-13} \lor \neg \left(a \leq 1.5 \cdot 10^{-128}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.09999999999999998e-13 or 1.49999999999999989e-128 < a Initial program 74.1%
Taylor expanded in a around inf 68.3%
+-commutative68.3%
Simplified68.3%
if -1.09999999999999998e-13 < a < 1.49999999999999989e-128Initial program 68.9%
Taylor expanded in x around inf 47.8%
Final simplification59.7%
(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 71.9%
Taylor expanded in x around inf 44.2%
Final simplification44.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 2024067
(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))))