
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.2e+83) (not (<= t 1.12e+80))) (+ (- x (* a (/ y t))) (* y (/ z t))) (+ (+ x y) (/ -1.0 (* (/ (- a t) y) (/ -1.0 (- t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e+83) || !(t <= 1.12e+80)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + (-1.0 / (((a - t) / y) * (-1.0 / (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 <= (-1.2d+83)) .or. (.not. (t <= 1.12d+80))) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else
tmp = (x + y) + ((-1.0d0) / (((a - t) / y) * ((-1.0d0) / (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 <= -1.2e+83) || !(t <= 1.12e+80)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + (-1.0 / (((a - t) / y) * (-1.0 / (t - z))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.2e+83) or not (t <= 1.12e+80): tmp = (x - (a * (y / t))) + (y * (z / t)) else: tmp = (x + y) + (-1.0 / (((a - t) / y) * (-1.0 / (t - z)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.2e+83) || !(t <= 1.12e+80)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = Float64(Float64(x + y) + Float64(-1.0 / Float64(Float64(Float64(a - t) / y) * Float64(-1.0 / Float64(t - z))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.2e+83) || ~((t <= 1.12e+80))) tmp = (x - (a * (y / t))) + (y * (z / t)); else tmp = (x + y) + (-1.0 / (((a - t) / y) * (-1.0 / (t - z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.2e+83], N[Not[LessEqual[t, 1.12e+80]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(-1.0 / N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] * N[(-1.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+83} \lor \neg \left(t \leq 1.12 \cdot 10^{+80}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \frac{-1}{\frac{a - t}{y} \cdot \frac{-1}{t - z}}\\
\end{array}
\end{array}
if t < -1.19999999999999996e83 or 1.12e80 < t Initial program 61.9%
Taylor expanded in t around inf 88.4%
sub-neg88.4%
mul-1-neg88.4%
unsub-neg88.4%
associate-/l*87.6%
mul-1-neg87.6%
remove-double-neg87.6%
associate-/l*93.6%
Simplified93.6%
if -1.19999999999999996e83 < t < 1.12e80Initial program 89.2%
clear-num89.2%
inv-pow89.2%
*-commutative89.2%
Applied egg-rr89.2%
unpow-189.2%
associate-/r*93.9%
Simplified93.9%
div-inv94.0%
Applied egg-rr94.0%
Final simplification93.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.4e+83) (not (<= t 9.5e+77))) (+ (- x (* a (/ y t))) (* y (/ z t))) (- (+ x y) (/ -1.0 (/ (/ (- a t) y) (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.4e+83) || !(t <= 9.5e+77)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) - (-1.0 / (((a - t) / y) / (t - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-6.4d+83)) .or. (.not. (t <= 9.5d+77))) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else
tmp = (x + y) - ((-1.0d0) / (((a - t) / y) / (t - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.4e+83) || !(t <= 9.5e+77)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) - (-1.0 / (((a - t) / y) / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.4e+83) or not (t <= 9.5e+77): tmp = (x - (a * (y / t))) + (y * (z / t)) else: tmp = (x + y) - (-1.0 / (((a - t) / y) / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.4e+83) || !(t <= 9.5e+77)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = Float64(Float64(x + y) - Float64(-1.0 / Float64(Float64(Float64(a - t) / y) / Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6.4e+83) || ~((t <= 9.5e+77))) tmp = (x - (a * (y / t))) + (y * (z / t)); else tmp = (x + y) - (-1.0 / (((a - t) / y) / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.4e+83], N[Not[LessEqual[t, 9.5e+77]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(-1.0 / N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.4 \cdot 10^{+83} \lor \neg \left(t \leq 9.5 \cdot 10^{+77}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{-1}{\frac{\frac{a - t}{y}}{t - z}}\\
\end{array}
\end{array}
if t < -6.3999999999999998e83 or 9.4999999999999998e77 < t Initial program 61.9%
Taylor expanded in t around inf 88.4%
sub-neg88.4%
mul-1-neg88.4%
unsub-neg88.4%
associate-/l*87.6%
mul-1-neg87.6%
remove-double-neg87.6%
associate-/l*93.6%
Simplified93.6%
if -6.3999999999999998e83 < t < 9.4999999999999998e77Initial program 89.2%
clear-num89.2%
inv-pow89.2%
*-commutative89.2%
Applied egg-rr89.2%
unpow-189.2%
associate-/r*93.9%
Simplified93.9%
Final simplification93.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -7.2e+46) (not (<= t 4e+72))) (+ (- x (* a (/ y t))) (* y (/ z t))) (- (+ x y) (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -7.2e+46) || !(t <= 4e+72)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) - (z * (y / 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 <= (-7.2d+46)) .or. (.not. (t <= 4d+72))) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else
tmp = (x + y) - (z * (y / 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 <= -7.2e+46) || !(t <= 4e+72)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) - (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -7.2e+46) or not (t <= 4e+72): tmp = (x - (a * (y / t))) + (y * (z / t)) else: tmp = (x + y) - (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -7.2e+46) || !(t <= 4e+72)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = Float64(Float64(x + y) - Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -7.2e+46) || ~((t <= 4e+72))) tmp = (x - (a * (y / t))) + (y * (z / t)); else tmp = (x + y) - (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -7.2e+46], N[Not[LessEqual[t, 4e+72]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+46} \lor \neg \left(t \leq 4 \cdot 10^{+72}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -7.1999999999999997e46 or 3.99999999999999978e72 < t Initial program 63.9%
Taylor expanded in t around inf 88.0%
sub-neg88.0%
mul-1-neg88.0%
unsub-neg88.0%
associate-/l*88.2%
mul-1-neg88.2%
remove-double-neg88.2%
associate-/l*93.9%
Simplified93.9%
if -7.1999999999999997e46 < t < 3.99999999999999978e72Initial program 88.9%
clear-num88.9%
inv-pow88.9%
*-commutative88.9%
Applied egg-rr88.9%
unpow-188.9%
associate-/r*93.7%
Simplified93.7%
div-inv93.8%
Applied egg-rr93.8%
Taylor expanded in t around 0 78.9%
+-commutative78.9%
*-commutative78.9%
associate-*r/83.5%
Simplified83.5%
Final simplification87.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.02e+83) (not (<= t 5e+79))) (+ (- x (* a (/ y t))) (* y (/ z t))) (+ (+ x y) (* (- z t) (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.02e+83) || !(t <= 5e+79)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + ((z - t) * (y / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.02d+83)) .or. (.not. (t <= 5d+79))) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else
tmp = (x + y) + ((z - t) * (y / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.02e+83) || !(t <= 5e+79)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + ((z - t) * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.02e+83) or not (t <= 5e+79): tmp = (x - (a * (y / t))) + (y * (z / t)) else: tmp = (x + y) + ((z - t) * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.02e+83) || !(t <= 5e+79)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.02e+83) || ~((t <= 5e+79))) tmp = (x - (a * (y / t))) + (y * (z / t)); else tmp = (x + y) + ((z - t) * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.02e+83], N[Not[LessEqual[t, 5e+79]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.02 \cdot 10^{+83} \lor \neg \left(t \leq 5 \cdot 10^{+79}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if t < -1.0200000000000001e83 or 5e79 < t Initial program 61.9%
Taylor expanded in t around inf 88.4%
sub-neg88.4%
mul-1-neg88.4%
unsub-neg88.4%
associate-/l*87.6%
mul-1-neg87.6%
remove-double-neg87.6%
associate-/l*93.6%
Simplified93.6%
if -1.0200000000000001e83 < t < 5e79Initial program 89.2%
associate-/l*93.8%
*-commutative93.8%
Applied egg-rr93.8%
Final simplification93.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -6e-91)
(- (+ x y) (* z (/ y a)))
(if (<= a 12000000000.0)
(+ x (/ -1.0 (/ (/ t y) (- a z))))
(- (+ x y) (* y (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6e-91) {
tmp = (x + y) - (z * (y / a));
} else if (a <= 12000000000.0) {
tmp = x + (-1.0 / ((t / y) / (a - z)));
} 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 (a <= (-6d-91)) then
tmp = (x + y) - (z * (y / a))
else if (a <= 12000000000.0d0) then
tmp = x + ((-1.0d0) / ((t / y) / (a - z)))
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 (a <= -6e-91) {
tmp = (x + y) - (z * (y / a));
} else if (a <= 12000000000.0) {
tmp = x + (-1.0 / ((t / y) / (a - z)));
} else {
tmp = (x + y) - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6e-91: tmp = (x + y) - (z * (y / a)) elif a <= 12000000000.0: tmp = x + (-1.0 / ((t / y) / (a - z))) else: tmp = (x + y) - (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6e-91) tmp = Float64(Float64(x + y) - Float64(z * Float64(y / a))); elseif (a <= 12000000000.0) tmp = Float64(x + Float64(-1.0 / Float64(Float64(t / y) / Float64(a - z)))); 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 (a <= -6e-91) tmp = (x + y) - (z * (y / a)); elseif (a <= 12000000000.0) tmp = x + (-1.0 / ((t / y) / (a - z))); else tmp = (x + y) - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6e-91], N[(N[(x + y), $MachinePrecision] - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 12000000000.0], N[(x + N[(-1.0 / N[(N[(t / y), $MachinePrecision] / N[(a - z), $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}\;a \leq -6 \cdot 10^{-91}:\\
\;\;\;\;\left(x + y\right) - z \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq 12000000000:\\
\;\;\;\;x + \frac{-1}{\frac{\frac{t}{y}}{a - z}}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if a < -6.0000000000000004e-91Initial program 80.4%
clear-num80.3%
inv-pow80.3%
*-commutative80.3%
Applied egg-rr80.3%
unpow-180.3%
associate-/r*87.5%
Simplified87.5%
div-inv87.5%
Applied egg-rr87.5%
Taylor expanded in t around 0 79.5%
+-commutative79.5%
*-commutative79.5%
associate-*r/85.0%
Simplified85.0%
if -6.0000000000000004e-91 < a < 1.2e10Initial program 76.4%
Taylor expanded in t around -inf 85.9%
mul-1-neg85.9%
unsub-neg85.9%
*-commutative85.9%
Simplified85.9%
clear-num85.9%
inv-pow85.9%
distribute-lft-out--85.9%
Applied egg-rr85.9%
unpow-185.9%
associate-/r*87.1%
Simplified87.1%
if 1.2e10 < a Initial program 82.9%
Taylor expanded in t around 0 82.3%
+-commutative82.3%
associate-/l*89.4%
Simplified89.4%
Final simplification87.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.6e+65) (not (<= a 70000000000.0))) (+ x y) (+ x (/ (* y (- z a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.6e+65) || !(a <= 70000000000.0)) {
tmp = x + y;
} else {
tmp = x + ((y * (z - a)) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-7.6d+65)) .or. (.not. (a <= 70000000000.0d0))) then
tmp = x + y
else
tmp = x + ((y * (z - a)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.6e+65) || !(a <= 70000000000.0)) {
tmp = x + y;
} else {
tmp = x + ((y * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.6e+65) or not (a <= 70000000000.0): tmp = x + y else: tmp = x + ((y * (z - a)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.6e+65) || !(a <= 70000000000.0)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.6e+65) || ~((a <= 70000000000.0))) tmp = x + y; else tmp = x + ((y * (z - a)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.6e+65], N[Not[LessEqual[a, 70000000000.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.6 \cdot 10^{+65} \lor \neg \left(a \leq 70000000000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if a < -7.60000000000000022e65 or 7e10 < a Initial program 81.1%
Taylor expanded in a around inf 79.7%
+-commutative79.7%
Simplified79.7%
if -7.60000000000000022e65 < a < 7e10Initial program 77.9%
Taylor expanded in t around -inf 83.3%
mul-1-neg83.3%
unsub-neg83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in y around 0 83.3%
Final simplification81.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.5e-17) (not (<= a 55000000000000.0))) (- (+ x y) (* y (/ z a))) (+ x (/ (* y (- z a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.5e-17) || !(a <= 55000000000000.0)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + ((y * (z - a)) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.5d-17)) .or. (.not. (a <= 55000000000000.0d0))) then
tmp = (x + y) - (y * (z / a))
else
tmp = x + ((y * (z - a)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.5e-17) || !(a <= 55000000000000.0)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + ((y * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.5e-17) or not (a <= 55000000000000.0): tmp = (x + y) - (y * (z / a)) else: tmp = x + ((y * (z - a)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.5e-17) || !(a <= 55000000000000.0)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.5e-17) || ~((a <= 55000000000000.0))) tmp = (x + y) - (y * (z / a)); else tmp = x + ((y * (z - a)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.5e-17], N[Not[LessEqual[a, 55000000000000.0]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{-17} \lor \neg \left(a \leq 55000000000000\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if a < -1.50000000000000003e-17 or 5.5e13 < a Initial program 79.9%
Taylor expanded in t around 0 79.5%
+-commutative79.5%
associate-/l*87.0%
Simplified87.0%
if -1.50000000000000003e-17 < a < 5.5e13Initial program 78.8%
Taylor expanded in t around -inf 85.9%
mul-1-neg85.9%
unsub-neg85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in y around 0 85.9%
Final simplification86.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.5e-92)
(- (+ x y) (* z (/ y a)))
(if (<= a 85000000000.0)
(+ x (/ (* y (- z a)) t))
(- (+ x y) (* y (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.5e-92) {
tmp = (x + y) - (z * (y / a));
} else if (a <= 85000000000.0) {
tmp = x + ((y * (z - 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 (a <= (-9.5d-92)) then
tmp = (x + y) - (z * (y / a))
else if (a <= 85000000000.0d0) then
tmp = x + ((y * (z - 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 (a <= -9.5e-92) {
tmp = (x + y) - (z * (y / a));
} else if (a <= 85000000000.0) {
tmp = x + ((y * (z - a)) / t);
} else {
tmp = (x + y) - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.5e-92: tmp = (x + y) - (z * (y / a)) elif a <= 85000000000.0: tmp = x + ((y * (z - a)) / t) else: tmp = (x + y) - (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.5e-92) tmp = Float64(Float64(x + y) - Float64(z * Float64(y / a))); elseif (a <= 85000000000.0) tmp = Float64(x + Float64(Float64(y * Float64(z - 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 (a <= -9.5e-92) tmp = (x + y) - (z * (y / a)); elseif (a <= 85000000000.0) tmp = x + ((y * (z - a)) / t); else tmp = (x + y) - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.5e-92], N[(N[(x + y), $MachinePrecision] - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 85000000000.0], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{-92}:\\
\;\;\;\;\left(x + y\right) - z \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq 85000000000:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if a < -9.49999999999999946e-92Initial program 80.4%
clear-num80.3%
inv-pow80.3%
*-commutative80.3%
Applied egg-rr80.3%
unpow-180.3%
associate-/r*87.5%
Simplified87.5%
div-inv87.5%
Applied egg-rr87.5%
Taylor expanded in t around 0 79.5%
+-commutative79.5%
*-commutative79.5%
associate-*r/85.0%
Simplified85.0%
if -9.49999999999999946e-92 < a < 8.5e10Initial program 76.4%
Taylor expanded in t around -inf 85.9%
mul-1-neg85.9%
unsub-neg85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in y around 0 85.9%
if 8.5e10 < a Initial program 82.9%
Taylor expanded in t around 0 82.3%
+-commutative82.3%
associate-/l*89.4%
Simplified89.4%
Final simplification86.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.2e+237) (not (<= z 5.2e+139))) (* y (/ z (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.2e+237) || !(z <= 5.2e+139)) {
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 ((z <= (-5.2d+237)) .or. (.not. (z <= 5.2d+139))) 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 ((z <= -5.2e+237) || !(z <= 5.2e+139)) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.2e+237) or not (z <= 5.2e+139): tmp = y * (z / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.2e+237) || !(z <= 5.2e+139)) 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 ((z <= -5.2e+237) || ~((z <= 5.2e+139))) tmp = y * (z / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.2e+237], N[Not[LessEqual[z, 5.2e+139]], $MachinePrecision]], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+237} \lor \neg \left(z \leq 5.2 \cdot 10^{+139}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -5.20000000000000005e237 or 5.20000000000000044e139 < z Initial program 83.6%
sub-neg83.6%
+-commutative83.6%
distribute-frac-neg83.6%
distribute-rgt-neg-out83.6%
associate-/l*91.1%
fma-define91.2%
distribute-frac-neg91.2%
distribute-neg-frac291.2%
sub-neg91.2%
distribute-neg-in91.2%
remove-double-neg91.2%
+-commutative91.2%
sub-neg91.2%
Simplified91.2%
Taylor expanded in z around inf 61.4%
associate-/l*63.3%
Applied egg-rr63.3%
if -5.20000000000000005e237 < z < 5.20000000000000044e139Initial program 78.4%
Taylor expanded in a around inf 71.5%
+-commutative71.5%
Simplified71.5%
Final simplification69.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.3e+86) (not (<= a 3.5e+16))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.3e+86) || !(a <= 3.5e+16)) {
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.3d+86)) .or. (.not. (a <= 3.5d+16))) 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.3e+86) || !(a <= 3.5e+16)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.3e+86) or not (a <= 3.5e+16): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.3e+86) || !(a <= 3.5e+16)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.3e+86) || ~((a <= 3.5e+16))) 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.3e+86], N[Not[LessEqual[a, 3.5e+16]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{+86} \lor \neg \left(a \leq 3.5 \cdot 10^{+16}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -2.2999999999999999e86 or 3.5e16 < a Initial program 81.3%
Taylor expanded in a around inf 79.8%
+-commutative79.8%
Simplified79.8%
if -2.2999999999999999e86 < a < 3.5e16Initial program 77.9%
Taylor expanded in t around -inf 82.6%
mul-1-neg82.6%
unsub-neg82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in a around 0 79.4%
mul-1-neg79.4%
distribute-rgt-neg-out79.4%
Simplified79.4%
Final simplification79.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.2e+238) (* y (/ z (- t a))) (if (<= z 7.8e+99) (+ x y) (/ (* y z) (- t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.2e+238) {
tmp = y * (z / (t - a));
} else if (z <= 7.8e+99) {
tmp = x + y;
} else {
tmp = (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 (z <= (-5.2d+238)) then
tmp = y * (z / (t - a))
else if (z <= 7.8d+99) then
tmp = x + y
else
tmp = (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 (z <= -5.2e+238) {
tmp = y * (z / (t - a));
} else if (z <= 7.8e+99) {
tmp = x + y;
} else {
tmp = (y * z) / (t - a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.2e+238: tmp = y * (z / (t - a)) elif z <= 7.8e+99: tmp = x + y else: tmp = (y * z) / (t - a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.2e+238) tmp = Float64(y * Float64(z / Float64(t - a))); elseif (z <= 7.8e+99) tmp = Float64(x + y); else tmp = Float64(Float64(y * z) / Float64(t - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.2e+238) tmp = y * (z / (t - a)); elseif (z <= 7.8e+99) tmp = x + y; else tmp = (y * z) / (t - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.2e+238], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+99], N[(x + y), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+238}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+99}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t - a}\\
\end{array}
\end{array}
if z < -5.1999999999999999e238Initial program 77.6%
sub-neg77.6%
+-commutative77.6%
distribute-frac-neg77.6%
distribute-rgt-neg-out77.6%
associate-/l*97.7%
fma-define98.2%
distribute-frac-neg98.2%
distribute-neg-frac298.2%
sub-neg98.2%
distribute-neg-in98.2%
remove-double-neg98.2%
+-commutative98.2%
sub-neg98.2%
Simplified98.2%
Taylor expanded in z around inf 54.7%
associate-/l*65.7%
Applied egg-rr65.7%
if -5.1999999999999999e238 < z < 7.79999999999999989e99Initial program 78.1%
Taylor expanded in a around inf 72.4%
+-commutative72.4%
Simplified72.4%
if 7.79999999999999989e99 < z Initial program 86.7%
sub-neg86.7%
+-commutative86.7%
distribute-frac-neg86.7%
distribute-rgt-neg-out86.7%
associate-/l*87.5%
fma-define87.4%
distribute-frac-neg87.4%
distribute-neg-frac287.4%
sub-neg87.4%
distribute-neg-in87.4%
remove-double-neg87.4%
+-commutative87.4%
sub-neg87.4%
Simplified87.4%
Taylor expanded in z around inf 61.5%
Final simplification70.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.4e+86) (not (<= a 72000000000.0))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.4e+86) || !(a <= 72000000000.0)) {
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.4d+86)) .or. (.not. (a <= 72000000000.0d0))) 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.4e+86) || !(a <= 72000000000.0)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.4e+86) or not (a <= 72000000000.0): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.4e+86) || !(a <= 72000000000.0)) 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.4e+86) || ~((a <= 72000000000.0))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.4e+86], N[Not[LessEqual[a, 72000000000.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+86} \lor \neg \left(a \leq 72000000000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.40000000000000002e86 or 7.2e10 < a Initial program 81.3%
Taylor expanded in a around inf 79.8%
+-commutative79.8%
Simplified79.8%
if -1.40000000000000002e86 < a < 7.2e10Initial program 77.9%
Taylor expanded in x around inf 57.8%
Final simplification67.9%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 79.4%
Taylor expanded in x around inf 53.3%
Final simplification53.3%
(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 2024055
(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))))