
(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 11 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 -5.6e+176)
(+ (- x (* a (/ y t))) (* y (/ z t)))
(if (<= t 3e-22)
(- (+ x y) (* (/ y (- a t)) (- z t)))
(- x (* y (/ (- a z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.6e+176) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else if (t <= 3e-22) {
tmp = (x + y) - ((y / (a - t)) * (z - t));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-5.6d+176)) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else if (t <= 3d-22) then
tmp = (x + y) - ((y / (a - t)) * (z - t))
else
tmp = x - (y * ((a - z) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.6e+176) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else if (t <= 3e-22) {
tmp = (x + y) - ((y / (a - t)) * (z - t));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.6e+176: tmp = (x - (a * (y / t))) + (y * (z / t)) elif t <= 3e-22: tmp = (x + y) - ((y / (a - t)) * (z - t)) else: tmp = x - (y * ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.6e+176) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); elseif (t <= 3e-22) tmp = Float64(Float64(x + y) - Float64(Float64(y / Float64(a - t)) * Float64(z - t))); else tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.6e+176) tmp = (x - (a * (y / t))) + (y * (z / t)); elseif (t <= 3e-22) tmp = (x + y) - ((y / (a - t)) * (z - t)); else tmp = x - (y * ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.6e+176], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-22], N[(N[(x + y), $MachinePrecision] - N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+176}:\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-22}:\\
\;\;\;\;\left(x + y\right) - \frac{y}{a - t} \cdot \left(z - t\right)\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\end{array}
\end{array}
if t < -5.6000000000000005e176Initial program 46.6%
Taylor expanded in y around 0 46.6%
associate-*l/54.4%
Simplified54.4%
associate-*l/46.6%
associate-*r/57.9%
clear-num57.9%
un-div-inv58.0%
Applied egg-rr58.0%
Taylor expanded in t around inf 85.3%
sub-neg85.3%
mul-1-neg85.3%
unsub-neg85.3%
associate-/l*88.9%
mul-1-neg88.9%
remove-double-neg88.9%
associate-/l*89.2%
Simplified89.2%
if -5.6000000000000005e176 < t < 2.9999999999999999e-22Initial program 88.3%
Taylor expanded in y around 0 88.3%
associate-*l/93.2%
Simplified93.2%
if 2.9999999999999999e-22 < t Initial program 61.9%
Taylor expanded in t around inf 79.7%
associate--l+79.7%
distribute-lft-out--79.7%
div-sub79.7%
mul-1-neg79.7%
unsub-neg79.7%
*-commutative79.7%
distribute-lft-out--81.1%
Simplified81.1%
Taylor expanded in t around inf 81.1%
neg-mul-181.1%
sub-neg81.1%
associate-*r/88.2%
Simplified88.2%
Final simplification91.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ (- a z) t)))))
(if (<= a -1.6e+83)
(+ x y)
(if (<= a -380000000000.0)
t_1
(if (<= a -1.62e-25)
(+ x y)
(if (<= a -2.3e-71)
(* z (/ y (- t a)))
(if (<= a 8.8e+49) t_1 (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * ((a - z) / t));
double tmp;
if (a <= -1.6e+83) {
tmp = x + y;
} else if (a <= -380000000000.0) {
tmp = t_1;
} else if (a <= -1.62e-25) {
tmp = x + y;
} else if (a <= -2.3e-71) {
tmp = z * (y / (t - a));
} else if (a <= 8.8e+49) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y * ((a - z) / t))
if (a <= (-1.6d+83)) then
tmp = x + y
else if (a <= (-380000000000.0d0)) then
tmp = t_1
else if (a <= (-1.62d-25)) then
tmp = x + y
else if (a <= (-2.3d-71)) then
tmp = z * (y / (t - a))
else if (a <= 8.8d+49) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * ((a - z) / t));
double tmp;
if (a <= -1.6e+83) {
tmp = x + y;
} else if (a <= -380000000000.0) {
tmp = t_1;
} else if (a <= -1.62e-25) {
tmp = x + y;
} else if (a <= -2.3e-71) {
tmp = z * (y / (t - a));
} else if (a <= 8.8e+49) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * ((a - z) / t)) tmp = 0 if a <= -1.6e+83: tmp = x + y elif a <= -380000000000.0: tmp = t_1 elif a <= -1.62e-25: tmp = x + y elif a <= -2.3e-71: tmp = z * (y / (t - a)) elif a <= 8.8e+49: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(Float64(a - z) / t))) tmp = 0.0 if (a <= -1.6e+83) tmp = Float64(x + y); elseif (a <= -380000000000.0) tmp = t_1; elseif (a <= -1.62e-25) tmp = Float64(x + y); elseif (a <= -2.3e-71) tmp = Float64(z * Float64(y / Float64(t - a))); elseif (a <= 8.8e+49) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * ((a - z) / t)); tmp = 0.0; if (a <= -1.6e+83) tmp = x + y; elseif (a <= -380000000000.0) tmp = t_1; elseif (a <= -1.62e-25) tmp = x + y; elseif (a <= -2.3e-71) tmp = z * (y / (t - a)); elseif (a <= 8.8e+49) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.6e+83], N[(x + y), $MachinePrecision], If[LessEqual[a, -380000000000.0], t$95$1, If[LessEqual[a, -1.62e-25], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.3e-71], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.8e+49], t$95$1, N[(x + y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{a - z}{t}\\
\mathbf{if}\;a \leq -1.6 \cdot 10^{+83}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -380000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.62 \cdot 10^{-25}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{-71}:\\
\;\;\;\;z \cdot \frac{y}{t - a}\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.5999999999999999e83 or -3.8e11 < a < -1.62e-25 or 8.8000000000000003e49 < a Initial program 80.6%
Taylor expanded in a around inf 84.1%
+-commutative84.1%
Simplified84.1%
if -1.5999999999999999e83 < a < -3.8e11 or -2.2999999999999998e-71 < a < 8.8000000000000003e49Initial program 74.5%
Taylor expanded in t around inf 79.1%
associate--l+79.1%
distribute-lft-out--79.1%
div-sub80.0%
mul-1-neg80.0%
unsub-neg80.0%
*-commutative80.0%
distribute-lft-out--80.0%
Simplified80.0%
Taylor expanded in t around inf 80.0%
neg-mul-180.0%
sub-neg80.0%
associate-*r/78.8%
Simplified78.8%
if -1.62e-25 < a < -2.2999999999999998e-71Initial program 51.9%
sub-neg51.9%
+-commutative51.9%
distribute-frac-neg51.9%
distribute-rgt-neg-out51.9%
associate-/l*52.0%
fma-define51.4%
distribute-frac-neg51.4%
distribute-neg-frac251.4%
sub-neg51.4%
distribute-neg-in51.4%
remove-double-neg51.4%
+-commutative51.4%
sub-neg51.4%
Simplified51.4%
Taylor expanded in z around inf 68.1%
clear-num67.8%
inv-pow67.8%
Applied egg-rr67.8%
unpow-167.8%
Simplified67.8%
clear-num68.1%
*-commutative68.1%
associate-*r/68.1%
*-commutative68.1%
Applied egg-rr68.1%
Final simplification81.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.25e+83)
(+ x y)
(if (<= a -22000000000.0)
(- x (* y (/ (- a z) t)))
(if (<= a -8.8e-26)
(+ x y)
(if (<= a -2.3e-71)
(* z (/ y (- t a)))
(if (<= a 4e+48) (+ x (/ (* y (- z a)) t)) (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.25e+83) {
tmp = x + y;
} else if (a <= -22000000000.0) {
tmp = x - (y * ((a - z) / t));
} else if (a <= -8.8e-26) {
tmp = x + y;
} else if (a <= -2.3e-71) {
tmp = z * (y / (t - a));
} else if (a <= 4e+48) {
tmp = x + ((y * (z - a)) / t);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.25d+83)) then
tmp = x + y
else if (a <= (-22000000000.0d0)) then
tmp = x - (y * ((a - z) / t))
else if (a <= (-8.8d-26)) then
tmp = x + y
else if (a <= (-2.3d-71)) then
tmp = z * (y / (t - a))
else if (a <= 4d+48) then
tmp = x + ((y * (z - a)) / t)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.25e+83) {
tmp = x + y;
} else if (a <= -22000000000.0) {
tmp = x - (y * ((a - z) / t));
} else if (a <= -8.8e-26) {
tmp = x + y;
} else if (a <= -2.3e-71) {
tmp = z * (y / (t - a));
} else if (a <= 4e+48) {
tmp = x + ((y * (z - a)) / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.25e+83: tmp = x + y elif a <= -22000000000.0: tmp = x - (y * ((a - z) / t)) elif a <= -8.8e-26: tmp = x + y elif a <= -2.3e-71: tmp = z * (y / (t - a)) elif a <= 4e+48: tmp = x + ((y * (z - a)) / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.25e+83) tmp = Float64(x + y); elseif (a <= -22000000000.0) tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); elseif (a <= -8.8e-26) tmp = Float64(x + y); elseif (a <= -2.3e-71) tmp = Float64(z * Float64(y / Float64(t - a))); elseif (a <= 4e+48) tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.25e+83) tmp = x + y; elseif (a <= -22000000000.0) tmp = x - (y * ((a - z) / t)); elseif (a <= -8.8e-26) tmp = x + y; elseif (a <= -2.3e-71) tmp = z * (y / (t - a)); elseif (a <= 4e+48) tmp = x + ((y * (z - a)) / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.25e+83], N[(x + y), $MachinePrecision], If[LessEqual[a, -22000000000.0], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -8.8e-26], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.3e-71], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e+48], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.25 \cdot 10^{+83}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -22000000000:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\mathbf{elif}\;a \leq -8.8 \cdot 10^{-26}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{-71}:\\
\;\;\;\;z \cdot \frac{y}{t - a}\\
\mathbf{elif}\;a \leq 4 \cdot 10^{+48}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -3.2500000000000001e83 or -2.2e10 < a < -8.8000000000000003e-26 or 4.00000000000000018e48 < a Initial program 80.6%
Taylor expanded in a around inf 84.1%
+-commutative84.1%
Simplified84.1%
if -3.2500000000000001e83 < a < -2.2e10Initial program 73.7%
Taylor expanded in t around inf 81.6%
associate--l+81.6%
distribute-lft-out--81.6%
div-sub81.6%
mul-1-neg81.6%
unsub-neg81.6%
*-commutative81.6%
distribute-lft-out--81.6%
Simplified81.6%
Taylor expanded in t around inf 81.6%
neg-mul-181.6%
sub-neg81.6%
associate-*r/81.8%
Simplified81.8%
if -8.8000000000000003e-26 < a < -2.2999999999999998e-71Initial program 51.9%
sub-neg51.9%
+-commutative51.9%
distribute-frac-neg51.9%
distribute-rgt-neg-out51.9%
associate-/l*52.0%
fma-define51.4%
distribute-frac-neg51.4%
distribute-neg-frac251.4%
sub-neg51.4%
distribute-neg-in51.4%
remove-double-neg51.4%
+-commutative51.4%
sub-neg51.4%
Simplified51.4%
Taylor expanded in z around inf 68.1%
clear-num67.8%
inv-pow67.8%
Applied egg-rr67.8%
unpow-167.8%
Simplified67.8%
clear-num68.1%
*-commutative68.1%
associate-*r/68.1%
*-commutative68.1%
Applied egg-rr68.1%
if -2.2999999999999998e-71 < a < 4.00000000000000018e48Initial program 74.7%
Taylor expanded in t around inf 78.8%
associate--l+78.8%
distribute-lft-out--78.8%
div-sub79.8%
mul-1-neg79.8%
unsub-neg79.8%
*-commutative79.8%
distribute-lft-out--79.8%
Simplified79.8%
Final simplification81.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* a y) t))))
(if (<= a -2e-26)
(+ x y)
(if (<= a 8.2e-74)
t_1
(if (<= a 3.5e-31)
(* z (/ y (- t a)))
(if (<= a 5.2e+47) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((a * y) / t);
double tmp;
if (a <= -2e-26) {
tmp = x + y;
} else if (a <= 8.2e-74) {
tmp = t_1;
} else if (a <= 3.5e-31) {
tmp = z * (y / (t - a));
} else if (a <= 5.2e+47) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - ((a * y) / t)
if (a <= (-2d-26)) then
tmp = x + y
else if (a <= 8.2d-74) then
tmp = t_1
else if (a <= 3.5d-31) then
tmp = z * (y / (t - a))
else if (a <= 5.2d+47) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((a * y) / t);
double tmp;
if (a <= -2e-26) {
tmp = x + y;
} else if (a <= 8.2e-74) {
tmp = t_1;
} else if (a <= 3.5e-31) {
tmp = z * (y / (t - a));
} else if (a <= 5.2e+47) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((a * y) / t) tmp = 0 if a <= -2e-26: tmp = x + y elif a <= 8.2e-74: tmp = t_1 elif a <= 3.5e-31: tmp = z * (y / (t - a)) elif a <= 5.2e+47: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(a * y) / t)) tmp = 0.0 if (a <= -2e-26) tmp = Float64(x + y); elseif (a <= 8.2e-74) tmp = t_1; elseif (a <= 3.5e-31) tmp = Float64(z * Float64(y / Float64(t - a))); elseif (a <= 5.2e+47) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((a * y) / t); tmp = 0.0; if (a <= -2e-26) tmp = x + y; elseif (a <= 8.2e-74) tmp = t_1; elseif (a <= 3.5e-31) tmp = z * (y / (t - a)); elseif (a <= 5.2e+47) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(a * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e-26], N[(x + y), $MachinePrecision], If[LessEqual[a, 8.2e-74], t$95$1, If[LessEqual[a, 3.5e-31], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.2e+47], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{a \cdot y}{t}\\
\mathbf{if}\;a \leq -2 \cdot 10^{-26}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{-31}:\\
\;\;\;\;z \cdot \frac{y}{t - a}\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.0000000000000001e-26 or 5.20000000000000007e47 < a Initial program 80.0%
Taylor expanded in a around inf 80.0%
+-commutative80.0%
Simplified80.0%
if -2.0000000000000001e-26 < a < 8.20000000000000063e-74 or 3.49999999999999985e-31 < a < 5.20000000000000007e47Initial program 71.5%
Taylor expanded in t around inf 80.3%
associate--l+80.3%
distribute-lft-out--80.3%
div-sub80.5%
mul-1-neg80.5%
unsub-neg80.5%
*-commutative80.5%
distribute-lft-out--80.5%
Simplified80.5%
Taylor expanded in a around inf 61.0%
*-commutative61.0%
Simplified61.0%
if 8.20000000000000063e-74 < a < 3.49999999999999985e-31Initial program 90.8%
sub-neg90.8%
+-commutative90.8%
distribute-frac-neg90.8%
distribute-rgt-neg-out90.8%
associate-/l*91.0%
fma-define91.5%
distribute-frac-neg91.5%
distribute-neg-frac291.5%
sub-neg91.5%
distribute-neg-in91.5%
remove-double-neg91.5%
+-commutative91.5%
sub-neg91.5%
Simplified91.5%
Taylor expanded in z around inf 72.7%
clear-num72.6%
inv-pow72.6%
Applied egg-rr72.6%
unpow-172.6%
Simplified72.6%
clear-num72.7%
*-commutative72.7%
associate-*r/72.9%
*-commutative72.9%
Applied egg-rr72.9%
Final simplification71.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.25e+177) (not (<= t 2.7e-22))) (- x (* y (/ (- a z) t))) (+ (+ x y) (* y (/ z (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.25e+177) || !(t <= 2.7e-22)) {
tmp = x - (y * ((a - z) / 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 <= (-1.25d+177)) .or. (.not. (t <= 2.7d-22))) then
tmp = x - (y * ((a - z) / 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 <= -1.25e+177) || !(t <= 2.7e-22)) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = (x + y) + (y * (z / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.25e+177) or not (t <= 2.7e-22): tmp = x - (y * ((a - z) / t)) else: tmp = (x + y) + (y * (z / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.25e+177) || !(t <= 2.7e-22)) tmp = Float64(x - Float64(y * Float64(Float64(a - z) / 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 <= -1.25e+177) || ~((t <= 2.7e-22))) tmp = x - (y * ((a - z) / t)); else tmp = (x + y) + (y * (z / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.25e+177], N[Not[LessEqual[t, 2.7e-22]], $MachinePrecision]], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $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 -1.25 \cdot 10^{+177} \lor \neg \left(t \leq 2.7 \cdot 10^{-22}\right):\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if t < -1.2500000000000001e177 or 2.7000000000000002e-22 < t Initial program 57.5%
Taylor expanded in t around inf 81.3%
associate--l+81.3%
distribute-lft-out--81.3%
div-sub81.3%
mul-1-neg81.3%
unsub-neg81.3%
*-commutative81.3%
distribute-lft-out--82.4%
Simplified82.4%
Taylor expanded in t around inf 82.4%
neg-mul-182.4%
sub-neg82.4%
associate-*r/87.5%
Simplified87.5%
if -1.2500000000000001e177 < t < 2.7000000000000002e-22Initial program 88.3%
Taylor expanded in z around inf 88.4%
associate-/l*92.6%
Simplified92.6%
Final simplification90.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.6e+176) (not (<= t 3e-22))) (- x (* y (/ (- a z) t))) (+ (+ x y) (/ y (/ (- t a) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.6e+176) || !(t <= 3e-22)) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = (x + y) + (y / ((t - a) / 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 <= (-5.6d+176)) .or. (.not. (t <= 3d-22))) then
tmp = x - (y * ((a - z) / t))
else
tmp = (x + y) + (y / ((t - a) / 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 <= -5.6e+176) || !(t <= 3e-22)) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = (x + y) + (y / ((t - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.6e+176) or not (t <= 3e-22): tmp = x - (y * ((a - z) / t)) else: tmp = (x + y) + (y / ((t - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.6e+176) || !(t <= 3e-22)) tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); else tmp = Float64(Float64(x + y) + Float64(y / Float64(Float64(t - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.6e+176) || ~((t <= 3e-22))) tmp = x - (y * ((a - z) / t)); else tmp = (x + y) + (y / ((t - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.6e+176], N[Not[LessEqual[t, 3e-22]], $MachinePrecision]], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(y / N[(N[(t - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+176} \lor \neg \left(t \leq 3 \cdot 10^{-22}\right):\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \frac{y}{\frac{t - a}{z}}\\
\end{array}
\end{array}
if t < -5.6000000000000005e176 or 2.9999999999999999e-22 < t Initial program 57.5%
Taylor expanded in t around inf 81.3%
associate--l+81.3%
distribute-lft-out--81.3%
div-sub81.3%
mul-1-neg81.3%
unsub-neg81.3%
*-commutative81.3%
distribute-lft-out--82.4%
Simplified82.4%
Taylor expanded in t around inf 82.4%
neg-mul-182.4%
sub-neg82.4%
associate-*r/87.5%
Simplified87.5%
if -5.6000000000000005e176 < t < 2.9999999999999999e-22Initial program 88.3%
Taylor expanded in y around 0 88.3%
associate-*l/93.2%
Simplified93.2%
associate-*l/88.3%
associate-*r/93.1%
clear-num93.1%
un-div-inv93.2%
Applied egg-rr93.2%
Taylor expanded in z around inf 92.6%
Final simplification90.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.8e+177)
(+ (- x (* a (/ y t))) (* y (/ z t)))
(if (<= t 1.95e-22)
(+ (+ x y) (/ y (/ (- t a) z)))
(- x (* y (/ (- a z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.8e+177) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else if (t <= 1.95e-22) {
tmp = (x + y) + (y / ((t - a) / z));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.8d+177)) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else if (t <= 1.95d-22) then
tmp = (x + y) + (y / ((t - a) / z))
else
tmp = x - (y * ((a - z) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.8e+177) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else if (t <= 1.95e-22) {
tmp = (x + y) + (y / ((t - a) / z));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.8e+177: tmp = (x - (a * (y / t))) + (y * (z / t)) elif t <= 1.95e-22: tmp = (x + y) + (y / ((t - a) / z)) else: tmp = x - (y * ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.8e+177) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); elseif (t <= 1.95e-22) tmp = Float64(Float64(x + y) + Float64(y / Float64(Float64(t - a) / z))); else tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.8e+177) tmp = (x - (a * (y / t))) + (y * (z / t)); elseif (t <= 1.95e-22) tmp = (x + y) + (y / ((t - a) / z)); else tmp = x - (y * ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.8e+177], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e-22], N[(N[(x + y), $MachinePrecision] + N[(y / N[(N[(t - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+177}:\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-22}:\\
\;\;\;\;\left(x + y\right) + \frac{y}{\frac{t - a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\end{array}
\end{array}
if t < -2.80000000000000002e177Initial program 46.6%
Taylor expanded in y around 0 46.6%
associate-*l/54.4%
Simplified54.4%
associate-*l/46.6%
associate-*r/57.9%
clear-num57.9%
un-div-inv58.0%
Applied egg-rr58.0%
Taylor expanded in t around inf 85.3%
sub-neg85.3%
mul-1-neg85.3%
unsub-neg85.3%
associate-/l*88.9%
mul-1-neg88.9%
remove-double-neg88.9%
associate-/l*89.2%
Simplified89.2%
if -2.80000000000000002e177 < t < 1.94999999999999999e-22Initial program 88.3%
Taylor expanded in y around 0 88.3%
associate-*l/93.2%
Simplified93.2%
associate-*l/88.3%
associate-*r/93.1%
clear-num93.1%
un-div-inv93.2%
Applied egg-rr93.2%
Taylor expanded in z around inf 92.6%
if 1.94999999999999999e-22 < t Initial program 61.9%
Taylor expanded in t around inf 79.7%
associate--l+79.7%
distribute-lft-out--79.7%
div-sub79.7%
mul-1-neg79.7%
unsub-neg79.7%
*-commutative79.7%
distribute-lft-out--81.1%
Simplified81.1%
Taylor expanded in t around inf 81.1%
neg-mul-181.1%
sub-neg81.1%
associate-*r/88.2%
Simplified88.2%
Final simplification91.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.7e+36) (not (<= t 4.9e-23))) (- x (* y (/ (- a z) t))) (- (+ x y) (/ y (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.7e+36) || !(t <= 4.9e-23)) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = (x + y) - (y / (a / 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.7d+36)) .or. (.not. (t <= 4.9d-23))) then
tmp = x - (y * ((a - z) / t))
else
tmp = (x + y) - (y / (a / 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.7e+36) || !(t <= 4.9e-23)) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = (x + y) - (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.7e+36) or not (t <= 4.9e-23): tmp = x - (y * ((a - z) / t)) else: tmp = (x + y) - (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.7e+36) || !(t <= 4.9e-23)) tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); else tmp = Float64(Float64(x + y) - Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.7e+36) || ~((t <= 4.9e-23))) tmp = x - (y * ((a - z) / t)); else tmp = (x + y) - (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.7e+36], N[Not[LessEqual[t, 4.9e-23]], $MachinePrecision]], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{+36} \lor \neg \left(t \leq 4.9 \cdot 10^{-23}\right):\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -1.6999999999999999e36 or 4.8999999999999998e-23 < t Initial program 59.0%
Taylor expanded in t around inf 77.0%
associate--l+77.0%
distribute-lft-out--77.0%
div-sub77.0%
mul-1-neg77.0%
unsub-neg77.0%
*-commutative77.0%
distribute-lft-out--78.0%
Simplified78.0%
Taylor expanded in t around inf 78.0%
neg-mul-178.0%
sub-neg78.0%
associate-*r/81.9%
Simplified81.9%
if -1.6999999999999999e36 < t < 4.8999999999999998e-23Initial program 93.4%
Taylor expanded in y around 0 93.4%
associate-*l/96.3%
Simplified96.3%
associate-*l/93.4%
associate-*r/95.6%
clear-num95.6%
un-div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in t around 0 87.9%
Final simplification85.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -0.0205) (not (<= a 4.8e+48))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -0.0205) || !(a <= 4.8e+48)) {
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 <= (-0.0205d0)) .or. (.not. (a <= 4.8d+48))) 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 <= -0.0205) || !(a <= 4.8e+48)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -0.0205) or not (a <= 4.8e+48): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -0.0205) || !(a <= 4.8e+48)) 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 <= -0.0205) || ~((a <= 4.8e+48))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -0.0205], N[Not[LessEqual[a, 4.8e+48]], $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 -0.0205 \lor \neg \left(a \leq 4.8 \cdot 10^{+48}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -0.0205000000000000009 or 4.8000000000000002e48 < a Initial program 80.2%
Taylor expanded in a around inf 80.9%
+-commutative80.9%
Simplified80.9%
if -0.0205000000000000009 < a < 4.8000000000000002e48Initial program 73.5%
Taylor expanded in t around inf 76.3%
associate--l+76.3%
distribute-lft-out--76.3%
div-sub77.3%
mul-1-neg77.3%
unsub-neg77.3%
*-commutative77.3%
distribute-lft-out--77.3%
Simplified77.3%
Taylor expanded in a around 0 74.8%
associate-*r*74.8%
neg-mul-174.8%
*-commutative74.8%
Simplified74.8%
Final simplification77.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.05e+203) x (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.05e+203) {
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 <= (-1.05d+203)) 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 <= -1.05e+203) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.05e+203: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.05e+203) 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 <= -1.05e+203) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.05e+203], x, N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+203}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.04999999999999992e203Initial program 50.2%
Taylor expanded in x around inf 73.3%
if -1.04999999999999992e203 < t Initial program 79.8%
Taylor expanded in a around inf 63.7%
+-commutative63.7%
Simplified63.7%
Final simplification64.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 76.9%
Taylor expanded in x around inf 50.6%
Final simplification50.6%
(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 2024082
(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))))