
(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 (- t (* z a))))
(if (<= z -1.56e+125)
(/ (- y (/ x z)) a)
(if (<= z 3.1e+126)
(- (/ x t_1) (/ (* z y) t_1))
(/ (- y) (- (/ t z) a))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (z * a);
double tmp;
if (z <= -1.56e+125) {
tmp = (y - (x / z)) / a;
} else if (z <= 3.1e+126) {
tmp = (x / t_1) - ((z * y) / t_1);
} else {
tmp = -y / ((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) :: t_1
real(8) :: tmp
t_1 = t - (z * a)
if (z <= (-1.56d+125)) then
tmp = (y - (x / z)) / a
else if (z <= 3.1d+126) then
tmp = (x / t_1) - ((z * y) / t_1)
else
tmp = -y / ((t / 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 = t - (z * a);
double tmp;
if (z <= -1.56e+125) {
tmp = (y - (x / z)) / a;
} else if (z <= 3.1e+126) {
tmp = (x / t_1) - ((z * y) / t_1);
} else {
tmp = -y / ((t / z) - a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (z * a) tmp = 0 if z <= -1.56e+125: tmp = (y - (x / z)) / a elif z <= 3.1e+126: tmp = (x / t_1) - ((z * y) / t_1) else: tmp = -y / ((t / z) - a) return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(z * a)) tmp = 0.0 if (z <= -1.56e+125) tmp = Float64(Float64(y - Float64(x / z)) / a); elseif (z <= 3.1e+126) tmp = Float64(Float64(x / t_1) - Float64(Float64(z * y) / t_1)); else tmp = Float64(Float64(-y) / Float64(Float64(t / z) - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (z * a); tmp = 0.0; if (z <= -1.56e+125) tmp = (y - (x / z)) / a; elseif (z <= 3.1e+126) tmp = (x / t_1) - ((z * y) / t_1); else tmp = -y / ((t / z) - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.56e+125], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 3.1e+126], N[(N[(x / t$95$1), $MachinePrecision] - N[(N[(z * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[((-y) / N[(N[(t / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - z \cdot a\\
\mathbf{if}\;z \leq -1.56 \cdot 10^{+125}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+126}:\\
\;\;\;\;\frac{x}{t_1} - \frac{z \cdot y}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-y}{\frac{t}{z} - a}\\
\end{array}
\end{array}
if z < -1.56e125Initial program 55.3%
*-commutative55.3%
Simplified55.3%
Taylor expanded in x around 0 55.3%
fma-def55.3%
associate-/l*68.3%
*-commutative68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in a around inf 83.3%
mul-1-neg83.3%
sub-neg83.3%
Simplified83.3%
if -1.56e125 < z < 3.1e126Initial program 98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in x around 0 98.2%
if 3.1e126 < z Initial program 52.8%
*-commutative52.8%
Simplified52.8%
Taylor expanded in x around 0 52.8%
fma-def52.8%
associate-/l*75.2%
*-commutative75.2%
*-commutative75.2%
Simplified75.2%
Taylor expanded in t around inf 53.7%
Taylor expanded in y around inf 45.7%
mul-1-neg45.7%
associate-/l*68.1%
distribute-neg-frac68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in t around 0 90.4%
neg-mul-190.4%
+-commutative90.4%
unsub-neg90.4%
Simplified90.4%
Final simplification94.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ x (- t (* z a)))) (t_2 (/ (- y) (- (/ t z) a))))
(if (<= z -1300000000.0)
t_2
(if (<= z 1.32e-158)
t_1
(if (<= z 6.8e-108)
(* z (/ y (- (* z a) t)))
(if (<= z 3.4e-75)
(/ (- x (* z y)) t)
(if (<= z 3.9e-19)
(/ (- y (/ x z)) a)
(if (<= z 1.02e+51) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x / (t - (z * a));
double t_2 = -y / ((t / z) - a);
double tmp;
if (z <= -1300000000.0) {
tmp = t_2;
} else if (z <= 1.32e-158) {
tmp = t_1;
} else if (z <= 6.8e-108) {
tmp = z * (y / ((z * a) - t));
} else if (z <= 3.4e-75) {
tmp = (x - (z * y)) / t;
} else if (z <= 3.9e-19) {
tmp = (y - (x / z)) / a;
} else if (z <= 1.02e+51) {
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 / (t - (z * a))
t_2 = -y / ((t / z) - a)
if (z <= (-1300000000.0d0)) then
tmp = t_2
else if (z <= 1.32d-158) then
tmp = t_1
else if (z <= 6.8d-108) then
tmp = z * (y / ((z * a) - t))
else if (z <= 3.4d-75) then
tmp = (x - (z * y)) / t
else if (z <= 3.9d-19) then
tmp = (y - (x / z)) / a
else if (z <= 1.02d+51) 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 / (t - (z * a));
double t_2 = -y / ((t / z) - a);
double tmp;
if (z <= -1300000000.0) {
tmp = t_2;
} else if (z <= 1.32e-158) {
tmp = t_1;
} else if (z <= 6.8e-108) {
tmp = z * (y / ((z * a) - t));
} else if (z <= 3.4e-75) {
tmp = (x - (z * y)) / t;
} else if (z <= 3.9e-19) {
tmp = (y - (x / z)) / a;
} else if (z <= 1.02e+51) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x / (t - (z * a)) t_2 = -y / ((t / z) - a) tmp = 0 if z <= -1300000000.0: tmp = t_2 elif z <= 1.32e-158: tmp = t_1 elif z <= 6.8e-108: tmp = z * (y / ((z * a) - t)) elif z <= 3.4e-75: tmp = (x - (z * y)) / t elif z <= 3.9e-19: tmp = (y - (x / z)) / a elif z <= 1.02e+51: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x / Float64(t - Float64(z * a))) t_2 = Float64(Float64(-y) / Float64(Float64(t / z) - a)) tmp = 0.0 if (z <= -1300000000.0) tmp = t_2; elseif (z <= 1.32e-158) tmp = t_1; elseif (z <= 6.8e-108) tmp = Float64(z * Float64(y / Float64(Float64(z * a) - t))); elseif (z <= 3.4e-75) tmp = Float64(Float64(x - Float64(z * y)) / t); elseif (z <= 3.9e-19) tmp = Float64(Float64(y - Float64(x / z)) / a); elseif (z <= 1.02e+51) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x / (t - (z * a)); t_2 = -y / ((t / z) - a); tmp = 0.0; if (z <= -1300000000.0) tmp = t_2; elseif (z <= 1.32e-158) tmp = t_1; elseif (z <= 6.8e-108) tmp = z * (y / ((z * a) - t)); elseif (z <= 3.4e-75) tmp = (x - (z * y)) / t; elseif (z <= 3.9e-19) tmp = (y - (x / z)) / a; elseif (z <= 1.02e+51) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-y) / N[(N[(t / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1300000000.0], t$95$2, If[LessEqual[z, 1.32e-158], t$95$1, If[LessEqual[z, 6.8e-108], N[(z * N[(y / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-75], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 3.9e-19], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.02e+51], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{t - z \cdot a}\\
t_2 := \frac{-y}{\frac{t}{z} - a}\\
\mathbf{if}\;z \leq -1300000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-108}:\\
\;\;\;\;z \cdot \frac{y}{z \cdot a - t}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-75}:\\
\;\;\;\;\frac{x - z \cdot y}{t}\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-19}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.3e9 or 1.02e51 < z Initial program 65.1%
*-commutative65.1%
Simplified65.1%
Taylor expanded in x around 0 65.1%
fma-def65.1%
associate-/l*78.1%
*-commutative78.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in t around inf 56.6%
Taylor expanded in y around inf 54.3%
mul-1-neg54.3%
associate-/l*67.3%
distribute-neg-frac67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in t around 0 84.2%
neg-mul-184.2%
+-commutative84.2%
unsub-neg84.2%
Simplified84.2%
if -1.3e9 < z < 1.3200000000000001e-158 or 3.89999999999999995e-19 < z < 1.02e51Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 83.4%
*-commutative83.4%
Simplified83.4%
if 1.3200000000000001e-158 < z < 6.80000000000000004e-108Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 92.0%
mul-1-neg92.0%
sub-neg92.0%
+-commutative92.0%
distribute-rgt-neg-in92.0%
fma-udef92.0%
associate-*l/91.7%
distribute-rgt-neg-in91.7%
fma-udef91.7%
distribute-rgt-neg-in91.7%
+-commutative91.7%
sub-neg91.7%
*-commutative91.7%
Simplified91.7%
associate-*l/92.0%
frac-2neg92.0%
add-sqr-sqrt0.0%
sqrt-unprod17.2%
sqr-neg17.2%
sqrt-unprod17.2%
add-sqr-sqrt17.2%
distribute-rgt-neg-out17.2%
add-sqr-sqrt0.0%
sqrt-unprod87.1%
sqr-neg87.1%
sqrt-unprod91.6%
add-sqr-sqrt92.0%
sub-neg92.0%
distribute-neg-in92.0%
distribute-lft-neg-in92.0%
add-sqr-sqrt0.0%
Applied egg-rr92.0%
associate-/l*77.4%
associate-/r/91.7%
+-commutative91.7%
unsub-neg91.7%
Simplified91.7%
if 6.80000000000000004e-108 < z < 3.40000000000000015e-75Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around inf 99.7%
if 3.40000000000000015e-75 < z < 3.89999999999999995e-19Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 99.7%
fma-def99.7%
associate-/l*99.7%
*-commutative99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in a around inf 82.0%
mul-1-neg82.0%
sub-neg82.0%
Simplified82.0%
Final simplification84.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ x (- t (* z a)))) (t_2 (/ (- y) (- (/ t z) a))))
(if (<= z -330000000.0)
t_2
(if (<= z 1.8e-158)
t_1
(if (<= z 6.8e-108)
(* z (/ y (- (* z a) t)))
(if (<= z 3.4e-75)
(/ (- x (* z y)) t)
(if (<= z 3.9e-19)
(- (/ y a) (/ (/ x a) z))
(if (<= z 1.02e+51) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x / (t - (z * a));
double t_2 = -y / ((t / z) - a);
double tmp;
if (z <= -330000000.0) {
tmp = t_2;
} else if (z <= 1.8e-158) {
tmp = t_1;
} else if (z <= 6.8e-108) {
tmp = z * (y / ((z * a) - t));
} else if (z <= 3.4e-75) {
tmp = (x - (z * y)) / t;
} else if (z <= 3.9e-19) {
tmp = (y / a) - ((x / a) / z);
} else if (z <= 1.02e+51) {
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 / (t - (z * a))
t_2 = -y / ((t / z) - a)
if (z <= (-330000000.0d0)) then
tmp = t_2
else if (z <= 1.8d-158) then
tmp = t_1
else if (z <= 6.8d-108) then
tmp = z * (y / ((z * a) - t))
else if (z <= 3.4d-75) then
tmp = (x - (z * y)) / t
else if (z <= 3.9d-19) then
tmp = (y / a) - ((x / a) / z)
else if (z <= 1.02d+51) 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 / (t - (z * a));
double t_2 = -y / ((t / z) - a);
double tmp;
if (z <= -330000000.0) {
tmp = t_2;
} else if (z <= 1.8e-158) {
tmp = t_1;
} else if (z <= 6.8e-108) {
tmp = z * (y / ((z * a) - t));
} else if (z <= 3.4e-75) {
tmp = (x - (z * y)) / t;
} else if (z <= 3.9e-19) {
tmp = (y / a) - ((x / a) / z);
} else if (z <= 1.02e+51) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x / (t - (z * a)) t_2 = -y / ((t / z) - a) tmp = 0 if z <= -330000000.0: tmp = t_2 elif z <= 1.8e-158: tmp = t_1 elif z <= 6.8e-108: tmp = z * (y / ((z * a) - t)) elif z <= 3.4e-75: tmp = (x - (z * y)) / t elif z <= 3.9e-19: tmp = (y / a) - ((x / a) / z) elif z <= 1.02e+51: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x / Float64(t - Float64(z * a))) t_2 = Float64(Float64(-y) / Float64(Float64(t / z) - a)) tmp = 0.0 if (z <= -330000000.0) tmp = t_2; elseif (z <= 1.8e-158) tmp = t_1; elseif (z <= 6.8e-108) tmp = Float64(z * Float64(y / Float64(Float64(z * a) - t))); elseif (z <= 3.4e-75) tmp = Float64(Float64(x - Float64(z * y)) / t); elseif (z <= 3.9e-19) tmp = Float64(Float64(y / a) - Float64(Float64(x / a) / z)); elseif (z <= 1.02e+51) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x / (t - (z * a)); t_2 = -y / ((t / z) - a); tmp = 0.0; if (z <= -330000000.0) tmp = t_2; elseif (z <= 1.8e-158) tmp = t_1; elseif (z <= 6.8e-108) tmp = z * (y / ((z * a) - t)); elseif (z <= 3.4e-75) tmp = (x - (z * y)) / t; elseif (z <= 3.9e-19) tmp = (y / a) - ((x / a) / z); elseif (z <= 1.02e+51) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-y) / N[(N[(t / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -330000000.0], t$95$2, If[LessEqual[z, 1.8e-158], t$95$1, If[LessEqual[z, 6.8e-108], N[(z * N[(y / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-75], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 3.9e-19], N[(N[(y / a), $MachinePrecision] - N[(N[(x / a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+51], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{t - z \cdot a}\\
t_2 := \frac{-y}{\frac{t}{z} - a}\\
\mathbf{if}\;z \leq -330000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-108}:\\
\;\;\;\;z \cdot \frac{y}{z \cdot a - t}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-75}:\\
\;\;\;\;\frac{x - z \cdot y}{t}\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-19}:\\
\;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -3.3e8 or 1.02e51 < z Initial program 65.1%
*-commutative65.1%
Simplified65.1%
Taylor expanded in x around 0 65.1%
fma-def65.1%
associate-/l*78.1%
*-commutative78.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in t around inf 56.6%
Taylor expanded in y around inf 54.3%
mul-1-neg54.3%
associate-/l*67.3%
distribute-neg-frac67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in t around 0 84.2%
neg-mul-184.2%
+-commutative84.2%
unsub-neg84.2%
Simplified84.2%
if -3.3e8 < z < 1.79999999999999995e-158 or 3.89999999999999995e-19 < z < 1.02e51Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 83.4%
*-commutative83.4%
Simplified83.4%
if 1.79999999999999995e-158 < z < 6.80000000000000004e-108Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 92.0%
mul-1-neg92.0%
sub-neg92.0%
+-commutative92.0%
distribute-rgt-neg-in92.0%
fma-udef92.0%
associate-*l/91.7%
distribute-rgt-neg-in91.7%
fma-udef91.7%
distribute-rgt-neg-in91.7%
+-commutative91.7%
sub-neg91.7%
*-commutative91.7%
Simplified91.7%
associate-*l/92.0%
frac-2neg92.0%
add-sqr-sqrt0.0%
sqrt-unprod17.2%
sqr-neg17.2%
sqrt-unprod17.2%
add-sqr-sqrt17.2%
distribute-rgt-neg-out17.2%
add-sqr-sqrt0.0%
sqrt-unprod87.1%
sqr-neg87.1%
sqrt-unprod91.6%
add-sqr-sqrt92.0%
sub-neg92.0%
distribute-neg-in92.0%
distribute-lft-neg-in92.0%
add-sqr-sqrt0.0%
Applied egg-rr92.0%
associate-/l*77.4%
associate-/r/91.7%
+-commutative91.7%
unsub-neg91.7%
Simplified91.7%
if 6.80000000000000004e-108 < z < 3.40000000000000015e-75Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around inf 99.7%
if 3.40000000000000015e-75 < z < 3.89999999999999995e-19Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 99.7%
fma-def99.7%
associate-/l*99.7%
*-commutative99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 82.3%
+-commutative82.3%
mul-1-neg82.3%
sub-neg82.3%
associate-/r*82.3%
Simplified82.3%
Final simplification84.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ (- y) t))))
(if (<= z -9.2e-45)
(/ y a)
(if (<= z 7e-157)
(/ x t)
(if (<= z 3.1e-110)
t_1
(if (<= z 1.2e-77)
(/ x t)
(if (<= z 5.35e-14)
(/ (- (/ x a)) z)
(if (<= z 4.3e+137) t_1 (/ y a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (-y / t);
double tmp;
if (z <= -9.2e-45) {
tmp = y / a;
} else if (z <= 7e-157) {
tmp = x / t;
} else if (z <= 3.1e-110) {
tmp = t_1;
} else if (z <= 1.2e-77) {
tmp = x / t;
} else if (z <= 5.35e-14) {
tmp = -(x / a) / z;
} else if (z <= 4.3e+137) {
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 = z * (-y / t)
if (z <= (-9.2d-45)) then
tmp = y / a
else if (z <= 7d-157) then
tmp = x / t
else if (z <= 3.1d-110) then
tmp = t_1
else if (z <= 1.2d-77) then
tmp = x / t
else if (z <= 5.35d-14) then
tmp = -(x / a) / z
else if (z <= 4.3d+137) 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 = z * (-y / t);
double tmp;
if (z <= -9.2e-45) {
tmp = y / a;
} else if (z <= 7e-157) {
tmp = x / t;
} else if (z <= 3.1e-110) {
tmp = t_1;
} else if (z <= 1.2e-77) {
tmp = x / t;
} else if (z <= 5.35e-14) {
tmp = -(x / a) / z;
} else if (z <= 4.3e+137) {
tmp = t_1;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (-y / t) tmp = 0 if z <= -9.2e-45: tmp = y / a elif z <= 7e-157: tmp = x / t elif z <= 3.1e-110: tmp = t_1 elif z <= 1.2e-77: tmp = x / t elif z <= 5.35e-14: tmp = -(x / a) / z elif z <= 4.3e+137: tmp = t_1 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(Float64(-y) / t)) tmp = 0.0 if (z <= -9.2e-45) tmp = Float64(y / a); elseif (z <= 7e-157) tmp = Float64(x / t); elseif (z <= 3.1e-110) tmp = t_1; elseif (z <= 1.2e-77) tmp = Float64(x / t); elseif (z <= 5.35e-14) tmp = Float64(Float64(-Float64(x / a)) / z); elseif (z <= 4.3e+137) tmp = t_1; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (-y / t); tmp = 0.0; if (z <= -9.2e-45) tmp = y / a; elseif (z <= 7e-157) tmp = x / t; elseif (z <= 3.1e-110) tmp = t_1; elseif (z <= 1.2e-77) tmp = x / t; elseif (z <= 5.35e-14) tmp = -(x / a) / z; elseif (z <= 4.3e+137) tmp = t_1; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[((-y) / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e-45], N[(y / a), $MachinePrecision], If[LessEqual[z, 7e-157], N[(x / t), $MachinePrecision], If[LessEqual[z, 3.1e-110], t$95$1, If[LessEqual[z, 1.2e-77], N[(x / t), $MachinePrecision], If[LessEqual[z, 5.35e-14], N[((-N[(x / a), $MachinePrecision]) / z), $MachinePrecision], If[LessEqual[z, 4.3e+137], t$95$1, N[(y / a), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{-y}{t}\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-157}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-77}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 5.35 \cdot 10^{-14}:\\
\;\;\;\;\frac{-\frac{x}{a}}{z}\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+137}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -9.19999999999999967e-45 or 4.29999999999999965e137 < z Initial program 62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in z around inf 66.4%
if -9.19999999999999967e-45 < z < 7.0000000000000004e-157 or 3.10000000000000007e-110 < z < 1.19999999999999995e-77Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 72.6%
if 7.0000000000000004e-157 < z < 3.10000000000000007e-110 or 5.3499999999999999e-14 < z < 4.29999999999999965e137Initial program 93.5%
*-commutative93.5%
Simplified93.5%
Taylor expanded in x around 0 61.3%
mul-1-neg61.3%
sub-neg61.3%
+-commutative61.3%
distribute-rgt-neg-in61.3%
fma-udef61.3%
associate-*l/65.3%
distribute-rgt-neg-in65.3%
fma-udef65.3%
distribute-rgt-neg-in65.3%
+-commutative65.3%
sub-neg65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in t around inf 51.9%
if 1.19999999999999995e-77 < z < 5.3499999999999999e-14Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around inf 55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in t around 0 37.9%
mul-1-neg37.9%
associate-/r*37.8%
Simplified37.8%
Final simplification64.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ (- y) t))))
(if (<= z -1.1e-44)
(/ y a)
(if (<= z 7e-157)
(/ x t)
(if (<= z 9.2e-110)
t_1
(if (<= z 5.6e-77)
(/ x t)
(if (<= z 4.4e-14)
(/ (- x) (* z a))
(if (<= z 4.3e+137) t_1 (/ y a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (-y / t);
double tmp;
if (z <= -1.1e-44) {
tmp = y / a;
} else if (z <= 7e-157) {
tmp = x / t;
} else if (z <= 9.2e-110) {
tmp = t_1;
} else if (z <= 5.6e-77) {
tmp = x / t;
} else if (z <= 4.4e-14) {
tmp = -x / (z * a);
} else if (z <= 4.3e+137) {
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 = z * (-y / t)
if (z <= (-1.1d-44)) then
tmp = y / a
else if (z <= 7d-157) then
tmp = x / t
else if (z <= 9.2d-110) then
tmp = t_1
else if (z <= 5.6d-77) then
tmp = x / t
else if (z <= 4.4d-14) then
tmp = -x / (z * a)
else if (z <= 4.3d+137) 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 = z * (-y / t);
double tmp;
if (z <= -1.1e-44) {
tmp = y / a;
} else if (z <= 7e-157) {
tmp = x / t;
} else if (z <= 9.2e-110) {
tmp = t_1;
} else if (z <= 5.6e-77) {
tmp = x / t;
} else if (z <= 4.4e-14) {
tmp = -x / (z * a);
} else if (z <= 4.3e+137) {
tmp = t_1;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (-y / t) tmp = 0 if z <= -1.1e-44: tmp = y / a elif z <= 7e-157: tmp = x / t elif z <= 9.2e-110: tmp = t_1 elif z <= 5.6e-77: tmp = x / t elif z <= 4.4e-14: tmp = -x / (z * a) elif z <= 4.3e+137: tmp = t_1 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(Float64(-y) / t)) tmp = 0.0 if (z <= -1.1e-44) tmp = Float64(y / a); elseif (z <= 7e-157) tmp = Float64(x / t); elseif (z <= 9.2e-110) tmp = t_1; elseif (z <= 5.6e-77) tmp = Float64(x / t); elseif (z <= 4.4e-14) tmp = Float64(Float64(-x) / Float64(z * a)); elseif (z <= 4.3e+137) tmp = t_1; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (-y / t); tmp = 0.0; if (z <= -1.1e-44) tmp = y / a; elseif (z <= 7e-157) tmp = x / t; elseif (z <= 9.2e-110) tmp = t_1; elseif (z <= 5.6e-77) tmp = x / t; elseif (z <= 4.4e-14) tmp = -x / (z * a); elseif (z <= 4.3e+137) tmp = t_1; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[((-y) / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e-44], N[(y / a), $MachinePrecision], If[LessEqual[z, 7e-157], N[(x / t), $MachinePrecision], If[LessEqual[z, 9.2e-110], t$95$1, If[LessEqual[z, 5.6e-77], N[(x / t), $MachinePrecision], If[LessEqual[z, 4.4e-14], N[((-x) / N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e+137], t$95$1, N[(y / a), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{-y}{t}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{-44}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-157}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-77}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-14}:\\
\;\;\;\;\frac{-x}{z \cdot a}\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+137}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.10000000000000006e-44 or 4.29999999999999965e137 < z Initial program 62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in z around inf 66.4%
if -1.10000000000000006e-44 < z < 7.0000000000000004e-157 or 9.2000000000000006e-110 < z < 5.5999999999999999e-77Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 72.6%
if 7.0000000000000004e-157 < z < 9.2000000000000006e-110 or 4.4000000000000002e-14 < z < 4.29999999999999965e137Initial program 93.5%
*-commutative93.5%
Simplified93.5%
Taylor expanded in x around 0 61.3%
mul-1-neg61.3%
sub-neg61.3%
+-commutative61.3%
distribute-rgt-neg-in61.3%
fma-udef61.3%
associate-*l/65.3%
distribute-rgt-neg-in65.3%
fma-udef65.3%
distribute-rgt-neg-in65.3%
+-commutative65.3%
sub-neg65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in t around inf 51.9%
if 5.5999999999999999e-77 < z < 4.4000000000000002e-14Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 99.7%
fma-def99.7%
associate-/l*99.6%
*-commutative99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 63.0%
+-commutative63.0%
mul-1-neg63.0%
sub-neg63.0%
associate-/r*62.9%
Simplified62.9%
Taylor expanded in y around 0 37.9%
associate-*r/37.9%
neg-mul-137.9%
*-commutative37.9%
Simplified37.9%
Final simplification64.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.2e-45)
(/ y a)
(if (<= z 7e-157)
(/ x t)
(if (<= z 2.2e-110)
(/ (- z) (/ t y))
(if (<= z 4.4e-77)
(/ x t)
(if (<= z 2.1e-14)
(/ (- x) (* z a))
(if (<= z 4e+137) (* z (/ (- y) t)) (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e-45) {
tmp = y / a;
} else if (z <= 7e-157) {
tmp = x / t;
} else if (z <= 2.2e-110) {
tmp = -z / (t / y);
} else if (z <= 4.4e-77) {
tmp = x / t;
} else if (z <= 2.1e-14) {
tmp = -x / (z * a);
} else if (z <= 4e+137) {
tmp = z * (-y / 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 <= (-9.2d-45)) then
tmp = y / a
else if (z <= 7d-157) then
tmp = x / t
else if (z <= 2.2d-110) then
tmp = -z / (t / y)
else if (z <= 4.4d-77) then
tmp = x / t
else if (z <= 2.1d-14) then
tmp = -x / (z * a)
else if (z <= 4d+137) then
tmp = z * (-y / 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 <= -9.2e-45) {
tmp = y / a;
} else if (z <= 7e-157) {
tmp = x / t;
} else if (z <= 2.2e-110) {
tmp = -z / (t / y);
} else if (z <= 4.4e-77) {
tmp = x / t;
} else if (z <= 2.1e-14) {
tmp = -x / (z * a);
} else if (z <= 4e+137) {
tmp = z * (-y / t);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.2e-45: tmp = y / a elif z <= 7e-157: tmp = x / t elif z <= 2.2e-110: tmp = -z / (t / y) elif z <= 4.4e-77: tmp = x / t elif z <= 2.1e-14: tmp = -x / (z * a) elif z <= 4e+137: tmp = z * (-y / t) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.2e-45) tmp = Float64(y / a); elseif (z <= 7e-157) tmp = Float64(x / t); elseif (z <= 2.2e-110) tmp = Float64(Float64(-z) / Float64(t / y)); elseif (z <= 4.4e-77) tmp = Float64(x / t); elseif (z <= 2.1e-14) tmp = Float64(Float64(-x) / Float64(z * a)); elseif (z <= 4e+137) tmp = Float64(z * Float64(Float64(-y) / t)); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.2e-45) tmp = y / a; elseif (z <= 7e-157) tmp = x / t; elseif (z <= 2.2e-110) tmp = -z / (t / y); elseif (z <= 4.4e-77) tmp = x / t; elseif (z <= 2.1e-14) tmp = -x / (z * a); elseif (z <= 4e+137) tmp = z * (-y / t); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e-45], N[(y / a), $MachinePrecision], If[LessEqual[z, 7e-157], N[(x / t), $MachinePrecision], If[LessEqual[z, 2.2e-110], N[((-z) / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e-77], N[(x / t), $MachinePrecision], If[LessEqual[z, 2.1e-14], N[((-x) / N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+137], N[(z * N[((-y) / t), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-157}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-110}:\\
\;\;\;\;\frac{-z}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-77}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-14}:\\
\;\;\;\;\frac{-x}{z \cdot a}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+137}:\\
\;\;\;\;z \cdot \frac{-y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -9.19999999999999967e-45 or 4.0000000000000001e137 < z Initial program 62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in z around inf 66.4%
if -9.19999999999999967e-45 < z < 7.0000000000000004e-157 or 2.1999999999999999e-110 < z < 4.40000000000000014e-77Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 72.6%
if 7.0000000000000004e-157 < z < 2.1999999999999999e-110Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around inf 82.1%
Taylor expanded in x around 0 82.4%
mul-1-neg82.4%
*-commutative82.4%
associate-/l*82.6%
distribute-neg-frac82.6%
Simplified82.6%
if 4.40000000000000014e-77 < z < 2.0999999999999999e-14Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 99.7%
fma-def99.7%
associate-/l*99.6%
*-commutative99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 63.0%
+-commutative63.0%
mul-1-neg63.0%
sub-neg63.0%
associate-/r*62.9%
Simplified62.9%
Taylor expanded in y around 0 37.9%
associate-*r/37.9%
neg-mul-137.9%
*-commutative37.9%
Simplified37.9%
if 2.0999999999999999e-14 < z < 4.0000000000000001e137Initial program 91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in x around 0 52.0%
mul-1-neg52.0%
sub-neg52.0%
+-commutative52.0%
distribute-rgt-neg-in52.0%
fma-udef52.0%
associate-*l/57.5%
distribute-rgt-neg-in57.5%
fma-udef57.5%
distribute-rgt-neg-in57.5%
+-commutative57.5%
sub-neg57.5%
*-commutative57.5%
Simplified57.5%
Taylor expanded in t around inf 42.3%
Final simplification64.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y) (- (/ t z) a))))
(if (<= z -1.1e-44)
t_1
(if (<= z 3.4e-75)
(/ (- x (* z y)) t)
(if (<= z 3.9e-19)
(/ (- y (/ x z)) a)
(if (<= z 1.6e+52) (/ x (- t (* z a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -y / ((t / z) - a);
double tmp;
if (z <= -1.1e-44) {
tmp = t_1;
} else if (z <= 3.4e-75) {
tmp = (x - (z * y)) / t;
} else if (z <= 3.9e-19) {
tmp = (y - (x / z)) / a;
} else if (z <= 1.6e+52) {
tmp = x / (t - (z * a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -y / ((t / z) - a)
if (z <= (-1.1d-44)) then
tmp = t_1
else if (z <= 3.4d-75) then
tmp = (x - (z * y)) / t
else if (z <= 3.9d-19) then
tmp = (y - (x / z)) / a
else if (z <= 1.6d+52) then
tmp = x / (t - (z * a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -y / ((t / z) - a);
double tmp;
if (z <= -1.1e-44) {
tmp = t_1;
} else if (z <= 3.4e-75) {
tmp = (x - (z * y)) / t;
} else if (z <= 3.9e-19) {
tmp = (y - (x / z)) / a;
} else if (z <= 1.6e+52) {
tmp = x / (t - (z * a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -y / ((t / z) - a) tmp = 0 if z <= -1.1e-44: tmp = t_1 elif z <= 3.4e-75: tmp = (x - (z * y)) / t elif z <= 3.9e-19: tmp = (y - (x / z)) / a elif z <= 1.6e+52: tmp = x / (t - (z * a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-y) / Float64(Float64(t / z) - a)) tmp = 0.0 if (z <= -1.1e-44) tmp = t_1; elseif (z <= 3.4e-75) tmp = Float64(Float64(x - Float64(z * y)) / t); elseif (z <= 3.9e-19) tmp = Float64(Float64(y - Float64(x / z)) / a); elseif (z <= 1.6e+52) tmp = Float64(x / Float64(t - Float64(z * a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -y / ((t / z) - a); tmp = 0.0; if (z <= -1.1e-44) tmp = t_1; elseif (z <= 3.4e-75) tmp = (x - (z * y)) / t; elseif (z <= 3.9e-19) tmp = (y - (x / z)) / a; elseif (z <= 1.6e+52) tmp = x / (t - (z * a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-y) / N[(N[(t / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e-44], t$95$1, If[LessEqual[z, 3.4e-75], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 3.9e-19], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.6e+52], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-y}{\frac{t}{z} - a}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{-44}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-75}:\\
\;\;\;\;\frac{x - z \cdot y}{t}\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-19}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+52}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.10000000000000006e-44 or 1.6e52 < z Initial program 66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in x around 0 66.7%
fma-def66.7%
associate-/l*79.2%
*-commutative79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in t around inf 57.1%
Taylor expanded in y around inf 54.1%
mul-1-neg54.1%
associate-/l*66.6%
distribute-neg-frac66.6%
*-commutative66.6%
Simplified66.6%
Taylor expanded in t around 0 82.6%
neg-mul-182.6%
+-commutative82.6%
unsub-neg82.6%
Simplified82.6%
if -1.10000000000000006e-44 < z < 3.40000000000000015e-75Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around inf 83.9%
if 3.40000000000000015e-75 < z < 3.89999999999999995e-19Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 99.7%
fma-def99.7%
associate-/l*99.7%
*-commutative99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in a around inf 82.0%
mul-1-neg82.0%
sub-neg82.0%
Simplified82.0%
if 3.89999999999999995e-19 < z < 1.6e52Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 70.4%
*-commutative70.4%
Simplified70.4%
Final simplification82.3%
(FPCore (x y z t a)
:precision binary64
(if (or (<= z -1.1e-44)
(and (not (<= z 3.4e-75)) (or (<= z 3.9e-19) (not (<= z 1.1e+92)))))
(/ (- y (/ x z)) a)
(/ (- x (* z y)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.1e-44) || (!(z <= 3.4e-75) && ((z <= 3.9e-19) || !(z <= 1.1e+92)))) {
tmp = (y - (x / z)) / a;
} else {
tmp = (x - (z * y)) / t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.1d-44)) .or. (.not. (z <= 3.4d-75)) .and. (z <= 3.9d-19) .or. (.not. (z <= 1.1d+92))) then
tmp = (y - (x / z)) / a
else
tmp = (x - (z * y)) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.1e-44) || (!(z <= 3.4e-75) && ((z <= 3.9e-19) || !(z <= 1.1e+92)))) {
tmp = (y - (x / z)) / a;
} else {
tmp = (x - (z * y)) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.1e-44) or (not (z <= 3.4e-75) and ((z <= 3.9e-19) or not (z <= 1.1e+92))): tmp = (y - (x / z)) / a else: tmp = (x - (z * y)) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.1e-44) || (!(z <= 3.4e-75) && ((z <= 3.9e-19) || !(z <= 1.1e+92)))) tmp = Float64(Float64(y - Float64(x / z)) / a); else tmp = Float64(Float64(x - Float64(z * y)) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.1e-44) || (~((z <= 3.4e-75)) && ((z <= 3.9e-19) || ~((z <= 1.1e+92))))) tmp = (y - (x / z)) / a; else tmp = (x - (z * y)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.1e-44], And[N[Not[LessEqual[z, 3.4e-75]], $MachinePrecision], Or[LessEqual[z, 3.9e-19], N[Not[LessEqual[z, 1.1e+92]], $MachinePrecision]]]], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-44} \lor \neg \left(z \leq 3.4 \cdot 10^{-75}\right) \land \left(z \leq 3.9 \cdot 10^{-19} \lor \neg \left(z \leq 1.1 \cdot 10^{+92}\right)\right):\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - z \cdot y}{t}\\
\end{array}
\end{array}
if z < -1.10000000000000006e-44 or 3.40000000000000015e-75 < z < 3.89999999999999995e-19 or 1.09999999999999996e92 < z Initial program 67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in x around 0 67.2%
fma-def67.2%
associate-/l*79.8%
*-commutative79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in a around inf 75.8%
mul-1-neg75.8%
sub-neg75.8%
Simplified75.8%
if -1.10000000000000006e-44 < z < 3.40000000000000015e-75 or 3.89999999999999995e-19 < z < 1.09999999999999996e92Initial program 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in t around inf 80.7%
Final simplification78.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ x (- t (* z a)))))
(if (<= z -7200000000.0)
(/ y a)
(if (<= z 7e-157)
t_1
(if (<= z 2.4e-110)
(/ (- z) (/ t y))
(if (<= z 4e+137) t_1 (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x / (t - (z * a));
double tmp;
if (z <= -7200000000.0) {
tmp = y / a;
} else if (z <= 7e-157) {
tmp = t_1;
} else if (z <= 2.4e-110) {
tmp = -z / (t / y);
} else if (z <= 4e+137) {
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 / (t - (z * a))
if (z <= (-7200000000.0d0)) then
tmp = y / a
else if (z <= 7d-157) then
tmp = t_1
else if (z <= 2.4d-110) then
tmp = -z / (t / y)
else if (z <= 4d+137) 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 / (t - (z * a));
double tmp;
if (z <= -7200000000.0) {
tmp = y / a;
} else if (z <= 7e-157) {
tmp = t_1;
} else if (z <= 2.4e-110) {
tmp = -z / (t / y);
} else if (z <= 4e+137) {
tmp = t_1;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x / (t - (z * a)) tmp = 0 if z <= -7200000000.0: tmp = y / a elif z <= 7e-157: tmp = t_1 elif z <= 2.4e-110: tmp = -z / (t / y) elif z <= 4e+137: tmp = t_1 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(x / Float64(t - Float64(z * a))) tmp = 0.0 if (z <= -7200000000.0) tmp = Float64(y / a); elseif (z <= 7e-157) tmp = t_1; elseif (z <= 2.4e-110) tmp = Float64(Float64(-z) / Float64(t / y)); elseif (z <= 4e+137) tmp = t_1; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x / (t - (z * a)); tmp = 0.0; if (z <= -7200000000.0) tmp = y / a; elseif (z <= 7e-157) tmp = t_1; elseif (z <= 2.4e-110) tmp = -z / (t / y); elseif (z <= 4e+137) tmp = t_1; 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]}, If[LessEqual[z, -7200000000.0], N[(y / a), $MachinePrecision], If[LessEqual[z, 7e-157], t$95$1, If[LessEqual[z, 2.4e-110], N[((-z) / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+137], t$95$1, N[(y / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{t - z \cdot a}\\
\mathbf{if}\;z \leq -7200000000:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-157}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-110}:\\
\;\;\;\;\frac{-z}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+137}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -7.2e9 or 4.0000000000000001e137 < z Initial program 60.2%
*-commutative60.2%
Simplified60.2%
Taylor expanded in z around inf 68.3%
if -7.2e9 < z < 7.0000000000000004e-157 or 2.40000000000000006e-110 < z < 4.0000000000000001e137Initial program 97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in x around inf 73.3%
*-commutative73.3%
Simplified73.3%
if 7.0000000000000004e-157 < z < 2.40000000000000006e-110Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around inf 82.1%
Taylor expanded in x around 0 82.4%
mul-1-neg82.4%
*-commutative82.4%
associate-/l*82.6%
distribute-neg-frac82.6%
Simplified82.6%
Final simplification71.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.4e+125)
(/ (- y (/ x z)) a)
(if (<= z 1.35e+127)
(/ (- x (* z y)) (- t (* z a)))
(/ (- y) (- (/ t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e+125) {
tmp = (y - (x / z)) / a;
} else if (z <= 1.35e+127) {
tmp = (x - (z * y)) / (t - (z * a));
} else {
tmp = -y / ((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 <= (-1.4d+125)) then
tmp = (y - (x / z)) / a
else if (z <= 1.35d+127) then
tmp = (x - (z * y)) / (t - (z * a))
else
tmp = -y / ((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 <= -1.4e+125) {
tmp = (y - (x / z)) / a;
} else if (z <= 1.35e+127) {
tmp = (x - (z * y)) / (t - (z * a));
} else {
tmp = -y / ((t / z) - a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.4e+125: tmp = (y - (x / z)) / a elif z <= 1.35e+127: tmp = (x - (z * y)) / (t - (z * a)) else: tmp = -y / ((t / z) - a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.4e+125) tmp = Float64(Float64(y - Float64(x / z)) / a); elseif (z <= 1.35e+127) tmp = Float64(Float64(x - Float64(z * y)) / Float64(t - Float64(z * a))); else tmp = Float64(Float64(-y) / Float64(Float64(t / z) - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.4e+125) tmp = (y - (x / z)) / a; elseif (z <= 1.35e+127) tmp = (x - (z * y)) / (t - (z * a)); else tmp = -y / ((t / z) - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.4e+125], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.35e+127], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-y) / N[(N[(t / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+125}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+127}:\\
\;\;\;\;\frac{x - z \cdot y}{t - z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{-y}{\frac{t}{z} - a}\\
\end{array}
\end{array}
if z < -1.4e125Initial program 55.3%
*-commutative55.3%
Simplified55.3%
Taylor expanded in x around 0 55.3%
fma-def55.3%
associate-/l*68.3%
*-commutative68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in a around inf 83.3%
mul-1-neg83.3%
sub-neg83.3%
Simplified83.3%
if -1.4e125 < z < 1.3500000000000001e127Initial program 98.2%
if 1.3500000000000001e127 < z Initial program 52.8%
*-commutative52.8%
Simplified52.8%
Taylor expanded in x around 0 52.8%
fma-def52.8%
associate-/l*75.2%
*-commutative75.2%
*-commutative75.2%
Simplified75.2%
Taylor expanded in t around inf 53.7%
Taylor expanded in y around inf 45.7%
mul-1-neg45.7%
associate-/l*68.1%
distribute-neg-frac68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in t around 0 90.4%
neg-mul-190.4%
+-commutative90.4%
unsub-neg90.4%
Simplified90.4%
Final simplification94.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.08e-44) (/ y a) (if (<= z 6.8e-157) (/ x t) (if (<= z 4e+137) (* (- y) (/ z t)) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.08e-44) {
tmp = y / a;
} else if (z <= 6.8e-157) {
tmp = x / t;
} else if (z <= 4e+137) {
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 <= (-1.08d-44)) then
tmp = y / a
else if (z <= 6.8d-157) then
tmp = x / t
else if (z <= 4d+137) 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 <= -1.08e-44) {
tmp = y / a;
} else if (z <= 6.8e-157) {
tmp = x / t;
} else if (z <= 4e+137) {
tmp = -y * (z / t);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.08e-44: tmp = y / a elif z <= 6.8e-157: tmp = x / t elif z <= 4e+137: tmp = -y * (z / t) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.08e-44) tmp = Float64(y / a); elseif (z <= 6.8e-157) tmp = Float64(x / t); elseif (z <= 4e+137) tmp = Float64(Float64(-y) * Float64(z / 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.08e-44) tmp = y / a; elseif (z <= 6.8e-157) tmp = x / t; elseif (z <= 4e+137) tmp = -y * (z / t); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.08e-44], N[(y / a), $MachinePrecision], If[LessEqual[z, 6.8e-157], N[(x / t), $MachinePrecision], If[LessEqual[z, 4e+137], N[((-y) * N[(z / t), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.08 \cdot 10^{-44}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-157}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+137}:\\
\;\;\;\;\left(-y\right) \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.07999999999999994e-44 or 4.0000000000000001e137 < z Initial program 62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in z around inf 66.4%
if -1.07999999999999994e-44 < z < 6.79999999999999955e-157Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 72.4%
if 6.79999999999999955e-157 < z < 4.0000000000000001e137Initial program 95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in t around inf 63.0%
div-inv62.9%
*-commutative62.9%
Applied egg-rr62.9%
Taylor expanded in x around 0 43.1%
mul-1-neg43.1%
associate-*r/40.2%
distribute-rgt-neg-in40.2%
Simplified40.2%
Final simplification61.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -108000000.0) (not (<= z 1.3e+146))) (/ y a) (/ (- x (* z y)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -108000000.0) || !(z <= 1.3e+146)) {
tmp = y / a;
} else {
tmp = (x - (z * y)) / 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 <= (-108000000.0d0)) .or. (.not. (z <= 1.3d+146))) then
tmp = y / a
else
tmp = (x - (z * y)) / 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 <= -108000000.0) || !(z <= 1.3e+146)) {
tmp = y / a;
} else {
tmp = (x - (z * y)) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -108000000.0) or not (z <= 1.3e+146): tmp = y / a else: tmp = (x - (z * y)) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -108000000.0) || !(z <= 1.3e+146)) tmp = Float64(y / a); else tmp = Float64(Float64(x - Float64(z * y)) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -108000000.0) || ~((z <= 1.3e+146))) tmp = y / a; else tmp = (x - (z * y)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -108000000.0], N[Not[LessEqual[z, 1.3e+146]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -108000000 \lor \neg \left(z \leq 1.3 \cdot 10^{+146}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - z \cdot y}{t}\\
\end{array}
\end{array}
if z < -1.08e8 or 1.30000000000000007e146 < z Initial program 60.4%
*-commutative60.4%
Simplified60.4%
Taylor expanded in z around inf 68.6%
if -1.08e8 < z < 1.30000000000000007e146Initial program 97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in t around inf 73.9%
Final simplification71.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.1e-44) (not (<= z 1.9e+85))) (/ y a) (/ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.1e-44) || !(z <= 1.9e+85)) {
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 <= (-1.1d-44)) .or. (.not. (z <= 1.9d+85))) 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 <= -1.1e-44) || !(z <= 1.9e+85)) {
tmp = y / a;
} else {
tmp = x / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.1e-44) or not (z <= 1.9e+85): tmp = y / a else: tmp = x / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.1e-44) || !(z <= 1.9e+85)) 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 <= -1.1e-44) || ~((z <= 1.9e+85))) tmp = y / a; else tmp = x / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.1e-44], N[Not[LessEqual[z, 1.9e+85]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(x / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-44} \lor \neg \left(z \leq 1.9 \cdot 10^{+85}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t}\\
\end{array}
\end{array}
if z < -1.10000000000000006e-44 or 1.89999999999999996e85 < z Initial program 64.7%
*-commutative64.7%
Simplified64.7%
Taylor expanded in z around inf 63.1%
if -1.10000000000000006e-44 < z < 1.89999999999999996e85Initial program 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in z around 0 57.5%
Final simplification60.0%
(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 83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in z around 0 37.1%
Final simplification37.1%
(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 2023322
(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))))