
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (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 - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (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 - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -1e-266) (not (<= t_1 0.0)))
(fma (/ (- y z) (- a z)) (- t x) x)
(+ t (/ (- x t) (/ z (- y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -1e-266) || !(t_1 <= 0.0)) {
tmp = fma(((y - z) / (a - z)), (t - x), x);
} else {
tmp = t + ((x - t) / (z / (y - a)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -1e-266) || !(t_1 <= 0.0)) tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x); else tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-266], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-266} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.9999999999999998e-267 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 72.4%
+-commutative72.4%
associate-*l/90.0%
fma-def90.0%
Simplified90.0%
if -9.9999999999999998e-267 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.3%
associate-*l/4.3%
Simplified4.3%
Taylor expanded in z around -inf 99.7%
mul-1-neg99.7%
distribute-rgt-out--99.8%
associate-/l*100.0%
Simplified100.0%
Final simplification91.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -1e-266) (not (<= t_1 0.0)))
(+ x (* (- t x) (/ (- y z) (- a z))))
(+ t (/ (- x t) (/ z (- y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -1e-266) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t + ((x - t) / (z / (y - 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) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) * (t - x)) / (a - z))
if ((t_1 <= (-1d-266)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) * ((y - z) / (a - z)))
else
tmp = t + ((x - t) / (z / (y - a)))
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) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -1e-266) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t + ((x - t) / (z / (y - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if (t_1 <= -1e-266) or not (t_1 <= 0.0): tmp = x + ((t - x) * ((y - z) / (a - z))) else: tmp = t + ((x - t) / (z / (y - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -1e-266) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if ((t_1 <= -1e-266) || ~((t_1 <= 0.0))) tmp = x + ((t - x) * ((y - z) / (a - z))); else tmp = t + ((x - t) / (z / (y - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-266], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-266} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.9999999999999998e-267 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 72.4%
associate-*l/90.0%
Simplified90.0%
if -9.9999999999999998e-267 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.3%
associate-*l/4.3%
Simplified4.3%
Taylor expanded in z around -inf 99.7%
mul-1-neg99.7%
distribute-rgt-out--99.8%
associate-/l*100.0%
Simplified100.0%
Final simplification91.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ t (- a z)))))
(if (<= z -9e+109)
t
(if (<= z -3.8e+56)
(/ (* y (- t)) z)
(if (<= z -4.9e+39)
t
(if (<= z -1.96e-16)
x
(if (<= z -2.5e-95)
t_1
(if (<= z -8.2e-139)
x
(if (<= z 1.3e-303) t_1 (if (<= z 3.9e+81) x t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / (a - z));
double tmp;
if (z <= -9e+109) {
tmp = t;
} else if (z <= -3.8e+56) {
tmp = (y * -t) / z;
} else if (z <= -4.9e+39) {
tmp = t;
} else if (z <= -1.96e-16) {
tmp = x;
} else if (z <= -2.5e-95) {
tmp = t_1;
} else if (z <= -8.2e-139) {
tmp = x;
} else if (z <= 1.3e-303) {
tmp = t_1;
} else if (z <= 3.9e+81) {
tmp = x;
} else {
tmp = 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 = y * (t / (a - z))
if (z <= (-9d+109)) then
tmp = t
else if (z <= (-3.8d+56)) then
tmp = (y * -t) / z
else if (z <= (-4.9d+39)) then
tmp = t
else if (z <= (-1.96d-16)) then
tmp = x
else if (z <= (-2.5d-95)) then
tmp = t_1
else if (z <= (-8.2d-139)) then
tmp = x
else if (z <= 1.3d-303) then
tmp = t_1
else if (z <= 3.9d+81) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / (a - z));
double tmp;
if (z <= -9e+109) {
tmp = t;
} else if (z <= -3.8e+56) {
tmp = (y * -t) / z;
} else if (z <= -4.9e+39) {
tmp = t;
} else if (z <= -1.96e-16) {
tmp = x;
} else if (z <= -2.5e-95) {
tmp = t_1;
} else if (z <= -8.2e-139) {
tmp = x;
} else if (z <= 1.3e-303) {
tmp = t_1;
} else if (z <= 3.9e+81) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / (a - z)) tmp = 0 if z <= -9e+109: tmp = t elif z <= -3.8e+56: tmp = (y * -t) / z elif z <= -4.9e+39: tmp = t elif z <= -1.96e-16: tmp = x elif z <= -2.5e-95: tmp = t_1 elif z <= -8.2e-139: tmp = x elif z <= 1.3e-303: tmp = t_1 elif z <= 3.9e+81: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / Float64(a - z))) tmp = 0.0 if (z <= -9e+109) tmp = t; elseif (z <= -3.8e+56) tmp = Float64(Float64(y * Float64(-t)) / z); elseif (z <= -4.9e+39) tmp = t; elseif (z <= -1.96e-16) tmp = x; elseif (z <= -2.5e-95) tmp = t_1; elseif (z <= -8.2e-139) tmp = x; elseif (z <= 1.3e-303) tmp = t_1; elseif (z <= 3.9e+81) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / (a - z)); tmp = 0.0; if (z <= -9e+109) tmp = t; elseif (z <= -3.8e+56) tmp = (y * -t) / z; elseif (z <= -4.9e+39) tmp = t; elseif (z <= -1.96e-16) tmp = x; elseif (z <= -2.5e-95) tmp = t_1; elseif (z <= -8.2e-139) tmp = x; elseif (z <= 1.3e-303) tmp = t_1; elseif (z <= 3.9e+81) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+109], t, If[LessEqual[z, -3.8e+56], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -4.9e+39], t, If[LessEqual[z, -1.96e-16], x, If[LessEqual[z, -2.5e-95], t$95$1, If[LessEqual[z, -8.2e-139], x, If[LessEqual[z, 1.3e-303], t$95$1, If[LessEqual[z, 3.9e+81], x, t]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a - z}\\
\mathbf{if}\;z \leq -9 \cdot 10^{+109}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{+56}:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{+39}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.96 \cdot 10^{-16}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-95}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-139}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-303}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -8.9999999999999992e109 or -3.79999999999999996e56 < z < -4.89999999999999987e39 or 3.9000000000000001e81 < z Initial program 31.6%
associate-*l/65.5%
Simplified65.5%
Taylor expanded in z around inf 58.8%
if -8.9999999999999992e109 < z < -3.79999999999999996e56Initial program 80.9%
associate-*l/89.9%
Simplified89.9%
Taylor expanded in y around -inf 72.1%
Taylor expanded in t around inf 60.6%
*-commutative60.6%
associate-*r/60.5%
Simplified60.5%
Taylor expanded in a around 0 61.0%
*-commutative61.0%
associate-*r/61.0%
mul-1-neg61.0%
distribute-rgt-neg-out61.0%
Simplified61.0%
if -4.89999999999999987e39 < z < -1.96000000000000005e-16 or -2.4999999999999999e-95 < z < -8.20000000000000028e-139 or 1.30000000000000002e-303 < z < 3.9000000000000001e81Initial program 83.2%
associate-*l/89.2%
Simplified89.2%
Taylor expanded in a around inf 42.9%
if -1.96000000000000005e-16 < z < -2.4999999999999999e-95 or -8.20000000000000028e-139 < z < 1.30000000000000002e-303Initial program 88.5%
associate-*l/92.3%
Simplified92.3%
Taylor expanded in y around -inf 61.1%
Taylor expanded in t around inf 46.1%
*-commutative46.1%
associate-*r/52.4%
Simplified52.4%
Final simplification51.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.15e+110)
t
(if (<= z -3.3e+55)
(/ (* y (- t)) z)
(if (<= z -1.15e+29)
(+ x (/ t (/ (- a) z)))
(if (<= z -5e+19)
(/ (- x) (/ (- a z) y))
(if (<= z 7.5e-307)
(+ x (* t (/ y a)))
(if (<= z 2.5e+81) (- x (* x (/ y a))) t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+110) {
tmp = t;
} else if (z <= -3.3e+55) {
tmp = (y * -t) / z;
} else if (z <= -1.15e+29) {
tmp = x + (t / (-a / z));
} else if (z <= -5e+19) {
tmp = -x / ((a - z) / y);
} else if (z <= 7.5e-307) {
tmp = x + (t * (y / a));
} else if (z <= 2.5e+81) {
tmp = x - (x * (y / a));
} else {
tmp = 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.15d+110)) then
tmp = t
else if (z <= (-3.3d+55)) then
tmp = (y * -t) / z
else if (z <= (-1.15d+29)) then
tmp = x + (t / (-a / z))
else if (z <= (-5d+19)) then
tmp = -x / ((a - z) / y)
else if (z <= 7.5d-307) then
tmp = x + (t * (y / a))
else if (z <= 2.5d+81) then
tmp = x - (x * (y / a))
else
tmp = 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.15e+110) {
tmp = t;
} else if (z <= -3.3e+55) {
tmp = (y * -t) / z;
} else if (z <= -1.15e+29) {
tmp = x + (t / (-a / z));
} else if (z <= -5e+19) {
tmp = -x / ((a - z) / y);
} else if (z <= 7.5e-307) {
tmp = x + (t * (y / a));
} else if (z <= 2.5e+81) {
tmp = x - (x * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e+110: tmp = t elif z <= -3.3e+55: tmp = (y * -t) / z elif z <= -1.15e+29: tmp = x + (t / (-a / z)) elif z <= -5e+19: tmp = -x / ((a - z) / y) elif z <= 7.5e-307: tmp = x + (t * (y / a)) elif z <= 2.5e+81: tmp = x - (x * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e+110) tmp = t; elseif (z <= -3.3e+55) tmp = Float64(Float64(y * Float64(-t)) / z); elseif (z <= -1.15e+29) tmp = Float64(x + Float64(t / Float64(Float64(-a) / z))); elseif (z <= -5e+19) tmp = Float64(Float64(-x) / Float64(Float64(a - z) / y)); elseif (z <= 7.5e-307) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 2.5e+81) tmp = Float64(x - Float64(x * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.15e+110) tmp = t; elseif (z <= -3.3e+55) tmp = (y * -t) / z; elseif (z <= -1.15e+29) tmp = x + (t / (-a / z)); elseif (z <= -5e+19) tmp = -x / ((a - z) / y); elseif (z <= 7.5e-307) tmp = x + (t * (y / a)); elseif (z <= 2.5e+81) tmp = x - (x * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+110], t, If[LessEqual[z, -3.3e+55], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -1.15e+29], N[(x + N[(t / N[((-a) / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5e+19], N[((-x) / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-307], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+81], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+110}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{+55}:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{+29}:\\
\;\;\;\;x + \frac{t}{\frac{-a}{z}}\\
\mathbf{elif}\;z \leq -5 \cdot 10^{+19}:\\
\;\;\;\;\frac{-x}{\frac{a - z}{y}}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-307}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+81}:\\
\;\;\;\;x - x \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.15e110 or 2.4999999999999999e81 < z Initial program 31.5%
associate-*l/65.4%
Simplified65.4%
Taylor expanded in z around inf 58.5%
if -1.15e110 < z < -3.3e55Initial program 80.9%
associate-*l/89.9%
Simplified89.9%
Taylor expanded in y around -inf 72.1%
Taylor expanded in t around inf 60.6%
*-commutative60.6%
associate-*r/60.5%
Simplified60.5%
Taylor expanded in a around 0 61.0%
*-commutative61.0%
associate-*r/61.0%
mul-1-neg61.0%
distribute-rgt-neg-out61.0%
Simplified61.0%
if -3.3e55 < z < -1.1500000000000001e29Initial program 52.6%
associate-/l*83.1%
Simplified83.1%
Taylor expanded in t around inf 76.0%
Taylor expanded in a around inf 42.8%
associate-/l*58.6%
Simplified58.6%
Taylor expanded in y around 0 58.6%
associate-*r/58.6%
neg-mul-158.6%
Simplified58.6%
if -1.1500000000000001e29 < z < -5e19Initial program 28.7%
associate-*l/75.7%
Simplified75.7%
Taylor expanded in y around -inf 53.6%
Taylor expanded in t around 0 51.1%
associate-/l*75.2%
associate-*r/75.2%
neg-mul-175.2%
Simplified75.2%
if -5e19 < z < 7.5000000000000006e-307Initial program 86.5%
associate-*l/89.4%
Simplified89.4%
Taylor expanded in z around 0 68.2%
associate-/l*74.3%
associate-/r/74.1%
Simplified74.1%
Taylor expanded in t around inf 61.8%
associate-*r/66.2%
Simplified66.2%
if 7.5000000000000006e-307 < z < 2.4999999999999999e81Initial program 86.6%
associate-*l/91.0%
Simplified91.0%
Taylor expanded in z around 0 73.6%
associate-/l*76.8%
associate-/r/77.9%
Simplified77.9%
Taylor expanded in t around 0 65.6%
mul-1-neg65.6%
*-commutative65.6%
associate-*l/68.8%
distribute-rgt-neg-out68.8%
Simplified68.8%
Final simplification64.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))) (t_2 (- x (* x (/ y a)))))
(if (<= z -5.3e+112)
t
(if (<= z -24000000000.0)
(/ (- y) (/ z (- t x)))
(if (<= z -4e-67)
t_1
(if (<= z -5.4e-110)
t_2
(if (<= z 1.32e-306) t_1 (if (<= z 1e+82) t_2 t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double t_2 = x - (x * (y / a));
double tmp;
if (z <= -5.3e+112) {
tmp = t;
} else if (z <= -24000000000.0) {
tmp = -y / (z / (t - x));
} else if (z <= -4e-67) {
tmp = t_1;
} else if (z <= -5.4e-110) {
tmp = t_2;
} else if (z <= 1.32e-306) {
tmp = t_1;
} else if (z <= 1e+82) {
tmp = t_2;
} else {
tmp = 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) :: t_2
real(8) :: tmp
t_1 = x + (t * (y / a))
t_2 = x - (x * (y / a))
if (z <= (-5.3d+112)) then
tmp = t
else if (z <= (-24000000000.0d0)) then
tmp = -y / (z / (t - x))
else if (z <= (-4d-67)) then
tmp = t_1
else if (z <= (-5.4d-110)) then
tmp = t_2
else if (z <= 1.32d-306) then
tmp = t_1
else if (z <= 1d+82) then
tmp = t_2
else
tmp = 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 + (t * (y / a));
double t_2 = x - (x * (y / a));
double tmp;
if (z <= -5.3e+112) {
tmp = t;
} else if (z <= -24000000000.0) {
tmp = -y / (z / (t - x));
} else if (z <= -4e-67) {
tmp = t_1;
} else if (z <= -5.4e-110) {
tmp = t_2;
} else if (z <= 1.32e-306) {
tmp = t_1;
} else if (z <= 1e+82) {
tmp = t_2;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) t_2 = x - (x * (y / a)) tmp = 0 if z <= -5.3e+112: tmp = t elif z <= -24000000000.0: tmp = -y / (z / (t - x)) elif z <= -4e-67: tmp = t_1 elif z <= -5.4e-110: tmp = t_2 elif z <= 1.32e-306: tmp = t_1 elif z <= 1e+82: tmp = t_2 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) t_2 = Float64(x - Float64(x * Float64(y / a))) tmp = 0.0 if (z <= -5.3e+112) tmp = t; elseif (z <= -24000000000.0) tmp = Float64(Float64(-y) / Float64(z / Float64(t - x))); elseif (z <= -4e-67) tmp = t_1; elseif (z <= -5.4e-110) tmp = t_2; elseif (z <= 1.32e-306) tmp = t_1; elseif (z <= 1e+82) tmp = t_2; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); t_2 = x - (x * (y / a)); tmp = 0.0; if (z <= -5.3e+112) tmp = t; elseif (z <= -24000000000.0) tmp = -y / (z / (t - x)); elseif (z <= -4e-67) tmp = t_1; elseif (z <= -5.4e-110) tmp = t_2; elseif (z <= 1.32e-306) tmp = t_1; elseif (z <= 1e+82) tmp = t_2; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.3e+112], t, If[LessEqual[z, -24000000000.0], N[((-y) / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e-67], t$95$1, If[LessEqual[z, -5.4e-110], t$95$2, If[LessEqual[z, 1.32e-306], t$95$1, If[LessEqual[z, 1e+82], t$95$2, t]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
t_2 := x - x \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -5.3 \cdot 10^{+112}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -24000000000:\\
\;\;\;\;\frac{-y}{\frac{z}{t - x}}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.4 \cdot 10^{-110}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-306}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 10^{+82}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.30000000000000018e112 or 9.9999999999999996e81 < z Initial program 31.5%
associate-*l/65.4%
Simplified65.4%
Taylor expanded in z around inf 58.5%
if -5.30000000000000018e112 < z < -2.4e10Initial program 60.9%
associate-*l/82.2%
Simplified82.2%
Taylor expanded in y around -inf 48.5%
Taylor expanded in a around 0 44.9%
associate-/l*53.0%
associate-*r/53.0%
neg-mul-153.0%
Simplified53.0%
if -2.4e10 < z < -3.99999999999999977e-67 or -5.3999999999999996e-110 < z < 1.32e-306Initial program 86.1%
associate-*l/92.0%
Simplified92.0%
Taylor expanded in z around 0 80.5%
associate-/l*86.7%
associate-/r/86.4%
Simplified86.4%
Taylor expanded in t around inf 78.3%
associate-*r/84.3%
Simplified84.3%
if -3.99999999999999977e-67 < z < -5.3999999999999996e-110 or 1.32e-306 < z < 9.9999999999999996e81Initial program 87.6%
associate-*l/90.4%
Simplified90.4%
Taylor expanded in z around 0 68.8%
associate-/l*72.5%
associate-/r/73.4%
Simplified73.4%
Taylor expanded in t around 0 62.8%
mul-1-neg62.8%
*-commutative62.8%
associate-*l/67.4%
distribute-rgt-neg-out67.4%
Simplified67.4%
Final simplification66.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* x (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= z -1.18e+36)
t_2
(if (<= z -1.75e-16)
t_1
(if (<= z -4.4e-91)
t_2
(if (<= z 1.3e-306)
(+ x (* t (/ y a)))
(if (<= z 1.1e+65) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (x * (y / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1.18e+36) {
tmp = t_2;
} else if (z <= -1.75e-16) {
tmp = t_1;
} else if (z <= -4.4e-91) {
tmp = t_2;
} else if (z <= 1.3e-306) {
tmp = x + (t * (y / a));
} else if (z <= 1.1e+65) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = x - (x * (y / a))
t_2 = t * ((y - z) / (a - z))
if (z <= (-1.18d+36)) then
tmp = t_2
else if (z <= (-1.75d-16)) then
tmp = t_1
else if (z <= (-4.4d-91)) then
tmp = t_2
else if (z <= 1.3d-306) then
tmp = x + (t * (y / a))
else if (z <= 1.1d+65) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (x * (y / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1.18e+36) {
tmp = t_2;
} else if (z <= -1.75e-16) {
tmp = t_1;
} else if (z <= -4.4e-91) {
tmp = t_2;
} else if (z <= 1.3e-306) {
tmp = x + (t * (y / a));
} else if (z <= 1.1e+65) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (x * (y / a)) t_2 = t * ((y - z) / (a - z)) tmp = 0 if z <= -1.18e+36: tmp = t_2 elif z <= -1.75e-16: tmp = t_1 elif z <= -4.4e-91: tmp = t_2 elif z <= 1.3e-306: tmp = x + (t * (y / a)) elif z <= 1.1e+65: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(x * Float64(y / a))) t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -1.18e+36) tmp = t_2; elseif (z <= -1.75e-16) tmp = t_1; elseif (z <= -4.4e-91) tmp = t_2; elseif (z <= 1.3e-306) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 1.1e+65) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (x * (y / a)); t_2 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -1.18e+36) tmp = t_2; elseif (z <= -1.75e-16) tmp = t_1; elseif (z <= -4.4e-91) tmp = t_2; elseif (z <= 1.3e-306) tmp = x + (t * (y / a)); elseif (z <= 1.1e+65) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.18e+36], t$95$2, If[LessEqual[z, -1.75e-16], t$95$1, If[LessEqual[z, -4.4e-91], t$95$2, If[LessEqual[z, 1.3e-306], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+65], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - x \cdot \frac{y}{a}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.18 \cdot 10^{+36}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-91}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-306}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+65}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.17999999999999997e36 or -1.75000000000000009e-16 < z < -4.4000000000000002e-91 or 1.0999999999999999e65 < z Initial program 46.1%
associate-*l/72.2%
Simplified72.2%
Taylor expanded in x around 0 47.9%
associate-*r/66.6%
Simplified66.6%
if -1.17999999999999997e36 < z < -1.75000000000000009e-16 or 1.3e-306 < z < 1.0999999999999999e65Initial program 83.9%
associate-*l/90.8%
Simplified90.8%
Taylor expanded in z around 0 72.2%
associate-/l*77.0%
associate-/r/78.1%
Simplified78.1%
Taylor expanded in t around 0 64.0%
mul-1-neg64.0%
*-commutative64.0%
associate-*l/68.9%
distribute-rgt-neg-out68.9%
Simplified68.9%
if -4.4000000000000002e-91 < z < 1.3e-306Initial program 82.1%
associate-*l/86.6%
Simplified86.6%
Taylor expanded in z around 0 72.2%
associate-/l*84.6%
associate-/r/81.7%
Simplified81.7%
Taylor expanded in t around inf 72.1%
associate-*r/79.2%
Simplified79.2%
Final simplification69.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.2e+39)
t
(if (<= z -1.55e-17)
x
(if (<= z -1.08e-64)
(* t (/ y a))
(if (<= z -6.2e-89)
(/ (- x) (/ a y))
(if (<= z -5.5e-140)
x
(if (<= z 1.15e-305) (* y (/ t a)) (if (<= z 6.2e+81) x t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.2e+39) {
tmp = t;
} else if (z <= -1.55e-17) {
tmp = x;
} else if (z <= -1.08e-64) {
tmp = t * (y / a);
} else if (z <= -6.2e-89) {
tmp = -x / (a / y);
} else if (z <= -5.5e-140) {
tmp = x;
} else if (z <= 1.15e-305) {
tmp = y * (t / a);
} else if (z <= 6.2e+81) {
tmp = x;
} else {
tmp = 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 <= (-6.2d+39)) then
tmp = t
else if (z <= (-1.55d-17)) then
tmp = x
else if (z <= (-1.08d-64)) then
tmp = t * (y / a)
else if (z <= (-6.2d-89)) then
tmp = -x / (a / y)
else if (z <= (-5.5d-140)) then
tmp = x
else if (z <= 1.15d-305) then
tmp = y * (t / a)
else if (z <= 6.2d+81) then
tmp = x
else
tmp = 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 <= -6.2e+39) {
tmp = t;
} else if (z <= -1.55e-17) {
tmp = x;
} else if (z <= -1.08e-64) {
tmp = t * (y / a);
} else if (z <= -6.2e-89) {
tmp = -x / (a / y);
} else if (z <= -5.5e-140) {
tmp = x;
} else if (z <= 1.15e-305) {
tmp = y * (t / a);
} else if (z <= 6.2e+81) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.2e+39: tmp = t elif z <= -1.55e-17: tmp = x elif z <= -1.08e-64: tmp = t * (y / a) elif z <= -6.2e-89: tmp = -x / (a / y) elif z <= -5.5e-140: tmp = x elif z <= 1.15e-305: tmp = y * (t / a) elif z <= 6.2e+81: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.2e+39) tmp = t; elseif (z <= -1.55e-17) tmp = x; elseif (z <= -1.08e-64) tmp = Float64(t * Float64(y / a)); elseif (z <= -6.2e-89) tmp = Float64(Float64(-x) / Float64(a / y)); elseif (z <= -5.5e-140) tmp = x; elseif (z <= 1.15e-305) tmp = Float64(y * Float64(t / a)); elseif (z <= 6.2e+81) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.2e+39) tmp = t; elseif (z <= -1.55e-17) tmp = x; elseif (z <= -1.08e-64) tmp = t * (y / a); elseif (z <= -6.2e-89) tmp = -x / (a / y); elseif (z <= -5.5e-140) tmp = x; elseif (z <= 1.15e-305) tmp = y * (t / a); elseif (z <= 6.2e+81) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.2e+39], t, If[LessEqual[z, -1.55e-17], x, If[LessEqual[z, -1.08e-64], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-89], N[((-x) / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.5e-140], x, If[LessEqual[z, 1.15e-305], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+81], x, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+39}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-17}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.08 \cdot 10^{-64}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-89}:\\
\;\;\;\;\frac{-x}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-140}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-305}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.2000000000000005e39 or 6.2e81 < z Initial program 36.5%
associate-*l/67.9%
Simplified67.9%
Taylor expanded in z around inf 54.3%
if -6.2000000000000005e39 < z < -1.5499999999999999e-17 or -6.19999999999999993e-89 < z < -5.50000000000000026e-140 or 1.15e-305 < z < 6.2e81Initial program 83.5%
associate-*l/88.6%
Simplified88.6%
Taylor expanded in a around inf 42.2%
if -1.5499999999999999e-17 < z < -1.0799999999999999e-64Initial program 94.4%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in y around -inf 52.2%
Taylor expanded in t around inf 40.3%
*-commutative40.3%
associate-*r/28.6%
Simplified28.6%
Taylor expanded in a around inf 28.1%
Taylor expanded in y around 0 39.8%
associate-*r/39.8%
Simplified39.8%
if -1.0799999999999999e-64 < z < -6.19999999999999993e-89Initial program 99.8%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around -inf 87.5%
Taylor expanded in t around 0 38.5%
associate-*r/38.5%
mul-1-neg38.5%
distribute-lft-neg-out38.5%
*-commutative38.5%
Simplified38.5%
Taylor expanded in a around inf 51.1%
mul-1-neg51.1%
associate-/l*51.1%
Simplified51.1%
if -5.50000000000000026e-140 < z < 1.15e-305Initial program 82.5%
associate-*l/92.2%
Simplified92.2%
Taylor expanded in y around -inf 56.7%
Taylor expanded in t around inf 49.5%
*-commutative49.5%
associate-*r/63.3%
Simplified63.3%
Taylor expanded in a around inf 63.3%
Final simplification49.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -2.3e+39)
t_1
(if (<= z -6e-96)
(* y (/ (- t x) (- a z)))
(if (<= z 1.05e-307)
(+ x (* t (/ y a)))
(if (<= z 1.25e+64) (- x (* x (/ y a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2.3e+39) {
tmp = t_1;
} else if (z <= -6e-96) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 1.05e-307) {
tmp = x + (t * (y / a));
} else if (z <= 1.25e+64) {
tmp = x - (x * (y / 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 = t * ((y - z) / (a - z))
if (z <= (-2.3d+39)) then
tmp = t_1
else if (z <= (-6d-96)) then
tmp = y * ((t - x) / (a - z))
else if (z <= 1.05d-307) then
tmp = x + (t * (y / a))
else if (z <= 1.25d+64) then
tmp = x - (x * (y / 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 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2.3e+39) {
tmp = t_1;
} else if (z <= -6e-96) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 1.05e-307) {
tmp = x + (t * (y / a));
} else if (z <= 1.25e+64) {
tmp = x - (x * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -2.3e+39: tmp = t_1 elif z <= -6e-96: tmp = y * ((t - x) / (a - z)) elif z <= 1.05e-307: tmp = x + (t * (y / a)) elif z <= 1.25e+64: tmp = x - (x * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -2.3e+39) tmp = t_1; elseif (z <= -6e-96) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (z <= 1.05e-307) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 1.25e+64) tmp = Float64(x - Float64(x * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -2.3e+39) tmp = t_1; elseif (z <= -6e-96) tmp = y * ((t - x) / (a - z)); elseif (z <= 1.05e-307) tmp = x + (t * (y / a)); elseif (z <= 1.25e+64) tmp = x - (x * (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+39], t$95$1, If[LessEqual[z, -6e-96], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-307], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+64], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-96}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-307}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+64}:\\
\;\;\;\;x - x \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.30000000000000012e39 or 1.25e64 < z Initial program 37.9%
associate-*l/68.2%
Simplified68.2%
Taylor expanded in x around 0 45.9%
associate-*r/67.6%
Simplified67.6%
if -2.30000000000000012e39 < z < -6e-96Initial program 83.1%
associate-*l/89.3%
Simplified89.3%
Taylor expanded in y around inf 57.0%
div-sub57.0%
Simplified57.0%
if -6e-96 < z < 1.0500000000000001e-307Initial program 81.7%
associate-*l/88.8%
Simplified88.8%
Taylor expanded in z around 0 74.0%
associate-/l*86.7%
associate-/r/83.7%
Simplified83.7%
Taylor expanded in t around inf 73.9%
associate-*r/81.1%
Simplified81.1%
if 1.0500000000000001e-307 < z < 1.25e64Initial program 87.2%
associate-*l/91.7%
Simplified91.7%
Taylor expanded in z around 0 75.8%
associate-/l*79.2%
associate-/r/80.4%
Simplified80.4%
Taylor expanded in t around 0 67.5%
mul-1-neg67.5%
*-commutative67.5%
associate-*l/70.8%
distribute-rgt-neg-out70.8%
Simplified70.8%
Final simplification69.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.05e+110)
t
(if (<= z -5.1e+51)
(/ y (/ z (- t)))
(if (<= z -4.2e+37)
t
(if (<= z -1.15e-142)
x
(if (<= z 1.7e-306) (* y (/ t a)) (if (<= z 5.5e+81) x t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.05e+110) {
tmp = t;
} else if (z <= -5.1e+51) {
tmp = y / (z / -t);
} else if (z <= -4.2e+37) {
tmp = t;
} else if (z <= -1.15e-142) {
tmp = x;
} else if (z <= 1.7e-306) {
tmp = y * (t / a);
} else if (z <= 5.5e+81) {
tmp = x;
} else {
tmp = 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.05d+110)) then
tmp = t
else if (z <= (-5.1d+51)) then
tmp = y / (z / -t)
else if (z <= (-4.2d+37)) then
tmp = t
else if (z <= (-1.15d-142)) then
tmp = x
else if (z <= 1.7d-306) then
tmp = y * (t / a)
else if (z <= 5.5d+81) then
tmp = x
else
tmp = 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.05e+110) {
tmp = t;
} else if (z <= -5.1e+51) {
tmp = y / (z / -t);
} else if (z <= -4.2e+37) {
tmp = t;
} else if (z <= -1.15e-142) {
tmp = x;
} else if (z <= 1.7e-306) {
tmp = y * (t / a);
} else if (z <= 5.5e+81) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.05e+110: tmp = t elif z <= -5.1e+51: tmp = y / (z / -t) elif z <= -4.2e+37: tmp = t elif z <= -1.15e-142: tmp = x elif z <= 1.7e-306: tmp = y * (t / a) elif z <= 5.5e+81: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.05e+110) tmp = t; elseif (z <= -5.1e+51) tmp = Float64(y / Float64(z / Float64(-t))); elseif (z <= -4.2e+37) tmp = t; elseif (z <= -1.15e-142) tmp = x; elseif (z <= 1.7e-306) tmp = Float64(y * Float64(t / a)); elseif (z <= 5.5e+81) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.05e+110) tmp = t; elseif (z <= -5.1e+51) tmp = y / (z / -t); elseif (z <= -4.2e+37) tmp = t; elseif (z <= -1.15e-142) tmp = x; elseif (z <= 1.7e-306) tmp = y * (t / a); elseif (z <= 5.5e+81) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.05e+110], t, If[LessEqual[z, -5.1e+51], N[(y / N[(z / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e+37], t, If[LessEqual[z, -1.15e-142], x, If[LessEqual[z, 1.7e-306], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+81], x, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+110}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.1 \cdot 10^{+51}:\\
\;\;\;\;\frac{y}{\frac{z}{-t}}\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{+37}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-142}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-306}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.05000000000000007e110 or -5.1000000000000001e51 < z < -4.2000000000000002e37 or 5.5000000000000003e81 < z Initial program 31.6%
associate-*l/65.5%
Simplified65.5%
Taylor expanded in z around inf 58.8%
if -1.05000000000000007e110 < z < -5.1000000000000001e51Initial program 80.9%
associate-*l/89.9%
Simplified89.9%
Taylor expanded in y around -inf 72.1%
Taylor expanded in t around inf 60.6%
*-commutative60.6%
associate-*r/60.5%
Simplified60.5%
Taylor expanded in a around 0 61.0%
*-commutative61.0%
associate-*r/61.0%
mul-1-neg61.0%
distribute-rgt-neg-out61.0%
associate-/l*60.8%
Simplified60.8%
if -4.2000000000000002e37 < z < -1.15000000000000001e-142 or 1.6999999999999999e-306 < z < 5.5000000000000003e81Initial program 85.2%
associate-*l/89.7%
Simplified89.7%
Taylor expanded in a around inf 38.8%
if -1.15000000000000001e-142 < z < 1.6999999999999999e-306Initial program 82.5%
associate-*l/92.2%
Simplified92.2%
Taylor expanded in y around -inf 56.7%
Taylor expanded in t around inf 49.5%
*-commutative49.5%
associate-*r/63.3%
Simplified63.3%
Taylor expanded in a around inf 63.3%
Final simplification49.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.9e+110)
t
(if (<= z -3.6e+56)
(/ (* y (- t)) z)
(if (<= z -8e+38)
t
(if (<= z -4.5e-137)
x
(if (<= z 4.7e-306) (* y (/ t a)) (if (<= z 7.9e+80) x t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.9e+110) {
tmp = t;
} else if (z <= -3.6e+56) {
tmp = (y * -t) / z;
} else if (z <= -8e+38) {
tmp = t;
} else if (z <= -4.5e-137) {
tmp = x;
} else if (z <= 4.7e-306) {
tmp = y * (t / a);
} else if (z <= 7.9e+80) {
tmp = x;
} else {
tmp = 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 <= (-5.9d+110)) then
tmp = t
else if (z <= (-3.6d+56)) then
tmp = (y * -t) / z
else if (z <= (-8d+38)) then
tmp = t
else if (z <= (-4.5d-137)) then
tmp = x
else if (z <= 4.7d-306) then
tmp = y * (t / a)
else if (z <= 7.9d+80) then
tmp = x
else
tmp = 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 <= -5.9e+110) {
tmp = t;
} else if (z <= -3.6e+56) {
tmp = (y * -t) / z;
} else if (z <= -8e+38) {
tmp = t;
} else if (z <= -4.5e-137) {
tmp = x;
} else if (z <= 4.7e-306) {
tmp = y * (t / a);
} else if (z <= 7.9e+80) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.9e+110: tmp = t elif z <= -3.6e+56: tmp = (y * -t) / z elif z <= -8e+38: tmp = t elif z <= -4.5e-137: tmp = x elif z <= 4.7e-306: tmp = y * (t / a) elif z <= 7.9e+80: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.9e+110) tmp = t; elseif (z <= -3.6e+56) tmp = Float64(Float64(y * Float64(-t)) / z); elseif (z <= -8e+38) tmp = t; elseif (z <= -4.5e-137) tmp = x; elseif (z <= 4.7e-306) tmp = Float64(y * Float64(t / a)); elseif (z <= 7.9e+80) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.9e+110) tmp = t; elseif (z <= -3.6e+56) tmp = (y * -t) / z; elseif (z <= -8e+38) tmp = t; elseif (z <= -4.5e-137) tmp = x; elseif (z <= 4.7e-306) tmp = y * (t / a); elseif (z <= 7.9e+80) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.9e+110], t, If[LessEqual[z, -3.6e+56], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -8e+38], t, If[LessEqual[z, -4.5e-137], x, If[LessEqual[z, 4.7e-306], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.9e+80], x, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.9 \cdot 10^{+110}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{+56}:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\
\mathbf{elif}\;z \leq -8 \cdot 10^{+38}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-137}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-306}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 7.9 \cdot 10^{+80}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.8999999999999997e110 or -3.59999999999999998e56 < z < -7.99999999999999982e38 or 7.89999999999999999e80 < z Initial program 31.6%
associate-*l/65.5%
Simplified65.5%
Taylor expanded in z around inf 58.8%
if -5.8999999999999997e110 < z < -3.59999999999999998e56Initial program 80.9%
associate-*l/89.9%
Simplified89.9%
Taylor expanded in y around -inf 72.1%
Taylor expanded in t around inf 60.6%
*-commutative60.6%
associate-*r/60.5%
Simplified60.5%
Taylor expanded in a around 0 61.0%
*-commutative61.0%
associate-*r/61.0%
mul-1-neg61.0%
distribute-rgt-neg-out61.0%
Simplified61.0%
if -7.99999999999999982e38 < z < -4.4999999999999997e-137 or 4.7000000000000001e-306 < z < 7.89999999999999999e80Initial program 85.2%
associate-*l/89.7%
Simplified89.7%
Taylor expanded in a around inf 38.8%
if -4.4999999999999997e-137 < z < 4.7000000000000001e-306Initial program 82.5%
associate-*l/92.2%
Simplified92.2%
Taylor expanded in y around -inf 56.7%
Taylor expanded in t around inf 49.5%
*-commutative49.5%
associate-*r/63.3%
Simplified63.3%
Taylor expanded in a around inf 63.3%
Final simplification49.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.95e+114) (not (<= z 1.15e+68))) (* t (/ (- y z) (- a z))) (+ x (* (- t x) (/ y (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.95e+114) || !(z <= 1.15e+68)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (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 <= (-1.95d+114)) .or. (.not. (z <= 1.15d+68))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((t - x) * (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 <= -1.95e+114) || !(z <= 1.15e+68)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.95e+114) or not (z <= 1.15e+68): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.95e+114) || !(z <= 1.15e+68)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.95e+114) || ~((z <= 1.15e+68))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.95e+114], N[Not[LessEqual[z, 1.15e+68]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+114} \lor \neg \left(z \leq 1.15 \cdot 10^{+68}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -1.95e114 or 1.15e68 < z Initial program 33.7%
associate-*l/65.5%
Simplified65.5%
Taylor expanded in x around 0 43.0%
associate-*r/67.0%
Simplified67.0%
if -1.95e114 < z < 1.15e68Initial program 83.4%
associate-*l/90.1%
Simplified90.1%
Taylor expanded in y around inf 82.4%
Final simplification76.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.1e+38) (not (<= z 4.6e+36))) (+ t (/ (- x t) (/ z (- y a)))) (+ x (* (- t x) (/ y (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.1e+38) || !(z <= 4.6e+36)) {
tmp = t + ((x - t) / (z / (y - a)));
} else {
tmp = x + ((t - x) * (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 <= (-1.1d+38)) .or. (.not. (z <= 4.6d+36))) then
tmp = t + ((x - t) / (z / (y - a)))
else
tmp = x + ((t - x) * (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 <= -1.1e+38) || !(z <= 4.6e+36)) {
tmp = t + ((x - t) / (z / (y - a)));
} else {
tmp = x + ((t - x) * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.1e+38) or not (z <= 4.6e+36): tmp = t + ((x - t) / (z / (y - a))) else: tmp = x + ((t - x) * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.1e+38) || !(z <= 4.6e+36)) tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.1e+38) || ~((z <= 4.6e+36))) tmp = t + ((x - t) / (z / (y - a))); else tmp = x + ((t - x) * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.1e+38], N[Not[LessEqual[z, 4.6e+36]], $MachinePrecision]], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+38} \lor \neg \left(z \leq 4.6 \cdot 10^{+36}\right):\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -1.10000000000000003e38 or 4.59999999999999993e36 < z Initial program 37.6%
associate-*l/66.7%
Simplified66.7%
Taylor expanded in z around -inf 62.8%
mul-1-neg62.8%
distribute-rgt-out--63.0%
associate-/l*83.0%
Simplified83.0%
if -1.10000000000000003e38 < z < 4.59999999999999993e36Initial program 86.5%
associate-*l/92.2%
Simplified92.2%
Taylor expanded in y around inf 84.9%
Final simplification84.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.8e+116)
t
(if (<= z 4.5e-307)
(+ x (* t (/ y a)))
(if (<= z 1.82e+81) (- x (* x (/ y a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.8e+116) {
tmp = t;
} else if (z <= 4.5e-307) {
tmp = x + (t * (y / a));
} else if (z <= 1.82e+81) {
tmp = x - (x * (y / a));
} else {
tmp = 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 <= (-5.8d+116)) then
tmp = t
else if (z <= 4.5d-307) then
tmp = x + (t * (y / a))
else if (z <= 1.82d+81) then
tmp = x - (x * (y / a))
else
tmp = 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 <= -5.8e+116) {
tmp = t;
} else if (z <= 4.5e-307) {
tmp = x + (t * (y / a));
} else if (z <= 1.82e+81) {
tmp = x - (x * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.8e+116: tmp = t elif z <= 4.5e-307: tmp = x + (t * (y / a)) elif z <= 1.82e+81: tmp = x - (x * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.8e+116) tmp = t; elseif (z <= 4.5e-307) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 1.82e+81) tmp = Float64(x - Float64(x * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.8e+116) tmp = t; elseif (z <= 4.5e-307) tmp = x + (t * (y / a)); elseif (z <= 1.82e+81) tmp = x - (x * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.8e+116], t, If[LessEqual[z, 4.5e-307], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.82e+81], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+116}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-307}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.82 \cdot 10^{+81}:\\
\;\;\;\;x - x \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.8000000000000003e116 or 1.82000000000000003e81 < z Initial program 31.8%
associate-*l/65.0%
Simplified65.0%
Taylor expanded in z around inf 59.1%
if -5.8000000000000003e116 < z < 4.49999999999999989e-307Initial program 79.5%
associate-*l/88.5%
Simplified88.5%
Taylor expanded in z around 0 59.7%
associate-/l*67.6%
associate-/r/67.6%
Simplified67.6%
Taylor expanded in t around inf 53.9%
associate-*r/58.3%
Simplified58.3%
if 4.49999999999999989e-307 < z < 1.82000000000000003e81Initial program 86.6%
associate-*l/91.0%
Simplified91.0%
Taylor expanded in z around 0 73.6%
associate-/l*76.8%
associate-/r/77.9%
Simplified77.9%
Taylor expanded in t around 0 65.6%
mul-1-neg65.6%
*-commutative65.6%
associate-*l/68.8%
distribute-rgt-neg-out68.8%
Simplified68.8%
Final simplification62.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.2e+38) (not (<= z 3.6e+64))) (* t (/ (- y z) (- a z))) (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.2e+38) || !(z <= 3.6e+64)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / 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.2d+38)) .or. (.not. (z <= 3.6d+64))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((t - x) * (y / 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.2e+38) || !(z <= 3.6e+64)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.2e+38) or not (z <= 3.6e+64): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.2e+38) || !(z <= 3.6e+64)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.2e+38) || ~((z <= 3.6e+64))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.2e+38], N[Not[LessEqual[z, 3.6e+64]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+38} \lor \neg \left(z \leq 3.6 \cdot 10^{+64}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -6.20000000000000035e38 or 3.60000000000000014e64 < z Initial program 37.9%
associate-*l/68.2%
Simplified68.2%
Taylor expanded in x around 0 45.9%
associate-*r/67.6%
Simplified67.6%
if -6.20000000000000035e38 < z < 3.60000000000000014e64Initial program 85.0%
associate-*l/90.5%
Simplified90.5%
Taylor expanded in z around 0 70.8%
associate-/l*76.3%
associate-/r/76.9%
Simplified76.9%
Final simplification73.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.5e+37)
t
(if (<= z -3.5e-139)
x
(if (<= z 5e-303) (* t (/ y a)) (if (<= z 1.1e+82) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+37) {
tmp = t;
} else if (z <= -3.5e-139) {
tmp = x;
} else if (z <= 5e-303) {
tmp = t * (y / a);
} else if (z <= 1.1e+82) {
tmp = x;
} else {
tmp = 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 <= (-6.5d+37)) then
tmp = t
else if (z <= (-3.5d-139)) then
tmp = x
else if (z <= 5d-303) then
tmp = t * (y / a)
else if (z <= 1.1d+82) then
tmp = x
else
tmp = 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 <= -6.5e+37) {
tmp = t;
} else if (z <= -3.5e-139) {
tmp = x;
} else if (z <= 5e-303) {
tmp = t * (y / a);
} else if (z <= 1.1e+82) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e+37: tmp = t elif z <= -3.5e-139: tmp = x elif z <= 5e-303: tmp = t * (y / a) elif z <= 1.1e+82: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e+37) tmp = t; elseif (z <= -3.5e-139) tmp = x; elseif (z <= 5e-303) tmp = Float64(t * Float64(y / a)); elseif (z <= 1.1e+82) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e+37) tmp = t; elseif (z <= -3.5e-139) tmp = x; elseif (z <= 5e-303) tmp = t * (y / a); elseif (z <= 1.1e+82) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e+37], t, If[LessEqual[z, -3.5e-139], x, If[LessEqual[z, 5e-303], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+82], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+37}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-139}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-303}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+82}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.4999999999999998e37 or 1.1000000000000001e82 < z Initial program 36.5%
associate-*l/67.9%
Simplified67.9%
Taylor expanded in z around inf 54.3%
if -6.4999999999999998e37 < z < -3.50000000000000001e-139 or 4.9999999999999998e-303 < z < 1.1000000000000001e82Initial program 85.2%
associate-*l/89.7%
Simplified89.7%
Taylor expanded in a around inf 38.8%
if -3.50000000000000001e-139 < z < 4.9999999999999998e-303Initial program 82.5%
associate-*l/92.2%
Simplified92.2%
Taylor expanded in y around -inf 56.7%
Taylor expanded in t around inf 49.5%
*-commutative49.5%
associate-*r/63.3%
Simplified63.3%
Taylor expanded in a around inf 63.3%
Taylor expanded in y around 0 49.5%
associate-*r/59.3%
Simplified59.3%
Final simplification47.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.52e+38)
t
(if (<= z -2.55e-141)
x
(if (<= z 1.25e-302) (* y (/ t a)) (if (<= z 1.02e+82) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.52e+38) {
tmp = t;
} else if (z <= -2.55e-141) {
tmp = x;
} else if (z <= 1.25e-302) {
tmp = y * (t / a);
} else if (z <= 1.02e+82) {
tmp = x;
} else {
tmp = 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.52d+38)) then
tmp = t
else if (z <= (-2.55d-141)) then
tmp = x
else if (z <= 1.25d-302) then
tmp = y * (t / a)
else if (z <= 1.02d+82) then
tmp = x
else
tmp = 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.52e+38) {
tmp = t;
} else if (z <= -2.55e-141) {
tmp = x;
} else if (z <= 1.25e-302) {
tmp = y * (t / a);
} else if (z <= 1.02e+82) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.52e+38: tmp = t elif z <= -2.55e-141: tmp = x elif z <= 1.25e-302: tmp = y * (t / a) elif z <= 1.02e+82: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.52e+38) tmp = t; elseif (z <= -2.55e-141) tmp = x; elseif (z <= 1.25e-302) tmp = Float64(y * Float64(t / a)); elseif (z <= 1.02e+82) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.52e+38) tmp = t; elseif (z <= -2.55e-141) tmp = x; elseif (z <= 1.25e-302) tmp = y * (t / a); elseif (z <= 1.02e+82) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.52e+38], t, If[LessEqual[z, -2.55e-141], x, If[LessEqual[z, 1.25e-302], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+82], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.52 \cdot 10^{+38}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-141}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-302}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+82}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.51999999999999996e38 or 1.0200000000000001e82 < z Initial program 36.5%
associate-*l/67.9%
Simplified67.9%
Taylor expanded in z around inf 54.3%
if -1.51999999999999996e38 < z < -2.54999999999999989e-141 or 1.25000000000000008e-302 < z < 1.0200000000000001e82Initial program 85.2%
associate-*l/89.7%
Simplified89.7%
Taylor expanded in a around inf 38.8%
if -2.54999999999999989e-141 < z < 1.25000000000000008e-302Initial program 82.5%
associate-*l/92.2%
Simplified92.2%
Taylor expanded in y around -inf 56.7%
Taylor expanded in t around inf 49.5%
*-commutative49.5%
associate-*r/63.3%
Simplified63.3%
Taylor expanded in a around inf 63.3%
Final simplification47.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.4e+113) t (if (<= z 1.2e+81) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+113) {
tmp = t;
} else if (z <= 1.2e+81) {
tmp = x + (t * (y / a));
} else {
tmp = 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.4d+113)) then
tmp = t
else if (z <= 1.2d+81) then
tmp = x + (t * (y / a))
else
tmp = 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.4e+113) {
tmp = t;
} else if (z <= 1.2e+81) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.4e+113: tmp = t elif z <= 1.2e+81: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.4e+113) tmp = t; elseif (z <= 1.2e+81) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.4e+113) tmp = t; elseif (z <= 1.2e+81) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e+113], t, If[LessEqual[z, 1.2e+81], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+113}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+81}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.39999999999999983e113 or 1.19999999999999995e81 < z Initial program 31.8%
associate-*l/65.0%
Simplified65.0%
Taylor expanded in z around inf 59.1%
if -2.39999999999999983e113 < z < 1.19999999999999995e81Initial program 83.2%
associate-*l/89.8%
Simplified89.8%
Taylor expanded in z around 0 66.9%
associate-/l*72.4%
associate-/r/72.9%
Simplified72.9%
Taylor expanded in t around inf 52.7%
associate-*r/55.9%
Simplified55.9%
Final simplification57.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.7e+38) t (if (<= z 3.05e+81) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e+38) {
tmp = t;
} else if (z <= 3.05e+81) {
tmp = x;
} else {
tmp = 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.7d+38)) then
tmp = t
else if (z <= 3.05d+81) then
tmp = x
else
tmp = 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.7e+38) {
tmp = t;
} else if (z <= 3.05e+81) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.7e+38: tmp = t elif z <= 3.05e+81: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.7e+38) tmp = t; elseif (z <= 3.05e+81) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.7e+38) tmp = t; elseif (z <= 3.05e+81) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e+38], t, If[LessEqual[z, 3.05e+81], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+38}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.69999999999999998e38 or 3.05000000000000019e81 < z Initial program 36.5%
associate-*l/67.9%
Simplified67.9%
Taylor expanded in z around inf 54.3%
if -1.69999999999999998e38 < z < 3.05000000000000019e81Initial program 84.8%
associate-*l/90.1%
Simplified90.1%
Taylor expanded in a around inf 37.5%
Final simplification44.2%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return 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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 65.5%
associate-*l/81.3%
Simplified81.3%
Taylor expanded in z around inf 26.8%
Final simplification26.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} 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 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
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 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023301
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))
(+ x (/ (* (- y z) (- t x)) (- a z))))