
(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 18 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
(if (<= t -1.45e+16)
(+ x (- (* y (/ z t)) (* a (/ y t))))
(if (<= t 4.65e+201)
(fma (- z t) (/ y (- t a)) (+ x y))
(+ x (* y (- (/ z t) (/ a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.45e+16) {
tmp = x + ((y * (z / t)) - (a * (y / t)));
} else if (t <= 4.65e+201) {
tmp = fma((z - t), (y / (t - a)), (x + y));
} else {
tmp = x + (y * ((z / t) - (a / t)));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.45e+16) tmp = Float64(x + Float64(Float64(y * Float64(z / t)) - Float64(a * Float64(y / t)))); elseif (t <= 4.65e+201) tmp = fma(Float64(z - t), Float64(y / Float64(t - a)), Float64(x + y)); else tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t)))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.45e+16], N[(x + N[(N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.65e+201], N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{+16}:\\
\;\;\;\;x + \left(y \cdot \frac{z}{t} - a \cdot \frac{y}{t}\right)\\
\mathbf{elif}\;t \leq 4.65 \cdot 10^{+201}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\end{array}
\end{array}
if t < -1.45e16Initial program 65.3%
sub-neg65.3%
+-commutative65.3%
distribute-frac-neg65.3%
distribute-rgt-neg-out65.3%
associate-/l*65.8%
fma-define66.1%
distribute-frac-neg66.1%
distribute-neg-frac266.1%
sub-neg66.1%
distribute-neg-in66.1%
remove-double-neg66.1%
+-commutative66.1%
sub-neg66.1%
Simplified66.1%
Taylor expanded in t around inf 71.7%
associate--l+71.7%
associate-+r+82.1%
distribute-rgt1-in82.1%
metadata-eval82.1%
mul0-lft82.1%
associate-/l*85.4%
associate-/l*90.8%
Simplified90.8%
if -1.45e16 < t < 4.64999999999999998e201Initial program 90.7%
sub-neg90.7%
+-commutative90.7%
distribute-frac-neg90.7%
distribute-rgt-neg-out90.7%
associate-/l*94.8%
fma-define94.9%
distribute-frac-neg94.9%
distribute-neg-frac294.9%
sub-neg94.9%
distribute-neg-in94.9%
remove-double-neg94.9%
+-commutative94.9%
sub-neg94.9%
Simplified94.9%
if 4.64999999999999998e201 < t Initial program 47.9%
sub-neg47.9%
+-commutative47.9%
distribute-frac-neg47.9%
distribute-rgt-neg-out47.9%
associate-/l*62.4%
fma-define62.9%
distribute-frac-neg62.9%
distribute-neg-frac262.9%
sub-neg62.9%
distribute-neg-in62.9%
remove-double-neg62.9%
+-commutative62.9%
sub-neg62.9%
Simplified62.9%
Taylor expanded in t around inf 64.2%
associate--l+64.2%
associate-+r+78.4%
distribute-rgt1-in78.4%
metadata-eval78.4%
mul0-lft78.4%
associate-/l*86.1%
associate-/l*89.8%
Simplified89.8%
Taylor expanded in y around 0 89.8%
Final simplification93.4%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -4e+77)
(and (not (<= a -2.26e-5))
(or (<= a -1.22e-135) (not (<= a 2.9e+14)))))
(+ x y)
(+ x (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4e+77) || (!(a <= -2.26e-5) && ((a <= -1.22e-135) || !(a <= 2.9e+14)))) {
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 <= (-4d+77)) .or. (.not. (a <= (-2.26d-5))) .and. (a <= (-1.22d-135)) .or. (.not. (a <= 2.9d+14))) 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 <= -4e+77) || (!(a <= -2.26e-5) && ((a <= -1.22e-135) || !(a <= 2.9e+14)))) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4e+77) or (not (a <= -2.26e-5) and ((a <= -1.22e-135) or not (a <= 2.9e+14))): tmp = x + y else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4e+77) || (!(a <= -2.26e-5) && ((a <= -1.22e-135) || !(a <= 2.9e+14)))) 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 <= -4e+77) || (~((a <= -2.26e-5)) && ((a <= -1.22e-135) || ~((a <= 2.9e+14))))) tmp = x + y; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4e+77], And[N[Not[LessEqual[a, -2.26e-5]], $MachinePrecision], Or[LessEqual[a, -1.22e-135], N[Not[LessEqual[a, 2.9e+14]], $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 -4 \cdot 10^{+77} \lor \neg \left(a \leq -2.26 \cdot 10^{-5}\right) \land \left(a \leq -1.22 \cdot 10^{-135} \lor \neg \left(a \leq 2.9 \cdot 10^{+14}\right)\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -3.99999999999999993e77 or -2.26e-5 < a < -1.22e-135 or 2.9e14 < a Initial program 84.3%
Taylor expanded in a around inf 80.2%
+-commutative80.2%
Simplified80.2%
if -3.99999999999999993e77 < a < -2.26e-5 or -1.22e-135 < a < 2.9e14Initial program 76.8%
sub-neg76.8%
+-commutative76.8%
distribute-frac-neg76.8%
distribute-rgt-neg-out76.8%
associate-/l*78.7%
fma-define78.9%
distribute-frac-neg78.9%
distribute-neg-frac278.9%
sub-neg78.9%
distribute-neg-in78.9%
remove-double-neg78.9%
+-commutative78.9%
sub-neg78.9%
Simplified78.9%
Taylor expanded in t around inf 70.4%
associate--l+70.4%
associate-+r+78.4%
distribute-rgt1-in78.4%
metadata-eval78.4%
mul0-lft78.4%
associate-/l*79.5%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in a around 0 79.4%
associate-*r/80.5%
Simplified80.5%
Final simplification80.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.42e+76)
(+ x y)
(if (<= a -2.26e-5)
(- x (* y (/ z a)))
(if (or (<= a -1.22e-135) (not (<= a 21500000000000.0)))
(+ x y)
(+ x (* y (/ z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.42e+76) {
tmp = x + y;
} else if (a <= -2.26e-5) {
tmp = x - (y * (z / a));
} else if ((a <= -1.22e-135) || !(a <= 21500000000000.0)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.42d+76)) then
tmp = x + y
else if (a <= (-2.26d-5)) then
tmp = x - (y * (z / a))
else if ((a <= (-1.22d-135)) .or. (.not. (a <= 21500000000000.0d0))) then
tmp = x + y
else
tmp = x + (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.42e+76) {
tmp = x + y;
} else if (a <= -2.26e-5) {
tmp = x - (y * (z / a));
} else if ((a <= -1.22e-135) || !(a <= 21500000000000.0)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.42e+76: tmp = x + y elif a <= -2.26e-5: tmp = x - (y * (z / a)) elif (a <= -1.22e-135) or not (a <= 21500000000000.0): tmp = x + y else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.42e+76) tmp = Float64(x + y); elseif (a <= -2.26e-5) tmp = Float64(x - Float64(y * Float64(z / a))); elseif ((a <= -1.22e-135) || !(a <= 21500000000000.0)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.42e+76) tmp = x + y; elseif (a <= -2.26e-5) tmp = x - (y * (z / a)); elseif ((a <= -1.22e-135) || ~((a <= 21500000000000.0))) tmp = x + y; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.42e+76], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.26e-5], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -1.22e-135], N[Not[LessEqual[a, 21500000000000.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.42 \cdot 10^{+76}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.26 \cdot 10^{-5}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq -1.22 \cdot 10^{-135} \lor \neg \left(a \leq 21500000000000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -1.41999999999999996e76 or -2.26e-5 < a < -1.22e-135 or 2.15e13 < a Initial program 84.3%
Taylor expanded in a around inf 80.2%
+-commutative80.2%
Simplified80.2%
if -1.41999999999999996e76 < a < -2.26e-5Initial program 80.8%
sub-neg80.8%
+-commutative80.8%
distribute-frac-neg80.8%
distribute-rgt-neg-out80.8%
associate-/l*76.0%
fma-define75.7%
distribute-frac-neg75.7%
distribute-neg-frac275.7%
sub-neg75.7%
distribute-neg-in75.7%
remove-double-neg75.7%
+-commutative75.7%
sub-neg75.7%
Simplified75.7%
Taylor expanded in x around inf 71.7%
times-frac71.4%
Simplified71.4%
Taylor expanded in z around inf 83.2%
associate-/l*83.2%
associate-/r*77.0%
Simplified77.0%
Taylor expanded in a around inf 71.2%
mul-1-neg71.2%
unsub-neg71.2%
associate-/l*71.1%
Simplified71.1%
if -1.22e-135 < a < 2.15e13Initial program 76.3%
sub-neg76.3%
+-commutative76.3%
distribute-frac-neg76.3%
distribute-rgt-neg-out76.3%
associate-/l*79.1%
fma-define79.3%
distribute-frac-neg79.3%
distribute-neg-frac279.3%
sub-neg79.3%
distribute-neg-in79.3%
remove-double-neg79.3%
+-commutative79.3%
sub-neg79.3%
Simplified79.3%
Taylor expanded in t around inf 73.9%
associate--l+73.9%
associate-+r+81.3%
distribute-rgt1-in81.3%
metadata-eval81.3%
mul0-lft81.3%
associate-/l*82.7%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in a around 0 81.4%
associate-*r/82.6%
Simplified82.6%
Final simplification80.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.65e+76)
(+ x y)
(if (<= a -2.26e-5)
(- x (/ (* y z) a))
(if (or (<= a -4.6e-138) (not (<= a 18500000000000.0)))
(+ x y)
(+ x (* y (/ z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.65e+76) {
tmp = x + y;
} else if (a <= -2.26e-5) {
tmp = x - ((y * z) / a);
} else if ((a <= -4.6e-138) || !(a <= 18500000000000.0)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.65d+76)) then
tmp = x + y
else if (a <= (-2.26d-5)) then
tmp = x - ((y * z) / a)
else if ((a <= (-4.6d-138)) .or. (.not. (a <= 18500000000000.0d0))) then
tmp = x + y
else
tmp = x + (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.65e+76) {
tmp = x + y;
} else if (a <= -2.26e-5) {
tmp = x - ((y * z) / a);
} else if ((a <= -4.6e-138) || !(a <= 18500000000000.0)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.65e+76: tmp = x + y elif a <= -2.26e-5: tmp = x - ((y * z) / a) elif (a <= -4.6e-138) or not (a <= 18500000000000.0): tmp = x + y else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.65e+76) tmp = Float64(x + y); elseif (a <= -2.26e-5) tmp = Float64(x - Float64(Float64(y * z) / a)); elseif ((a <= -4.6e-138) || !(a <= 18500000000000.0)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.65e+76) tmp = x + y; elseif (a <= -2.26e-5) tmp = x - ((y * z) / a); elseif ((a <= -4.6e-138) || ~((a <= 18500000000000.0))) tmp = x + y; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.65e+76], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.26e-5], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -4.6e-138], N[Not[LessEqual[a, 18500000000000.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{+76}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.26 \cdot 10^{-5}:\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\mathbf{elif}\;a \leq -4.6 \cdot 10^{-138} \lor \neg \left(a \leq 18500000000000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -1.65e76 or -2.26e-5 < a < -4.5999999999999998e-138 or 1.85e13 < a Initial program 84.3%
Taylor expanded in a around inf 80.2%
+-commutative80.2%
Simplified80.2%
if -1.65e76 < a < -2.26e-5Initial program 80.8%
sub-neg80.8%
+-commutative80.8%
distribute-frac-neg80.8%
distribute-rgt-neg-out80.8%
associate-/l*76.0%
fma-define75.7%
distribute-frac-neg75.7%
distribute-neg-frac275.7%
sub-neg75.7%
distribute-neg-in75.7%
remove-double-neg75.7%
+-commutative75.7%
sub-neg75.7%
Simplified75.7%
Taylor expanded in x around inf 71.7%
times-frac71.4%
Simplified71.4%
Taylor expanded in z around inf 83.2%
associate-/l*83.2%
associate-/r*77.0%
Simplified77.0%
Taylor expanded in a around inf 71.2%
associate-*r/71.2%
associate-*r*71.2%
neg-mul-171.2%
Simplified71.2%
if -4.5999999999999998e-138 < a < 1.85e13Initial program 76.3%
sub-neg76.3%
+-commutative76.3%
distribute-frac-neg76.3%
distribute-rgt-neg-out76.3%
associate-/l*79.1%
fma-define79.3%
distribute-frac-neg79.3%
distribute-neg-frac279.3%
sub-neg79.3%
distribute-neg-in79.3%
remove-double-neg79.3%
+-commutative79.3%
sub-neg79.3%
Simplified79.3%
Taylor expanded in t around inf 73.9%
associate--l+73.9%
associate-+r+81.3%
distribute-rgt1-in81.3%
metadata-eval81.3%
mul0-lft81.3%
associate-/l*82.7%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in a around 0 81.4%
associate-*r/82.6%
Simplified82.6%
Final simplification80.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- t a)))))
(if (<= z -5.4e+143)
t_1
(if (<= z 2.4e+63)
(+ x y)
(if (<= z 7.2e+74)
(* y (/ z (- t a)))
(if (<= z 2.8e+222) (+ x y) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / (t - a));
double tmp;
if (z <= -5.4e+143) {
tmp = t_1;
} else if (z <= 2.4e+63) {
tmp = x + y;
} else if (z <= 7.2e+74) {
tmp = y * (z / (t - a));
} else if (z <= 2.8e+222) {
tmp = x + y;
} 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 = z * (y / (t - a))
if (z <= (-5.4d+143)) then
tmp = t_1
else if (z <= 2.4d+63) then
tmp = x + y
else if (z <= 7.2d+74) then
tmp = y * (z / (t - a))
else if (z <= 2.8d+222) then
tmp = x + y
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 = z * (y / (t - a));
double tmp;
if (z <= -5.4e+143) {
tmp = t_1;
} else if (z <= 2.4e+63) {
tmp = x + y;
} else if (z <= 7.2e+74) {
tmp = y * (z / (t - a));
} else if (z <= 2.8e+222) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / (t - a)) tmp = 0 if z <= -5.4e+143: tmp = t_1 elif z <= 2.4e+63: tmp = x + y elif z <= 7.2e+74: tmp = y * (z / (t - a)) elif z <= 2.8e+222: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(t - a))) tmp = 0.0 if (z <= -5.4e+143) tmp = t_1; elseif (z <= 2.4e+63) tmp = Float64(x + y); elseif (z <= 7.2e+74) tmp = Float64(y * Float64(z / Float64(t - a))); elseif (z <= 2.8e+222) tmp = Float64(x + y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / (t - a)); tmp = 0.0; if (z <= -5.4e+143) tmp = t_1; elseif (z <= 2.4e+63) tmp = x + y; elseif (z <= 7.2e+74) tmp = y * (z / (t - a)); elseif (z <= 2.8e+222) tmp = x + y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e+143], t$95$1, If[LessEqual[z, 2.4e+63], N[(x + y), $MachinePrecision], If[LessEqual[z, 7.2e+74], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+222], N[(x + y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{t - a}\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+63}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+74}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+222}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.4000000000000003e143 or 2.8000000000000001e222 < z Initial program 77.8%
sub-neg77.8%
+-commutative77.8%
distribute-frac-neg77.8%
distribute-rgt-neg-out77.8%
associate-/l*90.7%
fma-define90.9%
distribute-frac-neg90.9%
distribute-neg-frac290.9%
sub-neg90.9%
distribute-neg-in90.9%
remove-double-neg90.9%
+-commutative90.9%
sub-neg90.9%
Simplified90.9%
Taylor expanded in z around inf 59.1%
associate-/l*67.1%
Simplified67.1%
clear-num67.0%
un-div-inv67.1%
Applied egg-rr67.1%
associate-/r/71.4%
Simplified71.4%
if -5.4000000000000003e143 < z < 2.4e63 or 7.19999999999999975e74 < z < 2.8000000000000001e222Initial program 81.6%
Taylor expanded in a around inf 70.6%
+-commutative70.6%
Simplified70.6%
if 2.4e63 < z < 7.19999999999999975e74Initial program 61.0%
sub-neg61.0%
+-commutative61.0%
distribute-frac-neg61.0%
distribute-rgt-neg-out61.0%
associate-/l*80.2%
fma-define81.0%
distribute-frac-neg81.0%
distribute-neg-frac281.0%
sub-neg81.0%
distribute-neg-in81.0%
remove-double-neg81.0%
+-commutative81.0%
sub-neg81.0%
Simplified81.0%
Taylor expanded in z around inf 59.1%
associate-/l*97.0%
Simplified97.0%
Final simplification71.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3050000000000.0) (not (<= t 4.65e+201))) (+ x (* y (- (/ z t) (/ a t)))) (- (+ x y) (* (- z t) (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3050000000000.0) || !(t <= 4.65e+201)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = (x + y) - ((z - t) * (y / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-3050000000000.0d0)) .or. (.not. (t <= 4.65d+201))) then
tmp = x + (y * ((z / t) - (a / t)))
else
tmp = (x + y) - ((z - t) * (y / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3050000000000.0) || !(t <= 4.65e+201)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = (x + y) - ((z - t) * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3050000000000.0) or not (t <= 4.65e+201): tmp = x + (y * ((z / t) - (a / t))) else: tmp = (x + y) - ((z - t) * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3050000000000.0) || !(t <= 4.65e+201)) tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t)))); else tmp = Float64(Float64(x + y) - Float64(Float64(z - t) * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3050000000000.0) || ~((t <= 4.65e+201))) tmp = x + (y * ((z / t) - (a / t))); else tmp = (x + y) - ((z - t) * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3050000000000.0], N[Not[LessEqual[t, 4.65e+201]], $MachinePrecision]], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3050000000000 \lor \neg \left(t \leq 4.65 \cdot 10^{+201}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \left(z - t\right) \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -3.05e12 or 4.64999999999999998e201 < t Initial program 59.9%
sub-neg59.9%
+-commutative59.9%
distribute-frac-neg59.9%
distribute-rgt-neg-out59.9%
associate-/l*64.7%
fma-define65.1%
distribute-frac-neg65.1%
distribute-neg-frac265.1%
sub-neg65.1%
distribute-neg-in65.1%
remove-double-neg65.1%
+-commutative65.1%
sub-neg65.1%
Simplified65.1%
Taylor expanded in t around inf 69.3%
associate--l+69.3%
associate-+r+81.0%
distribute-rgt1-in81.0%
metadata-eval81.0%
mul0-lft81.0%
associate-/l*85.6%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in y around 0 89.4%
if -3.05e12 < t < 4.64999999999999998e201Initial program 90.7%
associate-/l*94.8%
*-commutative94.8%
Applied egg-rr94.8%
Final simplification93.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.05e+16)
(+ x (- (* y (/ z t)) (* a (/ y t))))
(if (<= t 4.65e+201)
(- (+ x y) (* (- z t) (/ y (- a t))))
(+ x (* y (- (/ z t) (/ a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.05e+16) {
tmp = x + ((y * (z / t)) - (a * (y / t)));
} else if (t <= 4.65e+201) {
tmp = (x + y) - ((z - t) * (y / (a - t)));
} else {
tmp = x + (y * ((z / t) - (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 (t <= (-1.05d+16)) then
tmp = x + ((y * (z / t)) - (a * (y / t)))
else if (t <= 4.65d+201) then
tmp = (x + y) - ((z - t) * (y / (a - t)))
else
tmp = x + (y * ((z / t) - (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 (t <= -1.05e+16) {
tmp = x + ((y * (z / t)) - (a * (y / t)));
} else if (t <= 4.65e+201) {
tmp = (x + y) - ((z - t) * (y / (a - t)));
} else {
tmp = x + (y * ((z / t) - (a / t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.05e+16: tmp = x + ((y * (z / t)) - (a * (y / t))) elif t <= 4.65e+201: tmp = (x + y) - ((z - t) * (y / (a - t))) else: tmp = x + (y * ((z / t) - (a / t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.05e+16) tmp = Float64(x + Float64(Float64(y * Float64(z / t)) - Float64(a * Float64(y / t)))); elseif (t <= 4.65e+201) tmp = Float64(Float64(x + y) - Float64(Float64(z - t) * Float64(y / Float64(a - t)))); else tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.05e+16) tmp = x + ((y * (z / t)) - (a * (y / t))); elseif (t <= 4.65e+201) tmp = (x + y) - ((z - t) * (y / (a - t))); else tmp = x + (y * ((z / t) - (a / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.05e+16], N[(x + N[(N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.65e+201], N[(N[(x + y), $MachinePrecision] - N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+16}:\\
\;\;\;\;x + \left(y \cdot \frac{z}{t} - a \cdot \frac{y}{t}\right)\\
\mathbf{elif}\;t \leq 4.65 \cdot 10^{+201}:\\
\;\;\;\;\left(x + y\right) - \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\end{array}
\end{array}
if t < -1.05e16Initial program 65.3%
sub-neg65.3%
+-commutative65.3%
distribute-frac-neg65.3%
distribute-rgt-neg-out65.3%
associate-/l*65.8%
fma-define66.1%
distribute-frac-neg66.1%
distribute-neg-frac266.1%
sub-neg66.1%
distribute-neg-in66.1%
remove-double-neg66.1%
+-commutative66.1%
sub-neg66.1%
Simplified66.1%
Taylor expanded in t around inf 71.7%
associate--l+71.7%
associate-+r+82.1%
distribute-rgt1-in82.1%
metadata-eval82.1%
mul0-lft82.1%
associate-/l*85.4%
associate-/l*90.8%
Simplified90.8%
if -1.05e16 < t < 4.64999999999999998e201Initial program 90.7%
associate-/l*94.8%
*-commutative94.8%
Applied egg-rr94.8%
if 4.64999999999999998e201 < t Initial program 47.9%
sub-neg47.9%
+-commutative47.9%
distribute-frac-neg47.9%
distribute-rgt-neg-out47.9%
associate-/l*62.4%
fma-define62.9%
distribute-frac-neg62.9%
distribute-neg-frac262.9%
sub-neg62.9%
distribute-neg-in62.9%
remove-double-neg62.9%
+-commutative62.9%
sub-neg62.9%
Simplified62.9%
Taylor expanded in t around inf 64.2%
associate--l+64.2%
associate-+r+78.4%
distribute-rgt1-in78.4%
metadata-eval78.4%
mul0-lft78.4%
associate-/l*86.1%
associate-/l*89.8%
Simplified89.8%
Taylor expanded in y around 0 89.8%
Final simplification93.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.1e-9) (not (<= t 4.65e+201))) (+ x (* y (- (/ z t) (/ a t)))) (+ (+ x y) (* y (/ z (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.1e-9) || !(t <= 4.65e+201)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = (x + y) + (y * (z / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2.1d-9)) .or. (.not. (t <= 4.65d+201))) then
tmp = x + (y * ((z / t) - (a / t)))
else
tmp = (x + y) + (y * (z / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.1e-9) || !(t <= 4.65e+201)) {
tmp = x + (y * ((z / t) - (a / t)));
} else {
tmp = (x + y) + (y * (z / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.1e-9) or not (t <= 4.65e+201): tmp = x + (y * ((z / t) - (a / t))) else: tmp = (x + y) + (y * (z / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.1e-9) || !(t <= 4.65e+201)) tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t)))); else tmp = Float64(Float64(x + y) + Float64(y * Float64(z / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.1e-9) || ~((t <= 4.65e+201))) tmp = x + (y * ((z / t) - (a / t))); else tmp = (x + y) + (y * (z / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.1e-9], N[Not[LessEqual[t, 4.65e+201]], $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 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{-9} \lor \neg \left(t \leq 4.65 \cdot 10^{+201}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if t < -2.10000000000000019e-9 or 4.64999999999999998e201 < t Initial program 63.0%
sub-neg63.0%
+-commutative63.0%
distribute-frac-neg63.0%
distribute-rgt-neg-out63.0%
associate-/l*67.4%
fma-define67.8%
distribute-frac-neg67.8%
distribute-neg-frac267.8%
sub-neg67.8%
distribute-neg-in67.8%
remove-double-neg67.8%
+-commutative67.8%
sub-neg67.8%
Simplified67.8%
Taylor expanded in t around inf 71.7%
associate--l+71.7%
associate-+r+82.4%
distribute-rgt1-in82.4%
metadata-eval82.4%
mul0-lft82.4%
associate-/l*86.7%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in y around 0 90.2%
if -2.10000000000000019e-9 < t < 4.64999999999999998e201Initial program 90.3%
Taylor expanded in z around inf 90.5%
associate-/l*92.1%
Simplified92.1%
Final simplification91.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.9e+78) (not (<= a 1.05e+32))) (+ x y) (+ x (* y (/ z (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.9e+78) || !(a <= 1.05e+32)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.9d+78)) .or. (.not. (a <= 1.05d+32))) then
tmp = x + y
else
tmp = x + (y * (z / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.9e+78) || !(a <= 1.05e+32)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.9e+78) or not (a <= 1.05e+32): tmp = x + y else: tmp = x + (y * (z / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.9e+78) || !(a <= 1.05e+32)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.9e+78) || ~((a <= 1.05e+32))) tmp = x + y; else tmp = x + (y * (z / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.9e+78], N[Not[LessEqual[a, 1.05e+32]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+78} \lor \neg \left(a \leq 1.05 \cdot 10^{+32}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if a < -2.90000000000000017e78 or 1.05e32 < a Initial program 83.1%
Taylor expanded in a around inf 83.6%
+-commutative83.6%
Simplified83.6%
if -2.90000000000000017e78 < a < 1.05e32Initial program 79.0%
sub-neg79.0%
+-commutative79.0%
distribute-frac-neg79.0%
distribute-rgt-neg-out79.0%
associate-/l*80.6%
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%
Taylor expanded in x around inf 73.1%
times-frac77.0%
Simplified77.0%
Taylor expanded in z around inf 79.1%
associate-/l*77.3%
associate-/r*76.8%
Simplified76.8%
Taylor expanded in x around 0 86.3%
associate-/l*86.9%
Simplified86.9%
Final simplification85.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.2e-72) (not (<= t 3e-141))) (+ x (* y (/ z (- t a)))) (- (+ x y) (/ (* y z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.2e-72) || !(t <= 3e-141)) {
tmp = x + (y * (z / (t - a)));
} 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 <= (-4.2d-72)) .or. (.not. (t <= 3d-141))) then
tmp = x + (y * (z / (t - a)))
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 <= -4.2e-72) || !(t <= 3e-141)) {
tmp = x + (y * (z / (t - a)));
} else {
tmp = (x + y) - ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.2e-72) or not (t <= 3e-141): tmp = x + (y * (z / (t - a))) else: tmp = (x + y) - ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.2e-72) || !(t <= 3e-141)) tmp = Float64(x + Float64(y * Float64(z / Float64(t - a)))); else tmp = Float64(Float64(x + y) - Float64(Float64(y * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.2e-72) || ~((t <= 3e-141))) tmp = x + (y * (z / (t - a))); else tmp = (x + y) - ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.2e-72], N[Not[LessEqual[t, 3e-141]], $MachinePrecision]], N[(x + N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-72} \lor \neg \left(t \leq 3 \cdot 10^{-141}\right):\\
\;\;\;\;x + y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if t < -4.2e-72 or 2.99999999999999983e-141 < t Initial program 73.2%
sub-neg73.2%
+-commutative73.2%
distribute-frac-neg73.2%
distribute-rgt-neg-out73.2%
associate-/l*79.5%
fma-define79.8%
distribute-frac-neg79.8%
distribute-neg-frac279.8%
sub-neg79.8%
distribute-neg-in79.8%
remove-double-neg79.8%
+-commutative79.8%
sub-neg79.8%
Simplified79.8%
Taylor expanded in x around inf 71.4%
times-frac76.6%
Simplified76.6%
Taylor expanded in z around inf 72.4%
associate-/l*72.9%
associate-/r*70.2%
Simplified70.2%
Taylor expanded in x around 0 76.3%
associate-/l*81.0%
Simplified81.0%
if -4.2e-72 < t < 2.99999999999999983e-141Initial program 96.4%
Taylor expanded in t around 0 88.8%
Final simplification83.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.6e-12) (+ x (* y (- (/ z t) (/ a t)))) (if (<= t 2.8e-137) (- (+ x y) (/ (* y z) a)) (+ x (* y (/ z (- t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.6e-12) {
tmp = x + (y * ((z / t) - (a / t)));
} else if (t <= 2.8e-137) {
tmp = (x + y) - ((y * z) / a);
} else {
tmp = x + (y * (z / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-3.6d-12)) then
tmp = x + (y * ((z / t) - (a / t)))
else if (t <= 2.8d-137) then
tmp = (x + y) - ((y * z) / a)
else
tmp = x + (y * (z / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.6e-12) {
tmp = x + (y * ((z / t) - (a / t)));
} else if (t <= 2.8e-137) {
tmp = (x + y) - ((y * z) / a);
} else {
tmp = x + (y * (z / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.6e-12: tmp = x + (y * ((z / t) - (a / t))) elif t <= 2.8e-137: tmp = (x + y) - ((y * z) / a) else: tmp = x + (y * (z / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.6e-12) tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t)))); elseif (t <= 2.8e-137) tmp = Float64(Float64(x + y) - Float64(Float64(y * z) / a)); else tmp = Float64(x + Float64(y * Float64(z / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.6e-12) tmp = x + (y * ((z / t) - (a / t))); elseif (t <= 2.8e-137) tmp = (x + y) - ((y * z) / a); else tmp = x + (y * (z / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.6e-12], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-137], N[(N[(x + y), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-12}:\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-137}:\\
\;\;\;\;\left(x + y\right) - \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if t < -3.6e-12Initial program 69.0%
sub-neg69.0%
+-commutative69.0%
distribute-frac-neg69.0%
distribute-rgt-neg-out69.0%
associate-/l*69.4%
fma-define69.8%
distribute-frac-neg69.8%
distribute-neg-frac269.8%
sub-neg69.8%
distribute-neg-in69.8%
remove-double-neg69.8%
+-commutative69.8%
sub-neg69.8%
Simplified69.8%
Taylor expanded in t around inf 74.7%
associate--l+74.7%
associate-+r+84.1%
distribute-rgt1-in84.1%
metadata-eval84.1%
mul0-lft84.1%
associate-/l*87.0%
associate-/l*91.8%
Simplified91.8%
Taylor expanded in y around 0 90.3%
if -3.6e-12 < t < 2.7999999999999999e-137Initial program 95.7%
Taylor expanded in t around 0 86.4%
if 2.7999999999999999e-137 < t Initial program 74.3%
sub-neg74.3%
+-commutative74.3%
distribute-frac-neg74.3%
distribute-rgt-neg-out74.3%
associate-/l*85.1%
fma-define85.3%
distribute-frac-neg85.3%
distribute-neg-frac285.3%
sub-neg85.3%
distribute-neg-in85.3%
remove-double-neg85.3%
+-commutative85.3%
sub-neg85.3%
Simplified85.3%
Taylor expanded in x around inf 71.9%
times-frac77.9%
Simplified77.9%
Taylor expanded in z around inf 68.9%
associate-/l*72.7%
associate-/r*67.9%
Simplified67.9%
Taylor expanded in x around 0 73.8%
associate-/l*80.2%
Simplified80.2%
Final simplification85.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -9.5e+169) (not (<= y 6.8e+141))) (* y (/ z (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.5e+169) || !(y <= 6.8e+141)) {
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 ((y <= (-9.5d+169)) .or. (.not. (y <= 6.8d+141))) 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 ((y <= -9.5e+169) || !(y <= 6.8e+141)) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9.5e+169) or not (y <= 6.8e+141): tmp = y * (z / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9.5e+169) || !(y <= 6.8e+141)) tmp = Float64(y * Float64(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 ((y <= -9.5e+169) || ~((y <= 6.8e+141))) tmp = y * (z / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9.5e+169], N[Not[LessEqual[y, 6.8e+141]], $MachinePrecision]], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+169} \lor \neg \left(y \leq 6.8 \cdot 10^{+141}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < -9.4999999999999995e169 or 6.7999999999999996e141 < y Initial program 47.8%
sub-neg47.8%
+-commutative47.8%
distribute-frac-neg47.8%
distribute-rgt-neg-out47.8%
associate-/l*63.8%
fma-define64.2%
distribute-frac-neg64.2%
distribute-neg-frac264.2%
sub-neg64.2%
distribute-neg-in64.2%
remove-double-neg64.2%
+-commutative64.2%
sub-neg64.2%
Simplified64.2%
Taylor expanded in z around inf 41.9%
associate-/l*52.1%
Simplified52.1%
if -9.4999999999999995e169 < y < 6.7999999999999996e141Initial program 88.5%
Taylor expanded in a around inf 71.3%
+-commutative71.3%
Simplified71.3%
Final simplification67.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -9e+164) (* z (/ y t)) (if (<= z 4.6e+254) (+ x y) (* y (/ z (- a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+164) {
tmp = z * (y / t);
} else if (z <= 4.6e+254) {
tmp = x + y;
} else {
tmp = 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 (z <= (-9d+164)) then
tmp = z * (y / t)
else if (z <= 4.6d+254) then
tmp = x + y
else
tmp = 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 (z <= -9e+164) {
tmp = z * (y / t);
} else if (z <= 4.6e+254) {
tmp = x + y;
} else {
tmp = y * (z / -a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9e+164: tmp = z * (y / t) elif z <= 4.6e+254: tmp = x + y else: tmp = y * (z / -a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9e+164) tmp = Float64(z * Float64(y / t)); elseif (z <= 4.6e+254) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9e+164) tmp = z * (y / t); elseif (z <= 4.6e+254) tmp = x + y; else tmp = y * (z / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e+164], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+254], N[(x + y), $MachinePrecision], N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+164}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+254}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{-a}\\
\end{array}
\end{array}
if z < -8.9999999999999995e164Initial program 77.6%
sub-neg77.6%
+-commutative77.6%
distribute-frac-neg77.6%
distribute-rgt-neg-out77.6%
associate-/l*90.6%
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%
Taylor expanded in z around inf 68.2%
Taylor expanded in t around inf 54.4%
associate-/l*54.8%
Simplified54.8%
clear-num54.8%
un-div-inv54.8%
Applied egg-rr54.8%
associate-/r/59.0%
Simplified59.0%
if -8.9999999999999995e164 < z < 4.59999999999999997e254Initial program 80.3%
Taylor expanded in a around inf 67.8%
+-commutative67.8%
Simplified67.8%
if 4.59999999999999997e254 < z Initial program 91.9%
sub-neg91.9%
+-commutative91.9%
distribute-frac-neg91.9%
distribute-rgt-neg-out91.9%
associate-/l*91.3%
fma-define91.3%
distribute-frac-neg91.3%
distribute-neg-frac291.3%
sub-neg91.3%
distribute-neg-in91.3%
remove-double-neg91.3%
+-commutative91.3%
sub-neg91.3%
Simplified91.3%
Taylor expanded in z around inf 74.0%
Taylor expanded in t around 0 56.8%
mul-1-neg56.8%
associate-/l*64.5%
Simplified64.5%
Final simplification67.0%
(FPCore (x y z t a) :precision binary64 (if (<= x -6.6e-205) x (if (<= x 4.3e-212) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.6e-205) {
tmp = x;
} else if (x <= 4.3e-212) {
tmp = 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 (x <= (-6.6d-205)) then
tmp = x
else if (x <= 4.3d-212) then
tmp = 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 (x <= -6.6e-205) {
tmp = x;
} else if (x <= 4.3e-212) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6.6e-205: tmp = x elif x <= 4.3e-212: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6.6e-205) tmp = x; elseif (x <= 4.3e-212) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -6.6e-205) tmp = x; elseif (x <= 4.3e-212) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.6e-205], x, If[LessEqual[x, 4.3e-212], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.6 \cdot 10^{-205}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{-212}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -6.5999999999999998e-205 or 4.29999999999999974e-212 < x Initial program 82.2%
Taylor expanded in x around inf 62.2%
if -6.5999999999999998e-205 < x < 4.29999999999999974e-212Initial program 73.4%
Taylor expanded in x around 0 67.2%
associate-*r/82.1%
Simplified82.1%
Taylor expanded in z around 0 47.4%
associate-*r/47.4%
neg-mul-147.4%
Simplified47.4%
Taylor expanded in t around 0 46.8%
Final simplification59.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -6.2e+168) (* y (/ z t)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -6.2e+168) {
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 (y <= (-6.2d+168)) 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 (y <= -6.2e+168) {
tmp = y * (z / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -6.2e+168: tmp = y * (z / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -6.2e+168) 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 (y <= -6.2e+168) tmp = y * (z / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -6.2e+168], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+168}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < -6.19999999999999993e168Initial program 49.6%
sub-neg49.6%
+-commutative49.6%
distribute-frac-neg49.6%
distribute-rgt-neg-out49.6%
associate-/l*71.8%
fma-define72.1%
distribute-frac-neg72.1%
distribute-neg-frac272.1%
sub-neg72.1%
distribute-neg-in72.1%
remove-double-neg72.1%
+-commutative72.1%
sub-neg72.1%
Simplified72.1%
Taylor expanded in z around inf 45.5%
Taylor expanded in t around inf 36.8%
associate-/l*43.4%
Simplified43.4%
if -6.19999999999999993e168 < y Initial program 83.6%
Taylor expanded in a around inf 66.4%
+-commutative66.4%
Simplified66.4%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.2e+175) (* z (/ y t)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.2e+175) {
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 (y <= (-2.2d+175)) 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 (y <= -2.2e+175) {
tmp = z * (y / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.2e+175: tmp = z * (y / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.2e+175) 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 (y <= -2.2e+175) tmp = z * (y / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.2e+175], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+175}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < -2.1999999999999999e175Initial program 49.6%
sub-neg49.6%
+-commutative49.6%
distribute-frac-neg49.6%
distribute-rgt-neg-out49.6%
associate-/l*71.8%
fma-define72.1%
distribute-frac-neg72.1%
distribute-neg-frac272.1%
sub-neg72.1%
distribute-neg-in72.1%
remove-double-neg72.1%
+-commutative72.1%
sub-neg72.1%
Simplified72.1%
Taylor expanded in z around inf 45.5%
Taylor expanded in t around inf 36.8%
associate-/l*43.4%
Simplified43.4%
clear-num43.3%
un-div-inv43.3%
Applied egg-rr43.3%
associate-/r/43.5%
Simplified43.5%
if -2.1999999999999999e175 < y Initial program 83.6%
Taylor expanded in a around inf 66.4%
+-commutative66.4%
Simplified66.4%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -9.8e+47) x (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.8e+47) {
tmp = x;
} 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 (t <= (-9.8d+47)) then
tmp = x
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 (t <= -9.8e+47) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9.8e+47: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.8e+47) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9.8e+47) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.8e+47], x, N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.8 \cdot 10^{+47}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -9.8000000000000006e47Initial program 63.3%
Taylor expanded in x around inf 64.7%
if -9.8000000000000006e47 < t Initial program 84.5%
Taylor expanded in a around inf 64.1%
+-commutative64.1%
Simplified64.1%
Final simplification64.2%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 80.6%
Taylor expanded in x around inf 52.5%
Final simplification52.5%
(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 2024084
(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))))