
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
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) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
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) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= x -3e-176) (+ x (/ (- y z) (/ (- a z) t))) (fma (/ (- y z) (- a z)) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3e-176) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = fma(((y - z) / (a - z)), t, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (x <= -3e-176) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); else tmp = fma(Float64(Float64(y - z) / Float64(a - z)), t, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3e-176], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{-176}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t, x\right)\\
\end{array}
\end{array}
if x < -3e-176Initial program 79.0%
associate-*l/94.5%
Simplified94.5%
associate-/r/99.8%
Applied egg-rr99.8%
if -3e-176 < x Initial program 86.3%
+-commutative86.3%
associate-*l/99.3%
fma-def99.3%
Simplified99.3%
Final simplification99.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.45e+122)
(+ x t)
(if (<= z -2.5e+38)
(- x (* t (/ y z)))
(if (<= z -39000000000000.0)
(+ x t)
(if (<= z 6e+54) (+ x (/ t (/ a y))) (+ x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+122) {
tmp = x + t;
} else if (z <= -2.5e+38) {
tmp = x - (t * (y / z));
} else if (z <= -39000000000000.0) {
tmp = x + t;
} else if (z <= 6e+54) {
tmp = x + (t / (a / y));
} else {
tmp = x + 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 <= (-1.45d+122)) then
tmp = x + t
else if (z <= (-2.5d+38)) then
tmp = x - (t * (y / z))
else if (z <= (-39000000000000.0d0)) then
tmp = x + t
else if (z <= 6d+54) then
tmp = x + (t / (a / y))
else
tmp = x + 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 <= -1.45e+122) {
tmp = x + t;
} else if (z <= -2.5e+38) {
tmp = x - (t * (y / z));
} else if (z <= -39000000000000.0) {
tmp = x + t;
} else if (z <= 6e+54) {
tmp = x + (t / (a / y));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.45e+122: tmp = x + t elif z <= -2.5e+38: tmp = x - (t * (y / z)) elif z <= -39000000000000.0: tmp = x + t elif z <= 6e+54: tmp = x + (t / (a / y)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e+122) tmp = Float64(x + t); elseif (z <= -2.5e+38) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= -39000000000000.0) tmp = Float64(x + t); elseif (z <= 6e+54) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.45e+122) tmp = x + t; elseif (z <= -2.5e+38) tmp = x - (t * (y / z)); elseif (z <= -39000000000000.0) tmp = x + t; elseif (z <= 6e+54) tmp = x + (t / (a / y)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e+122], N[(x + t), $MachinePrecision], If[LessEqual[z, -2.5e+38], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -39000000000000.0], N[(x + t), $MachinePrecision], If[LessEqual[z, 6e+54], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+122}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{+38}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -39000000000000:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+54}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -1.45e122 or -2.49999999999999985e38 < z < -3.9e13 or 5.9999999999999998e54 < z Initial program 69.2%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 83.9%
if -1.45e122 < z < -2.49999999999999985e38Initial program 78.0%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 75.7%
Taylor expanded in a around 0 64.4%
mul-1-neg64.4%
unsub-neg64.4%
associate-/l*64.5%
Simplified64.5%
Taylor expanded in t around 0 64.4%
associate-*r/64.5%
Simplified64.5%
if -3.9e13 < z < 5.9999999999999998e54Initial program 94.4%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in z around 0 78.8%
+-commutative78.8%
associate-/l*79.4%
Simplified79.4%
Final simplification80.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.3e+126)
(+ x t)
(if (<= z -3.6e+38)
(- x (* t (/ y z)))
(if (<= z -39000000000000.0)
(+ x (* z (/ t z)))
(if (<= z 3.7e+50) (+ x (/ t (/ a y))) (+ x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+126) {
tmp = x + t;
} else if (z <= -3.6e+38) {
tmp = x - (t * (y / z));
} else if (z <= -39000000000000.0) {
tmp = x + (z * (t / z));
} else if (z <= 3.7e+50) {
tmp = x + (t / (a / y));
} else {
tmp = x + 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.3d+126)) then
tmp = x + t
else if (z <= (-3.6d+38)) then
tmp = x - (t * (y / z))
else if (z <= (-39000000000000.0d0)) then
tmp = x + (z * (t / z))
else if (z <= 3.7d+50) then
tmp = x + (t / (a / y))
else
tmp = x + 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.3e+126) {
tmp = x + t;
} else if (z <= -3.6e+38) {
tmp = x - (t * (y / z));
} else if (z <= -39000000000000.0) {
tmp = x + (z * (t / z));
} else if (z <= 3.7e+50) {
tmp = x + (t / (a / y));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e+126: tmp = x + t elif z <= -3.6e+38: tmp = x - (t * (y / z)) elif z <= -39000000000000.0: tmp = x + (z * (t / z)) elif z <= 3.7e+50: tmp = x + (t / (a / y)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e+126) tmp = Float64(x + t); elseif (z <= -3.6e+38) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= -39000000000000.0) tmp = Float64(x + Float64(z * Float64(t / z))); elseif (z <= 3.7e+50) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.3e+126) tmp = x + t; elseif (z <= -3.6e+38) tmp = x - (t * (y / z)); elseif (z <= -39000000000000.0) tmp = x + (z * (t / z)); elseif (z <= 3.7e+50) tmp = x + (t / (a / y)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+126], N[(x + t), $MachinePrecision], If[LessEqual[z, -3.6e+38], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -39000000000000.0], N[(x + N[(z * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e+50], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+126}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{+38}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -39000000000000:\\
\;\;\;\;x + z \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+50}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -2.3000000000000001e126 or 3.7000000000000001e50 < z Initial program 66.8%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 84.8%
if -2.3000000000000001e126 < z < -3.59999999999999969e38Initial program 78.0%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 75.7%
Taylor expanded in a around 0 64.4%
mul-1-neg64.4%
unsub-neg64.4%
associate-/l*64.5%
Simplified64.5%
Taylor expanded in t around 0 64.4%
associate-*r/64.5%
Simplified64.5%
if -3.59999999999999969e38 < z < -3.9e13Initial program 99.8%
associate-*l/99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
div-inv99.8%
clear-num100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 72.3%
mul-1-neg72.3%
unsub-neg72.3%
*-commutative72.3%
associate-*r/72.3%
Simplified72.3%
Taylor expanded in a around 0 72.3%
associate-*r/72.3%
neg-mul-172.3%
Simplified72.3%
if -3.9e13 < z < 3.7000000000000001e50Initial program 94.4%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in z around 0 78.8%
+-commutative78.8%
associate-/l*79.4%
Simplified79.4%
Final simplification80.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.5e+14) (not (<= z 2.2e+50))) (+ x (* t (- 1.0 (/ y z)))) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.5e+14) || !(z <= 2.2e+50)) {
tmp = x + (t * (1.0 - (y / z)));
} else {
tmp = x + (t / (a / 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.5d+14)) .or. (.not. (z <= 2.2d+50))) then
tmp = x + (t * (1.0d0 - (y / z)))
else
tmp = x + (t / (a / 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.5e+14) || !(z <= 2.2e+50)) {
tmp = x + (t * (1.0 - (y / z)));
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.5e+14) or not (z <= 2.2e+50): tmp = x + (t * (1.0 - (y / z))) else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.5e+14) || !(z <= 2.2e+50)) tmp = Float64(x + Float64(t * Float64(1.0 - Float64(y / z)))); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.5e+14) || ~((z <= 2.2e+50))) tmp = x + (t * (1.0 - (y / z))); else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.5e+14], N[Not[LessEqual[z, 2.2e+50]], $MachinePrecision]], N[(x + N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+14} \lor \neg \left(z \leq 2.2 \cdot 10^{+50}\right):\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -1.5e14 or 2.20000000000000017e50 < z Initial program 70.5%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in a around 0 88.6%
associate-*r/88.6%
neg-mul-188.6%
Simplified88.6%
Taylor expanded in y around 0 88.6%
mul-1-neg88.6%
unsub-neg88.6%
Simplified88.6%
if -1.5e14 < z < 2.20000000000000017e50Initial program 94.4%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in z around 0 78.8%
+-commutative78.8%
associate-/l*79.4%
Simplified79.4%
Final simplification83.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.5e+14) (not (<= z 0.00075))) (+ x (* t (- 1.0 (/ y z)))) (+ x (* (- y z) (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.5e+14) || !(z <= 0.00075)) {
tmp = x + (t * (1.0 - (y / z)));
} else {
tmp = x + ((y - z) * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.5d+14)) .or. (.not. (z <= 0.00075d0))) then
tmp = x + (t * (1.0d0 - (y / z)))
else
tmp = x + ((y - z) * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.5e+14) || !(z <= 0.00075)) {
tmp = x + (t * (1.0 - (y / z)));
} else {
tmp = x + ((y - z) * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.5e+14) or not (z <= 0.00075): tmp = x + (t * (1.0 - (y / z))) else: tmp = x + ((y - z) * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.5e+14) || !(z <= 0.00075)) tmp = Float64(x + Float64(t * Float64(1.0 - Float64(y / z)))); else tmp = Float64(x + Float64(Float64(y - z) * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.5e+14) || ~((z <= 0.00075))) tmp = x + (t * (1.0 - (y / z))); else tmp = x + ((y - z) * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.5e+14], N[Not[LessEqual[z, 0.00075]], $MachinePrecision]], N[(x + N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+14} \lor \neg \left(z \leq 0.00075\right):\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.5e14 or 7.5000000000000002e-4 < z Initial program 71.6%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in a around 0 86.2%
associate-*r/86.2%
neg-mul-186.2%
Simplified86.2%
Taylor expanded in y around 0 86.3%
mul-1-neg86.3%
unsub-neg86.3%
Simplified86.3%
if -1.5e14 < z < 7.5000000000000002e-4Initial program 94.7%
associate-*l/95.5%
Simplified95.5%
associate-/r/99.1%
Applied egg-rr99.1%
div-inv98.4%
clear-num98.4%
Applied egg-rr98.4%
Taylor expanded in a around inf 83.8%
Final simplification85.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.8e+16) (not (<= z 1.2e+54))) (+ x (* t (- 1.0 (/ y z)))) (+ x (* t (/ y (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.8e+16) || !(z <= 1.2e+54)) {
tmp = x + (t * (1.0 - (y / z)));
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.8d+16)) .or. (.not. (z <= 1.2d+54))) then
tmp = x + (t * (1.0d0 - (y / z)))
else
tmp = x + (t * (y / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.8e+16) || !(z <= 1.2e+54)) {
tmp = x + (t * (1.0 - (y / z)));
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.8e+16) or not (z <= 1.2e+54): tmp = x + (t * (1.0 - (y / z))) else: tmp = x + (t * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.8e+16) || !(z <= 1.2e+54)) tmp = Float64(x + Float64(t * Float64(1.0 - Float64(y / z)))); else tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.8e+16) || ~((z <= 1.2e+54))) tmp = x + (t * (1.0 - (y / z))); else tmp = x + (t * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.8e+16], N[Not[LessEqual[z, 1.2e+54]], $MachinePrecision]], N[(x + N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+16} \lor \neg \left(z \leq 1.2 \cdot 10^{+54}\right):\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -4.8e16 or 1.19999999999999999e54 < z Initial program 70.2%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in a around 0 88.5%
associate-*r/88.5%
neg-mul-188.5%
Simplified88.5%
Taylor expanded in y around 0 88.5%
mul-1-neg88.5%
unsub-neg88.5%
Simplified88.5%
if -4.8e16 < z < 1.19999999999999999e54Initial program 94.4%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in y around inf 87.3%
Final simplification87.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.42e+16) (+ x (* t (- 1.0 (/ y z)))) (if (<= z 3e+51) (+ x (* t (/ y (- a z)))) (+ x (- t (/ t (/ z y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.42e+16) {
tmp = x + (t * (1.0 - (y / z)));
} else if (z <= 3e+51) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (t - (t / (z / 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.42d+16)) then
tmp = x + (t * (1.0d0 - (y / z)))
else if (z <= 3d+51) then
tmp = x + (t * (y / (a - z)))
else
tmp = x + (t - (t / (z / 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.42e+16) {
tmp = x + (t * (1.0 - (y / z)));
} else if (z <= 3e+51) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (t - (t / (z / y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.42e+16: tmp = x + (t * (1.0 - (y / z))) elif z <= 3e+51: tmp = x + (t * (y / (a - z))) else: tmp = x + (t - (t / (z / y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.42e+16) tmp = Float64(x + Float64(t * Float64(1.0 - Float64(y / z)))); elseif (z <= 3e+51) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x + Float64(t - Float64(t / Float64(z / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.42e+16) tmp = x + (t * (1.0 - (y / z))); elseif (z <= 3e+51) tmp = x + (t * (y / (a - z))); else tmp = x + (t - (t / (z / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.42e+16], N[(x + N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+51], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.42 \cdot 10^{+16}:\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+51}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - \frac{t}{\frac{z}{y}}\right)\\
\end{array}
\end{array}
if z < -1.42e16Initial program 73.7%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around 0 89.7%
associate-*r/89.7%
neg-mul-189.7%
Simplified89.7%
Taylor expanded in y around 0 89.7%
mul-1-neg89.7%
unsub-neg89.7%
Simplified89.7%
if -1.42e16 < z < 3e51Initial program 94.4%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in y around inf 87.3%
if 3e51 < z Initial program 66.3%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in a around 0 87.1%
associate-*r/87.1%
neg-mul-187.1%
Simplified87.1%
Taylor expanded in y around 0 76.3%
mul-1-neg76.3%
unsub-neg76.3%
associate-/l*87.2%
Simplified87.2%
Final simplification87.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.42e+16) (+ x (* t (- 1.0 (/ y z)))) (if (<= z 3.8e+52) (+ x (/ t (/ (- a z) y))) (+ x (- t (/ t (/ z y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.42e+16) {
tmp = x + (t * (1.0 - (y / z)));
} else if (z <= 3.8e+52) {
tmp = x + (t / ((a - z) / y));
} else {
tmp = x + (t - (t / (z / 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.42d+16)) then
tmp = x + (t * (1.0d0 - (y / z)))
else if (z <= 3.8d+52) then
tmp = x + (t / ((a - z) / y))
else
tmp = x + (t - (t / (z / 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.42e+16) {
tmp = x + (t * (1.0 - (y / z)));
} else if (z <= 3.8e+52) {
tmp = x + (t / ((a - z) / y));
} else {
tmp = x + (t - (t / (z / y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.42e+16: tmp = x + (t * (1.0 - (y / z))) elif z <= 3.8e+52: tmp = x + (t / ((a - z) / y)) else: tmp = x + (t - (t / (z / y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.42e+16) tmp = Float64(x + Float64(t * Float64(1.0 - Float64(y / z)))); elseif (z <= 3.8e+52) tmp = Float64(x + Float64(t / Float64(Float64(a - z) / y))); else tmp = Float64(x + Float64(t - Float64(t / Float64(z / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.42e+16) tmp = x + (t * (1.0 - (y / z))); elseif (z <= 3.8e+52) tmp = x + (t / ((a - z) / y)); else tmp = x + (t - (t / (z / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.42e+16], N[(x + N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+52], N[(x + N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.42 \cdot 10^{+16}:\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+52}:\\
\;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - \frac{t}{\frac{z}{y}}\right)\\
\end{array}
\end{array}
if z < -1.42e16Initial program 73.7%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around 0 89.7%
associate-*r/89.7%
neg-mul-189.7%
Simplified89.7%
Taylor expanded in y around 0 89.7%
mul-1-neg89.7%
unsub-neg89.7%
Simplified89.7%
if -1.42e16 < z < 3.8e52Initial program 94.4%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in y around inf 86.8%
associate-/l*87.3%
Simplified87.3%
if 3.8e52 < z Initial program 66.3%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in a around 0 87.1%
associate-*r/87.1%
neg-mul-187.1%
Simplified87.1%
Taylor expanded in y around 0 76.3%
mul-1-neg76.3%
unsub-neg76.3%
associate-/l*87.2%
Simplified87.2%
Final simplification87.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.2e+16) (+ x (* t (- 1.0 (/ y z)))) (if (<= z 8.5e+17) (+ x (/ t (/ (- a z) y))) (- x (* z (/ t (- a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e+16) {
tmp = x + (t * (1.0 - (y / z)));
} else if (z <= 8.5e+17) {
tmp = x + (t / ((a - z) / y));
} else {
tmp = x - (z * (t / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-9.2d+16)) then
tmp = x + (t * (1.0d0 - (y / z)))
else if (z <= 8.5d+17) then
tmp = x + (t / ((a - z) / y))
else
tmp = x - (z * (t / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e+16) {
tmp = x + (t * (1.0 - (y / z)));
} else if (z <= 8.5e+17) {
tmp = x + (t / ((a - z) / y));
} else {
tmp = x - (z * (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.2e+16: tmp = x + (t * (1.0 - (y / z))) elif z <= 8.5e+17: tmp = x + (t / ((a - z) / y)) else: tmp = x - (z * (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.2e+16) tmp = Float64(x + Float64(t * Float64(1.0 - Float64(y / z)))); elseif (z <= 8.5e+17) tmp = Float64(x + Float64(t / Float64(Float64(a - z) / y))); else tmp = Float64(x - Float64(z * Float64(t / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.2e+16) tmp = x + (t * (1.0 - (y / z))); elseif (z <= 8.5e+17) tmp = x + (t / ((a - z) / y)); else tmp = x - (z * (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e+16], N[(x + N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+17], N[(x + N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+16}:\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+17}:\\
\;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if z < -9.2e16Initial program 73.7%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around 0 89.7%
associate-*r/89.7%
neg-mul-189.7%
Simplified89.7%
Taylor expanded in y around 0 89.7%
mul-1-neg89.7%
unsub-neg89.7%
Simplified89.7%
if -9.2e16 < z < 8.5e17Initial program 94.9%
associate-*l/95.7%
Simplified95.7%
Taylor expanded in y around inf 87.0%
associate-/l*87.6%
Simplified87.6%
if 8.5e17 < z Initial program 67.5%
associate-*l/100.0%
Simplified100.0%
associate-/r/94.8%
Applied egg-rr94.8%
div-inv94.7%
clear-num95.1%
Applied egg-rr95.1%
Taylor expanded in y around 0 64.2%
mul-1-neg64.2%
unsub-neg64.2%
*-commutative64.2%
associate-*r/87.2%
Simplified87.2%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (<= y -0.0008) (+ x (* t (/ y (- a z)))) (if (<= y 2.1e+23) (- x (* t (/ z (- a z)))) (+ x (/ t (/ (- a z) y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -0.0008) {
tmp = x + (t * (y / (a - z)));
} else if (y <= 2.1e+23) {
tmp = x - (t * (z / (a - z)));
} else {
tmp = x + (t / ((a - z) / 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 <= (-0.0008d0)) then
tmp = x + (t * (y / (a - z)))
else if (y <= 2.1d+23) then
tmp = x - (t * (z / (a - z)))
else
tmp = x + (t / ((a - z) / 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 <= -0.0008) {
tmp = x + (t * (y / (a - z)));
} else if (y <= 2.1e+23) {
tmp = x - (t * (z / (a - z)));
} else {
tmp = x + (t / ((a - z) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -0.0008: tmp = x + (t * (y / (a - z))) elif y <= 2.1e+23: tmp = x - (t * (z / (a - z))) else: tmp = x + (t / ((a - z) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -0.0008) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); elseif (y <= 2.1e+23) tmp = Float64(x - Float64(t * Float64(z / Float64(a - z)))); else tmp = Float64(x + Float64(t / Float64(Float64(a - z) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -0.0008) tmp = x + (t * (y / (a - z))); elseif (y <= 2.1e+23) tmp = x - (t * (z / (a - z))); else tmp = x + (t / ((a - z) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -0.0008], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+23], N[(x - N[(t * N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0008:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+23}:\\
\;\;\;\;x - t \cdot \frac{z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\
\end{array}
\end{array}
if y < -8.00000000000000038e-4Initial program 82.7%
associate-*l/98.4%
Simplified98.4%
Taylor expanded in y around inf 85.3%
if -8.00000000000000038e-4 < y < 2.1000000000000001e23Initial program 82.7%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in y around 0 76.8%
mul-1-neg76.8%
unsub-neg76.8%
*-commutative76.8%
associate-*l/93.2%
Simplified93.2%
if 2.1000000000000001e23 < y Initial program 86.5%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in y around inf 79.0%
associate-/l*85.5%
Simplified85.5%
Final simplification89.3%
(FPCore (x y z t a) :precision binary64 (if (<= x -5e-176) (+ x (* (- y z) (/ t (- a z)))) (+ x (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5e-176) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-5d-176)) then
tmp = x + ((y - z) * (t / (a - z)))
else
tmp = x + (t * ((y - z) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5e-176) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5e-176: tmp = x + ((y - z) * (t / (a - z))) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5e-176) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); else tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -5e-176) tmp = x + ((y - z) * (t / (a - z))); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5e-176], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-176}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -5e-176Initial program 79.0%
associate-*l/94.5%
Simplified94.5%
associate-/r/99.8%
Applied egg-rr99.8%
div-inv99.8%
clear-num99.8%
Applied egg-rr99.8%
if -5e-176 < x Initial program 86.3%
associate-*l/99.3%
Simplified99.3%
Final simplification99.5%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.15e-175) (+ x (/ (- y z) (/ (- a z) t))) (+ x (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.15e-175) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.15d-175)) then
tmp = x + ((y - z) / ((a - z) / t))
else
tmp = x + (t * ((y - z) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.15e-175) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.15e-175: tmp = x + ((y - z) / ((a - z) / t)) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.15e-175) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); else tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.15e-175) tmp = x + ((y - z) / ((a - z) / t)); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.15e-175], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{-175}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -1.15e-175Initial program 79.0%
associate-*l/94.5%
Simplified94.5%
associate-/r/99.8%
Applied egg-rr99.8%
if -1.15e-175 < x Initial program 86.3%
associate-*l/99.3%
Simplified99.3%
Final simplification99.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -8e+14) (+ x t) (if (<= z 2.2e+50) (+ x (* t (/ y a))) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8e+14) {
tmp = x + t;
} else if (z <= 2.2e+50) {
tmp = x + (t * (y / a));
} else {
tmp = x + 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 <= (-8d+14)) then
tmp = x + t
else if (z <= 2.2d+50) then
tmp = x + (t * (y / a))
else
tmp = x + 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 <= -8e+14) {
tmp = x + t;
} else if (z <= 2.2e+50) {
tmp = x + (t * (y / a));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8e+14: tmp = x + t elif z <= 2.2e+50: tmp = x + (t * (y / a)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8e+14) tmp = Float64(x + t); elseif (z <= 2.2e+50) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8e+14) tmp = x + t; elseif (z <= 2.2e+50) tmp = x + (t * (y / a)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8e+14], N[(x + t), $MachinePrecision], If[LessEqual[z, 2.2e+50], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+14}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+50}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -8e14 or 2.20000000000000017e50 < z Initial program 70.5%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 77.2%
if -8e14 < z < 2.20000000000000017e50Initial program 94.4%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in z around 0 79.4%
Final simplification78.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.65e+15) (+ x t) (if (<= z 3.2e+54) (+ x (/ t (/ a y))) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+15) {
tmp = x + t;
} else if (z <= 3.2e+54) {
tmp = x + (t / (a / y));
} else {
tmp = x + 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 <= (-1.65d+15)) then
tmp = x + t
else if (z <= 3.2d+54) then
tmp = x + (t / (a / y))
else
tmp = x + 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 <= -1.65e+15) {
tmp = x + t;
} else if (z <= 3.2e+54) {
tmp = x + (t / (a / y));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.65e+15: tmp = x + t elif z <= 3.2e+54: tmp = x + (t / (a / y)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.65e+15) tmp = Float64(x + t); elseif (z <= 3.2e+54) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.65e+15) tmp = x + t; elseif (z <= 3.2e+54) tmp = x + (t / (a / y)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.65e+15], N[(x + t), $MachinePrecision], If[LessEqual[z, 3.2e+54], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+15}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+54}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -1.65e15 or 3.2e54 < z Initial program 70.5%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 77.2%
if -1.65e15 < z < 3.2e54Initial program 94.4%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in z around 0 78.8%
+-commutative78.8%
associate-/l*79.4%
Simplified79.4%
Final simplification78.4%
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ t (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * (t / (a - z)));
}
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 / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * (t / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * (t / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * (t / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t}{a - z}
\end{array}
Initial program 83.7%
associate-*l/97.6%
Simplified97.6%
associate-/r/96.8%
Applied egg-rr96.8%
div-inv96.4%
clear-num96.6%
Applied egg-rr96.6%
Final simplification96.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.45e+129) x (if (<= a 2e+125) (+ x t) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.45e+129) {
tmp = x;
} else if (a <= 2e+125) {
tmp = x + t;
} 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 (a <= (-2.45d+129)) then
tmp = x
else if (a <= 2d+125) then
tmp = x + t
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 (a <= -2.45e+129) {
tmp = x;
} else if (a <= 2e+125) {
tmp = x + t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.45e+129: tmp = x elif a <= 2e+125: tmp = x + t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.45e+129) tmp = x; elseif (a <= 2e+125) tmp = Float64(x + t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.45e+129) tmp = x; elseif (a <= 2e+125) tmp = x + t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.45e+129], x, If[LessEqual[a, 2e+125], N[(x + t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.45 \cdot 10^{+129}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+125}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.45e129 or 1.9999999999999998e125 < a Initial program 82.5%
associate-*l/96.0%
Simplified96.0%
Taylor expanded in x around inf 68.5%
if -2.45e129 < a < 1.9999999999999998e125Initial program 84.2%
associate-*l/98.3%
Simplified98.3%
Taylor expanded in z around inf 61.6%
Final simplification63.6%
(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 83.7%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in x around inf 46.9%
Final simplification46.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y z) (- a z)) t))))
(if (< t -1.0682974490174067e-39)
t_1
(if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} 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 - z) / (a - z)) * t)
if (t < (-1.0682974490174067d-39)) then
tmp = t_1
else if (t < 3.9110949887586375d-141) then
tmp = x + (((y - z) * t) / (a - z))
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 - z) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) / (a - z)) * t) tmp = 0 if t < -1.0682974490174067e-39: tmp = t_1 elif t < 3.9110949887586375e-141: tmp = x + (((y - z) * t) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t)) tmp = 0.0 if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) / (a - z)) * t); tmp = 0.0; if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = x + (((y - z) * t) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.0682974490174067e-39], t$95$1, If[Less[t, 3.9110949887586375e-141], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z} \cdot t\\
\mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023275
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))
(+ x (/ (* (- y z) t) (- a z))))