
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
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 - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
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 - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- z y) (+ (- t z) 1.0)))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
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 + (a * ((z - y) / ((t - z) + 1.0d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
def code(x, y, z, t, a): return x + (a * ((z - y) / ((t - z) + 1.0)))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(z - y) / Float64(Float64(t - z) + 1.0)))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((z - y) / ((t - z) + 1.0))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{z - y}{\left(t - z\right) + 1}
\end{array}
Initial program 96.2%
associate-/r/99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ a t) (- z y)))))
(if (<= t -3300000000.0)
t_1
(if (<= t -3.45e-292)
(+ x (/ a (/ (- 1.0 z) z)))
(if (<= t 5e-86) (- x (* y a)) (if (<= t 7e-11) (- x a) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((a / t) * (z - y));
double tmp;
if (t <= -3300000000.0) {
tmp = t_1;
} else if (t <= -3.45e-292) {
tmp = x + (a / ((1.0 - z) / z));
} else if (t <= 5e-86) {
tmp = x - (y * a);
} else if (t <= 7e-11) {
tmp = x - a;
} 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 = x + ((a / t) * (z - y))
if (t <= (-3300000000.0d0)) then
tmp = t_1
else if (t <= (-3.45d-292)) then
tmp = x + (a / ((1.0d0 - z) / z))
else if (t <= 5d-86) then
tmp = x - (y * a)
else if (t <= 7d-11) then
tmp = x - a
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 = x + ((a / t) * (z - y));
double tmp;
if (t <= -3300000000.0) {
tmp = t_1;
} else if (t <= -3.45e-292) {
tmp = x + (a / ((1.0 - z) / z));
} else if (t <= 5e-86) {
tmp = x - (y * a);
} else if (t <= 7e-11) {
tmp = x - a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((a / t) * (z - y)) tmp = 0 if t <= -3300000000.0: tmp = t_1 elif t <= -3.45e-292: tmp = x + (a / ((1.0 - z) / z)) elif t <= 5e-86: tmp = x - (y * a) elif t <= 7e-11: tmp = x - a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(a / t) * Float64(z - y))) tmp = 0.0 if (t <= -3300000000.0) tmp = t_1; elseif (t <= -3.45e-292) tmp = Float64(x + Float64(a / Float64(Float64(1.0 - z) / z))); elseif (t <= 5e-86) tmp = Float64(x - Float64(y * a)); elseif (t <= 7e-11) tmp = Float64(x - a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((a / t) * (z - y)); tmp = 0.0; if (t <= -3300000000.0) tmp = t_1; elseif (t <= -3.45e-292) tmp = x + (a / ((1.0 - z) / z)); elseif (t <= 5e-86) tmp = x - (y * a); elseif (t <= 7e-11) tmp = x - a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(a / t), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3300000000.0], t$95$1, If[LessEqual[t, -3.45e-292], N[(x + N[(a / N[(N[(1.0 - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-86], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-11], N[(x - a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{t} \cdot \left(z - y\right)\\
\mathbf{if}\;t \leq -3300000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3.45 \cdot 10^{-292}:\\
\;\;\;\;x + \frac{a}{\frac{1 - z}{z}}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-86}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-11}:\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.3e9 or 7.00000000000000038e-11 < t Initial program 97.0%
associate-/r/98.4%
Simplified98.4%
Taylor expanded in t around inf 78.2%
associate-/l*83.8%
associate-/r/86.1%
Simplified86.1%
if -3.3e9 < t < -3.44999999999999984e-292Initial program 96.1%
associate-/r/99.9%
Simplified99.9%
associate-/r/96.1%
div-inv96.1%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 81.9%
*-commutative81.9%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in y around 0 59.0%
sub-neg59.0%
mul-1-neg59.0%
*-commutative59.0%
associate-*r/73.8%
remove-double-neg73.8%
*-commutative73.8%
associate-/r/75.7%
Simplified75.7%
if -3.44999999999999984e-292 < t < 4.9999999999999999e-86Initial program 95.0%
associate-/r/100.0%
Simplified100.0%
associate-/r/95.0%
div-inv95.0%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 94.8%
*-commutative94.8%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in z around 0 70.3%
if 4.9999999999999999e-86 < t < 7.00000000000000038e-11Initial program 94.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 89.3%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.5e+120)
(- x a)
(if (<= z -1.22e-25)
x
(if (<= z 3.8e-285)
(- x (* y a))
(if (<= z 3e+71) (- x (* a (/ y t))) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+120) {
tmp = x - a;
} else if (z <= -1.22e-25) {
tmp = x;
} else if (z <= 3.8e-285) {
tmp = x - (y * a);
} else if (z <= 3e+71) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.5d+120)) then
tmp = x - a
else if (z <= (-1.22d-25)) then
tmp = x
else if (z <= 3.8d-285) then
tmp = x - (y * a)
else if (z <= 3d+71) then
tmp = x - (a * (y / t))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+120) {
tmp = x - a;
} else if (z <= -1.22e-25) {
tmp = x;
} else if (z <= 3.8e-285) {
tmp = x - (y * a);
} else if (z <= 3e+71) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e+120: tmp = x - a elif z <= -1.22e-25: tmp = x elif z <= 3.8e-285: tmp = x - (y * a) elif z <= 3e+71: tmp = x - (a * (y / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e+120) tmp = Float64(x - a); elseif (z <= -1.22e-25) tmp = x; elseif (z <= 3.8e-285) tmp = Float64(x - Float64(y * a)); elseif (z <= 3e+71) tmp = Float64(x - Float64(a * Float64(y / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e+120) tmp = x - a; elseif (z <= -1.22e-25) tmp = x; elseif (z <= 3.8e-285) tmp = x - (y * a); elseif (z <= 3e+71) tmp = x - (a * (y / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e+120], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.22e-25], x, If[LessEqual[z, 3.8e-285], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+71], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+120}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.22 \cdot 10^{-25}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-285}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+71}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -6.4999999999999997e120 or 3.00000000000000013e71 < z Initial program 90.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 84.3%
if -6.4999999999999997e120 < z < -1.21999999999999999e-25Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
associate-/r/99.9%
div-inv99.9%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 66.0%
*-commutative66.0%
associate-/l*68.6%
Simplified68.6%
Taylor expanded in x around inf 70.2%
if -1.21999999999999999e-25 < z < 3.8000000000000002e-285Initial program 99.8%
associate-/r/98.0%
Simplified98.0%
associate-/r/99.8%
div-inv99.8%
associate-/r*97.9%
Applied egg-rr97.9%
Taylor expanded in t around 0 79.4%
*-commutative79.4%
associate-/l*79.3%
Simplified79.3%
Taylor expanded in z around 0 79.6%
if 3.8000000000000002e-285 < z < 3.00000000000000013e71Initial program 98.7%
associate-/r/98.7%
Simplified98.7%
Taylor expanded in t around inf 73.6%
Taylor expanded in y around inf 71.3%
associate-/l*75.5%
associate-/r/76.8%
Simplified76.8%
Final simplification79.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.1e+69)
(- x a)
(if (<= z -8e-89)
(- x (/ (* y a) t))
(if (<= z 3.7e-284)
(- x (* y a))
(if (<= z 5.2e+71) (- x (* a (/ y t))) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.1e+69) {
tmp = x - a;
} else if (z <= -8e-89) {
tmp = x - ((y * a) / t);
} else if (z <= 3.7e-284) {
tmp = x - (y * a);
} else if (z <= 5.2e+71) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5.1d+69)) then
tmp = x - a
else if (z <= (-8d-89)) then
tmp = x - ((y * a) / t)
else if (z <= 3.7d-284) then
tmp = x - (y * a)
else if (z <= 5.2d+71) then
tmp = x - (a * (y / t))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.1e+69) {
tmp = x - a;
} else if (z <= -8e-89) {
tmp = x - ((y * a) / t);
} else if (z <= 3.7e-284) {
tmp = x - (y * a);
} else if (z <= 5.2e+71) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.1e+69: tmp = x - a elif z <= -8e-89: tmp = x - ((y * a) / t) elif z <= 3.7e-284: tmp = x - (y * a) elif z <= 5.2e+71: tmp = x - (a * (y / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.1e+69) tmp = Float64(x - a); elseif (z <= -8e-89) tmp = Float64(x - Float64(Float64(y * a) / t)); elseif (z <= 3.7e-284) tmp = Float64(x - Float64(y * a)); elseif (z <= 5.2e+71) tmp = Float64(x - Float64(a * Float64(y / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.1e+69) tmp = x - a; elseif (z <= -8e-89) tmp = x - ((y * a) / t); elseif (z <= 3.7e-284) tmp = x - (y * a); elseif (z <= 5.2e+71) tmp = x - (a * (y / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.1e+69], N[(x - a), $MachinePrecision], If[LessEqual[z, -8e-89], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-284], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+71], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{+69}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-89}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-284}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+71}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -5.09999999999999999e69 or 5.19999999999999983e71 < z Initial program 91.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 82.5%
if -5.09999999999999999e69 < z < -8.00000000000000031e-89Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around inf 64.2%
Taylor expanded in y around inf 72.9%
if -8.00000000000000031e-89 < z < 3.7e-284Initial program 99.8%
associate-/r/97.5%
Simplified97.5%
associate-/r/99.8%
div-inv99.8%
associate-/r*97.4%
Applied egg-rr97.4%
Taylor expanded in t around 0 81.9%
*-commutative81.9%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in z around 0 82.0%
if 3.7e-284 < z < 5.19999999999999983e71Initial program 98.7%
associate-/r/98.7%
Simplified98.7%
Taylor expanded in t around inf 73.6%
Taylor expanded in y around inf 71.3%
associate-/l*75.5%
associate-/r/76.8%
Simplified76.8%
Final simplification79.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.8e+120)
(- x a)
(if (<= z -1.0)
(+ x (* y (/ a z)))
(if (<= z 1.9e-284)
(- x (* y a))
(if (<= z 3e+71) (- x (* a (/ y t))) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e+120) {
tmp = x - a;
} else if (z <= -1.0) {
tmp = x + (y * (a / z));
} else if (z <= 1.9e-284) {
tmp = x - (y * a);
} else if (z <= 3e+71) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.8d+120)) then
tmp = x - a
else if (z <= (-1.0d0)) then
tmp = x + (y * (a / z))
else if (z <= 1.9d-284) then
tmp = x - (y * a)
else if (z <= 3d+71) then
tmp = x - (a * (y / t))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e+120) {
tmp = x - a;
} else if (z <= -1.0) {
tmp = x + (y * (a / z));
} else if (z <= 1.9e-284) {
tmp = x - (y * a);
} else if (z <= 3e+71) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.8e+120: tmp = x - a elif z <= -1.0: tmp = x + (y * (a / z)) elif z <= 1.9e-284: tmp = x - (y * a) elif z <= 3e+71: tmp = x - (a * (y / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.8e+120) tmp = Float64(x - a); elseif (z <= -1.0) tmp = Float64(x + Float64(y * Float64(a / z))); elseif (z <= 1.9e-284) tmp = Float64(x - Float64(y * a)); elseif (z <= 3e+71) tmp = Float64(x - Float64(a * Float64(y / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.8e+120) tmp = x - a; elseif (z <= -1.0) tmp = x + (y * (a / z)); elseif (z <= 1.9e-284) tmp = x - (y * a); elseif (z <= 3e+71) tmp = x - (a * (y / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e+120], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.0], N[(x + N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e-284], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+71], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+120}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1:\\
\;\;\;\;x + y \cdot \frac{a}{z}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-284}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+71}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -6.79999999999999998e120 or 3.00000000000000013e71 < z Initial program 90.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 84.3%
if -6.79999999999999998e120 < z < -1Initial program 99.9%
Taylor expanded in z around inf 66.7%
mul-1-neg66.7%
distribute-neg-frac66.7%
Simplified66.7%
Taylor expanded in y around inf 71.4%
*-commutative71.4%
associate-*r/74.1%
associate-*r*74.1%
neg-mul-174.1%
Simplified74.1%
if -1 < z < 1.8999999999999999e-284Initial program 99.8%
associate-/r/98.1%
Simplified98.1%
associate-/r/99.8%
div-inv99.8%
associate-/r*98.0%
Applied egg-rr98.0%
Taylor expanded in t around 0 80.3%
*-commutative80.3%
associate-/l*80.2%
Simplified80.2%
Taylor expanded in z around 0 78.5%
if 1.8999999999999999e-284 < z < 3.00000000000000013e71Initial program 98.7%
associate-/r/98.7%
Simplified98.7%
Taylor expanded in t around inf 73.6%
Taylor expanded in y around inf 71.3%
associate-/l*75.5%
associate-/r/76.8%
Simplified76.8%
Final simplification79.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.35e+121)
(- x a)
(if (<= z -1.0)
(- x (/ a (/ (- z) y)))
(if (<= z 2.1e-284)
(- x (* y a))
(if (<= z 1.55e+72) (- x (* a (/ y t))) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e+121) {
tmp = x - a;
} else if (z <= -1.0) {
tmp = x - (a / (-z / y));
} else if (z <= 2.1e-284) {
tmp = x - (y * a);
} else if (z <= 1.55e+72) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.35d+121)) then
tmp = x - a
else if (z <= (-1.0d0)) then
tmp = x - (a / (-z / y))
else if (z <= 2.1d-284) then
tmp = x - (y * a)
else if (z <= 1.55d+72) then
tmp = x - (a * (y / t))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e+121) {
tmp = x - a;
} else if (z <= -1.0) {
tmp = x - (a / (-z / y));
} else if (z <= 2.1e-284) {
tmp = x - (y * a);
} else if (z <= 1.55e+72) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.35e+121: tmp = x - a elif z <= -1.0: tmp = x - (a / (-z / y)) elif z <= 2.1e-284: tmp = x - (y * a) elif z <= 1.55e+72: tmp = x - (a * (y / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.35e+121) tmp = Float64(x - a); elseif (z <= -1.0) tmp = Float64(x - Float64(a / Float64(Float64(-z) / y))); elseif (z <= 2.1e-284) tmp = Float64(x - Float64(y * a)); elseif (z <= 1.55e+72) tmp = Float64(x - Float64(a * Float64(y / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.35e+121) tmp = x - a; elseif (z <= -1.0) tmp = x - (a / (-z / y)); elseif (z <= 2.1e-284) tmp = x - (y * a); elseif (z <= 1.55e+72) tmp = x - (a * (y / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e+121], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.0], N[(x - N[(a / N[((-z) / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-284], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+72], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+121}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1:\\
\;\;\;\;x - \frac{a}{\frac{-z}{y}}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-284}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+72}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.3500000000000001e121 or 1.54999999999999994e72 < z Initial program 90.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 84.3%
if -1.3500000000000001e121 < z < -1Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 91.4%
*-commutative91.4%
associate-/l*96.9%
associate--l+96.9%
Simplified96.9%
Taylor expanded in z around inf 74.2%
mul-1-neg74.2%
distribute-neg-frac74.2%
Simplified74.2%
if -1 < z < 2.09999999999999991e-284Initial program 99.8%
associate-/r/98.1%
Simplified98.1%
associate-/r/99.8%
div-inv99.8%
associate-/r*98.0%
Applied egg-rr98.0%
Taylor expanded in t around 0 80.3%
*-commutative80.3%
associate-/l*80.2%
Simplified80.2%
Taylor expanded in z around 0 78.5%
if 2.09999999999999991e-284 < z < 1.54999999999999994e72Initial program 98.7%
associate-/r/98.7%
Simplified98.7%
Taylor expanded in t around inf 73.6%
Taylor expanded in y around inf 71.3%
associate-/l*75.5%
associate-/r/76.8%
Simplified76.8%
Final simplification79.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- (* y (/ a z)) a))))
(if (<= z -4.5e+26)
t_1
(if (<= z 1.8e-284)
(- x (* y a))
(if (<= z 5e+67) (- x (* a (/ y t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * (a / z)) - a);
double tmp;
if (z <= -4.5e+26) {
tmp = t_1;
} else if (z <= 1.8e-284) {
tmp = x - (y * a);
} else if (z <= 5e+67) {
tmp = x - (a * (y / 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) :: tmp
t_1 = x + ((y * (a / z)) - a)
if (z <= (-4.5d+26)) then
tmp = t_1
else if (z <= 1.8d-284) then
tmp = x - (y * a)
else if (z <= 5d+67) then
tmp = x - (a * (y / 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 = x + ((y * (a / z)) - a);
double tmp;
if (z <= -4.5e+26) {
tmp = t_1;
} else if (z <= 1.8e-284) {
tmp = x - (y * a);
} else if (z <= 5e+67) {
tmp = x - (a * (y / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y * (a / z)) - a) tmp = 0 if z <= -4.5e+26: tmp = t_1 elif z <= 1.8e-284: tmp = x - (y * a) elif z <= 5e+67: tmp = x - (a * (y / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y * Float64(a / z)) - a)) tmp = 0.0 if (z <= -4.5e+26) tmp = t_1; elseif (z <= 1.8e-284) tmp = Float64(x - Float64(y * a)); elseif (z <= 5e+67) tmp = Float64(x - Float64(a * Float64(y / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y * (a / z)) - a); tmp = 0.0; if (z <= -4.5e+26) tmp = t_1; elseif (z <= 1.8e-284) tmp = x - (y * a); elseif (z <= 5e+67) tmp = x - (a * (y / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+26], t$95$1, If[LessEqual[z, 1.8e-284], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+67], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y \cdot \frac{a}{z} - a\right)\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-284}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+67}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.49999999999999978e26 or 4.99999999999999976e67 < z Initial program 92.8%
Taylor expanded in z around inf 80.1%
mul-1-neg80.1%
distribute-neg-frac80.1%
Simplified80.1%
Taylor expanded in y around 0 81.7%
mul-1-neg81.7%
unsub-neg81.7%
*-commutative81.7%
associate-*r/85.6%
Simplified85.6%
if -4.49999999999999978e26 < z < 1.8000000000000001e-284Initial program 99.8%
associate-/r/98.3%
Simplified98.3%
associate-/r/99.8%
div-inv99.8%
associate-/r*98.2%
Applied egg-rr98.2%
Taylor expanded in t around 0 75.7%
*-commutative75.7%
associate-/l*75.6%
Simplified75.6%
Taylor expanded in z around 0 74.5%
if 1.8000000000000001e-284 < z < 4.99999999999999976e67Initial program 98.7%
associate-/r/98.7%
Simplified98.7%
Taylor expanded in t around inf 74.1%
Taylor expanded in y around inf 72.8%
associate-/l*76.0%
associate-/r/77.4%
Simplified77.4%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.75e+46) (not (<= t 6.5e+31))) (+ x (* (/ a t) (- z y))) (- x (* (- y z) (/ a (- 1.0 z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.75e+46) || !(t <= 6.5e+31)) {
tmp = x + ((a / t) * (z - y));
} else {
tmp = x - ((y - z) * (a / (1.0 - 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.75d+46)) .or. (.not. (t <= 6.5d+31))) then
tmp = x + ((a / t) * (z - y))
else
tmp = x - ((y - z) * (a / (1.0d0 - 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.75e+46) || !(t <= 6.5e+31)) {
tmp = x + ((a / t) * (z - y));
} else {
tmp = x - ((y - z) * (a / (1.0 - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.75e+46) or not (t <= 6.5e+31): tmp = x + ((a / t) * (z - y)) else: tmp = x - ((y - z) * (a / (1.0 - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.75e+46) || !(t <= 6.5e+31)) tmp = Float64(x + Float64(Float64(a / t) * Float64(z - y))); else tmp = Float64(x - Float64(Float64(y - z) * Float64(a / Float64(1.0 - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.75e+46) || ~((t <= 6.5e+31))) tmp = x + ((a / t) * (z - y)); else tmp = x - ((y - z) * (a / (1.0 - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.75e+46], N[Not[LessEqual[t, 6.5e+31]], $MachinePrecision]], N[(x + N[(N[(a / t), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.75 \cdot 10^{+46} \lor \neg \left(t \leq 6.5 \cdot 10^{+31}\right):\\
\;\;\;\;x + \frac{a}{t} \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{1 - z}\\
\end{array}
\end{array}
if t < -1.74999999999999992e46 or 6.5000000000000004e31 < t Initial program 97.4%
associate-/r/98.2%
Simplified98.2%
Taylor expanded in t around inf 79.6%
associate-/l*86.0%
associate-/r/88.6%
Simplified88.6%
if -1.74999999999999992e46 < t < 6.5000000000000004e31Initial program 95.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 86.5%
associate-/l*97.8%
associate-/r/93.2%
Simplified93.2%
Final simplification91.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.3e+121) (not (<= z 8e+71))) (+ x (- (* y (/ a z)) a)) (- x (/ a (/ (+ (- t z) 1.0) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.3e+121) || !(z <= 8e+71)) {
tmp = x + ((y * (a / z)) - a);
} else {
tmp = x - (a / (((t - z) + 1.0) / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.3d+121)) .or. (.not. (z <= 8d+71))) then
tmp = x + ((y * (a / z)) - a)
else
tmp = x - (a / (((t - z) + 1.0d0) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.3e+121) || !(z <= 8e+71)) {
tmp = x + ((y * (a / z)) - a);
} else {
tmp = x - (a / (((t - z) + 1.0) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.3e+121) or not (z <= 8e+71): tmp = x + ((y * (a / z)) - a) else: tmp = x - (a / (((t - z) + 1.0) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.3e+121) || !(z <= 8e+71)) tmp = Float64(x + Float64(Float64(y * Float64(a / z)) - a)); else tmp = Float64(x - Float64(a / Float64(Float64(Float64(t - z) + 1.0) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.3e+121) || ~((z <= 8e+71))) tmp = x + ((y * (a / z)) - a); else tmp = x - (a / (((t - z) + 1.0) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.3e+121], N[Not[LessEqual[z, 8e+71]], $MachinePrecision]], N[(x + N[(N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], N[(x - N[(a / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+121} \lor \neg \left(z \leq 8 \cdot 10^{+71}\right):\\
\;\;\;\;x + \left(y \cdot \frac{a}{z} - a\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{\left(t - z\right) + 1}{y}}\\
\end{array}
\end{array}
if z < -2.2999999999999999e121 or 8.0000000000000003e71 < z Initial program 90.5%
Taylor expanded in z around inf 82.9%
mul-1-neg82.9%
distribute-neg-frac82.9%
Simplified82.9%
Taylor expanded in y around 0 86.0%
mul-1-neg86.0%
unsub-neg86.0%
*-commutative86.0%
associate-*r/90.3%
Simplified90.3%
if -2.2999999999999999e121 < z < 8.0000000000000003e71Initial program 99.3%
associate-/r/98.8%
Simplified98.8%
Taylor expanded in y around inf 91.1%
*-commutative91.1%
associate-/l*95.0%
associate--l+95.0%
Simplified95.0%
Final simplification93.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.28e+85) (not (<= z 8.5e+41))) (+ x (- (* y (/ a z)) a)) (- x (/ (* y a) (+ t 1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.28e+85) || !(z <= 8.5e+41)) {
tmp = x + ((y * (a / z)) - a);
} else {
tmp = x - ((y * a) / (t + 1.0));
}
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.28d+85)) .or. (.not. (z <= 8.5d+41))) then
tmp = x + ((y * (a / z)) - a)
else
tmp = x - ((y * a) / (t + 1.0d0))
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.28e+85) || !(z <= 8.5e+41)) {
tmp = x + ((y * (a / z)) - a);
} else {
tmp = x - ((y * a) / (t + 1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.28e+85) or not (z <= 8.5e+41): tmp = x + ((y * (a / z)) - a) else: tmp = x - ((y * a) / (t + 1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.28e+85) || !(z <= 8.5e+41)) tmp = Float64(x + Float64(Float64(y * Float64(a / z)) - a)); else tmp = Float64(x - Float64(Float64(y * a) / Float64(t + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.28e+85) || ~((z <= 8.5e+41))) tmp = x + ((y * (a / z)) - a); else tmp = x - ((y * a) / (t + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.28e+85], N[Not[LessEqual[z, 8.5e+41]], $MachinePrecision]], N[(x + N[(N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * a), $MachinePrecision] / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.28 \cdot 10^{+85} \lor \neg \left(z \leq 8.5 \cdot 10^{+41}\right):\\
\;\;\;\;x + \left(y \cdot \frac{a}{z} - a\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot a}{t + 1}\\
\end{array}
\end{array}
if z < -1.28000000000000004e85 or 8.49999999999999938e41 < z Initial program 92.1%
Taylor expanded in z around inf 80.5%
mul-1-neg80.5%
distribute-neg-frac80.5%
Simplified80.5%
Taylor expanded in y around 0 82.2%
mul-1-neg82.2%
unsub-neg82.2%
*-commutative82.2%
associate-*r/86.6%
Simplified86.6%
if -1.28000000000000004e85 < z < 8.49999999999999938e41Initial program 99.2%
associate-/r/98.6%
Simplified98.6%
Taylor expanded in z around 0 91.8%
Final simplification89.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.5e+120) (- x a) (if (<= z -1.65e-22) x (if (<= z 9.8e+29) (- x (* y a)) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e+120) {
tmp = x - a;
} else if (z <= -1.65e-22) {
tmp = x;
} else if (z <= 9.8e+29) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.5d+120)) then
tmp = x - a
else if (z <= (-1.65d-22)) then
tmp = x
else if (z <= 9.8d+29) then
tmp = x - (y * a)
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e+120) {
tmp = x - a;
} else if (z <= -1.65e-22) {
tmp = x;
} else if (z <= 9.8e+29) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.5e+120: tmp = x - a elif z <= -1.65e-22: tmp = x elif z <= 9.8e+29: tmp = x - (y * a) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.5e+120) tmp = Float64(x - a); elseif (z <= -1.65e-22) tmp = x; elseif (z <= 9.8e+29) tmp = Float64(x - Float64(y * a)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.5e+120) tmp = x - a; elseif (z <= -1.65e-22) tmp = x; elseif (z <= 9.8e+29) tmp = x - (y * a); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.5e+120], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.65e-22], x, If[LessEqual[z, 9.8e+29], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+120}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-22}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+29}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.50000000000000009e120 or 9.8000000000000003e29 < z Initial program 91.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 81.4%
if -2.50000000000000009e120 < z < -1.65e-22Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
associate-/r/99.9%
div-inv99.9%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 66.0%
*-commutative66.0%
associate-/l*68.6%
Simplified68.6%
Taylor expanded in x around inf 70.2%
if -1.65e-22 < z < 9.8000000000000003e29Initial program 99.0%
associate-/r/98.3%
Simplified98.3%
associate-/r/99.0%
div-inv99.1%
associate-/r*98.2%
Applied egg-rr98.2%
Taylor expanded in t around 0 68.5%
*-commutative68.5%
associate-/l*68.4%
Simplified68.4%
Taylor expanded in z around 0 67.1%
Final simplification73.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.5e+120) (- x a) (if (<= z 2.7e+34) x (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+120) {
tmp = x - a;
} else if (z <= 2.7e+34) {
tmp = x;
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.5d+120)) then
tmp = x - a
else if (z <= 2.7d+34) then
tmp = x
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+120) {
tmp = x - a;
} else if (z <= 2.7e+34) {
tmp = x;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e+120: tmp = x - a elif z <= 2.7e+34: tmp = x else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e+120) tmp = Float64(x - a); elseif (z <= 2.7e+34) tmp = x; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e+120) tmp = x - a; elseif (z <= 2.7e+34) tmp = x; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e+120], N[(x - a), $MachinePrecision], If[LessEqual[z, 2.7e+34], x, N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+120}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+34}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -6.4999999999999997e120 or 2.7e34 < z Initial program 91.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 81.4%
if -6.4999999999999997e120 < z < 2.7e34Initial program 99.2%
associate-/r/98.7%
Simplified98.7%
associate-/r/99.2%
div-inv99.3%
associate-/r*98.6%
Applied egg-rr98.6%
Taylor expanded in t around 0 67.9%
*-commutative67.9%
associate-/l*68.5%
Simplified68.5%
Taylor expanded in x around inf 60.0%
Final simplification68.2%
(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 96.2%
associate-/r/99.2%
Simplified99.2%
associate-/r/96.2%
div-inv96.2%
associate-/r*99.0%
Applied egg-rr99.0%
Taylor expanded in t around 0 67.7%
*-commutative67.7%
associate-/l*72.8%
Simplified72.8%
Taylor expanded in x around inf 53.8%
Final simplification53.8%
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
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 - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2023185
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:herbie-target
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))