
(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(Float64(x - 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[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y \cdot z}{t - a \cdot z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (- x (* y z)) (- t (* 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(Float64(x - 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[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y \cdot z}{t - a \cdot z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x (* y z)) (- t (* z a)))))
(if (<= t_1 -4e-284)
t_1
(if (<= t_1 0.0)
(/ (/ (- (* y z) x) a) z)
(if (<= t_1 1e+308) t_1 (/ (- y (/ x z)) a))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / (t - (z * a));
double tmp;
if (t_1 <= -4e-284) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (((y * z) - x) / a) / z;
} else if (t_1 <= 1e+308) {
tmp = t_1;
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (x - (y * z)) / (t - (z * a))
if (t_1 <= (-4d-284)) then
tmp = t_1
else if (t_1 <= 0.0d0) then
tmp = (((y * z) - x) / a) / z
else if (t_1 <= 1d+308) then
tmp = t_1
else
tmp = (y - (x / z)) / 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 - (z * a));
double tmp;
if (t_1 <= -4e-284) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (((y * z) - x) / a) / z;
} else if (t_1 <= 1e+308) {
tmp = t_1;
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - (y * z)) / (t - (z * a)) tmp = 0 if t_1 <= -4e-284: tmp = t_1 elif t_1 <= 0.0: tmp = (((y * z) - x) / a) / z elif t_1 <= 1e+308: tmp = t_1 else: tmp = (y - (x / z)) / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(z * a))) tmp = 0.0 if (t_1 <= -4e-284) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(Float64(y * z) - x) / a) / z); elseif (t_1 <= 1e+308) tmp = t_1; else tmp = Float64(Float64(y - Float64(x / z)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - (y * z)) / (t - (z * a)); tmp = 0.0; if (t_1 <= -4e-284) tmp = t_1; elseif (t_1 <= 0.0) tmp = (((y * z) - x) / a) / z; elseif (t_1 <= 1e+308) tmp = t_1; else tmp = (y - (x / z)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e-284], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / a), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 1e+308], t$95$1, N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y \cdot z}{t - z \cdot a}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-284}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\frac{y \cdot z - x}{a}}{z}\\
\mathbf{elif}\;t\_1 \leq 10^{+308}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -4.00000000000000015e-284 or -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 1e308Initial program 98.8%
if -4.00000000000000015e-284 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -0.0Initial program 37.1%
*-commutative37.1%
Simplified37.1%
Taylor expanded in t around 0 30.8%
mul-1-neg30.8%
associate-/r*96.6%
distribute-neg-frac296.6%
Simplified96.6%
if 1e308 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 48.3%
*-commutative48.3%
Simplified48.3%
Taylor expanded in t around 0 40.6%
mul-1-neg40.6%
associate-/r*41.4%
distribute-neg-frac241.4%
Simplified41.4%
Taylor expanded in x around 0 81.6%
+-commutative81.6%
mul-1-neg81.6%
unsub-neg81.6%
associate-/r*73.9%
Simplified73.9%
Taylor expanded in y around 0 81.6%
+-commutative81.6%
neg-mul-181.6%
unsub-neg81.6%
associate-/l/81.6%
div-sub81.6%
Simplified81.6%
Final simplification96.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y z) (- t))) (t_2 (/ (/ (- x) z) a)))
(if (<= z -1.35e+178)
(/ y a)
(if (<= z -4.2e+42)
t_2
(if (<= z -1.06e-88)
(/ x t)
(if (<= z -3.5e-159)
t_1
(if (<= z 9.6e-64)
(/ x t)
(if (<= z 1.4e+49)
t_1
(if (<= z 2.6e+113)
t_2
(if (<= z 4.5e+152) (* y (/ z (- t))) (/ y a)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / -t;
double t_2 = (-x / z) / a;
double tmp;
if (z <= -1.35e+178) {
tmp = y / a;
} else if (z <= -4.2e+42) {
tmp = t_2;
} else if (z <= -1.06e-88) {
tmp = x / t;
} else if (z <= -3.5e-159) {
tmp = t_1;
} else if (z <= 9.6e-64) {
tmp = x / t;
} else if (z <= 1.4e+49) {
tmp = t_1;
} else if (z <= 2.6e+113) {
tmp = t_2;
} else if (z <= 4.5e+152) {
tmp = y * (z / -t);
} else {
tmp = 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) :: t_2
real(8) :: tmp
t_1 = (y * z) / -t
t_2 = (-x / z) / a
if (z <= (-1.35d+178)) then
tmp = y / a
else if (z <= (-4.2d+42)) then
tmp = t_2
else if (z <= (-1.06d-88)) then
tmp = x / t
else if (z <= (-3.5d-159)) then
tmp = t_1
else if (z <= 9.6d-64) then
tmp = x / t
else if (z <= 1.4d+49) then
tmp = t_1
else if (z <= 2.6d+113) then
tmp = t_2
else if (z <= 4.5d+152) then
tmp = y * (z / -t)
else
tmp = 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 = (y * z) / -t;
double t_2 = (-x / z) / a;
double tmp;
if (z <= -1.35e+178) {
tmp = y / a;
} else if (z <= -4.2e+42) {
tmp = t_2;
} else if (z <= -1.06e-88) {
tmp = x / t;
} else if (z <= -3.5e-159) {
tmp = t_1;
} else if (z <= 9.6e-64) {
tmp = x / t;
} else if (z <= 1.4e+49) {
tmp = t_1;
} else if (z <= 2.6e+113) {
tmp = t_2;
} else if (z <= 4.5e+152) {
tmp = y * (z / -t);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * z) / -t t_2 = (-x / z) / a tmp = 0 if z <= -1.35e+178: tmp = y / a elif z <= -4.2e+42: tmp = t_2 elif z <= -1.06e-88: tmp = x / t elif z <= -3.5e-159: tmp = t_1 elif z <= 9.6e-64: tmp = x / t elif z <= 1.4e+49: tmp = t_1 elif z <= 2.6e+113: tmp = t_2 elif z <= 4.5e+152: tmp = y * (z / -t) else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * z) / Float64(-t)) t_2 = Float64(Float64(Float64(-x) / z) / a) tmp = 0.0 if (z <= -1.35e+178) tmp = Float64(y / a); elseif (z <= -4.2e+42) tmp = t_2; elseif (z <= -1.06e-88) tmp = Float64(x / t); elseif (z <= -3.5e-159) tmp = t_1; elseif (z <= 9.6e-64) tmp = Float64(x / t); elseif (z <= 1.4e+49) tmp = t_1; elseif (z <= 2.6e+113) tmp = t_2; elseif (z <= 4.5e+152) tmp = Float64(y * Float64(z / Float64(-t))); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * z) / -t; t_2 = (-x / z) / a; tmp = 0.0; if (z <= -1.35e+178) tmp = y / a; elseif (z <= -4.2e+42) tmp = t_2; elseif (z <= -1.06e-88) tmp = x / t; elseif (z <= -3.5e-159) tmp = t_1; elseif (z <= 9.6e-64) tmp = x / t; elseif (z <= 1.4e+49) tmp = t_1; elseif (z <= 2.6e+113) tmp = t_2; elseif (z <= 4.5e+152) tmp = y * (z / -t); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-x) / z), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -1.35e+178], N[(y / a), $MachinePrecision], If[LessEqual[z, -4.2e+42], t$95$2, If[LessEqual[z, -1.06e-88], N[(x / t), $MachinePrecision], If[LessEqual[z, -3.5e-159], t$95$1, If[LessEqual[z, 9.6e-64], N[(x / t), $MachinePrecision], If[LessEqual[z, 1.4e+49], t$95$1, If[LessEqual[z, 2.6e+113], t$95$2, If[LessEqual[z, 4.5e+152], N[(y * N[(z / (-t)), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot z}{-t}\\
t_2 := \frac{\frac{-x}{z}}{a}\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+178}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.06 \cdot 10^{-88}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{-64}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+113}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+152}:\\
\;\;\;\;y \cdot \frac{z}{-t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.35000000000000009e178 or 4.5000000000000001e152 < z Initial program 51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in z around inf 70.5%
if -1.35000000000000009e178 < z < -4.19999999999999991e42 or 1.3999999999999999e49 < z < 2.5999999999999999e113Initial program 81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in t around 0 56.7%
mul-1-neg56.7%
associate-/r*59.5%
distribute-neg-frac259.5%
Simplified59.5%
Taylor expanded in x around 0 62.1%
+-commutative62.1%
mul-1-neg62.1%
unsub-neg62.1%
associate-/r*64.9%
Simplified64.9%
Taylor expanded in y around 0 62.1%
+-commutative62.1%
neg-mul-162.1%
unsub-neg62.1%
associate-/l/72.7%
div-sub72.7%
Simplified72.7%
Taylor expanded in y around 0 56.7%
associate-*r/56.7%
neg-mul-156.7%
Simplified56.7%
if -4.19999999999999991e42 < z < -1.06e-88 or -3.50000000000000002e-159 < z < 9.59999999999999994e-64Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 65.6%
if -1.06e-88 < z < -3.50000000000000002e-159 or 9.59999999999999994e-64 < z < 1.3999999999999999e49Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 73.9%
mul-1-neg73.9%
distribute-neg-frac273.9%
sub-neg73.9%
+-commutative73.9%
distribute-neg-in73.9%
unsub-neg73.9%
*-commutative73.9%
remove-double-neg73.9%
Simplified73.9%
Taylor expanded in z around 0 61.2%
mul-1-neg61.2%
associate-/l*59.1%
distribute-rgt-neg-in59.1%
Simplified59.1%
distribute-neg-frac259.1%
associate-*r/61.2%
Applied egg-rr61.2%
if 2.5999999999999999e113 < z < 4.5000000000000001e152Initial program 86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in x around 0 72.3%
mul-1-neg72.3%
distribute-neg-frac272.3%
sub-neg72.3%
+-commutative72.3%
distribute-neg-in72.3%
unsub-neg72.3%
*-commutative72.3%
remove-double-neg72.3%
Simplified72.3%
Taylor expanded in z around 0 72.3%
mul-1-neg72.3%
associate-/l*85.4%
distribute-rgt-neg-in85.4%
Simplified85.4%
Final simplification65.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y z) (- t))))
(if (<= z -3.8e+182)
(/ y a)
(if (<= z -5.2e+42)
(/ (/ (- x) z) a)
(if (<= z -1.12e-88)
(/ x t)
(if (<= z -3.5e-159)
t_1
(if (<= z 6e-61)
(/ x t)
(if (<= z 5.5e+47)
t_1
(if (<= z 1.25e+118)
(* (/ x z) (/ -1.0 a))
(if (<= z 1.9e+152) (* y (/ z (- t))) (/ y a)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / -t;
double tmp;
if (z <= -3.8e+182) {
tmp = y / a;
} else if (z <= -5.2e+42) {
tmp = (-x / z) / a;
} else if (z <= -1.12e-88) {
tmp = x / t;
} else if (z <= -3.5e-159) {
tmp = t_1;
} else if (z <= 6e-61) {
tmp = x / t;
} else if (z <= 5.5e+47) {
tmp = t_1;
} else if (z <= 1.25e+118) {
tmp = (x / z) * (-1.0 / a);
} else if (z <= 1.9e+152) {
tmp = y * (z / -t);
} else {
tmp = 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 = (y * z) / -t
if (z <= (-3.8d+182)) then
tmp = y / a
else if (z <= (-5.2d+42)) then
tmp = (-x / z) / a
else if (z <= (-1.12d-88)) then
tmp = x / t
else if (z <= (-3.5d-159)) then
tmp = t_1
else if (z <= 6d-61) then
tmp = x / t
else if (z <= 5.5d+47) then
tmp = t_1
else if (z <= 1.25d+118) then
tmp = (x / z) * ((-1.0d0) / a)
else if (z <= 1.9d+152) then
tmp = y * (z / -t)
else
tmp = 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 = (y * z) / -t;
double tmp;
if (z <= -3.8e+182) {
tmp = y / a;
} else if (z <= -5.2e+42) {
tmp = (-x / z) / a;
} else if (z <= -1.12e-88) {
tmp = x / t;
} else if (z <= -3.5e-159) {
tmp = t_1;
} else if (z <= 6e-61) {
tmp = x / t;
} else if (z <= 5.5e+47) {
tmp = t_1;
} else if (z <= 1.25e+118) {
tmp = (x / z) * (-1.0 / a);
} else if (z <= 1.9e+152) {
tmp = y * (z / -t);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * z) / -t tmp = 0 if z <= -3.8e+182: tmp = y / a elif z <= -5.2e+42: tmp = (-x / z) / a elif z <= -1.12e-88: tmp = x / t elif z <= -3.5e-159: tmp = t_1 elif z <= 6e-61: tmp = x / t elif z <= 5.5e+47: tmp = t_1 elif z <= 1.25e+118: tmp = (x / z) * (-1.0 / a) elif z <= 1.9e+152: tmp = y * (z / -t) else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * z) / Float64(-t)) tmp = 0.0 if (z <= -3.8e+182) tmp = Float64(y / a); elseif (z <= -5.2e+42) tmp = Float64(Float64(Float64(-x) / z) / a); elseif (z <= -1.12e-88) tmp = Float64(x / t); elseif (z <= -3.5e-159) tmp = t_1; elseif (z <= 6e-61) tmp = Float64(x / t); elseif (z <= 5.5e+47) tmp = t_1; elseif (z <= 1.25e+118) tmp = Float64(Float64(x / z) * Float64(-1.0 / a)); elseif (z <= 1.9e+152) tmp = Float64(y * Float64(z / Float64(-t))); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * z) / -t; tmp = 0.0; if (z <= -3.8e+182) tmp = y / a; elseif (z <= -5.2e+42) tmp = (-x / z) / a; elseif (z <= -1.12e-88) tmp = x / t; elseif (z <= -3.5e-159) tmp = t_1; elseif (z <= 6e-61) tmp = x / t; elseif (z <= 5.5e+47) tmp = t_1; elseif (z <= 1.25e+118) tmp = (x / z) * (-1.0 / a); elseif (z <= 1.9e+152) tmp = y * (z / -t); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / (-t)), $MachinePrecision]}, If[LessEqual[z, -3.8e+182], N[(y / a), $MachinePrecision], If[LessEqual[z, -5.2e+42], N[(N[((-x) / z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, -1.12e-88], N[(x / t), $MachinePrecision], If[LessEqual[z, -3.5e-159], t$95$1, If[LessEqual[z, 6e-61], N[(x / t), $MachinePrecision], If[LessEqual[z, 5.5e+47], t$95$1, If[LessEqual[z, 1.25e+118], N[(N[(x / z), $MachinePrecision] * N[(-1.0 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+152], N[(y * N[(z / (-t)), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot z}{-t}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+182}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{+42}:\\
\;\;\;\;\frac{\frac{-x}{z}}{a}\\
\mathbf{elif}\;z \leq -1.12 \cdot 10^{-88}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-61}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+118}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{-1}{a}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+152}:\\
\;\;\;\;y \cdot \frac{z}{-t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -3.80000000000000013e182 or 1.9e152 < z Initial program 51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in z around inf 70.5%
if -3.80000000000000013e182 < z < -5.1999999999999998e42Initial program 81.3%
*-commutative81.3%
Simplified81.3%
Taylor expanded in t around 0 58.8%
mul-1-neg58.8%
associate-/r*59.0%
distribute-neg-frac259.0%
Simplified59.0%
Taylor expanded in x around 0 66.4%
+-commutative66.4%
mul-1-neg66.4%
unsub-neg66.4%
associate-/r*66.5%
Simplified66.5%
Taylor expanded in y around 0 66.4%
+-commutative66.4%
neg-mul-166.4%
unsub-neg66.4%
associate-/l/73.7%
div-sub73.7%
Simplified73.7%
Taylor expanded in y around 0 51.6%
associate-*r/51.6%
neg-mul-151.6%
Simplified51.6%
if -5.1999999999999998e42 < z < -1.12e-88 or -3.50000000000000002e-159 < z < 6.00000000000000024e-61Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 65.6%
if -1.12e-88 < z < -3.50000000000000002e-159 or 6.00000000000000024e-61 < z < 5.4999999999999998e47Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 73.9%
mul-1-neg73.9%
distribute-neg-frac273.9%
sub-neg73.9%
+-commutative73.9%
distribute-neg-in73.9%
unsub-neg73.9%
*-commutative73.9%
remove-double-neg73.9%
Simplified73.9%
Taylor expanded in z around 0 61.2%
mul-1-neg61.2%
associate-/l*59.1%
distribute-rgt-neg-in59.1%
Simplified59.1%
distribute-neg-frac259.1%
associate-*r/61.2%
Applied egg-rr61.2%
if 5.4999999999999998e47 < z < 1.24999999999999993e118Initial program 80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in x around inf 61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in t around 0 51.8%
associate-*r/51.8%
neg-mul-151.8%
*-commutative51.8%
Simplified51.8%
neg-mul-151.8%
*-commutative51.8%
times-frac69.9%
Applied egg-rr69.9%
if 1.24999999999999993e118 < z < 1.9e152Initial program 86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in x around 0 72.3%
mul-1-neg72.3%
distribute-neg-frac272.3%
sub-neg72.3%
+-commutative72.3%
distribute-neg-in72.3%
unsub-neg72.3%
*-commutative72.3%
remove-double-neg72.3%
Simplified72.3%
Taylor expanded in z around 0 72.3%
mul-1-neg72.3%
associate-/l*85.4%
distribute-rgt-neg-in85.4%
Simplified85.4%
Final simplification65.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y z) (- t))) (t_2 (/ x (- t (* z a)))))
(if (<= z -2e+78)
(/ y a)
(if (<= z -1.06e-88)
t_2
(if (<= z -3.4e-159)
t_1
(if (<= z 1.06e-58)
t_2
(if (<= z 3.5e+47)
t_1
(if (<= z 5.5e+114)
(* (/ x z) (/ -1.0 a))
(if (<= z 1.6e+152) (* y (/ z (- t))) (/ y a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / -t;
double t_2 = x / (t - (z * a));
double tmp;
if (z <= -2e+78) {
tmp = y / a;
} else if (z <= -1.06e-88) {
tmp = t_2;
} else if (z <= -3.4e-159) {
tmp = t_1;
} else if (z <= 1.06e-58) {
tmp = t_2;
} else if (z <= 3.5e+47) {
tmp = t_1;
} else if (z <= 5.5e+114) {
tmp = (x / z) * (-1.0 / a);
} else if (z <= 1.6e+152) {
tmp = y * (z / -t);
} else {
tmp = 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) :: t_2
real(8) :: tmp
t_1 = (y * z) / -t
t_2 = x / (t - (z * a))
if (z <= (-2d+78)) then
tmp = y / a
else if (z <= (-1.06d-88)) then
tmp = t_2
else if (z <= (-3.4d-159)) then
tmp = t_1
else if (z <= 1.06d-58) then
tmp = t_2
else if (z <= 3.5d+47) then
tmp = t_1
else if (z <= 5.5d+114) then
tmp = (x / z) * ((-1.0d0) / a)
else if (z <= 1.6d+152) then
tmp = y * (z / -t)
else
tmp = 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 = (y * z) / -t;
double t_2 = x / (t - (z * a));
double tmp;
if (z <= -2e+78) {
tmp = y / a;
} else if (z <= -1.06e-88) {
tmp = t_2;
} else if (z <= -3.4e-159) {
tmp = t_1;
} else if (z <= 1.06e-58) {
tmp = t_2;
} else if (z <= 3.5e+47) {
tmp = t_1;
} else if (z <= 5.5e+114) {
tmp = (x / z) * (-1.0 / a);
} else if (z <= 1.6e+152) {
tmp = y * (z / -t);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * z) / -t t_2 = x / (t - (z * a)) tmp = 0 if z <= -2e+78: tmp = y / a elif z <= -1.06e-88: tmp = t_2 elif z <= -3.4e-159: tmp = t_1 elif z <= 1.06e-58: tmp = t_2 elif z <= 3.5e+47: tmp = t_1 elif z <= 5.5e+114: tmp = (x / z) * (-1.0 / a) elif z <= 1.6e+152: tmp = y * (z / -t) else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * z) / Float64(-t)) t_2 = Float64(x / Float64(t - Float64(z * a))) tmp = 0.0 if (z <= -2e+78) tmp = Float64(y / a); elseif (z <= -1.06e-88) tmp = t_2; elseif (z <= -3.4e-159) tmp = t_1; elseif (z <= 1.06e-58) tmp = t_2; elseif (z <= 3.5e+47) tmp = t_1; elseif (z <= 5.5e+114) tmp = Float64(Float64(x / z) * Float64(-1.0 / a)); elseif (z <= 1.6e+152) tmp = Float64(y * Float64(z / Float64(-t))); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * z) / -t; t_2 = x / (t - (z * a)); tmp = 0.0; if (z <= -2e+78) tmp = y / a; elseif (z <= -1.06e-88) tmp = t_2; elseif (z <= -3.4e-159) tmp = t_1; elseif (z <= 1.06e-58) tmp = t_2; elseif (z <= 3.5e+47) tmp = t_1; elseif (z <= 5.5e+114) tmp = (x / z) * (-1.0 / a); elseif (z <= 1.6e+152) tmp = y * (z / -t); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+78], N[(y / a), $MachinePrecision], If[LessEqual[z, -1.06e-88], t$95$2, If[LessEqual[z, -3.4e-159], t$95$1, If[LessEqual[z, 1.06e-58], t$95$2, If[LessEqual[z, 3.5e+47], t$95$1, If[LessEqual[z, 5.5e+114], N[(N[(x / z), $MachinePrecision] * N[(-1.0 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+152], N[(y * N[(z / (-t)), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot z}{-t}\\
t_2 := \frac{x}{t - z \cdot a}\\
\mathbf{if}\;z \leq -2 \cdot 10^{+78}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -1.06 \cdot 10^{-88}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{-58}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+114}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{-1}{a}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+152}:\\
\;\;\;\;y \cdot \frac{z}{-t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -2.00000000000000002e78 or 1.60000000000000003e152 < z Initial program 59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in z around inf 62.0%
if -2.00000000000000002e78 < z < -1.06e-88 or -3.39999999999999984e-159 < z < 1.0600000000000001e-58Initial program 98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in x around inf 80.9%
*-commutative80.9%
Simplified80.9%
if -1.06e-88 < z < -3.39999999999999984e-159 or 1.0600000000000001e-58 < z < 3.50000000000000015e47Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 74.4%
mul-1-neg74.4%
distribute-neg-frac274.4%
sub-neg74.4%
+-commutative74.4%
distribute-neg-in74.4%
unsub-neg74.4%
*-commutative74.4%
remove-double-neg74.4%
Simplified74.4%
Taylor expanded in z around 0 60.0%
mul-1-neg60.0%
associate-/l*57.9%
distribute-rgt-neg-in57.9%
Simplified57.9%
distribute-neg-frac257.9%
associate-*r/60.0%
Applied egg-rr60.0%
if 3.50000000000000015e47 < z < 5.5000000000000001e114Initial program 80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in x around inf 61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in t around 0 51.8%
associate-*r/51.8%
neg-mul-151.8%
*-commutative51.8%
Simplified51.8%
neg-mul-151.8%
*-commutative51.8%
times-frac69.9%
Applied egg-rr69.9%
if 5.5000000000000001e114 < z < 1.60000000000000003e152Initial program 86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in x around 0 72.3%
mul-1-neg72.3%
distribute-neg-frac272.3%
sub-neg72.3%
+-commutative72.3%
distribute-neg-in72.3%
unsub-neg72.3%
*-commutative72.3%
remove-double-neg72.3%
Simplified72.3%
Taylor expanded in z around 0 72.3%
mul-1-neg72.3%
associate-/l*85.4%
distribute-rgt-neg-in85.4%
Simplified85.4%
Final simplification71.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x (* y z)) t)))
(if (<= z -1.35e+178)
(/ y a)
(if (<= z -2.1e+45)
(/ (/ (- x) z) a)
(if (<= z 2.05e-201)
t_1
(if (<= z 8.5e-60)
(/ x (- t (* z a)))
(if (<= z 1.6e+152) t_1 (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / t;
double tmp;
if (z <= -1.35e+178) {
tmp = y / a;
} else if (z <= -2.1e+45) {
tmp = (-x / z) / a;
} else if (z <= 2.05e-201) {
tmp = t_1;
} else if (z <= 8.5e-60) {
tmp = x / (t - (z * a));
} else if (z <= 1.6e+152) {
tmp = t_1;
} else {
tmp = 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
if (z <= (-1.35d+178)) then
tmp = y / a
else if (z <= (-2.1d+45)) then
tmp = (-x / z) / a
else if (z <= 2.05d-201) then
tmp = t_1
else if (z <= 8.5d-60) then
tmp = x / (t - (z * a))
else if (z <= 1.6d+152) then
tmp = t_1
else
tmp = 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;
double tmp;
if (z <= -1.35e+178) {
tmp = y / a;
} else if (z <= -2.1e+45) {
tmp = (-x / z) / a;
} else if (z <= 2.05e-201) {
tmp = t_1;
} else if (z <= 8.5e-60) {
tmp = x / (t - (z * a));
} else if (z <= 1.6e+152) {
tmp = t_1;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - (y * z)) / t tmp = 0 if z <= -1.35e+178: tmp = y / a elif z <= -2.1e+45: tmp = (-x / z) / a elif z <= 2.05e-201: tmp = t_1 elif z <= 8.5e-60: tmp = x / (t - (z * a)) elif z <= 1.6e+152: tmp = t_1 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - Float64(y * z)) / t) tmp = 0.0 if (z <= -1.35e+178) tmp = Float64(y / a); elseif (z <= -2.1e+45) tmp = Float64(Float64(Float64(-x) / z) / a); elseif (z <= 2.05e-201) tmp = t_1; elseif (z <= 8.5e-60) tmp = Float64(x / Float64(t - Float64(z * a))); elseif (z <= 1.6e+152) tmp = t_1; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - (y * z)) / t; tmp = 0.0; if (z <= -1.35e+178) tmp = y / a; elseif (z <= -2.1e+45) tmp = (-x / z) / a; elseif (z <= 2.05e-201) tmp = t_1; elseif (z <= 8.5e-60) tmp = x / (t - (z * a)); elseif (z <= 1.6e+152) tmp = t_1; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -1.35e+178], N[(y / a), $MachinePrecision], If[LessEqual[z, -2.1e+45], N[(N[((-x) / z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 2.05e-201], t$95$1, If[LessEqual[z, 8.5e-60], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+152], t$95$1, N[(y / a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y \cdot z}{t}\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+178}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{+45}:\\
\;\;\;\;\frac{\frac{-x}{z}}{a}\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-60}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.35000000000000009e178 or 1.60000000000000003e152 < z Initial program 51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in z around inf 70.5%
if -1.35000000000000009e178 < z < -2.09999999999999995e45Initial program 80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in t around 0 61.1%
mul-1-neg61.1%
associate-/r*61.3%
distribute-neg-frac261.3%
Simplified61.3%
Taylor expanded in x around 0 69.0%
+-commutative69.0%
mul-1-neg69.0%
unsub-neg69.0%
associate-/r*69.1%
Simplified69.1%
Taylor expanded in y around 0 69.0%
+-commutative69.0%
neg-mul-169.0%
unsub-neg69.0%
associate-/l/76.6%
div-sub76.6%
Simplified76.6%
Taylor expanded in y around 0 53.5%
associate-*r/53.5%
neg-mul-153.5%
Simplified53.5%
if -2.09999999999999995e45 < z < 2.05000000000000001e-201 or 8.50000000000000044e-60 < z < 1.60000000000000003e152Initial program 97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around inf 76.7%
if 2.05000000000000001e-201 < z < 8.50000000000000044e-60Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 86.8%
*-commutative86.8%
Simplified86.8%
Final simplification74.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- t)))))
(if (<= z -3.65e+22)
(/ y a)
(if (<= z -1.75e-88)
(/ x t)
(if (<= z -3.5e-159)
t_1
(if (<= z 1.1e-63) (/ x t) (if (<= z 4.5e+152) t_1 (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / -t);
double tmp;
if (z <= -3.65e+22) {
tmp = y / a;
} else if (z <= -1.75e-88) {
tmp = x / t;
} else if (z <= -3.5e-159) {
tmp = t_1;
} else if (z <= 1.1e-63) {
tmp = x / t;
} else if (z <= 4.5e+152) {
tmp = t_1;
} else {
tmp = 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 = y * (z / -t)
if (z <= (-3.65d+22)) then
tmp = y / a
else if (z <= (-1.75d-88)) then
tmp = x / t
else if (z <= (-3.5d-159)) then
tmp = t_1
else if (z <= 1.1d-63) then
tmp = x / t
else if (z <= 4.5d+152) then
tmp = t_1
else
tmp = 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 = y * (z / -t);
double tmp;
if (z <= -3.65e+22) {
tmp = y / a;
} else if (z <= -1.75e-88) {
tmp = x / t;
} else if (z <= -3.5e-159) {
tmp = t_1;
} else if (z <= 1.1e-63) {
tmp = x / t;
} else if (z <= 4.5e+152) {
tmp = t_1;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / -t) tmp = 0 if z <= -3.65e+22: tmp = y / a elif z <= -1.75e-88: tmp = x / t elif z <= -3.5e-159: tmp = t_1 elif z <= 1.1e-63: tmp = x / t elif z <= 4.5e+152: tmp = t_1 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(-t))) tmp = 0.0 if (z <= -3.65e+22) tmp = Float64(y / a); elseif (z <= -1.75e-88) tmp = Float64(x / t); elseif (z <= -3.5e-159) tmp = t_1; elseif (z <= 1.1e-63) tmp = Float64(x / t); elseif (z <= 4.5e+152) tmp = t_1; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / -t); tmp = 0.0; if (z <= -3.65e+22) tmp = y / a; elseif (z <= -1.75e-88) tmp = x / t; elseif (z <= -3.5e-159) tmp = t_1; elseif (z <= 1.1e-63) tmp = x / t; elseif (z <= 4.5e+152) tmp = t_1; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / (-t)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.65e+22], N[(y / a), $MachinePrecision], If[LessEqual[z, -1.75e-88], N[(x / t), $MachinePrecision], If[LessEqual[z, -3.5e-159], t$95$1, If[LessEqual[z, 1.1e-63], N[(x / t), $MachinePrecision], If[LessEqual[z, 4.5e+152], t$95$1, N[(y / a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{-t}\\
\mathbf{if}\;z \leq -3.65 \cdot 10^{+22}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-88}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-63}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -3.6499999999999999e22 or 4.5000000000000001e152 < z Initial program 62.0%
*-commutative62.0%
Simplified62.0%
Taylor expanded in z around inf 58.5%
if -3.6499999999999999e22 < z < -1.7500000000000001e-88 or -3.50000000000000002e-159 < z < 1.1e-63Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 65.8%
if -1.7500000000000001e-88 < z < -3.50000000000000002e-159 or 1.1e-63 < z < 4.5000000000000001e152Initial program 95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in x around 0 68.6%
mul-1-neg68.6%
distribute-neg-frac268.6%
sub-neg68.6%
+-commutative68.6%
distribute-neg-in68.6%
unsub-neg68.6%
*-commutative68.6%
remove-double-neg68.6%
Simplified68.6%
Taylor expanded in z around 0 56.3%
mul-1-neg56.3%
associate-/l*56.3%
distribute-rgt-neg-in56.3%
Simplified56.3%
Final simplification61.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.6e+22)
(/ y a)
(if (<= z -4.5e-88)
(/ x t)
(if (<= z -3.5e-159)
(/ (* y z) (- t))
(if (<= z 1.15e-59)
(/ x t)
(if (<= z 1.6e+152) (* y (/ z (- t))) (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e+22) {
tmp = y / a;
} else if (z <= -4.5e-88) {
tmp = x / t;
} else if (z <= -3.5e-159) {
tmp = (y * z) / -t;
} else if (z <= 1.15e-59) {
tmp = x / t;
} else if (z <= 1.6e+152) {
tmp = y * (z / -t);
} else {
tmp = 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 <= (-2.6d+22)) then
tmp = y / a
else if (z <= (-4.5d-88)) then
tmp = x / t
else if (z <= (-3.5d-159)) then
tmp = (y * z) / -t
else if (z <= 1.15d-59) then
tmp = x / t
else if (z <= 1.6d+152) then
tmp = y * (z / -t)
else
tmp = 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 <= -2.6e+22) {
tmp = y / a;
} else if (z <= -4.5e-88) {
tmp = x / t;
} else if (z <= -3.5e-159) {
tmp = (y * z) / -t;
} else if (z <= 1.15e-59) {
tmp = x / t;
} else if (z <= 1.6e+152) {
tmp = y * (z / -t);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.6e+22: tmp = y / a elif z <= -4.5e-88: tmp = x / t elif z <= -3.5e-159: tmp = (y * z) / -t elif z <= 1.15e-59: tmp = x / t elif z <= 1.6e+152: tmp = y * (z / -t) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.6e+22) tmp = Float64(y / a); elseif (z <= -4.5e-88) tmp = Float64(x / t); elseif (z <= -3.5e-159) tmp = Float64(Float64(y * z) / Float64(-t)); elseif (z <= 1.15e-59) tmp = Float64(x / t); elseif (z <= 1.6e+152) tmp = Float64(y * Float64(z / Float64(-t))); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.6e+22) tmp = y / a; elseif (z <= -4.5e-88) tmp = x / t; elseif (z <= -3.5e-159) tmp = (y * z) / -t; elseif (z <= 1.15e-59) tmp = x / t; elseif (z <= 1.6e+152) tmp = y * (z / -t); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.6e+22], N[(y / a), $MachinePrecision], If[LessEqual[z, -4.5e-88], N[(x / t), $MachinePrecision], If[LessEqual[z, -3.5e-159], N[(N[(y * z), $MachinePrecision] / (-t)), $MachinePrecision], If[LessEqual[z, 1.15e-59], N[(x / t), $MachinePrecision], If[LessEqual[z, 1.6e+152], N[(y * N[(z / (-t)), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+22}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-88}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-159}:\\
\;\;\;\;\frac{y \cdot z}{-t}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-59}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+152}:\\
\;\;\;\;y \cdot \frac{z}{-t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -2.6e22 or 1.60000000000000003e152 < z Initial program 62.0%
*-commutative62.0%
Simplified62.0%
Taylor expanded in z around inf 58.5%
if -2.6e22 < z < -4.49999999999999991e-88 or -3.50000000000000002e-159 < z < 1.1499999999999999e-59Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 65.8%
if -4.49999999999999991e-88 < z < -3.50000000000000002e-159Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 69.2%
mul-1-neg69.2%
distribute-neg-frac269.2%
sub-neg69.2%
+-commutative69.2%
distribute-neg-in69.2%
unsub-neg69.2%
*-commutative69.2%
remove-double-neg69.2%
Simplified69.2%
Taylor expanded in z around 0 69.7%
mul-1-neg69.7%
associate-/l*62.9%
distribute-rgt-neg-in62.9%
Simplified62.9%
distribute-neg-frac262.9%
associate-*r/69.7%
Applied egg-rr69.7%
if 1.1499999999999999e-59 < z < 1.60000000000000003e152Initial program 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in x around 0 68.5%
mul-1-neg68.5%
distribute-neg-frac268.5%
sub-neg68.5%
+-commutative68.5%
distribute-neg-in68.5%
unsub-neg68.5%
*-commutative68.5%
remove-double-neg68.5%
Simplified68.5%
Taylor expanded in z around 0 52.5%
mul-1-neg52.5%
associate-/l*54.4%
distribute-rgt-neg-in54.4%
Simplified54.4%
Final simplification61.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y (/ x z)) a)))
(if (<= z -5e+43)
t_1
(if (<= z 2.55e-201)
(/ (- x (* y z)) t)
(if (<= z 1.55e-66)
(/ x (- t (* z a)))
(if (<= z 2.6e+151) (* z (/ y (- (* z a) t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - (x / z)) / a;
double tmp;
if (z <= -5e+43) {
tmp = t_1;
} else if (z <= 2.55e-201) {
tmp = (x - (y * z)) / t;
} else if (z <= 1.55e-66) {
tmp = x / (t - (z * a));
} else if (z <= 2.6e+151) {
tmp = z * (y / ((z * a) - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y - (x / z)) / a
if (z <= (-5d+43)) then
tmp = t_1
else if (z <= 2.55d-201) then
tmp = (x - (y * z)) / t
else if (z <= 1.55d-66) then
tmp = x / (t - (z * a))
else if (z <= 2.6d+151) then
tmp = z * (y / ((z * a) - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y - (x / z)) / a;
double tmp;
if (z <= -5e+43) {
tmp = t_1;
} else if (z <= 2.55e-201) {
tmp = (x - (y * z)) / t;
} else if (z <= 1.55e-66) {
tmp = x / (t - (z * a));
} else if (z <= 2.6e+151) {
tmp = z * (y / ((z * a) - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - (x / z)) / a tmp = 0 if z <= -5e+43: tmp = t_1 elif z <= 2.55e-201: tmp = (x - (y * z)) / t elif z <= 1.55e-66: tmp = x / (t - (z * a)) elif z <= 2.6e+151: tmp = z * (y / ((z * a) - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - Float64(x / z)) / a) tmp = 0.0 if (z <= -5e+43) tmp = t_1; elseif (z <= 2.55e-201) tmp = Float64(Float64(x - Float64(y * z)) / t); elseif (z <= 1.55e-66) tmp = Float64(x / Float64(t - Float64(z * a))); elseif (z <= 2.6e+151) tmp = Float64(z * Float64(y / Float64(Float64(z * a) - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - (x / z)) / a; tmp = 0.0; if (z <= -5e+43) tmp = t_1; elseif (z <= 2.55e-201) tmp = (x - (y * z)) / t; elseif (z <= 1.55e-66) tmp = x / (t - (z * a)); elseif (z <= 2.6e+151) tmp = z * (y / ((z * a) - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -5e+43], t$95$1, If[LessEqual[z, 2.55e-201], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.55e-66], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+151], N[(z * N[(y / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - \frac{x}{z}}{a}\\
\mathbf{if}\;z \leq -5 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-201}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-66}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+151}:\\
\;\;\;\;z \cdot \frac{y}{z \cdot a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.0000000000000004e43 or 2.60000000000000013e151 < z Initial program 61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in t around 0 47.9%
mul-1-neg47.9%
associate-/r*59.8%
distribute-neg-frac259.8%
Simplified59.8%
Taylor expanded in x around 0 75.2%
+-commutative75.2%
mul-1-neg75.2%
unsub-neg75.2%
associate-/r*77.4%
Simplified77.4%
Taylor expanded in y around 0 75.2%
+-commutative75.2%
neg-mul-175.2%
unsub-neg75.2%
associate-/l/83.2%
div-sub83.2%
Simplified83.2%
if -5.0000000000000004e43 < z < 2.5500000000000001e-201Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 82.9%
if 2.5500000000000001e-201 < z < 1.5499999999999999e-66Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 89.7%
*-commutative89.7%
Simplified89.7%
if 1.5499999999999999e-66 < z < 2.60000000000000013e151Initial program 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in x around 0 70.5%
mul-1-neg70.5%
distribute-neg-frac270.5%
sub-neg70.5%
+-commutative70.5%
distribute-neg-in70.5%
unsub-neg70.5%
*-commutative70.5%
remove-double-neg70.5%
Simplified70.5%
*-commutative70.5%
associate-/l*70.4%
*-commutative70.4%
Applied egg-rr70.4%
Final simplification81.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y (/ x z)) a)))
(if (<= z -1.15e+43)
t_1
(if (<= z 1.35e-201)
(/ (- x (* y z)) t)
(if (<= z 7.6e-66)
(/ x (- t (* z a)))
(if (<= z 2.1e+151) (/ z (/ (- (* z a) t) y)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - (x / z)) / a;
double tmp;
if (z <= -1.15e+43) {
tmp = t_1;
} else if (z <= 1.35e-201) {
tmp = (x - (y * z)) / t;
} else if (z <= 7.6e-66) {
tmp = x / (t - (z * a));
} else if (z <= 2.1e+151) {
tmp = z / (((z * a) - t) / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y - (x / z)) / a
if (z <= (-1.15d+43)) then
tmp = t_1
else if (z <= 1.35d-201) then
tmp = (x - (y * z)) / t
else if (z <= 7.6d-66) then
tmp = x / (t - (z * a))
else if (z <= 2.1d+151) then
tmp = z / (((z * a) - t) / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y - (x / z)) / a;
double tmp;
if (z <= -1.15e+43) {
tmp = t_1;
} else if (z <= 1.35e-201) {
tmp = (x - (y * z)) / t;
} else if (z <= 7.6e-66) {
tmp = x / (t - (z * a));
} else if (z <= 2.1e+151) {
tmp = z / (((z * a) - t) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - (x / z)) / a tmp = 0 if z <= -1.15e+43: tmp = t_1 elif z <= 1.35e-201: tmp = (x - (y * z)) / t elif z <= 7.6e-66: tmp = x / (t - (z * a)) elif z <= 2.1e+151: tmp = z / (((z * a) - t) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - Float64(x / z)) / a) tmp = 0.0 if (z <= -1.15e+43) tmp = t_1; elseif (z <= 1.35e-201) tmp = Float64(Float64(x - Float64(y * z)) / t); elseif (z <= 7.6e-66) tmp = Float64(x / Float64(t - Float64(z * a))); elseif (z <= 2.1e+151) tmp = Float64(z / Float64(Float64(Float64(z * a) - t) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - (x / z)) / a; tmp = 0.0; if (z <= -1.15e+43) tmp = t_1; elseif (z <= 1.35e-201) tmp = (x - (y * z)) / t; elseif (z <= 7.6e-66) tmp = x / (t - (z * a)); elseif (z <= 2.1e+151) tmp = z / (((z * a) - t) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -1.15e+43], t$95$1, If[LessEqual[z, 1.35e-201], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 7.6e-66], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+151], N[(z / N[(N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - \frac{x}{z}}{a}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-201}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-66}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+151}:\\
\;\;\;\;\frac{z}{\frac{z \cdot a - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1500000000000001e43 or 2.1000000000000001e151 < z Initial program 61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in t around 0 47.9%
mul-1-neg47.9%
associate-/r*59.8%
distribute-neg-frac259.8%
Simplified59.8%
Taylor expanded in x around 0 75.2%
+-commutative75.2%
mul-1-neg75.2%
unsub-neg75.2%
associate-/r*77.4%
Simplified77.4%
Taylor expanded in y around 0 75.2%
+-commutative75.2%
neg-mul-175.2%
unsub-neg75.2%
associate-/l/83.2%
div-sub83.2%
Simplified83.2%
if -1.1500000000000001e43 < z < 1.35000000000000003e-201Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 82.9%
if 1.35000000000000003e-201 < z < 7.5999999999999995e-66Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 89.7%
*-commutative89.7%
Simplified89.7%
if 7.5999999999999995e-66 < z < 2.1000000000000001e151Initial program 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in x around 0 70.5%
mul-1-neg70.5%
distribute-neg-frac270.5%
sub-neg70.5%
+-commutative70.5%
distribute-neg-in70.5%
unsub-neg70.5%
*-commutative70.5%
remove-double-neg70.5%
Simplified70.5%
*-commutative70.5%
associate-/l*70.4%
*-commutative70.4%
Applied egg-rr70.4%
clear-num70.3%
un-div-inv70.4%
*-commutative70.4%
Applied egg-rr70.4%
Final simplification81.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y (/ x z)) a)))
(if (<= z -1.5e+44)
t_1
(if (<= z 2.3e-201)
(/ (- x (* y z)) t)
(if (<= z 1.12e-64)
(/ x (- t (* z a)))
(if (<= z 2.6e+151) (/ (* y z) (- (* z a) t)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - (x / z)) / a;
double tmp;
if (z <= -1.5e+44) {
tmp = t_1;
} else if (z <= 2.3e-201) {
tmp = (x - (y * z)) / t;
} else if (z <= 1.12e-64) {
tmp = x / (t - (z * a));
} else if (z <= 2.6e+151) {
tmp = (y * z) / ((z * a) - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y - (x / z)) / a
if (z <= (-1.5d+44)) then
tmp = t_1
else if (z <= 2.3d-201) then
tmp = (x - (y * z)) / t
else if (z <= 1.12d-64) then
tmp = x / (t - (z * a))
else if (z <= 2.6d+151) then
tmp = (y * z) / ((z * a) - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y - (x / z)) / a;
double tmp;
if (z <= -1.5e+44) {
tmp = t_1;
} else if (z <= 2.3e-201) {
tmp = (x - (y * z)) / t;
} else if (z <= 1.12e-64) {
tmp = x / (t - (z * a));
} else if (z <= 2.6e+151) {
tmp = (y * z) / ((z * a) - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - (x / z)) / a tmp = 0 if z <= -1.5e+44: tmp = t_1 elif z <= 2.3e-201: tmp = (x - (y * z)) / t elif z <= 1.12e-64: tmp = x / (t - (z * a)) elif z <= 2.6e+151: tmp = (y * z) / ((z * a) - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - Float64(x / z)) / a) tmp = 0.0 if (z <= -1.5e+44) tmp = t_1; elseif (z <= 2.3e-201) tmp = Float64(Float64(x - Float64(y * z)) / t); elseif (z <= 1.12e-64) tmp = Float64(x / Float64(t - Float64(z * a))); elseif (z <= 2.6e+151) tmp = Float64(Float64(y * z) / Float64(Float64(z * a) - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - (x / z)) / a; tmp = 0.0; if (z <= -1.5e+44) tmp = t_1; elseif (z <= 2.3e-201) tmp = (x - (y * z)) / t; elseif (z <= 1.12e-64) tmp = x / (t - (z * a)); elseif (z <= 2.6e+151) tmp = (y * z) / ((z * a) - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -1.5e+44], t$95$1, If[LessEqual[z, 2.3e-201], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.12e-64], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+151], N[(N[(y * z), $MachinePrecision] / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - \frac{x}{z}}{a}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-201}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-64}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+151}:\\
\;\;\;\;\frac{y \cdot z}{z \cdot a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.49999999999999993e44 or 2.60000000000000013e151 < z Initial program 61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in t around 0 47.9%
mul-1-neg47.9%
associate-/r*59.8%
distribute-neg-frac259.8%
Simplified59.8%
Taylor expanded in x around 0 75.2%
+-commutative75.2%
mul-1-neg75.2%
unsub-neg75.2%
associate-/r*77.4%
Simplified77.4%
Taylor expanded in y around 0 75.2%
+-commutative75.2%
neg-mul-175.2%
unsub-neg75.2%
associate-/l/83.2%
div-sub83.2%
Simplified83.2%
if -1.49999999999999993e44 < z < 2.29999999999999986e-201Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 82.9%
if 2.29999999999999986e-201 < z < 1.12e-64Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 89.7%
*-commutative89.7%
Simplified89.7%
if 1.12e-64 < z < 2.60000000000000013e151Initial program 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in x around 0 70.5%
mul-1-neg70.5%
distribute-neg-frac270.5%
sub-neg70.5%
+-commutative70.5%
distribute-neg-in70.5%
unsub-neg70.5%
*-commutative70.5%
remove-double-neg70.5%
Simplified70.5%
Final simplification81.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y (/ x z)) a)))
(if (<= z -1.1e+43)
t_1
(if (<= z 2.35e-201)
(/ (- x (* y z)) t)
(if (<= z 2.35e-67)
(/ x (- t (* z a)))
(if (<= z 7.8e+151) (* y (/ z (- (* z a) t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - (x / z)) / a;
double tmp;
if (z <= -1.1e+43) {
tmp = t_1;
} else if (z <= 2.35e-201) {
tmp = (x - (y * z)) / t;
} else if (z <= 2.35e-67) {
tmp = x / (t - (z * a));
} else if (z <= 7.8e+151) {
tmp = y * (z / ((z * a) - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y - (x / z)) / a
if (z <= (-1.1d+43)) then
tmp = t_1
else if (z <= 2.35d-201) then
tmp = (x - (y * z)) / t
else if (z <= 2.35d-67) then
tmp = x / (t - (z * a))
else if (z <= 7.8d+151) then
tmp = y * (z / ((z * a) - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y - (x / z)) / a;
double tmp;
if (z <= -1.1e+43) {
tmp = t_1;
} else if (z <= 2.35e-201) {
tmp = (x - (y * z)) / t;
} else if (z <= 2.35e-67) {
tmp = x / (t - (z * a));
} else if (z <= 7.8e+151) {
tmp = y * (z / ((z * a) - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - (x / z)) / a tmp = 0 if z <= -1.1e+43: tmp = t_1 elif z <= 2.35e-201: tmp = (x - (y * z)) / t elif z <= 2.35e-67: tmp = x / (t - (z * a)) elif z <= 7.8e+151: tmp = y * (z / ((z * a) - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - Float64(x / z)) / a) tmp = 0.0 if (z <= -1.1e+43) tmp = t_1; elseif (z <= 2.35e-201) tmp = Float64(Float64(x - Float64(y * z)) / t); elseif (z <= 2.35e-67) tmp = Float64(x / Float64(t - Float64(z * a))); elseif (z <= 7.8e+151) tmp = Float64(y * Float64(z / Float64(Float64(z * a) - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - (x / z)) / a; tmp = 0.0; if (z <= -1.1e+43) tmp = t_1; elseif (z <= 2.35e-201) tmp = (x - (y * z)) / t; elseif (z <= 2.35e-67) tmp = x / (t - (z * a)); elseif (z <= 7.8e+151) tmp = y * (z / ((z * a) - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -1.1e+43], t$95$1, If[LessEqual[z, 2.35e-201], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 2.35e-67], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+151], N[(y * N[(z / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - \frac{x}{z}}{a}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{-201}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{-67}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+151}:\\
\;\;\;\;y \cdot \frac{z}{z \cdot a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1e43 or 7.79999999999999952e151 < z Initial program 61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in t around 0 47.9%
mul-1-neg47.9%
associate-/r*59.8%
distribute-neg-frac259.8%
Simplified59.8%
Taylor expanded in x around 0 75.2%
+-commutative75.2%
mul-1-neg75.2%
unsub-neg75.2%
associate-/r*77.4%
Simplified77.4%
Taylor expanded in y around 0 75.2%
+-commutative75.2%
neg-mul-175.2%
unsub-neg75.2%
associate-/l/83.2%
div-sub83.2%
Simplified83.2%
if -1.1e43 < z < 2.34999999999999997e-201Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 82.9%
if 2.34999999999999997e-201 < z < 2.35000000000000002e-67Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 89.7%
*-commutative89.7%
Simplified89.7%
if 2.35000000000000002e-67 < z < 7.79999999999999952e151Initial program 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in x around 0 70.5%
associate-/l*72.4%
associate-*r*72.4%
neg-mul-172.4%
*-commutative72.4%
Simplified72.4%
Final simplification81.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x (* y z)) t)) (t_2 (/ (- y (/ x z)) a)))
(if (<= z -1.45e+44)
t_2
(if (<= z 1.55e-201)
t_1
(if (<= z 1.2e-59) (/ x (- t (* z a))) (if (<= z 1.6e+152) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / t;
double t_2 = (y - (x / z)) / a;
double tmp;
if (z <= -1.45e+44) {
tmp = t_2;
} else if (z <= 1.55e-201) {
tmp = t_1;
} else if (z <= 1.2e-59) {
tmp = x / (t - (z * a));
} else if (z <= 1.6e+152) {
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 - (y * z)) / t
t_2 = (y - (x / z)) / a
if (z <= (-1.45d+44)) then
tmp = t_2
else if (z <= 1.55d-201) then
tmp = t_1
else if (z <= 1.2d-59) then
tmp = x / (t - (z * a))
else if (z <= 1.6d+152) 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 - (y * z)) / t;
double t_2 = (y - (x / z)) / a;
double tmp;
if (z <= -1.45e+44) {
tmp = t_2;
} else if (z <= 1.55e-201) {
tmp = t_1;
} else if (z <= 1.2e-59) {
tmp = x / (t - (z * a));
} else if (z <= 1.6e+152) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - (y * z)) / t t_2 = (y - (x / z)) / a tmp = 0 if z <= -1.45e+44: tmp = t_2 elif z <= 1.55e-201: tmp = t_1 elif z <= 1.2e-59: tmp = x / (t - (z * a)) elif z <= 1.6e+152: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - Float64(y * z)) / t) t_2 = Float64(Float64(y - Float64(x / z)) / a) tmp = 0.0 if (z <= -1.45e+44) tmp = t_2; elseif (z <= 1.55e-201) tmp = t_1; elseif (z <= 1.2e-59) tmp = Float64(x / Float64(t - Float64(z * a))); elseif (z <= 1.6e+152) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - (y * z)) / t; t_2 = (y - (x / z)) / a; tmp = 0.0; if (z <= -1.45e+44) tmp = t_2; elseif (z <= 1.55e-201) tmp = t_1; elseif (z <= 1.2e-59) tmp = x / (t - (z * a)); elseif (z <= 1.6e+152) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -1.45e+44], t$95$2, If[LessEqual[z, 1.55e-201], t$95$1, If[LessEqual[z, 1.2e-59], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+152], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y \cdot z}{t}\\
t_2 := \frac{y - \frac{x}{z}}{a}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+44}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-59}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.4500000000000001e44 or 1.60000000000000003e152 < z Initial program 60.6%
*-commutative60.6%
Simplified60.6%
Taylor expanded in t around 0 48.4%
mul-1-neg48.4%
associate-/r*60.5%
distribute-neg-frac260.5%
Simplified60.5%
Taylor expanded in x around 0 76.0%
+-commutative76.0%
mul-1-neg76.0%
unsub-neg76.0%
associate-/r*78.3%
Simplified78.3%
Taylor expanded in y around 0 76.0%
+-commutative76.0%
neg-mul-176.0%
unsub-neg76.0%
associate-/l/84.2%
div-sub84.2%
Simplified84.2%
if -1.4500000000000001e44 < z < 1.5499999999999999e-201 or 1.20000000000000008e-59 < z < 1.60000000000000003e152Initial program 97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around inf 76.7%
if 1.5499999999999999e-201 < z < 1.20000000000000008e-59Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 86.8%
*-commutative86.8%
Simplified86.8%
Final simplification80.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.75e+21) (not (<= z 3.7e-65))) (/ y a) (/ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.75e+21) || !(z <= 3.7e-65)) {
tmp = 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 <= (-2.75d+21)) .or. (.not. (z <= 3.7d-65))) then
tmp = 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 <= -2.75e+21) || !(z <= 3.7e-65)) {
tmp = y / a;
} else {
tmp = x / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.75e+21) or not (z <= 3.7e-65): tmp = y / a else: tmp = x / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.75e+21) || !(z <= 3.7e-65)) tmp = 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 <= -2.75e+21) || ~((z <= 3.7e-65))) tmp = y / a; else tmp = x / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.75e+21], N[Not[LessEqual[z, 3.7e-65]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(x / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{+21} \lor \neg \left(z \leq 3.7 \cdot 10^{-65}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t}\\
\end{array}
\end{array}
if z < -2.75e21 or 3.7e-65 < z Initial program 74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in z around inf 47.4%
if -2.75e21 < z < 3.7e-65Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 61.7%
Final simplification54.2%
(FPCore (x y z t a) :precision binary64 (/ x t))
double code(double x, double y, double z, double t, double a) {
return x / t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x / t
end function
public static double code(double x, double y, double z, double t, double a) {
return x / t;
}
def code(x, y, z, t, a): return x / t
function code(x, y, z, t, a) return Float64(x / t) end
function tmp = code(x, y, z, t, a) tmp = x / t; end
code[x_, y_, z_, t_, a_] := N[(x / t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{t}
\end{array}
Initial program 86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in z around 0 36.3%
Final simplification36.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* a z))) (t_2 (- (/ x t_1) (/ y (- (/ t z) a)))))
(if (< z -32113435955957344.0)
t_2
(if (< z 3.5139522372978296e-86) (* (- x (* y z)) (/ 1.0 t_1)) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * z);
double t_2 = (x / t_1) - (y / ((t / z) - a));
double tmp;
if (z < -32113435955957344.0) {
tmp = t_2;
} else if (z < 3.5139522372978296e-86) {
tmp = (x - (y * z)) * (1.0 / 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 = t - (a * z)
t_2 = (x / t_1) - (y / ((t / z) - a))
if (z < (-32113435955957344.0d0)) then
tmp = t_2
else if (z < 3.5139522372978296d-86) then
tmp = (x - (y * z)) * (1.0d0 / 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 = t - (a * z);
double t_2 = (x / t_1) - (y / ((t / z) - a));
double tmp;
if (z < -32113435955957344.0) {
tmp = t_2;
} else if (z < 3.5139522372978296e-86) {
tmp = (x - (y * z)) * (1.0 / t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (a * z) t_2 = (x / t_1) - (y / ((t / z) - a)) tmp = 0 if z < -32113435955957344.0: tmp = t_2 elif z < 3.5139522372978296e-86: tmp = (x - (y * z)) * (1.0 / t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(a * z)) t_2 = Float64(Float64(x / t_1) - Float64(y / Float64(Float64(t / z) - a))) tmp = 0.0 if (z < -32113435955957344.0) tmp = t_2; elseif (z < 3.5139522372978296e-86) tmp = Float64(Float64(x - Float64(y * z)) * Float64(1.0 / t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (a * z); t_2 = (x / t_1) - (y / ((t / z) - a)); tmp = 0.0; if (z < -32113435955957344.0) tmp = t_2; elseif (z < 3.5139522372978296e-86) tmp = (x - (y * z)) * (1.0 / t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t$95$1), $MachinePrecision] - N[(y / N[(N[(t / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -32113435955957344.0], t$95$2, If[Less[z, 3.5139522372978296e-86], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - a \cdot z\\
t_2 := \frac{x}{t\_1} - \frac{y}{\frac{t}{z} - a}\\
\mathbf{if}\;z < -32113435955957344:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z < 3.5139522372978296 \cdot 10^{-86}:\\
\;\;\;\;\left(x - y \cdot z\right) \cdot \frac{1}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024039
(FPCore (x y z t a)
:name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, A"
:precision binary64
:herbie-target
(if (< z -32113435955957344.0) (- (/ x (- t (* a z))) (/ y (- (/ t z) a))) (if (< z 3.5139522372978296e-86) (* (- x (* y z)) (/ 1.0 (- t (* a z)))) (- (/ x (- t (* a z))) (/ y (- (/ t z) a)))))
(/ (- x (* y z)) (- t (* a z))))