
(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
(let* ((t_1 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
(if (<= t_1 (- INFINITY))
(- x (/ -1.0 (/ (/ t y) (- z a))))
(if (<= t_1 -5e-242)
t_1
(if (<= t_1 0.0)
(+ x (* y (/ (- z a) t)))
(+ (+ x y) (* y (/ z (- t a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x - (-1.0 / ((t / y) / (z - a)));
} else if (t_1 <= -5e-242) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = (x + y) + (y * (z / (t - a)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x - (-1.0 / ((t / y) / (z - a)));
} else if (t_1 <= -5e-242) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = (x + y) + (y * (z / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) + ((y * (z - t)) / (t - a)) tmp = 0 if t_1 <= -math.inf: tmp = x - (-1.0 / ((t / y) / (z - a))) elif t_1 <= -5e-242: tmp = t_1 elif t_1 <= 0.0: tmp = x + (y * ((z - a) / t)) else: tmp = (x + y) + (y * (z / (t - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) + Float64(Float64(y * Float64(z - t)) / Float64(t - a))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x - Float64(-1.0 / Float64(Float64(t / y) / Float64(z - a)))); elseif (t_1 <= -5e-242) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); else tmp = Float64(Float64(x + y) + Float64(y * Float64(z / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) + ((y * (z - t)) / (t - a)); tmp = 0.0; if (t_1 <= -Inf) tmp = x - (-1.0 / ((t / y) / (z - a))); elseif (t_1 <= -5e-242) tmp = t_1; elseif (t_1 <= 0.0) tmp = x + (y * ((z - a) / t)); else tmp = (x + y) + (y * (z / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x - N[(-1.0 / N[(N[(t / y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-242], t$95$1, If[LessEqual[t$95$1, 0.0], N[(x + N[(y * N[(N[(z - a), $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}
t_1 := \left(x + y\right) + \frac{y \cdot \left(z - t\right)}{t - a}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x - \frac{-1}{\frac{\frac{t}{y}}{z - a}}\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -inf.0Initial program 36.2%
Taylor expanded in t around inf 57.0%
associate--l+57.0%
distribute-lft-out--57.0%
div-sub57.0%
mul-1-neg57.0%
unsub-neg57.0%
*-commutative57.0%
distribute-lft-out--57.2%
Simplified57.2%
clear-num57.2%
inv-pow57.2%
Applied egg-rr57.2%
unpow-157.2%
associate-/r*75.3%
Simplified75.3%
if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -4.9999999999999998e-242Initial program 95.9%
if -4.9999999999999998e-242 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 11.9%
Taylor expanded in t around inf 99.6%
associate--l+99.6%
distribute-lft-out--99.6%
div-sub99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
distribute-lft-out--99.6%
Simplified99.6%
Taylor expanded in t around inf 99.6%
mul-1-neg99.6%
associate-*r/99.7%
*-commutative99.7%
distribute-lft-neg-in99.7%
cancel-sign-sub-inv99.7%
*-commutative99.7%
Simplified99.7%
if 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 83.2%
Taylor expanded in z around inf 82.8%
associate-/l*94.4%
Simplified94.4%
Final simplification92.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.4e+116)
(+ x y)
(if (<= a -2.4e-20)
(- x (* a (/ y t)))
(if (or (<= a -1.85e-35) (not (<= a 6000000.0)))
(+ x y)
(+ x (/ (* y z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e+116) {
tmp = x + y;
} else if (a <= -2.4e-20) {
tmp = x - (a * (y / t));
} else if ((a <= -1.85e-35) || !(a <= 6000000.0)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.4d+116)) then
tmp = x + y
else if (a <= (-2.4d-20)) then
tmp = x - (a * (y / t))
else if ((a <= (-1.85d-35)) .or. (.not. (a <= 6000000.0d0))) then
tmp = x + y
else
tmp = x + ((y * z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e+116) {
tmp = x + y;
} else if (a <= -2.4e-20) {
tmp = x - (a * (y / t));
} else if ((a <= -1.85e-35) || !(a <= 6000000.0)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.4e+116: tmp = x + y elif a <= -2.4e-20: tmp = x - (a * (y / t)) elif (a <= -1.85e-35) or not (a <= 6000000.0): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e+116) tmp = Float64(x + y); elseif (a <= -2.4e-20) tmp = Float64(x - Float64(a * Float64(y / t))); elseif ((a <= -1.85e-35) || !(a <= 6000000.0)) 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 <= -1.4e+116) tmp = x + y; elseif (a <= -2.4e-20) tmp = x - (a * (y / t)); elseif ((a <= -1.85e-35) || ~((a <= 6000000.0))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e+116], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.4e-20], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -1.85e-35], N[Not[LessEqual[a, 6000000.0]], $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 -1.4 \cdot 10^{+116}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-20}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;a \leq -1.85 \cdot 10^{-35} \lor \neg \left(a \leq 6000000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -1.40000000000000002e116 or -2.39999999999999993e-20 < a < -1.8499999999999999e-35 or 6e6 < a Initial program 82.3%
Taylor expanded in a around inf 81.9%
+-commutative81.9%
Simplified81.9%
if -1.40000000000000002e116 < a < -2.39999999999999993e-20Initial program 62.1%
Taylor expanded in t around inf 54.8%
associate--l+54.8%
distribute-lft-out--54.8%
div-sub54.8%
mul-1-neg54.8%
unsub-neg54.8%
*-commutative54.8%
distribute-lft-out--58.1%
Simplified58.1%
Taylor expanded in a around inf 57.9%
associate-/l*64.2%
Simplified64.2%
if -1.8499999999999999e-35 < a < 6e6Initial program 68.8%
Taylor expanded in y around 0 68.8%
associate-*l/68.4%
Simplified68.4%
Taylor expanded in a around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in t around inf 76.3%
Final simplification77.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ z a)))))
(if (<= y -2.65e+193)
t_1
(if (<= y -1.9e+101)
(* y (/ z (- t a)))
(if (<= y 7e+144) (+ x y) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / a));
double tmp;
if (y <= -2.65e+193) {
tmp = t_1;
} else if (y <= -1.9e+101) {
tmp = y * (z / (t - a));
} else if (y <= 7e+144) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (1.0d0 - (z / a))
if (y <= (-2.65d+193)) then
tmp = t_1
else if (y <= (-1.9d+101)) then
tmp = y * (z / (t - a))
else if (y <= 7d+144) then
tmp = x + y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / a));
double tmp;
if (y <= -2.65e+193) {
tmp = t_1;
} else if (y <= -1.9e+101) {
tmp = y * (z / (t - a));
} else if (y <= 7e+144) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (z / a)) tmp = 0 if y <= -2.65e+193: tmp = t_1 elif y <= -1.9e+101: tmp = y * (z / (t - a)) elif y <= 7e+144: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (y <= -2.65e+193) tmp = t_1; elseif (y <= -1.9e+101) tmp = Float64(y * Float64(z / Float64(t - a))); elseif (y <= 7e+144) tmp = Float64(x + y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (1.0 - (z / a)); tmp = 0.0; if (y <= -2.65e+193) tmp = t_1; elseif (y <= -1.9e+101) tmp = y * (z / (t - a)); elseif (y <= 7e+144) tmp = x + y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.65e+193], t$95$1, If[LessEqual[y, -1.9e+101], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+144], N[(x + y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;y \leq -2.65 \cdot 10^{+193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{+101}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+144}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.6499999999999999e193 or 6.9999999999999996e144 < y Initial program 46.5%
Taylor expanded in t around 0 48.2%
+-commutative48.2%
associate-/l*60.5%
Simplified60.5%
Taylor expanded in y around inf 56.1%
if -2.6499999999999999e193 < y < -1.8999999999999999e101Initial program 46.4%
sub-neg46.4%
+-commutative46.4%
distribute-frac-neg46.4%
distribute-rgt-neg-out46.4%
associate-/l*75.8%
fma-define76.3%
distribute-frac-neg76.3%
distribute-neg-frac276.3%
sub-neg76.3%
distribute-neg-in76.3%
remove-double-neg76.3%
+-commutative76.3%
sub-neg76.3%
Simplified76.3%
Taylor expanded in z around inf 46.3%
associate-/l*68.3%
Simplified68.3%
if -1.8999999999999999e101 < y < 6.9999999999999996e144Initial program 86.9%
Taylor expanded in a around inf 72.6%
+-commutative72.6%
Simplified72.6%
Final simplification67.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.5e+29)
(- x (/ -1.0 (/ (/ t y) (- z a))))
(if (<= t 5.6e+120)
(+ (+ x y) (* y (/ z (- t a))))
(+ x (* y (/ (- z a) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.5e+29) {
tmp = x - (-1.0 / ((t / y) / (z - a)));
} else if (t <= 5.6e+120) {
tmp = (x + y) + (y * (z / (t - 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 (t <= (-2.5d+29)) then
tmp = x - ((-1.0d0) / ((t / y) / (z - a)))
else if (t <= 5.6d+120) then
tmp = (x + y) + (y * (z / (t - 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 (t <= -2.5e+29) {
tmp = x - (-1.0 / ((t / y) / (z - a)));
} else if (t <= 5.6e+120) {
tmp = (x + y) + (y * (z / (t - a)));
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.5e+29: tmp = x - (-1.0 / ((t / y) / (z - a))) elif t <= 5.6e+120: tmp = (x + y) + (y * (z / (t - a))) else: tmp = x + (y * ((z - a) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.5e+29) tmp = Float64(x - Float64(-1.0 / Float64(Float64(t / y) / Float64(z - a)))); elseif (t <= 5.6e+120) tmp = Float64(Float64(x + y) + Float64(y * Float64(z / Float64(t - a)))); else tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.5e+29) tmp = x - (-1.0 / ((t / y) / (z - a))); elseif (t <= 5.6e+120) tmp = (x + y) + (y * (z / (t - a))); else tmp = x + (y * ((z - a) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.5e+29], N[(x - N[(-1.0 / N[(N[(t / y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e+120], N[(N[(x + y), $MachinePrecision] + N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+29}:\\
\;\;\;\;x - \frac{-1}{\frac{\frac{t}{y}}{z - a}}\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+120}:\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if t < -2.5e29Initial program 58.1%
Taylor expanded in t around inf 74.5%
associate--l+74.5%
distribute-lft-out--74.5%
div-sub74.5%
mul-1-neg74.5%
unsub-neg74.5%
*-commutative74.5%
distribute-lft-out--74.5%
Simplified74.5%
clear-num74.5%
inv-pow74.5%
Applied egg-rr74.5%
unpow-174.5%
associate-/r*90.3%
Simplified90.3%
if -2.5e29 < t < 5.6000000000000001e120Initial program 85.1%
Taylor expanded in z around inf 83.9%
associate-/l*90.5%
Simplified90.5%
if 5.6000000000000001e120 < t Initial program 54.0%
Taylor expanded in t around inf 81.5%
associate--l+81.5%
distribute-lft-out--81.5%
div-sub81.5%
mul-1-neg81.5%
unsub-neg81.5%
*-commutative81.5%
distribute-lft-out--81.5%
Simplified81.5%
Taylor expanded in t around inf 81.5%
mul-1-neg81.5%
associate-*r/92.8%
*-commutative92.8%
distribute-lft-neg-in92.8%
cancel-sign-sub-inv92.8%
*-commutative92.8%
Simplified92.8%
Final simplification90.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.4e+116) (not (<= a 15000000000.0))) (+ x y) (+ x (* y (/ (- z a) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.4e+116) || !(a <= 15000000000.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 <= (-1.4d+116)) .or. (.not. (a <= 15000000000.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 <= -1.4e+116) || !(a <= 15000000000.0)) {
tmp = x + y;
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.4e+116) or not (a <= 15000000000.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 <= -1.4e+116) || !(a <= 15000000000.0)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.4e+116) || ~((a <= 15000000000.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, -1.4e+116], N[Not[LessEqual[a, 15000000000.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+116} \lor \neg \left(a \leq 15000000000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if a < -1.40000000000000002e116 or 1.5e10 < a Initial program 81.0%
Taylor expanded in a around inf 82.8%
+-commutative82.8%
Simplified82.8%
if -1.40000000000000002e116 < a < 1.5e10Initial program 68.9%
Taylor expanded in t around inf 73.6%
associate--l+73.6%
distribute-lft-out--73.6%
div-sub73.6%
mul-1-neg73.6%
unsub-neg73.6%
*-commutative73.6%
distribute-lft-out--74.2%
Simplified74.2%
Taylor expanded in t around inf 74.2%
mul-1-neg74.2%
associate-*r/78.9%
*-commutative78.9%
distribute-lft-neg-in78.9%
cancel-sign-sub-inv78.9%
*-commutative78.9%
Simplified78.9%
Final simplification80.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.6e-58) (not (<= t 2700.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 ((t <= -4.6e-58) || !(t <= 2700.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 ((t <= (-4.6d-58)) .or. (.not. (t <= 2700.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 ((t <= -4.6e-58) || !(t <= 2700.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 (t <= -4.6e-58) or not (t <= 2700.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 ((t <= -4.6e-58) || !(t <= 2700.0)) tmp = Float64(x + Float64(y * Float64(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 ((t <= -4.6e-58) || ~((t <= 2700.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[Or[LessEqual[t, -4.6e-58], N[Not[LessEqual[t, 2700.0]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-58} \lor \neg \left(t \leq 2700\right):\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -4.5999999999999998e-58 or 2700 < t Initial program 59.2%
Taylor expanded in t around inf 73.0%
associate--l+73.0%
distribute-lft-out--73.0%
div-sub73.0%
mul-1-neg73.0%
unsub-neg73.0%
*-commutative73.0%
distribute-lft-out--73.0%
Simplified73.0%
Taylor expanded in t around inf 73.0%
mul-1-neg73.0%
associate-*r/83.8%
*-commutative83.8%
distribute-lft-neg-in83.8%
cancel-sign-sub-inv83.8%
*-commutative83.8%
Simplified83.8%
if -4.5999999999999998e-58 < t < 2700Initial program 90.9%
Taylor expanded in t around 0 79.4%
+-commutative79.4%
associate-/l*85.7%
Simplified85.7%
Final simplification84.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.45e-58) (- x (/ -1.0 (/ (/ t y) (- z a)))) (if (<= t 116.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 (t <= -2.45e-58) {
tmp = x - (-1.0 / ((t / y) / (z - a)));
} else if (t <= 116.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 (t <= (-2.45d-58)) then
tmp = x - ((-1.0d0) / ((t / y) / (z - a)))
else if (t <= 116.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 (t <= -2.45e-58) {
tmp = x - (-1.0 / ((t / y) / (z - a)));
} else if (t <= 116.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 t <= -2.45e-58: tmp = x - (-1.0 / ((t / y) / (z - a))) elif t <= 116.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 (t <= -2.45e-58) tmp = Float64(x - Float64(-1.0 / Float64(Float64(t / y) / Float64(z - a)))); elseif (t <= 116.0) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.45e-58) tmp = x - (-1.0 / ((t / y) / (z - a))); elseif (t <= 116.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[LessEqual[t, -2.45e-58], N[(x - N[(-1.0 / N[(N[(t / y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 116.0], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.45 \cdot 10^{-58}:\\
\;\;\;\;x - \frac{-1}{\frac{\frac{t}{y}}{z - a}}\\
\mathbf{elif}\;t \leq 116:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if t < -2.45000000000000015e-58Initial program 60.8%
Taylor expanded in t around inf 71.5%
associate--l+71.5%
distribute-lft-out--71.5%
div-sub71.5%
mul-1-neg71.5%
unsub-neg71.5%
*-commutative71.5%
distribute-lft-out--71.5%
Simplified71.5%
clear-num71.5%
inv-pow71.5%
Applied egg-rr71.5%
unpow-171.5%
associate-/r*83.4%
Simplified83.4%
if -2.45000000000000015e-58 < t < 116Initial program 90.9%
Taylor expanded in t around 0 79.4%
+-commutative79.4%
associate-/l*85.7%
Simplified85.7%
if 116 < t Initial program 57.3%
Taylor expanded in t around inf 74.7%
associate--l+74.7%
distribute-lft-out--74.7%
div-sub74.7%
mul-1-neg74.7%
unsub-neg74.7%
*-commutative74.7%
distribute-lft-out--74.7%
Simplified74.7%
Taylor expanded in t around inf 74.7%
mul-1-neg74.7%
associate-*r/84.9%
*-commutative84.9%
distribute-lft-neg-in84.9%
cancel-sign-sub-inv84.9%
*-commutative84.9%
Simplified84.9%
Final simplification84.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.5e+107) (not (<= y 1.7e+145))) (* y (- 1.0 (/ z a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.5e+107) || !(y <= 1.7e+145)) {
tmp = y * (1.0 - (z / a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.5d+107)) .or. (.not. (y <= 1.7d+145))) then
tmp = y * (1.0d0 - (z / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.5e+107) || !(y <= 1.7e+145)) {
tmp = y * (1.0 - (z / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.5e+107) or not (y <= 1.7e+145): tmp = y * (1.0 - (z / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.5e+107) || !(y <= 1.7e+145)) tmp = Float64(y * Float64(1.0 - Float64(z / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.5e+107) || ~((y <= 1.7e+145))) tmp = y * (1.0 - (z / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.5e+107], N[Not[LessEqual[y, 1.7e+145]], $MachinePrecision]], N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+107} \lor \neg \left(y \leq 1.7 \cdot 10^{+145}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < -1.50000000000000012e107 or 1.7e145 < y Initial program 47.5%
Taylor expanded in t around 0 46.3%
+-commutative46.3%
associate-/l*56.6%
Simplified56.6%
Taylor expanded in y around inf 52.9%
if -1.50000000000000012e107 < y < 1.7e145Initial program 86.0%
Taylor expanded in a around inf 72.3%
+-commutative72.3%
Simplified72.3%
Final simplification66.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.35e+93) (not (<= a 185000.0))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.35e+93) || !(a <= 185000.0)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.35d+93)) .or. (.not. (a <= 185000.0d0))) then
tmp = x + y
else
tmp = x + ((y * z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.35e+93) || !(a <= 185000.0)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.35e+93) or not (a <= 185000.0): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.35e+93) || !(a <= 185000.0)) 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 <= -1.35e+93) || ~((a <= 185000.0))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.35e+93], N[Not[LessEqual[a, 185000.0]], $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 -1.35 \cdot 10^{+93} \lor \neg \left(a \leq 185000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -1.35e93 or 185000 < a Initial program 78.7%
Taylor expanded in a around inf 80.4%
+-commutative80.4%
Simplified80.4%
if -1.35e93 < a < 185000Initial program 70.0%
Taylor expanded in y around 0 70.0%
associate-*l/71.6%
Simplified71.6%
Taylor expanded in a around 0 57.2%
associate-*r/57.2%
neg-mul-157.2%
Simplified57.2%
Taylor expanded in t around inf 72.0%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.55e+199) x (if (<= t 1.2e+187) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.55e+199) {
tmp = x;
} else if (t <= 1.2e+187) {
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 (t <= (-1.55d+199)) then
tmp = x
else if (t <= 1.2d+187) 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 (t <= -1.55e+199) {
tmp = x;
} else if (t <= 1.2e+187) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.55e+199: tmp = x elif t <= 1.2e+187: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.55e+199) tmp = x; elseif (t <= 1.2e+187) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.55e+199) tmp = x; elseif (t <= 1.2e+187) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.55e+199], x, If[LessEqual[t, 1.2e+187], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+199}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+187}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.54999999999999993e199 or 1.19999999999999993e187 < t Initial program 53.3%
Taylor expanded in x around inf 75.2%
if -1.54999999999999993e199 < t < 1.19999999999999993e187Initial program 78.1%
Taylor expanded in a around inf 61.9%
+-commutative61.9%
Simplified61.9%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (<= z 2.65e+193) (+ x y) (* y (/ z t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 2.65e+193) {
tmp = x + y;
} else {
tmp = 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 (z <= 2.65d+193) then
tmp = x + y
else
tmp = 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 (z <= 2.65e+193) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 2.65e+193: tmp = x + y else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 2.65e+193) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 2.65e+193) tmp = x + y; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 2.65e+193], N[(x + y), $MachinePrecision], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.65 \cdot 10^{+193}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if z < 2.6499999999999999e193Initial program 73.7%
Taylor expanded in a around inf 62.5%
+-commutative62.5%
Simplified62.5%
if 2.6499999999999999e193 < z Initial program 73.2%
sub-neg73.2%
+-commutative73.2%
distribute-frac-neg73.2%
distribute-rgt-neg-out73.2%
associate-/l*73.8%
fma-define74.0%
distribute-frac-neg74.0%
distribute-neg-frac274.0%
sub-neg74.0%
distribute-neg-in74.0%
remove-double-neg74.0%
+-commutative74.0%
sub-neg74.0%
Simplified74.0%
Taylor expanded in z around inf 49.6%
Taylor expanded in t around inf 36.2%
associate-/l*55.0%
Simplified55.0%
Final simplification62.1%
(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 73.7%
Taylor expanded in x around inf 51.2%
Final simplification51.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (< t_2 -1.3664970889390727e-7)
t_1
(if (< t_2 1.4754293444577233e-239)
(/ (- (* y (- a z)) (* x t)) (- a t))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 < (-1.3664970889390727d-7)) then
tmp = t_1
else if (t_2 < 1.4754293444577233d-239) then
tmp = ((y * (a - z)) - (x * t)) / (a - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 < -1.3664970889390727e-7: tmp = t_1 elif t_2 < 1.4754293444577233e-239: tmp = ((y * (a - z)) - (x * t)) / (a - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = ((y * (a - z)) - (x * t)) / (a - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024076
(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))))