
(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 10 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
(if (<= z -9.6e+42)
(- (/ y a) (/ x (* z a)))
(if (<= z 1.8e+150)
(/ (- x (* z y)) (- t (* z a)))
(* y (/ (- 1.0 (/ x (* z y))) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.6e+42) {
tmp = (y / a) - (x / (z * a));
} else if (z <= 1.8e+150) {
tmp = (x - (z * y)) / (t - (z * a));
} else {
tmp = y * ((1.0 - (x / (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) :: tmp
if (z <= (-9.6d+42)) then
tmp = (y / a) - (x / (z * a))
else if (z <= 1.8d+150) then
tmp = (x - (z * y)) / (t - (z * a))
else
tmp = y * ((1.0d0 - (x / (z * 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 <= -9.6e+42) {
tmp = (y / a) - (x / (z * a));
} else if (z <= 1.8e+150) {
tmp = (x - (z * y)) / (t - (z * a));
} else {
tmp = y * ((1.0 - (x / (z * y))) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.6e+42: tmp = (y / a) - (x / (z * a)) elif z <= 1.8e+150: tmp = (x - (z * y)) / (t - (z * a)) else: tmp = y * ((1.0 - (x / (z * y))) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.6e+42) tmp = Float64(Float64(y / a) - Float64(x / Float64(z * a))); elseif (z <= 1.8e+150) tmp = Float64(Float64(x - Float64(z * y)) / Float64(t - Float64(z * a))); else tmp = Float64(y * Float64(Float64(1.0 - Float64(x / Float64(z * y))) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.6e+42) tmp = (y / a) - (x / (z * a)); elseif (z <= 1.8e+150) tmp = (x - (z * y)) / (t - (z * a)); else tmp = y * ((1.0 - (x / (z * y))) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.6e+42], N[(N[(y / a), $MachinePrecision] - N[(x / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+150], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(1.0 - N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{+42}:\\
\;\;\;\;\frac{y}{a} - \frac{x}{z \cdot a}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+150}:\\
\;\;\;\;\frac{x - z \cdot y}{t - z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{1 - \frac{x}{z \cdot y}}{a}\\
\end{array}
\end{array}
if z < -9.5999999999999994e42Initial program 67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in y around inf 74.5%
mul-1-neg74.5%
distribute-neg-frac274.5%
cancel-sign-sub-inv74.5%
*-commutative74.5%
+-commutative74.5%
*-commutative74.5%
distribute-lft-neg-in74.5%
distribute-rgt-neg-in74.5%
fma-undefine74.5%
neg-sub074.5%
fma-undefine74.5%
distribute-rgt-neg-in74.5%
distribute-lft-neg-in74.5%
*-commutative74.5%
associate--r+74.5%
neg-sub074.5%
distribute-rgt-neg-out74.5%
remove-double-neg74.5%
Simplified74.5%
Taylor expanded in a around inf 91.8%
associate-/l*89.5%
mul-1-neg89.5%
unsub-neg89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in y around 0 91.8%
+-commutative91.8%
mul-1-neg91.8%
unsub-neg91.8%
Simplified91.8%
if -9.5999999999999994e42 < z < 1.79999999999999993e150Initial program 97.2%
if 1.79999999999999993e150 < z Initial program 50.7%
*-commutative50.7%
Simplified50.7%
Taylor expanded in y around inf 58.2%
mul-1-neg58.2%
distribute-neg-frac258.2%
cancel-sign-sub-inv58.2%
*-commutative58.2%
+-commutative58.2%
*-commutative58.2%
distribute-lft-neg-in58.2%
distribute-rgt-neg-in58.2%
fma-undefine58.2%
neg-sub058.2%
fma-undefine58.2%
distribute-rgt-neg-in58.2%
distribute-lft-neg-in58.2%
*-commutative58.2%
associate--r+58.2%
neg-sub058.2%
distribute-rgt-neg-out58.2%
remove-double-neg58.2%
Simplified58.2%
Taylor expanded in a around inf 86.3%
associate-/l*82.6%
mul-1-neg82.6%
unsub-neg82.6%
*-commutative82.6%
Simplified82.6%
Final simplification94.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ x (- t (* z a)))) (t_2 (/ (- x (* z y)) t)))
(if (<= z -5.3e+47)
(- (/ y a) (/ x (* z a)))
(if (<= z -1.15e-16)
(* z (/ y (- (* z a) t)))
(if (<= z -2.5e-95)
t_1
(if (<= z -1.35e-174)
t_2
(if (<= z 7.5e-275)
t_1
(if (<= z 1.1e+56) t_2 (* y (/ (- 1.0 (/ x (* z y))) a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x / (t - (z * a));
double t_2 = (x - (z * y)) / t;
double tmp;
if (z <= -5.3e+47) {
tmp = (y / a) - (x / (z * a));
} else if (z <= -1.15e-16) {
tmp = z * (y / ((z * a) - t));
} else if (z <= -2.5e-95) {
tmp = t_1;
} else if (z <= -1.35e-174) {
tmp = t_2;
} else if (z <= 7.5e-275) {
tmp = t_1;
} else if (z <= 1.1e+56) {
tmp = t_2;
} else {
tmp = y * ((1.0 - (x / (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) :: t_2
real(8) :: tmp
t_1 = x / (t - (z * a))
t_2 = (x - (z * y)) / t
if (z <= (-5.3d+47)) then
tmp = (y / a) - (x / (z * a))
else if (z <= (-1.15d-16)) then
tmp = z * (y / ((z * a) - t))
else if (z <= (-2.5d-95)) then
tmp = t_1
else if (z <= (-1.35d-174)) then
tmp = t_2
else if (z <= 7.5d-275) then
tmp = t_1
else if (z <= 1.1d+56) then
tmp = t_2
else
tmp = y * ((1.0d0 - (x / (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 / (t - (z * a));
double t_2 = (x - (z * y)) / t;
double tmp;
if (z <= -5.3e+47) {
tmp = (y / a) - (x / (z * a));
} else if (z <= -1.15e-16) {
tmp = z * (y / ((z * a) - t));
} else if (z <= -2.5e-95) {
tmp = t_1;
} else if (z <= -1.35e-174) {
tmp = t_2;
} else if (z <= 7.5e-275) {
tmp = t_1;
} else if (z <= 1.1e+56) {
tmp = t_2;
} else {
tmp = y * ((1.0 - (x / (z * y))) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x / (t - (z * a)) t_2 = (x - (z * y)) / t tmp = 0 if z <= -5.3e+47: tmp = (y / a) - (x / (z * a)) elif z <= -1.15e-16: tmp = z * (y / ((z * a) - t)) elif z <= -2.5e-95: tmp = t_1 elif z <= -1.35e-174: tmp = t_2 elif z <= 7.5e-275: tmp = t_1 elif z <= 1.1e+56: tmp = t_2 else: tmp = y * ((1.0 - (x / (z * y))) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(x / Float64(t - Float64(z * a))) t_2 = Float64(Float64(x - Float64(z * y)) / t) tmp = 0.0 if (z <= -5.3e+47) tmp = Float64(Float64(y / a) - Float64(x / Float64(z * a))); elseif (z <= -1.15e-16) tmp = Float64(z * Float64(y / Float64(Float64(z * a) - t))); elseif (z <= -2.5e-95) tmp = t_1; elseif (z <= -1.35e-174) tmp = t_2; elseif (z <= 7.5e-275) tmp = t_1; elseif (z <= 1.1e+56) tmp = t_2; else tmp = Float64(y * Float64(Float64(1.0 - Float64(x / Float64(z * y))) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x / (t - (z * a)); t_2 = (x - (z * y)) / t; tmp = 0.0; if (z <= -5.3e+47) tmp = (y / a) - (x / (z * a)); elseif (z <= -1.15e-16) tmp = z * (y / ((z * a) - t)); elseif (z <= -2.5e-95) tmp = t_1; elseif (z <= -1.35e-174) tmp = t_2; elseif (z <= 7.5e-275) tmp = t_1; elseif (z <= 1.1e+56) tmp = t_2; else tmp = y * ((1.0 - (x / (z * y))) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -5.3e+47], N[(N[(y / a), $MachinePrecision] - N[(x / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.15e-16], N[(z * N[(y / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.5e-95], t$95$1, If[LessEqual[z, -1.35e-174], t$95$2, If[LessEqual[z, 7.5e-275], t$95$1, If[LessEqual[z, 1.1e+56], t$95$2, N[(y * N[(N[(1.0 - N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{t - z \cdot a}\\
t_2 := \frac{x - z \cdot y}{t}\\
\mathbf{if}\;z \leq -5.3 \cdot 10^{+47}:\\
\;\;\;\;\frac{y}{a} - \frac{x}{z \cdot a}\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-16}:\\
\;\;\;\;z \cdot \frac{y}{z \cdot a - t}\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-174}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+56}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{1 - \frac{x}{z \cdot y}}{a}\\
\end{array}
\end{array}
if z < -5.3e47Initial program 68.4%
*-commutative68.4%
Simplified68.4%
Taylor expanded in y around inf 73.4%
mul-1-neg73.4%
distribute-neg-frac273.4%
cancel-sign-sub-inv73.4%
*-commutative73.4%
+-commutative73.4%
*-commutative73.4%
distribute-lft-neg-in73.4%
distribute-rgt-neg-in73.4%
fma-undefine73.4%
neg-sub073.4%
fma-undefine73.4%
distribute-rgt-neg-in73.4%
distribute-lft-neg-in73.4%
*-commutative73.4%
associate--r+73.4%
neg-sub073.4%
distribute-rgt-neg-out73.4%
remove-double-neg73.4%
Simplified73.4%
Taylor expanded in a around inf 91.5%
associate-/l*89.1%
mul-1-neg89.1%
unsub-neg89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y around 0 91.5%
+-commutative91.5%
mul-1-neg91.5%
unsub-neg91.5%
Simplified91.5%
if -5.3e47 < z < -1.15e-16Initial program 90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in y around inf 92.6%
mul-1-neg92.6%
distribute-neg-frac292.6%
cancel-sign-sub-inv92.6%
*-commutative92.6%
+-commutative92.6%
*-commutative92.6%
distribute-lft-neg-in92.6%
distribute-rgt-neg-in92.6%
fma-undefine92.6%
neg-sub092.6%
fma-undefine92.6%
distribute-rgt-neg-in92.6%
distribute-lft-neg-in92.6%
*-commutative92.6%
associate--r+92.6%
neg-sub092.6%
distribute-rgt-neg-out92.6%
remove-double-neg92.6%
Simplified92.6%
Taylor expanded in y around inf 66.0%
*-commutative66.0%
associate-/l*75.2%
*-commutative75.2%
Applied egg-rr75.2%
if -1.15e-16 < z < -2.4999999999999999e-95 or -1.34999999999999994e-174 < z < 7.49999999999999943e-275Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 86.4%
*-commutative86.4%
Simplified86.4%
if -2.4999999999999999e-95 < z < -1.34999999999999994e-174 or 7.49999999999999943e-275 < z < 1.10000000000000008e56Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 77.9%
if 1.10000000000000008e56 < z Initial program 60.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in y around inf 71.2%
mul-1-neg71.2%
distribute-neg-frac271.2%
cancel-sign-sub-inv71.2%
*-commutative71.2%
+-commutative71.2%
*-commutative71.2%
distribute-lft-neg-in71.2%
distribute-rgt-neg-in71.2%
fma-undefine71.2%
neg-sub071.2%
fma-undefine71.2%
distribute-rgt-neg-in71.2%
distribute-lft-neg-in71.2%
*-commutative71.2%
associate--r+71.2%
neg-sub071.2%
distribute-rgt-neg-out71.2%
remove-double-neg71.2%
Simplified71.2%
Taylor expanded in a around inf 77.7%
associate-/l*75.4%
mul-1-neg75.4%
unsub-neg75.4%
*-commutative75.4%
Simplified75.4%
Final simplification81.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (/ y a) (/ x (* z a))))
(t_2 (/ x (- t (* z a))))
(t_3 (/ (- x (* z y)) t)))
(if (<= z -1.4e+48)
t_1
(if (<= z -5.7e-15)
(* z (/ y (- (* z a) t)))
(if (<= z -2.45e-95)
t_2
(if (<= z -3.6e-172)
t_3
(if (<= z 5e-274) t_2 (if (<= z 8e+48) t_3 t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) - (x / (z * a));
double t_2 = x / (t - (z * a));
double t_3 = (x - (z * y)) / t;
double tmp;
if (z <= -1.4e+48) {
tmp = t_1;
} else if (z <= -5.7e-15) {
tmp = z * (y / ((z * a) - t));
} else if (z <= -2.45e-95) {
tmp = t_2;
} else if (z <= -3.6e-172) {
tmp = t_3;
} else if (z <= 5e-274) {
tmp = t_2;
} else if (z <= 8e+48) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (y / a) - (x / (z * a))
t_2 = x / (t - (z * a))
t_3 = (x - (z * y)) / t
if (z <= (-1.4d+48)) then
tmp = t_1
else if (z <= (-5.7d-15)) then
tmp = z * (y / ((z * a) - t))
else if (z <= (-2.45d-95)) then
tmp = t_2
else if (z <= (-3.6d-172)) then
tmp = t_3
else if (z <= 5d-274) then
tmp = t_2
else if (z <= 8d+48) then
tmp = t_3
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 / a) - (x / (z * a));
double t_2 = x / (t - (z * a));
double t_3 = (x - (z * y)) / t;
double tmp;
if (z <= -1.4e+48) {
tmp = t_1;
} else if (z <= -5.7e-15) {
tmp = z * (y / ((z * a) - t));
} else if (z <= -2.45e-95) {
tmp = t_2;
} else if (z <= -3.6e-172) {
tmp = t_3;
} else if (z <= 5e-274) {
tmp = t_2;
} else if (z <= 8e+48) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / a) - (x / (z * a)) t_2 = x / (t - (z * a)) t_3 = (x - (z * y)) / t tmp = 0 if z <= -1.4e+48: tmp = t_1 elif z <= -5.7e-15: tmp = z * (y / ((z * a) - t)) elif z <= -2.45e-95: tmp = t_2 elif z <= -3.6e-172: tmp = t_3 elif z <= 5e-274: tmp = t_2 elif z <= 8e+48: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / a) - Float64(x / Float64(z * a))) t_2 = Float64(x / Float64(t - Float64(z * a))) t_3 = Float64(Float64(x - Float64(z * y)) / t) tmp = 0.0 if (z <= -1.4e+48) tmp = t_1; elseif (z <= -5.7e-15) tmp = Float64(z * Float64(y / Float64(Float64(z * a) - t))); elseif (z <= -2.45e-95) tmp = t_2; elseif (z <= -3.6e-172) tmp = t_3; elseif (z <= 5e-274) tmp = t_2; elseif (z <= 8e+48) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / a) - (x / (z * a)); t_2 = x / (t - (z * a)); t_3 = (x - (z * y)) / t; tmp = 0.0; if (z <= -1.4e+48) tmp = t_1; elseif (z <= -5.7e-15) tmp = z * (y / ((z * a) - t)); elseif (z <= -2.45e-95) tmp = t_2; elseif (z <= -3.6e-172) tmp = t_3; elseif (z <= 5e-274) tmp = t_2; elseif (z <= 8e+48) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] - N[(x / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -1.4e+48], t$95$1, If[LessEqual[z, -5.7e-15], N[(z * N[(y / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.45e-95], t$95$2, If[LessEqual[z, -3.6e-172], t$95$3, If[LessEqual[z, 5e-274], t$95$2, If[LessEqual[z, 8e+48], t$95$3, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} - \frac{x}{z \cdot a}\\
t_2 := \frac{x}{t - z \cdot a}\\
t_3 := \frac{x - z \cdot y}{t}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.7 \cdot 10^{-15}:\\
\;\;\;\;z \cdot \frac{y}{z \cdot a - t}\\
\mathbf{elif}\;z \leq -2.45 \cdot 10^{-95}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-172}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-274}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+48}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.40000000000000006e48 or 8.00000000000000035e48 < z Initial program 64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in y around inf 72.3%
mul-1-neg72.3%
distribute-neg-frac272.3%
cancel-sign-sub-inv72.3%
*-commutative72.3%
+-commutative72.3%
*-commutative72.3%
distribute-lft-neg-in72.3%
distribute-rgt-neg-in72.3%
fma-undefine72.3%
neg-sub072.3%
fma-undefine72.3%
distribute-rgt-neg-in72.3%
distribute-lft-neg-in72.3%
*-commutative72.3%
associate--r+72.3%
neg-sub072.3%
distribute-rgt-neg-out72.3%
remove-double-neg72.3%
Simplified72.3%
Taylor expanded in a around inf 84.8%
associate-/l*82.4%
mul-1-neg82.4%
unsub-neg82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in y around 0 83.5%
+-commutative83.5%
mul-1-neg83.5%
unsub-neg83.5%
Simplified83.5%
if -1.40000000000000006e48 < z < -5.7000000000000003e-15Initial program 90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in y around inf 92.6%
mul-1-neg92.6%
distribute-neg-frac292.6%
cancel-sign-sub-inv92.6%
*-commutative92.6%
+-commutative92.6%
*-commutative92.6%
distribute-lft-neg-in92.6%
distribute-rgt-neg-in92.6%
fma-undefine92.6%
neg-sub092.6%
fma-undefine92.6%
distribute-rgt-neg-in92.6%
distribute-lft-neg-in92.6%
*-commutative92.6%
associate--r+92.6%
neg-sub092.6%
distribute-rgt-neg-out92.6%
remove-double-neg92.6%
Simplified92.6%
Taylor expanded in y around inf 66.0%
*-commutative66.0%
associate-/l*75.2%
*-commutative75.2%
Applied egg-rr75.2%
if -5.7000000000000003e-15 < z < -2.45e-95 or -3.60000000000000015e-172 < z < 5e-274Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 86.4%
*-commutative86.4%
Simplified86.4%
if -2.45e-95 < z < -3.60000000000000015e-172 or 5e-274 < z < 8.00000000000000035e48Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 77.9%
Final simplification81.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ x (- t (* z a)))) (t_2 (/ (- x (* z y)) t)))
(if (<= z -2.7e+105)
(/ y a)
(if (<= z -2e-15)
(* y (/ z (- (* z a) t)))
(if (<= z -2.5e-95)
t_1
(if (<= z -1.15e-174)
t_2
(if (<= z 4.4e-275) t_1 (if (<= z 1e+54) t_2 (/ y a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x / (t - (z * a));
double t_2 = (x - (z * y)) / t;
double tmp;
if (z <= -2.7e+105) {
tmp = y / a;
} else if (z <= -2e-15) {
tmp = y * (z / ((z * a) - t));
} else if (z <= -2.5e-95) {
tmp = t_1;
} else if (z <= -1.15e-174) {
tmp = t_2;
} else if (z <= 4.4e-275) {
tmp = t_1;
} else if (z <= 1e+54) {
tmp = t_2;
} 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 = x / (t - (z * a))
t_2 = (x - (z * y)) / t
if (z <= (-2.7d+105)) then
tmp = y / a
else if (z <= (-2d-15)) then
tmp = y * (z / ((z * a) - t))
else if (z <= (-2.5d-95)) then
tmp = t_1
else if (z <= (-1.15d-174)) then
tmp = t_2
else if (z <= 4.4d-275) then
tmp = t_1
else if (z <= 1d+54) then
tmp = t_2
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 / (t - (z * a));
double t_2 = (x - (z * y)) / t;
double tmp;
if (z <= -2.7e+105) {
tmp = y / a;
} else if (z <= -2e-15) {
tmp = y * (z / ((z * a) - t));
} else if (z <= -2.5e-95) {
tmp = t_1;
} else if (z <= -1.15e-174) {
tmp = t_2;
} else if (z <= 4.4e-275) {
tmp = t_1;
} else if (z <= 1e+54) {
tmp = t_2;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x / (t - (z * a)) t_2 = (x - (z * y)) / t tmp = 0 if z <= -2.7e+105: tmp = y / a elif z <= -2e-15: tmp = y * (z / ((z * a) - t)) elif z <= -2.5e-95: tmp = t_1 elif z <= -1.15e-174: tmp = t_2 elif z <= 4.4e-275: tmp = t_1 elif z <= 1e+54: tmp = t_2 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(x / Float64(t - Float64(z * a))) t_2 = Float64(Float64(x - Float64(z * y)) / t) tmp = 0.0 if (z <= -2.7e+105) tmp = Float64(y / a); elseif (z <= -2e-15) tmp = Float64(y * Float64(z / Float64(Float64(z * a) - t))); elseif (z <= -2.5e-95) tmp = t_1; elseif (z <= -1.15e-174) tmp = t_2; elseif (z <= 4.4e-275) tmp = t_1; elseif (z <= 1e+54) tmp = t_2; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x / (t - (z * a)); t_2 = (x - (z * y)) / t; tmp = 0.0; if (z <= -2.7e+105) tmp = y / a; elseif (z <= -2e-15) tmp = y * (z / ((z * a) - t)); elseif (z <= -2.5e-95) tmp = t_1; elseif (z <= -1.15e-174) tmp = t_2; elseif (z <= 4.4e-275) tmp = t_1; elseif (z <= 1e+54) tmp = t_2; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -2.7e+105], N[(y / a), $MachinePrecision], If[LessEqual[z, -2e-15], N[(y * N[(z / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.5e-95], t$95$1, If[LessEqual[z, -1.15e-174], t$95$2, If[LessEqual[z, 4.4e-275], t$95$1, If[LessEqual[z, 1e+54], t$95$2, N[(y / a), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{t - z \cdot a}\\
t_2 := \frac{x - z \cdot y}{t}\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+105}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-15}:\\
\;\;\;\;y \cdot \frac{z}{z \cdot a - t}\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-174}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{+54}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -2.70000000000000016e105 or 1.0000000000000001e54 < z Initial program 61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in z around inf 72.5%
if -2.70000000000000016e105 < z < -2.0000000000000002e-15Initial program 90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in x around 0 69.7%
mul-1-neg69.7%
associate-/l*79.3%
distribute-rgt-neg-in79.3%
distribute-neg-frac279.3%
cancel-sign-sub-inv79.3%
*-commutative79.3%
+-commutative79.3%
*-commutative79.3%
distribute-lft-neg-in79.3%
distribute-rgt-neg-in79.3%
fma-undefine79.3%
neg-sub079.3%
fma-undefine79.3%
distribute-rgt-neg-in79.3%
distribute-lft-neg-in79.3%
*-commutative79.3%
associate--r+79.3%
neg-sub079.3%
distribute-rgt-neg-out79.3%
remove-double-neg79.3%
Simplified79.3%
if -2.0000000000000002e-15 < z < -2.4999999999999999e-95 or -1.1499999999999999e-174 < z < 4.39999999999999977e-275Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 86.4%
*-commutative86.4%
Simplified86.4%
if -2.4999999999999999e-95 < z < -1.1499999999999999e-174 or 4.39999999999999977e-275 < z < 1.0000000000000001e54Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 77.9%
Final simplification78.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ x (- t (* z a)))) (t_2 (/ (- x (* z y)) t)))
(if (<= z -1.04e+102)
(/ y a)
(if (<= z -1.3e-16)
(* z (/ y (- (* z a) t)))
(if (<= z -2.5e-95)
t_1
(if (<= z -8.5e-172)
t_2
(if (<= z 4.55e-274) t_1 (if (<= z 1.55e+66) t_2 (/ y a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x / (t - (z * a));
double t_2 = (x - (z * y)) / t;
double tmp;
if (z <= -1.04e+102) {
tmp = y / a;
} else if (z <= -1.3e-16) {
tmp = z * (y / ((z * a) - t));
} else if (z <= -2.5e-95) {
tmp = t_1;
} else if (z <= -8.5e-172) {
tmp = t_2;
} else if (z <= 4.55e-274) {
tmp = t_1;
} else if (z <= 1.55e+66) {
tmp = t_2;
} 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 = x / (t - (z * a))
t_2 = (x - (z * y)) / t
if (z <= (-1.04d+102)) then
tmp = y / a
else if (z <= (-1.3d-16)) then
tmp = z * (y / ((z * a) - t))
else if (z <= (-2.5d-95)) then
tmp = t_1
else if (z <= (-8.5d-172)) then
tmp = t_2
else if (z <= 4.55d-274) then
tmp = t_1
else if (z <= 1.55d+66) then
tmp = t_2
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 / (t - (z * a));
double t_2 = (x - (z * y)) / t;
double tmp;
if (z <= -1.04e+102) {
tmp = y / a;
} else if (z <= -1.3e-16) {
tmp = z * (y / ((z * a) - t));
} else if (z <= -2.5e-95) {
tmp = t_1;
} else if (z <= -8.5e-172) {
tmp = t_2;
} else if (z <= 4.55e-274) {
tmp = t_1;
} else if (z <= 1.55e+66) {
tmp = t_2;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x / (t - (z * a)) t_2 = (x - (z * y)) / t tmp = 0 if z <= -1.04e+102: tmp = y / a elif z <= -1.3e-16: tmp = z * (y / ((z * a) - t)) elif z <= -2.5e-95: tmp = t_1 elif z <= -8.5e-172: tmp = t_2 elif z <= 4.55e-274: tmp = t_1 elif z <= 1.55e+66: tmp = t_2 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(x / Float64(t - Float64(z * a))) t_2 = Float64(Float64(x - Float64(z * y)) / t) tmp = 0.0 if (z <= -1.04e+102) tmp = Float64(y / a); elseif (z <= -1.3e-16) tmp = Float64(z * Float64(y / Float64(Float64(z * a) - t))); elseif (z <= -2.5e-95) tmp = t_1; elseif (z <= -8.5e-172) tmp = t_2; elseif (z <= 4.55e-274) tmp = t_1; elseif (z <= 1.55e+66) tmp = t_2; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x / (t - (z * a)); t_2 = (x - (z * y)) / t; tmp = 0.0; if (z <= -1.04e+102) tmp = y / a; elseif (z <= -1.3e-16) tmp = z * (y / ((z * a) - t)); elseif (z <= -2.5e-95) tmp = t_1; elseif (z <= -8.5e-172) tmp = t_2; elseif (z <= 4.55e-274) tmp = t_1; elseif (z <= 1.55e+66) tmp = t_2; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -1.04e+102], N[(y / a), $MachinePrecision], If[LessEqual[z, -1.3e-16], N[(z * N[(y / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.5e-95], t$95$1, If[LessEqual[z, -8.5e-172], t$95$2, If[LessEqual[z, 4.55e-274], t$95$1, If[LessEqual[z, 1.55e+66], t$95$2, N[(y / a), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{t - z \cdot a}\\
t_2 := \frac{x - z \cdot y}{t}\\
\mathbf{if}\;z \leq -1.04 \cdot 10^{+102}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-16}:\\
\;\;\;\;z \cdot \frac{y}{z \cdot a - t}\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-172}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 4.55 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+66}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.04e102 or 1.55000000000000009e66 < z Initial program 61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in z around inf 72.5%
if -1.04e102 < z < -1.2999999999999999e-16Initial program 90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in y around inf 94.7%
mul-1-neg94.7%
distribute-neg-frac294.7%
cancel-sign-sub-inv94.7%
*-commutative94.7%
+-commutative94.7%
*-commutative94.7%
distribute-lft-neg-in94.7%
distribute-rgt-neg-in94.7%
fma-undefine94.7%
neg-sub094.7%
fma-undefine94.7%
distribute-rgt-neg-in94.7%
distribute-lft-neg-in94.7%
*-commutative94.7%
associate--r+94.7%
neg-sub094.7%
distribute-rgt-neg-out94.7%
remove-double-neg94.7%
Simplified94.7%
Taylor expanded in y around inf 69.7%
*-commutative69.7%
associate-/l*79.3%
*-commutative79.3%
Applied egg-rr79.3%
if -1.2999999999999999e-16 < z < -2.4999999999999999e-95 or -8.49999999999999963e-172 < z < 4.54999999999999992e-274Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 86.4%
*-commutative86.4%
Simplified86.4%
if -2.4999999999999999e-95 < z < -8.49999999999999963e-172 or 4.54999999999999992e-274 < z < 1.55000000000000009e66Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 77.9%
Final simplification78.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x (* z y)) t)))
(if (<= z -4.8e+33)
(/ y a)
(if (<= z -1.45e-16)
t_1
(if (<= z 1.14e-274)
(/ x (- t (* z a)))
(if (<= z 1.5e+55) t_1 (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (z * y)) / t;
double tmp;
if (z <= -4.8e+33) {
tmp = y / a;
} else if (z <= -1.45e-16) {
tmp = t_1;
} else if (z <= 1.14e-274) {
tmp = x / (t - (z * a));
} else if (z <= 1.5e+55) {
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 - (z * y)) / t
if (z <= (-4.8d+33)) then
tmp = y / a
else if (z <= (-1.45d-16)) then
tmp = t_1
else if (z <= 1.14d-274) then
tmp = x / (t - (z * a))
else if (z <= 1.5d+55) 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 - (z * y)) / t;
double tmp;
if (z <= -4.8e+33) {
tmp = y / a;
} else if (z <= -1.45e-16) {
tmp = t_1;
} else if (z <= 1.14e-274) {
tmp = x / (t - (z * a));
} else if (z <= 1.5e+55) {
tmp = t_1;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - (z * y)) / t tmp = 0 if z <= -4.8e+33: tmp = y / a elif z <= -1.45e-16: tmp = t_1 elif z <= 1.14e-274: tmp = x / (t - (z * a)) elif z <= 1.5e+55: tmp = t_1 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - Float64(z * y)) / t) tmp = 0.0 if (z <= -4.8e+33) tmp = Float64(y / a); elseif (z <= -1.45e-16) tmp = t_1; elseif (z <= 1.14e-274) tmp = Float64(x / Float64(t - Float64(z * a))); elseif (z <= 1.5e+55) tmp = t_1; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - (z * y)) / t; tmp = 0.0; if (z <= -4.8e+33) tmp = y / a; elseif (z <= -1.45e-16) tmp = t_1; elseif (z <= 1.14e-274) tmp = x / (t - (z * a)); elseif (z <= 1.5e+55) 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[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -4.8e+33], N[(y / a), $MachinePrecision], If[LessEqual[z, -1.45e-16], t$95$1, If[LessEqual[z, 1.14e-274], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+55], t$95$1, N[(y / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - z \cdot y}{t}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+33}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.14 \cdot 10^{-274}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -4.8e33 or 1.50000000000000008e55 < z Initial program 64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in z around inf 72.7%
if -4.8e33 < z < -1.4499999999999999e-16 or 1.13999999999999998e-274 < z < 1.50000000000000008e55Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around inf 77.1%
if -1.4499999999999999e-16 < z < 1.13999999999999998e-274Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 79.1%
*-commutative79.1%
Simplified79.1%
Final simplification76.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.2e+31)
(/ y a)
(if (<= z 7.2e-129)
(/ x t)
(if (<= z 6e-43) (/ (* z y) (- t)) (if (<= z 7.6e+48) (/ x t) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e+31) {
tmp = y / a;
} else if (z <= 7.2e-129) {
tmp = x / t;
} else if (z <= 6e-43) {
tmp = (z * y) / -t;
} else if (z <= 7.6e+48) {
tmp = x / 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 <= (-1.2d+31)) then
tmp = y / a
else if (z <= 7.2d-129) then
tmp = x / t
else if (z <= 6d-43) then
tmp = (z * y) / -t
else if (z <= 7.6d+48) then
tmp = x / 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 <= -1.2e+31) {
tmp = y / a;
} else if (z <= 7.2e-129) {
tmp = x / t;
} else if (z <= 6e-43) {
tmp = (z * y) / -t;
} else if (z <= 7.6e+48) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2e+31: tmp = y / a elif z <= 7.2e-129: tmp = x / t elif z <= 6e-43: tmp = (z * y) / -t elif z <= 7.6e+48: tmp = x / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2e+31) tmp = Float64(y / a); elseif (z <= 7.2e-129) tmp = Float64(x / t); elseif (z <= 6e-43) tmp = Float64(Float64(z * y) / Float64(-t)); elseif (z <= 7.6e+48) tmp = Float64(x / t); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.2e+31) tmp = y / a; elseif (z <= 7.2e-129) tmp = x / t; elseif (z <= 6e-43) tmp = (z * y) / -t; elseif (z <= 7.6e+48) tmp = x / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e+31], N[(y / a), $MachinePrecision], If[LessEqual[z, 7.2e-129], N[(x / t), $MachinePrecision], If[LessEqual[z, 6e-43], N[(N[(z * y), $MachinePrecision] / (-t)), $MachinePrecision], If[LessEqual[z, 7.6e+48], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+31}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-129}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-43}:\\
\;\;\;\;\frac{z \cdot y}{-t}\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+48}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.19999999999999991e31 or 7.60000000000000001e48 < z Initial program 65.7%
*-commutative65.7%
Simplified65.7%
Taylor expanded in z around inf 71.6%
if -1.19999999999999991e31 < z < 7.2e-129 or 6.00000000000000007e-43 < z < 7.60000000000000001e48Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 56.4%
if 7.2e-129 < z < 6.00000000000000007e-43Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around inf 72.9%
Taylor expanded in x around 0 58.5%
mul-1-neg58.5%
distribute-rgt-neg-out58.5%
Simplified58.5%
Final simplification62.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.1e+31) (not (<= z 5e+120))) (/ y a) (/ x (- t (* z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.1e+31) || !(z <= 5e+120)) {
tmp = y / a;
} else {
tmp = x / (t - (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) :: tmp
if ((z <= (-3.1d+31)) .or. (.not. (z <= 5d+120))) then
tmp = y / a
else
tmp = x / (t - (z * 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 <= -3.1e+31) || !(z <= 5e+120)) {
tmp = y / a;
} else {
tmp = x / (t - (z * a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.1e+31) or not (z <= 5e+120): tmp = y / a else: tmp = x / (t - (z * a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.1e+31) || !(z <= 5e+120)) tmp = Float64(y / a); else tmp = Float64(x / Float64(t - Float64(z * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.1e+31) || ~((z <= 5e+120))) tmp = y / a; else tmp = x / (t - (z * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.1e+31], N[Not[LessEqual[z, 5e+120]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+31} \lor \neg \left(z \leq 5 \cdot 10^{+120}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\end{array}
\end{array}
if z < -3.1000000000000002e31 or 5.00000000000000019e120 < z Initial program 64.0%
*-commutative64.0%
Simplified64.0%
Taylor expanded in z around inf 74.8%
if -3.1000000000000002e31 < z < 5.00000000000000019e120Initial program 98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in x around inf 68.2%
*-commutative68.2%
Simplified68.2%
Final simplification70.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.6e+32) (not (<= z 1.05e+49))) (/ y a) (/ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.6e+32) || !(z <= 1.05e+49)) {
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.6d+32)) .or. (.not. (z <= 1.05d+49))) 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.6e+32) || !(z <= 1.05e+49)) {
tmp = y / a;
} else {
tmp = x / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.6e+32) or not (z <= 1.05e+49): tmp = y / a else: tmp = x / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.6e+32) || !(z <= 1.05e+49)) 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.6e+32) || ~((z <= 1.05e+49))) tmp = y / a; else tmp = x / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.6e+32], N[Not[LessEqual[z, 1.05e+49]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(x / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+32} \lor \neg \left(z \leq 1.05 \cdot 10^{+49}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t}\\
\end{array}
\end{array}
if z < -2.6000000000000002e32 or 1.05000000000000005e49 < z Initial program 65.7%
*-commutative65.7%
Simplified65.7%
Taylor expanded in z around inf 71.6%
if -2.6000000000000002e32 < z < 1.05000000000000005e49Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 53.8%
Final simplification60.7%
(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.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in z around 0 37.4%
Final simplification37.4%
(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 2024115
(FPCore (x y z t a)
:name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, A"
:precision binary64
:alt
(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))))