
(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 14 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 (or (<= t_1 -2e-237) (not (<= t_1 0.0)))
(fma (- z t) (/ y (- t a)) (+ x y))
(- x (/ (- (* y a) (* y z)) t)))))
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 <= -2e-237) || !(t_1 <= 0.0)) {
tmp = fma((z - t), (y / (t - a)), (x + y));
} else {
tmp = x - (((y * a) - (y * z)) / t);
}
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 <= -2e-237) || !(t_1 <= 0.0)) tmp = fma(Float64(z - t), Float64(y / Float64(t - a)), Float64(x + y)); else tmp = Float64(x - Float64(Float64(Float64(y * a) - Float64(y * z)) / t)); end return 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[Or[LessEqual[t$95$1, -2e-237], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(y * a), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $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 -2 \cdot 10^{-237} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot a - y \cdot z}{t}\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2e-237 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 82.8%
sub-neg82.8%
+-commutative82.8%
distribute-frac-neg82.8%
distribute-rgt-neg-out82.8%
associate-/l*90.6%
fma-define90.7%
distribute-frac-neg90.7%
distribute-neg-frac290.7%
sub-neg90.7%
distribute-neg-in90.7%
remove-double-neg90.7%
+-commutative90.7%
sub-neg90.7%
Simplified90.7%
if -2e-237 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 13.0%
Taylor expanded in t around -inf 99.9%
mul-1-neg99.9%
unsub-neg99.9%
*-commutative99.9%
Simplified99.9%
Final simplification91.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
(if (or (<= t_1 -2e-237) (not (<= t_1 0.0)))
(+ (+ x y) (* (- z t) (/ y (- t a))))
(- x (/ (- (* y a) (* y z)) t)))))
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 <= -2e-237) || !(t_1 <= 0.0)) {
tmp = (x + y) + ((z - t) * (y / (t - a)));
} else {
tmp = x - (((y * a) - (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) :: t_1
real(8) :: tmp
t_1 = (x + y) + ((y * (z - t)) / (t - a))
if ((t_1 <= (-2d-237)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = (x + y) + ((z - t) * (y / (t - a)))
else
tmp = x - (((y * a) - (y * z)) / t)
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) + ((y * (z - t)) / (t - a));
double tmp;
if ((t_1 <= -2e-237) || !(t_1 <= 0.0)) {
tmp = (x + y) + ((z - t) * (y / (t - a)));
} else {
tmp = x - (((y * a) - (y * z)) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) + ((y * (z - t)) / (t - a)) tmp = 0 if (t_1 <= -2e-237) or not (t_1 <= 0.0): tmp = (x + y) + ((z - t) * (y / (t - a))) else: tmp = x - (((y * a) - (y * z)) / t) 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 <= -2e-237) || !(t_1 <= 0.0)) tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a)))); else tmp = Float64(x - Float64(Float64(Float64(y * a) - Float64(y * z)) / t)); 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 <= -2e-237) || ~((t_1 <= 0.0))) tmp = (x + y) + ((z - t) * (y / (t - a))); else tmp = x - (((y * a) - (y * z)) / t); 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[Or[LessEqual[t$95$1, -2e-237], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(y * a), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $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 -2 \cdot 10^{-237} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot a - y \cdot z}{t}\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2e-237 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 82.8%
associate-/l*90.6%
*-commutative90.6%
Applied egg-rr90.6%
if -2e-237 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 13.0%
Taylor expanded in t around -inf 99.9%
mul-1-neg99.9%
unsub-neg99.9%
*-commutative99.9%
Simplified99.9%
Final simplification91.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.3e-22)
(+ x (+ y (* t (/ y a))))
(if (<= a 4.3e-61)
(+ x (/ (* y z) t))
(if (<= a 70000000000.0) (- x (* z (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.3e-22) {
tmp = x + (y + (t * (y / a)));
} else if (a <= 4.3e-61) {
tmp = x + ((y * z) / t);
} else if (a <= 70000000000.0) {
tmp = x - (z * (y / 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 (a <= (-3.3d-22)) then
tmp = x + (y + (t * (y / a)))
else if (a <= 4.3d-61) then
tmp = x + ((y * z) / t)
else if (a <= 70000000000.0d0) then
tmp = x - (z * (y / 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 (a <= -3.3e-22) {
tmp = x + (y + (t * (y / a)));
} else if (a <= 4.3e-61) {
tmp = x + ((y * z) / t);
} else if (a <= 70000000000.0) {
tmp = x - (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.3e-22: tmp = x + (y + (t * (y / a))) elif a <= 4.3e-61: tmp = x + ((y * z) / t) elif a <= 70000000000.0: tmp = x - (z * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.3e-22) tmp = Float64(x + Float64(y + Float64(t * Float64(y / a)))); elseif (a <= 4.3e-61) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 70000000000.0) tmp = Float64(x - Float64(z * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.3e-22) tmp = x + (y + (t * (y / a))); elseif (a <= 4.3e-61) tmp = x + ((y * z) / t); elseif (a <= 70000000000.0) tmp = x - (z * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.3e-22], N[(x + N[(y + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.3e-61], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 70000000000.0], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{-22}:\\
\;\;\;\;x + \left(y + t \cdot \frac{y}{a}\right)\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{-61}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 70000000000:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -3.3000000000000001e-22Initial program 86.3%
sub-neg86.3%
+-commutative86.3%
distribute-frac-neg86.3%
distribute-rgt-neg-out86.3%
associate-/l*95.3%
fma-define95.4%
distribute-frac-neg95.4%
distribute-neg-frac295.4%
sub-neg95.4%
distribute-neg-in95.4%
remove-double-neg95.4%
+-commutative95.4%
sub-neg95.4%
Simplified95.4%
Taylor expanded in a around inf 84.3%
mul-1-neg84.3%
unsub-neg84.3%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in z around 0 79.6%
sub-neg79.6%
mul-1-neg79.6%
remove-double-neg79.6%
associate-/l*83.3%
Simplified83.3%
if -3.3000000000000001e-22 < a < 4.3000000000000003e-61Initial program 71.2%
associate-/l*71.4%
*-commutative71.4%
Applied egg-rr71.4%
Taylor expanded in z around inf 68.4%
Taylor expanded in x around inf 84.5%
Taylor expanded in t around inf 72.4%
if 4.3000000000000003e-61 < a < 7e10Initial program 86.0%
associate-/l*86.2%
*-commutative86.2%
Applied egg-rr86.2%
Taylor expanded in z around inf 85.9%
Taylor expanded in x around inf 86.0%
Taylor expanded in a around inf 79.3%
if 7e10 < a Initial program 73.3%
sub-neg73.3%
+-commutative73.3%
distribute-frac-neg73.3%
distribute-rgt-neg-out73.3%
associate-/l*91.9%
fma-define92.1%
distribute-frac-neg92.1%
distribute-neg-frac292.1%
sub-neg92.1%
distribute-neg-in92.1%
remove-double-neg92.1%
+-commutative92.1%
sub-neg92.1%
Simplified92.1%
Taylor expanded in a around inf 86.0%
+-commutative86.0%
Simplified86.0%
Final simplification79.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2e-22)
(+ x y)
(if (<= a 7.6e-60)
(+ x (/ (* y z) t))
(if (<= a 620000000000.0) (- x (* z (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e-22) {
tmp = x + y;
} else if (a <= 7.6e-60) {
tmp = x + ((y * z) / t);
} else if (a <= 620000000000.0) {
tmp = x - (z * (y / 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 (a <= (-2d-22)) then
tmp = x + y
else if (a <= 7.6d-60) then
tmp = x + ((y * z) / t)
else if (a <= 620000000000.0d0) then
tmp = x - (z * (y / 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 (a <= -2e-22) {
tmp = x + y;
} else if (a <= 7.6e-60) {
tmp = x + ((y * z) / t);
} else if (a <= 620000000000.0) {
tmp = x - (z * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2e-22: tmp = x + y elif a <= 7.6e-60: tmp = x + ((y * z) / t) elif a <= 620000000000.0: tmp = x - (z * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2e-22) tmp = Float64(x + y); elseif (a <= 7.6e-60) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 620000000000.0) tmp = Float64(x - Float64(z * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2e-22) tmp = x + y; elseif (a <= 7.6e-60) tmp = x + ((y * z) / t); elseif (a <= 620000000000.0) tmp = x - (z * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2e-22], N[(x + y), $MachinePrecision], If[LessEqual[a, 7.6e-60], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 620000000000.0], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-22}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 7.6 \cdot 10^{-60}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 620000000000:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.0000000000000001e-22 or 6.2e11 < a Initial program 80.4%
sub-neg80.4%
+-commutative80.4%
distribute-frac-neg80.4%
distribute-rgt-neg-out80.4%
associate-/l*93.8%
fma-define93.9%
distribute-frac-neg93.9%
distribute-neg-frac293.9%
sub-neg93.9%
distribute-neg-in93.9%
remove-double-neg93.9%
+-commutative93.9%
sub-neg93.9%
Simplified93.9%
Taylor expanded in a around inf 84.2%
+-commutative84.2%
Simplified84.2%
if -2.0000000000000001e-22 < a < 7.59999999999999989e-60Initial program 71.2%
associate-/l*71.4%
*-commutative71.4%
Applied egg-rr71.4%
Taylor expanded in z around inf 68.4%
Taylor expanded in x around inf 84.5%
Taylor expanded in t around inf 72.4%
if 7.59999999999999989e-60 < a < 6.2e11Initial program 86.0%
associate-/l*86.2%
*-commutative86.2%
Applied egg-rr86.2%
Taylor expanded in z around inf 85.9%
Taylor expanded in x around inf 86.0%
Taylor expanded in a around inf 79.3%
Final simplification78.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.2e-23) (not (<= a 3.1e-7))) (+ (+ x y) (* y (/ z (- t a)))) (+ x (* z (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.2e-23) || !(a <= 3.1e-7)) {
tmp = (x + y) + (y * (z / (t - a)));
} else {
tmp = x + (z * (y / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-5.2d-23)) .or. (.not. (a <= 3.1d-7))) then
tmp = (x + y) + (y * (z / (t - a)))
else
tmp = x + (z * (y / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.2e-23) || !(a <= 3.1e-7)) {
tmp = (x + y) + (y * (z / (t - a)));
} else {
tmp = x + (z * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.2e-23) or not (a <= 3.1e-7): tmp = (x + y) + (y * (z / (t - a))) else: tmp = x + (z * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.2e-23) || !(a <= 3.1e-7)) tmp = Float64(Float64(x + y) + Float64(y * Float64(z / Float64(t - a)))); else tmp = Float64(x + Float64(z * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.2e-23) || ~((a <= 3.1e-7))) tmp = (x + y) + (y * (z / (t - a))); else tmp = x + (z * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.2e-23], N[Not[LessEqual[a, 3.1e-7]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] + N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{-23} \lor \neg \left(a \leq 3.1 \cdot 10^{-7}\right):\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if a < -5.2e-23 or 3.1e-7 < a Initial program 80.7%
Taylor expanded in z around inf 84.3%
associate-/l*93.3%
Simplified93.3%
if -5.2e-23 < a < 3.1e-7Initial program 72.4%
associate-/l*72.6%
*-commutative72.6%
Applied egg-rr72.6%
Taylor expanded in z around inf 69.9%
Taylor expanded in x around inf 84.4%
Final simplification89.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.5e-22) (not (<= a 5.4e+84))) (+ x (+ y (* y (/ (- t z) a)))) (+ x (* z (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.5e-22) || !(a <= 5.4e+84)) {
tmp = x + (y + (y * ((t - z) / a)));
} else {
tmp = x + (z * (y / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-3.5d-22)) .or. (.not. (a <= 5.4d+84))) then
tmp = x + (y + (y * ((t - z) / a)))
else
tmp = x + (z * (y / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.5e-22) || !(a <= 5.4e+84)) {
tmp = x + (y + (y * ((t - z) / a)));
} else {
tmp = x + (z * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.5e-22) or not (a <= 5.4e+84): tmp = x + (y + (y * ((t - z) / a))) else: tmp = x + (z * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.5e-22) || !(a <= 5.4e+84)) tmp = Float64(x + Float64(y + Float64(y * Float64(Float64(t - z) / a)))); else tmp = Float64(x + Float64(z * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.5e-22) || ~((a <= 5.4e+84))) tmp = x + (y + (y * ((t - z) / a))); else tmp = x + (z * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.5e-22], N[Not[LessEqual[a, 5.4e+84]], $MachinePrecision]], N[(x + N[(y + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{-22} \lor \neg \left(a \leq 5.4 \cdot 10^{+84}\right):\\
\;\;\;\;x + \left(y + y \cdot \frac{t - z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if a < -3.50000000000000005e-22 or 5.4e84 < a Initial program 81.9%
sub-neg81.9%
+-commutative81.9%
distribute-frac-neg81.9%
distribute-rgt-neg-out81.9%
associate-/l*96.1%
fma-define96.2%
distribute-frac-neg96.2%
distribute-neg-frac296.2%
sub-neg96.2%
distribute-neg-in96.2%
remove-double-neg96.2%
+-commutative96.2%
sub-neg96.2%
Simplified96.2%
Taylor expanded in a around inf 80.4%
mul-1-neg80.4%
unsub-neg80.4%
associate-/l*95.4%
Simplified95.4%
if -3.50000000000000005e-22 < a < 5.4e84Initial program 72.8%
associate-/l*74.3%
*-commutative74.3%
Applied egg-rr74.3%
Taylor expanded in z around inf 71.8%
Taylor expanded in x around inf 83.7%
Final simplification88.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- t a)))))
(if (<= a -2.5e-22)
(+ (+ x y) (* y (/ z (- t a))))
(if (<= a 1.3e-105) (+ x t_1) (+ (+ x y) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / (t - a));
double tmp;
if (a <= -2.5e-22) {
tmp = (x + y) + (y * (z / (t - a)));
} else if (a <= 1.3e-105) {
tmp = x + t_1;
} else {
tmp = (x + y) + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = z * (y / (t - a))
if (a <= (-2.5d-22)) then
tmp = (x + y) + (y * (z / (t - a)))
else if (a <= 1.3d-105) then
tmp = x + t_1
else
tmp = (x + y) + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / (t - a));
double tmp;
if (a <= -2.5e-22) {
tmp = (x + y) + (y * (z / (t - a)));
} else if (a <= 1.3e-105) {
tmp = x + t_1;
} else {
tmp = (x + y) + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / (t - a)) tmp = 0 if a <= -2.5e-22: tmp = (x + y) + (y * (z / (t - a))) elif a <= 1.3e-105: tmp = x + t_1 else: tmp = (x + y) + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(t - a))) tmp = 0.0 if (a <= -2.5e-22) tmp = Float64(Float64(x + y) + Float64(y * Float64(z / Float64(t - a)))); elseif (a <= 1.3e-105) tmp = Float64(x + t_1); else tmp = Float64(Float64(x + y) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / (t - a)); tmp = 0.0; if (a <= -2.5e-22) tmp = (x + y) + (y * (z / (t - a))); elseif (a <= 1.3e-105) tmp = x + t_1; else tmp = (x + y) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.5e-22], N[(N[(x + y), $MachinePrecision] + N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e-105], N[(x + t$95$1), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{t - a}\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{-22}:\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{z}{t - a}\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-105}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + t\_1\\
\end{array}
\end{array}
if a < -2.49999999999999977e-22Initial program 86.3%
Taylor expanded in z around inf 87.4%
associate-/l*95.2%
Simplified95.2%
if -2.49999999999999977e-22 < a < 1.2999999999999999e-105Initial program 72.6%
associate-/l*72.8%
*-commutative72.8%
Applied egg-rr72.8%
Taylor expanded in z around inf 69.6%
Taylor expanded in x around inf 87.1%
if 1.2999999999999999e-105 < a Initial program 73.6%
associate-/l*87.7%
*-commutative87.7%
Applied egg-rr87.7%
Taylor expanded in z around inf 86.9%
Final simplification89.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.8e-23) (not (<= a 2.9e+75))) (- (+ x y) (* y (/ z a))) (+ x (* z (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.8e-23) || !(a <= 2.9e+75)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + (z * (y / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.8d-23)) .or. (.not. (a <= 2.9d+75))) then
tmp = (x + y) - (y * (z / a))
else
tmp = x + (z * (y / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.8e-23) || !(a <= 2.9e+75)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + (z * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.8e-23) or not (a <= 2.9e+75): tmp = (x + y) - (y * (z / a)) else: tmp = x + (z * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.8e-23) || !(a <= 2.9e+75)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(z * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.8e-23) || ~((a <= 2.9e+75))) tmp = (x + y) - (y * (z / a)); else tmp = x + (z * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.8e-23], N[Not[LessEqual[a, 2.9e+75]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.8 \cdot 10^{-23} \lor \neg \left(a \leq 2.9 \cdot 10^{+75}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if a < -2.7999999999999997e-23 or 2.8999999999999998e75 < a Initial program 81.5%
Taylor expanded in t around 0 83.4%
associate-/l*94.0%
Simplified94.0%
if -2.7999999999999997e-23 < a < 2.8999999999999998e75Initial program 72.9%
associate-/l*74.4%
*-commutative74.4%
Applied egg-rr74.4%
Taylor expanded in z around inf 71.9%
Taylor expanded in x around inf 84.1%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4e+86) (not (<= a 6.3e+71))) (+ x (+ y (* t (/ y a)))) (+ x (* z (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4e+86) || !(a <= 6.3e+71)) {
tmp = x + (y + (t * (y / a)));
} else {
tmp = x + (z * (y / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-4d+86)) .or. (.not. (a <= 6.3d+71))) then
tmp = x + (y + (t * (y / a)))
else
tmp = x + (z * (y / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4e+86) || !(a <= 6.3e+71)) {
tmp = x + (y + (t * (y / a)));
} else {
tmp = x + (z * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4e+86) or not (a <= 6.3e+71): tmp = x + (y + (t * (y / a))) else: tmp = x + (z * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4e+86) || !(a <= 6.3e+71)) tmp = Float64(x + Float64(y + Float64(t * Float64(y / a)))); else tmp = Float64(x + Float64(z * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4e+86) || ~((a <= 6.3e+71))) tmp = x + (y + (t * (y / a))); else tmp = x + (z * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4e+86], N[Not[LessEqual[a, 6.3e+71]], $MachinePrecision]], N[(x + N[(y + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+86} \lor \neg \left(a \leq 6.3 \cdot 10^{+71}\right):\\
\;\;\;\;x + \left(y + t \cdot \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if a < -4.0000000000000001e86 or 6.3e71 < a Initial program 80.6%
sub-neg80.6%
+-commutative80.6%
distribute-frac-neg80.6%
distribute-rgt-neg-out80.6%
associate-/l*96.0%
fma-define96.1%
distribute-frac-neg96.1%
distribute-neg-frac296.1%
sub-neg96.1%
distribute-neg-in96.1%
remove-double-neg96.1%
+-commutative96.1%
sub-neg96.1%
Simplified96.1%
Taylor expanded in a around inf 78.5%
mul-1-neg78.5%
unsub-neg78.5%
associate-/l*94.8%
Simplified94.8%
Taylor expanded in z around 0 79.2%
sub-neg79.2%
mul-1-neg79.2%
remove-double-neg79.2%
associate-/l*91.7%
Simplified91.7%
if -4.0000000000000001e86 < a < 6.3e71Initial program 74.4%
associate-/l*76.2%
*-commutative76.2%
Applied egg-rr76.2%
Taylor expanded in z around inf 73.9%
Taylor expanded in x around inf 82.6%
Final simplification86.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.5e-23) (not (<= a 2.8e-105))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e-23) || !(a <= 2.8e-105)) {
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 <= (-5.5d-23)) .or. (.not. (a <= 2.8d-105))) 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 <= -5.5e-23) || !(a <= 2.8e-105)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.5e-23) or not (a <= 2.8e-105): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.5e-23) || !(a <= 2.8e-105)) 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 <= -5.5e-23) || ~((a <= 2.8e-105))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.5e-23], N[Not[LessEqual[a, 2.8e-105]], $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 -5.5 \cdot 10^{-23} \lor \neg \left(a \leq 2.8 \cdot 10^{-105}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -5.5000000000000001e-23 or 2.8e-105 < a Initial program 79.7%
sub-neg79.7%
+-commutative79.7%
distribute-frac-neg79.7%
distribute-rgt-neg-out79.7%
associate-/l*91.3%
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 a around inf 78.7%
+-commutative78.7%
Simplified78.7%
if -5.5000000000000001e-23 < a < 2.8e-105Initial program 72.6%
associate-/l*72.8%
*-commutative72.8%
Applied egg-rr72.8%
Taylor expanded in z around inf 69.6%
Taylor expanded in x around inf 87.1%
Taylor expanded in t around inf 74.4%
Final simplification77.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.8e+238) (* y (/ z (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+238) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.8d+238)) then
tmp = y * (z / (t - a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+238) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.8e+238: tmp = y * (z / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.8e+238) tmp = Float64(y * Float64(z / Float64(t - a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.8e+238) tmp = y * (z / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e+238], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+238}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.79999999999999986e238Initial program 69.3%
sub-neg69.3%
+-commutative69.3%
distribute-frac-neg69.3%
distribute-rgt-neg-out69.3%
associate-/l*99.9%
fma-define99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in z around inf 45.7%
associate-/l*76.5%
Simplified76.5%
if -1.79999999999999986e238 < z Initial program 77.1%
sub-neg77.1%
+-commutative77.1%
distribute-frac-neg77.1%
distribute-rgt-neg-out77.1%
associate-/l*82.9%
fma-define83.1%
distribute-frac-neg83.1%
distribute-neg-frac283.1%
sub-neg83.1%
distribute-neg-in83.1%
remove-double-neg83.1%
+-commutative83.1%
sub-neg83.1%
Simplified83.1%
Taylor expanded in a around inf 66.0%
+-commutative66.0%
Simplified66.0%
Final simplification66.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 7e+160) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 7e+160) {
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 <= 7d+160) 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 <= 7e+160) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 7e+160: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 7e+160) 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 <= 7e+160) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 7e+160], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7 \cdot 10^{+160}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < 7.00000000000000051e160Initial program 80.8%
sub-neg80.8%
+-commutative80.8%
distribute-frac-neg80.8%
distribute-rgt-neg-out80.8%
associate-/l*87.3%
fma-define87.4%
distribute-frac-neg87.4%
distribute-neg-frac287.4%
sub-neg87.4%
distribute-neg-in87.4%
remove-double-neg87.4%
+-commutative87.4%
sub-neg87.4%
Simplified87.4%
Taylor expanded in a around inf 65.8%
+-commutative65.8%
Simplified65.8%
if 7.00000000000000051e160 < t Initial program 46.0%
sub-neg46.0%
+-commutative46.0%
distribute-frac-neg46.0%
distribute-rgt-neg-out46.0%
associate-/l*57.1%
fma-define57.4%
distribute-frac-neg57.4%
distribute-neg-frac257.4%
sub-neg57.4%
distribute-neg-in57.4%
remove-double-neg57.4%
+-commutative57.4%
sub-neg57.4%
Simplified57.4%
Taylor expanded in t around inf 71.0%
distribute-rgt1-in71.0%
metadata-eval71.0%
mul0-lft71.0%
Simplified71.0%
Taylor expanded in x around 0 71.0%
Final simplification66.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.5e+94) y x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.5e+94) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-2.5d+94)) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.5e+94) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.5e+94: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.5e+94) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.5e+94) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.5e+94], y, x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+94}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.50000000000000005e94Initial program 53.6%
sub-neg53.6%
+-commutative53.6%
distribute-frac-neg53.6%
distribute-rgt-neg-out53.6%
associate-/l*71.8%
fma-define72.1%
distribute-frac-neg72.1%
distribute-neg-frac272.1%
sub-neg72.1%
distribute-neg-in72.1%
remove-double-neg72.1%
+-commutative72.1%
sub-neg72.1%
Simplified72.1%
Taylor expanded in a around inf 52.4%
+-commutative52.4%
Simplified52.4%
Taylor expanded in y around inf 47.9%
if -2.50000000000000005e94 < y Initial program 81.4%
sub-neg81.4%
+-commutative81.4%
distribute-frac-neg81.4%
distribute-rgt-neg-out81.4%
associate-/l*86.1%
fma-define86.3%
distribute-frac-neg86.3%
distribute-neg-frac286.3%
sub-neg86.3%
distribute-neg-in86.3%
remove-double-neg86.3%
+-commutative86.3%
sub-neg86.3%
Simplified86.3%
Taylor expanded in t around inf 60.3%
distribute-rgt1-in60.3%
metadata-eval60.3%
mul0-lft60.3%
Simplified60.3%
Taylor expanded in x around 0 60.3%
(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.8%
sub-neg76.8%
+-commutative76.8%
distribute-frac-neg76.8%
distribute-rgt-neg-out76.8%
associate-/l*83.7%
fma-define83.9%
distribute-frac-neg83.9%
distribute-neg-frac283.9%
sub-neg83.9%
distribute-neg-in83.9%
remove-double-neg83.9%
+-commutative83.9%
sub-neg83.9%
Simplified83.9%
Taylor expanded in t around inf 52.6%
distribute-rgt1-in52.6%
metadata-eval52.6%
mul0-lft52.6%
Simplified52.6%
Taylor expanded in x around 0 52.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 2024170
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -13664970889390727/100000000000000000000000) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 14754293444577233/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)))))
(- (+ x y) (/ (* (- z t) y) (- a t))))