
(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 12 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.95e+164) (not (<= t 2.3e+116))) (- x (* y (+ (/ z (- a t)) (/ a t)))) (+ x (- y (/ (- z t) (* (- a t) (/ 1.0 y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.95e+164) || !(t <= 2.3e+116)) {
tmp = x - (y * ((z / (a - t)) + (a / t)));
} else {
tmp = x + (y - ((z - t) / ((a - t) * (1.0 / 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 <= (-1.95d+164)) .or. (.not. (t <= 2.3d+116))) then
tmp = x - (y * ((z / (a - t)) + (a / t)))
else
tmp = x + (y - ((z - t) / ((a - t) * (1.0d0 / 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 <= -1.95e+164) || !(t <= 2.3e+116)) {
tmp = x - (y * ((z / (a - t)) + (a / t)));
} else {
tmp = x + (y - ((z - t) / ((a - t) * (1.0 / y))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.95e+164) or not (t <= 2.3e+116): tmp = x - (y * ((z / (a - t)) + (a / t))) else: tmp = x + (y - ((z - t) / ((a - t) * (1.0 / y)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.95e+164) || !(t <= 2.3e+116)) tmp = Float64(x - Float64(y * Float64(Float64(z / Float64(a - t)) + Float64(a / t)))); else tmp = Float64(x + Float64(y - Float64(Float64(z - t) / Float64(Float64(a - t) * Float64(1.0 / y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.95e+164) || ~((t <= 2.3e+116))) tmp = x - (y * ((z / (a - t)) + (a / t))); else tmp = x + (y - ((z - t) / ((a - t) * (1.0 / y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.95e+164], N[Not[LessEqual[t, 2.3e+116]], $MachinePrecision]], N[(x - N[(y * N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] + N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(N[(z - t), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.95 \cdot 10^{+164} \lor \neg \left(t \leq 2.3 \cdot 10^{+116}\right):\\
\;\;\;\;x - y \cdot \left(\frac{z}{a - t} + \frac{a}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - \frac{z - t}{\left(a - t\right) \cdot \frac{1}{y}}\right)\\
\end{array}
\end{array}
if t < -1.94999999999999993e164 or 2.29999999999999995e116 < t Initial program 35.0%
+-commutative35.0%
associate--l+35.0%
sub-neg35.0%
distribute-frac-neg35.0%
*-commutative35.0%
distribute-rgt-neg-in35.0%
associate-/l*50.7%
sub-neg50.7%
distribute-neg-in50.7%
remove-double-neg50.7%
+-commutative50.7%
sub-neg50.7%
Simplified50.7%
Taylor expanded in y around 0 88.5%
Taylor expanded in t around inf 93.5%
associate-*r/93.5%
neg-mul-193.5%
Simplified93.5%
if -1.94999999999999993e164 < t < 2.29999999999999995e116Initial program 85.9%
sub-neg85.9%
distribute-frac-neg85.9%
distribute-rgt-neg-out85.9%
associate-/l*92.5%
div-sub91.3%
associate-+r-91.3%
associate-/r/92.5%
distribute-rgt-neg-out92.5%
associate-/r/91.3%
distribute-frac-neg91.3%
associate-+l+91.3%
associate-+r-94.1%
distribute-frac-neg94.1%
Simplified95.3%
div-inv95.3%
Applied egg-rr95.3%
Final simplification94.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.5e+140) (not (<= t 3.9e+115))) (+ x (/ (- z a) (/ t y))) (+ x (+ y (/ (- t z) (/ (- a t) y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.5e+140) || !(t <= 3.9e+115)) {
tmp = x + ((z - a) / (t / y));
} else {
tmp = x + (y + ((t - z) / ((a - t) / y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-6.5d+140)) .or. (.not. (t <= 3.9d+115))) then
tmp = x + ((z - a) / (t / y))
else
tmp = x + (y + ((t - z) / ((a - t) / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.5e+140) || !(t <= 3.9e+115)) {
tmp = x + ((z - a) / (t / y));
} else {
tmp = x + (y + ((t - z) / ((a - t) / y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.5e+140) or not (t <= 3.9e+115): tmp = x + ((z - a) / (t / y)) else: tmp = x + (y + ((t - z) / ((a - t) / y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.5e+140) || !(t <= 3.9e+115)) tmp = Float64(x + Float64(Float64(z - a) / Float64(t / y))); else tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6.5e+140) || ~((t <= 3.9e+115))) tmp = x + ((z - a) / (t / y)); else tmp = x + (y + ((t - z) / ((a - t) / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.5e+140], N[Not[LessEqual[t, 3.9e+115]], $MachinePrecision]], N[(x + N[(N[(z - a), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+140} \lor \neg \left(t \leq 3.9 \cdot 10^{+115}\right):\\
\;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\end{array}
\end{array}
if t < -6.4999999999999999e140 or 3.90000000000000006e115 < t Initial program 36.1%
+-commutative36.1%
associate--l+36.1%
sub-neg36.1%
distribute-frac-neg36.1%
*-commutative36.1%
distribute-rgt-neg-in36.1%
associate-/l*51.3%
sub-neg51.3%
distribute-neg-in51.3%
remove-double-neg51.3%
+-commutative51.3%
sub-neg51.3%
Simplified51.3%
Taylor expanded in y around 0 87.8%
Taylor expanded in t around inf 71.1%
mul-1-neg71.1%
associate-/l*90.5%
+-commutative90.5%
mul-1-neg90.5%
sub-neg90.5%
Simplified90.5%
if -6.4999999999999999e140 < t < 3.90000000000000006e115Initial program 86.2%
sub-neg86.2%
distribute-frac-neg86.2%
distribute-rgt-neg-out86.2%
associate-/l*93.0%
div-sub91.7%
associate-+r-91.7%
associate-/r/92.9%
distribute-rgt-neg-out92.9%
associate-/r/91.7%
distribute-frac-neg91.7%
associate-+l+91.7%
associate-+r-94.6%
distribute-frac-neg94.6%
Simplified95.8%
Final simplification94.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.6e+162) (not (<= t 9e+117))) (- x (* y (+ (/ z (- a t)) (/ a t)))) (+ x (+ y (/ (- t z) (/ (- a t) y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.6e+162) || !(t <= 9e+117)) {
tmp = x - (y * ((z / (a - t)) + (a / t)));
} else {
tmp = x + (y + ((t - z) / ((a - t) / y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2.6d+162)) .or. (.not. (t <= 9d+117))) then
tmp = x - (y * ((z / (a - t)) + (a / t)))
else
tmp = x + (y + ((t - z) / ((a - t) / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.6e+162) || !(t <= 9e+117)) {
tmp = x - (y * ((z / (a - t)) + (a / t)));
} else {
tmp = x + (y + ((t - z) / ((a - t) / y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.6e+162) or not (t <= 9e+117): tmp = x - (y * ((z / (a - t)) + (a / t))) else: tmp = x + (y + ((t - z) / ((a - t) / y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.6e+162) || !(t <= 9e+117)) tmp = Float64(x - Float64(y * Float64(Float64(z / Float64(a - t)) + Float64(a / t)))); else tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.6e+162) || ~((t <= 9e+117))) tmp = x - (y * ((z / (a - t)) + (a / t))); else tmp = x + (y + ((t - z) / ((a - t) / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.6e+162], N[Not[LessEqual[t, 9e+117]], $MachinePrecision]], N[(x - N[(y * N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] + N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+162} \lor \neg \left(t \leq 9 \cdot 10^{+117}\right):\\
\;\;\;\;x - y \cdot \left(\frac{z}{a - t} + \frac{a}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\end{array}
\end{array}
if t < -2.6e162 or 9e117 < t Initial program 35.0%
+-commutative35.0%
associate--l+35.0%
sub-neg35.0%
distribute-frac-neg35.0%
*-commutative35.0%
distribute-rgt-neg-in35.0%
associate-/l*50.7%
sub-neg50.7%
distribute-neg-in50.7%
remove-double-neg50.7%
+-commutative50.7%
sub-neg50.7%
Simplified50.7%
Taylor expanded in y around 0 88.5%
Taylor expanded in t around inf 93.5%
associate-*r/93.5%
neg-mul-193.5%
Simplified93.5%
if -2.6e162 < t < 9e117Initial program 85.9%
sub-neg85.9%
distribute-frac-neg85.9%
distribute-rgt-neg-out85.9%
associate-/l*92.5%
div-sub91.3%
associate-+r-91.3%
associate-/r/92.5%
distribute-rgt-neg-out92.5%
associate-/r/91.3%
distribute-frac-neg91.3%
associate-+l+91.3%
associate-+r-94.1%
distribute-frac-neg94.1%
Simplified95.3%
Final simplification94.7%
(FPCore (x y z t a) :precision binary64 (- x (* y (+ (/ z (- a t)) (- -1.0 (/ t (- a t)))))))
double code(double x, double y, double z, double t, double a) {
return x - (y * ((z / (a - t)) + (-1.0 - (t / (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 / (a - t)) + ((-1.0d0) - (t / (a - t)))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (y * ((z / (a - t)) + (-1.0 - (t / (a - t)))));
}
def code(x, y, z, t, a): return x - (y * ((z / (a - t)) + (-1.0 - (t / (a - t)))))
function code(x, y, z, t, a) return Float64(x - Float64(y * Float64(Float64(z / Float64(a - t)) + Float64(-1.0 - Float64(t / Float64(a - t)))))) end
function tmp = code(x, y, z, t, a) tmp = x - (y * ((z / (a - t)) + (-1.0 - (t / (a - t))))); end
code[x_, y_, z_, t_, a_] := N[(x - N[(y * N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - y \cdot \left(\frac{z}{a - t} + \left(-1 - \frac{t}{a - t}\right)\right)
\end{array}
Initial program 68.8%
+-commutative68.8%
associate--l+68.8%
sub-neg68.8%
distribute-frac-neg68.8%
*-commutative68.8%
distribute-rgt-neg-in68.8%
associate-/l*78.1%
sub-neg78.1%
distribute-neg-in78.1%
remove-double-neg78.1%
+-commutative78.1%
sub-neg78.1%
Simplified78.1%
Taylor expanded in y around 0 93.5%
Final simplification93.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.8e+51) (not (<= a 8e-85))) (- x (- (* z (/ y a)) y)) (+ x (/ y (/ t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.8e+51) || !(a <= 8e-85)) {
tmp = x - ((z * (y / a)) - y);
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.8d+51)) .or. (.not. (a <= 8d-85))) then
tmp = x - ((z * (y / a)) - y)
else
tmp = x + (y / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.8e+51) || !(a <= 8e-85)) {
tmp = x - ((z * (y / a)) - y);
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.8e+51) or not (a <= 8e-85): tmp = x - ((z * (y / a)) - y) else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.8e+51) || !(a <= 8e-85)) tmp = Float64(x - Float64(Float64(z * Float64(y / a)) - y)); else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.8e+51) || ~((a <= 8e-85))) tmp = x - ((z * (y / a)) - y); else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.8e+51], N[Not[LessEqual[a, 8e-85]], $MachinePrecision]], N[(x - N[(N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+51} \lor \neg \left(a \leq 8 \cdot 10^{-85}\right):\\
\;\;\;\;x - \left(z \cdot \frac{y}{a} - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if a < -1.80000000000000005e51 or 7.9999999999999998e-85 < a Initial program 71.6%
sub-neg71.6%
distribute-frac-neg71.6%
distribute-rgt-neg-out71.6%
associate-/l*86.0%
div-sub85.3%
associate-+r-85.3%
associate-/r/85.9%
distribute-rgt-neg-out85.9%
associate-/r/85.3%
distribute-frac-neg85.3%
associate-+l+85.3%
associate-+r-88.7%
distribute-frac-neg88.7%
Simplified89.4%
add-sqr-sqrt39.7%
div-inv39.8%
times-frac38.4%
Applied egg-rr38.4%
associate-*r/40.4%
*-commutative40.4%
associate-*r/40.4%
rem-square-sqrt90.1%
Simplified90.1%
Taylor expanded in t around 0 71.4%
associate-*l/81.2%
Simplified81.2%
if -1.80000000000000005e51 < a < 7.9999999999999998e-85Initial program 65.4%
+-commutative65.4%
associate--l+65.4%
sub-neg65.4%
distribute-frac-neg65.4%
*-commutative65.4%
distribute-rgt-neg-in65.4%
associate-/l*67.9%
sub-neg67.9%
distribute-neg-in67.9%
remove-double-neg67.9%
+-commutative67.9%
sub-neg67.9%
Simplified67.9%
Taylor expanded in y around 0 93.4%
Taylor expanded in a around 0 80.7%
associate-/l*86.8%
Simplified86.8%
Final simplification83.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.5e+50) (not (<= a 1.3e-83))) (- (+ y x) (* y (/ z a))) (+ x (/ y (/ t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.5e+50) || !(a <= 1.3e-83)) {
tmp = (y + x) - (y * (z / a));
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-7.5d+50)) .or. (.not. (a <= 1.3d-83))) then
tmp = (y + x) - (y * (z / a))
else
tmp = x + (y / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.5e+50) || !(a <= 1.3e-83)) {
tmp = (y + x) - (y * (z / a));
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.5e+50) or not (a <= 1.3e-83): tmp = (y + x) - (y * (z / a)) else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.5e+50) || !(a <= 1.3e-83)) tmp = Float64(Float64(y + x) - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.5e+50) || ~((a <= 1.3e-83))) tmp = (y + x) - (y * (z / a)); else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.5e+50], N[Not[LessEqual[a, 1.3e-83]], $MachinePrecision]], N[(N[(y + x), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{+50} \lor \neg \left(a \leq 1.3 \cdot 10^{-83}\right):\\
\;\;\;\;\left(y + x\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if a < -7.4999999999999999e50 or 1.30000000000000004e-83 < a Initial program 71.6%
associate-*l/86.7%
Simplified86.7%
Taylor expanded in t around 0 81.2%
if -7.4999999999999999e50 < a < 1.30000000000000004e-83Initial program 65.4%
+-commutative65.4%
associate--l+65.4%
sub-neg65.4%
distribute-frac-neg65.4%
*-commutative65.4%
distribute-rgt-neg-in65.4%
associate-/l*67.9%
sub-neg67.9%
distribute-neg-in67.9%
remove-double-neg67.9%
+-commutative67.9%
sub-neg67.9%
Simplified67.9%
Taylor expanded in y around 0 93.4%
Taylor expanded in a around 0 80.7%
associate-/l*86.8%
Simplified86.8%
Final simplification83.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.55e+45) (not (<= a 2.8e+75))) (- (+ y x) (* y (/ z a))) (- x (/ (* y z) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.55e+45) || !(a <= 2.8e+75)) {
tmp = (y + x) - (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 <= (-2.55d+45)) .or. (.not. (a <= 2.8d+75))) then
tmp = (y + x) - (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 <= -2.55e+45) || !(a <= 2.8e+75)) {
tmp = (y + x) - (y * (z / a));
} else {
tmp = x - ((y * z) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.55e+45) or not (a <= 2.8e+75): tmp = (y + x) - (y * (z / a)) else: tmp = x - ((y * z) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.55e+45) || !(a <= 2.8e+75)) tmp = Float64(Float64(y + x) - Float64(y * Float64(z / a))); else tmp = Float64(x - Float64(Float64(y * z) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.55e+45) || ~((a <= 2.8e+75))) tmp = (y + x) - (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, -2.55e+45], N[Not[LessEqual[a, 2.8e+75]], $MachinePrecision]], N[(N[(y + x), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.55 \cdot 10^{+45} \lor \neg \left(a \leq 2.8 \cdot 10^{+75}\right):\\
\;\;\;\;\left(y + x\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\end{array}
\end{array}
if a < -2.5499999999999999e45 or 2.80000000000000012e75 < a Initial program 72.0%
associate-*l/91.2%
Simplified91.2%
Taylor expanded in t around 0 87.6%
if -2.5499999999999999e45 < a < 2.80000000000000012e75Initial program 66.7%
sub-neg66.7%
distribute-frac-neg66.7%
distribute-rgt-neg-out66.7%
associate-/l*69.9%
div-sub68.5%
associate-+r-68.5%
associate-/r/69.8%
distribute-rgt-neg-out69.8%
associate-/r/68.5%
distribute-frac-neg68.5%
associate-+l+68.5%
associate-+r-78.6%
distribute-frac-neg78.6%
Simplified79.9%
Taylor expanded in z around inf 82.9%
associate-*r/82.9%
associate-*r*82.9%
neg-mul-182.9%
Simplified82.9%
Final simplification84.7%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.6e-18) (+ x (/ y (/ t z))) (if (<= t 2.2e-16) (- x (- (* z (/ y a)) y)) (+ x (/ (- z a) (/ t y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.6e-18) {
tmp = x + (y / (t / z));
} else if (t <= 2.2e-16) {
tmp = x - ((z * (y / a)) - y);
} else {
tmp = x + ((z - a) / (t / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-4.6d-18)) then
tmp = x + (y / (t / z))
else if (t <= 2.2d-16) then
tmp = x - ((z * (y / a)) - y)
else
tmp = x + ((z - a) / (t / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.6e-18) {
tmp = x + (y / (t / z));
} else if (t <= 2.2e-16) {
tmp = x - ((z * (y / a)) - y);
} else {
tmp = x + ((z - a) / (t / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.6e-18: tmp = x + (y / (t / z)) elif t <= 2.2e-16: tmp = x - ((z * (y / a)) - y) else: tmp = x + ((z - a) / (t / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.6e-18) tmp = Float64(x + Float64(y / Float64(t / z))); elseif (t <= 2.2e-16) tmp = Float64(x - Float64(Float64(z * Float64(y / a)) - y)); else tmp = Float64(x + Float64(Float64(z - a) / Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.6e-18) tmp = x + (y / (t / z)); elseif (t <= 2.2e-16) tmp = x - ((z * (y / a)) - y); else tmp = x + ((z - a) / (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.6e-18], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e-16], N[(x - N[(N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-18}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-16}:\\
\;\;\;\;x - \left(z \cdot \frac{y}{a} - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\
\end{array}
\end{array}
if t < -4.6000000000000002e-18Initial program 62.5%
+-commutative62.5%
associate--l+62.5%
sub-neg62.5%
distribute-frac-neg62.5%
*-commutative62.5%
distribute-rgt-neg-in62.5%
associate-/l*74.0%
sub-neg74.0%
distribute-neg-in74.0%
remove-double-neg74.0%
+-commutative74.0%
sub-neg74.0%
Simplified74.0%
Taylor expanded in y around 0 93.5%
Taylor expanded in a around 0 73.0%
associate-/l*82.2%
Simplified82.2%
if -4.6000000000000002e-18 < t < 2.2e-16Initial program 90.1%
sub-neg90.1%
distribute-frac-neg90.1%
distribute-rgt-neg-out90.1%
associate-/l*94.4%
div-sub92.4%
associate-+r-92.4%
associate-/r/94.4%
distribute-rgt-neg-out94.4%
associate-/r/92.4%
distribute-frac-neg92.4%
associate-+l+92.4%
associate-+r-93.3%
distribute-frac-neg93.3%
Simplified95.3%
add-sqr-sqrt35.1%
div-inv35.1%
times-frac35.9%
Applied egg-rr35.9%
associate-*r/35.9%
*-commutative35.9%
associate-*r/35.9%
rem-square-sqrt94.4%
Simplified94.4%
Taylor expanded in t around 0 82.2%
associate-*l/86.9%
Simplified86.9%
if 2.2e-16 < t Initial program 44.6%
+-commutative44.6%
associate--l+44.6%
sub-neg44.6%
distribute-frac-neg44.6%
*-commutative44.6%
distribute-rgt-neg-in44.6%
associate-/l*60.2%
sub-neg60.2%
distribute-neg-in60.2%
remove-double-neg60.2%
+-commutative60.2%
sub-neg60.2%
Simplified60.2%
Taylor expanded in y around 0 91.8%
Taylor expanded in t around inf 68.7%
mul-1-neg68.7%
associate-/l*89.4%
+-commutative89.4%
mul-1-neg89.4%
sub-neg89.4%
Simplified89.4%
Final simplification86.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4e+114)
(+ y x)
(if (<= a -2.1e-194)
x
(if (<= a 1.55e-274) (/ z (/ t y)) (if (<= a 2.6e+70) x (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4e+114) {
tmp = y + x;
} else if (a <= -2.1e-194) {
tmp = x;
} else if (a <= 1.55e-274) {
tmp = z / (t / y);
} else if (a <= 2.6e+70) {
tmp = x;
} else {
tmp = y + 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 <= (-4d+114)) then
tmp = y + x
else if (a <= (-2.1d-194)) then
tmp = x
else if (a <= 1.55d-274) then
tmp = z / (t / y)
else if (a <= 2.6d+70) then
tmp = x
else
tmp = y + 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 <= -4e+114) {
tmp = y + x;
} else if (a <= -2.1e-194) {
tmp = x;
} else if (a <= 1.55e-274) {
tmp = z / (t / y);
} else if (a <= 2.6e+70) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4e+114: tmp = y + x elif a <= -2.1e-194: tmp = x elif a <= 1.55e-274: tmp = z / (t / y) elif a <= 2.6e+70: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4e+114) tmp = Float64(y + x); elseif (a <= -2.1e-194) tmp = x; elseif (a <= 1.55e-274) tmp = Float64(z / Float64(t / y)); elseif (a <= 2.6e+70) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4e+114) tmp = y + x; elseif (a <= -2.1e-194) tmp = x; elseif (a <= 1.55e-274) tmp = z / (t / y); elseif (a <= 2.6e+70) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4e+114], N[(y + x), $MachinePrecision], If[LessEqual[a, -2.1e-194], x, If[LessEqual[a, 1.55e-274], N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.6e+70], x, N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+114}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq -2.1 \cdot 10^{-194}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-274}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{+70}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -4e114 or 2.6e70 < a Initial program 72.2%
+-commutative72.2%
associate--l+72.2%
sub-neg72.2%
distribute-frac-neg72.2%
*-commutative72.2%
distribute-rgt-neg-in72.2%
associate-/l*94.1%
sub-neg94.1%
distribute-neg-in94.1%
remove-double-neg94.1%
+-commutative94.1%
sub-neg94.1%
Simplified94.1%
Taylor expanded in a around inf 81.9%
if -4e114 < a < -2.1e-194 or 1.54999999999999989e-274 < a < 2.6e70Initial program 68.5%
+-commutative68.5%
associate--l+68.5%
sub-neg68.5%
distribute-frac-neg68.5%
*-commutative68.5%
distribute-rgt-neg-in68.5%
associate-/l*72.5%
sub-neg72.5%
distribute-neg-in72.5%
remove-double-neg72.5%
+-commutative72.5%
sub-neg72.5%
Simplified72.5%
Taylor expanded in y around 0 59.0%
if -2.1e-194 < a < 1.54999999999999989e-274Initial program 60.7%
+-commutative60.7%
associate--l+60.7%
sub-neg60.7%
distribute-frac-neg60.7%
*-commutative60.7%
distribute-rgt-neg-in60.7%
associate-/l*60.5%
sub-neg60.5%
distribute-neg-in60.5%
remove-double-neg60.5%
+-commutative60.5%
sub-neg60.5%
Simplified60.5%
Taylor expanded in y around 0 90.1%
Taylor expanded in a around 0 80.6%
Taylor expanded in y around inf 45.6%
*-commutative45.6%
associate-/l*58.4%
Simplified58.4%
Final simplification66.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.1e+111) (+ y x) (if (<= a 4.2e+70) (+ x (/ y (/ t z))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.1e+111) {
tmp = y + x;
} else if (a <= 4.2e+70) {
tmp = x + (y / (t / z));
} else {
tmp = y + 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 <= (-4.1d+111)) then
tmp = y + x
else if (a <= 4.2d+70) then
tmp = x + (y / (t / z))
else
tmp = y + 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 <= -4.1e+111) {
tmp = y + x;
} else if (a <= 4.2e+70) {
tmp = x + (y / (t / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.1e+111: tmp = y + x elif a <= 4.2e+70: tmp = x + (y / (t / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.1e+111) tmp = Float64(y + x); elseif (a <= 4.2e+70) tmp = Float64(x + Float64(y / Float64(t / z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.1e+111) tmp = y + x; elseif (a <= 4.2e+70) tmp = x + (y / (t / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.1e+111], N[(y + x), $MachinePrecision], If[LessEqual[a, 4.2e+70], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{+111}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{+70}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -4.09999999999999986e111 or 4.20000000000000015e70 < a Initial program 72.5%
+-commutative72.5%
associate--l+72.5%
sub-neg72.5%
distribute-frac-neg72.5%
*-commutative72.5%
distribute-rgt-neg-in72.5%
associate-/l*94.1%
sub-neg94.1%
distribute-neg-in94.1%
remove-double-neg94.1%
+-commutative94.1%
sub-neg94.1%
Simplified94.1%
Taylor expanded in a around inf 82.1%
if -4.09999999999999986e111 < a < 4.20000000000000015e70Initial program 66.9%
+-commutative66.9%
associate--l+66.9%
sub-neg66.9%
distribute-frac-neg66.9%
*-commutative66.9%
distribute-rgt-neg-in66.9%
associate-/l*70.2%
sub-neg70.2%
distribute-neg-in70.2%
remove-double-neg70.2%
+-commutative70.2%
sub-neg70.2%
Simplified70.2%
Taylor expanded in y around 0 92.3%
Taylor expanded in a around 0 73.3%
associate-/l*79.7%
Simplified79.7%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.48e+113) (+ y x) (if (<= a 2.45e+70) x (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.48e+113) {
tmp = y + x;
} else if (a <= 2.45e+70) {
tmp = x;
} else {
tmp = y + 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.48d+113)) then
tmp = y + x
else if (a <= 2.45d+70) then
tmp = x
else
tmp = y + 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.48e+113) {
tmp = y + x;
} else if (a <= 2.45e+70) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.48e+113: tmp = y + x elif a <= 2.45e+70: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.48e+113) tmp = Float64(y + x); elseif (a <= 2.45e+70) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.48e+113) tmp = y + x; elseif (a <= 2.45e+70) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.48e+113], N[(y + x), $MachinePrecision], If[LessEqual[a, 2.45e+70], x, N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.48 \cdot 10^{+113}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 2.45 \cdot 10^{+70}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -1.48000000000000002e113 or 2.45000000000000014e70 < a Initial program 72.2%
+-commutative72.2%
associate--l+72.2%
sub-neg72.2%
distribute-frac-neg72.2%
*-commutative72.2%
distribute-rgt-neg-in72.2%
associate-/l*94.1%
sub-neg94.1%
distribute-neg-in94.1%
remove-double-neg94.1%
+-commutative94.1%
sub-neg94.1%
Simplified94.1%
Taylor expanded in a around inf 81.9%
if -1.48000000000000002e113 < a < 2.45000000000000014e70Initial program 67.1%
+-commutative67.1%
associate--l+67.1%
sub-neg67.1%
distribute-frac-neg67.1%
*-commutative67.1%
distribute-rgt-neg-in67.1%
associate-/l*70.4%
sub-neg70.4%
distribute-neg-in70.4%
remove-double-neg70.4%
+-commutative70.4%
sub-neg70.4%
Simplified70.4%
Taylor expanded in y around 0 55.0%
Final simplification63.7%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 68.8%
+-commutative68.8%
associate--l+68.8%
sub-neg68.8%
distribute-frac-neg68.8%
*-commutative68.8%
distribute-rgt-neg-in68.8%
associate-/l*78.1%
sub-neg78.1%
distribute-neg-in78.1%
remove-double-neg78.1%
+-commutative78.1%
sub-neg78.1%
Simplified78.1%
Taylor expanded in y around 0 52.4%
Final simplification52.4%
(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 2023268
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))