
(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 13 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 -2.9e+87)
(/ y (- a (/ t z)))
(if (<= z 6e+115)
(/ (- x (* z y)) (- t (* z a)))
(+ (/ y a) (/ -1.0 (* a (/ z (- x (* y (/ t a))))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e+87) {
tmp = y / (a - (t / z));
} else if (z <= 6e+115) {
tmp = (x - (z * y)) / (t - (z * a));
} else {
tmp = (y / a) + (-1.0 / (a * (z / (x - (y * (t / a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.9d+87)) then
tmp = y / (a - (t / z))
else if (z <= 6d+115) then
tmp = (x - (z * y)) / (t - (z * a))
else
tmp = (y / a) + ((-1.0d0) / (a * (z / (x - (y * (t / a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e+87) {
tmp = y / (a - (t / z));
} else if (z <= 6e+115) {
tmp = (x - (z * y)) / (t - (z * a));
} else {
tmp = (y / a) + (-1.0 / (a * (z / (x - (y * (t / a))))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.9e+87: tmp = y / (a - (t / z)) elif z <= 6e+115: tmp = (x - (z * y)) / (t - (z * a)) else: tmp = (y / a) + (-1.0 / (a * (z / (x - (y * (t / a)))))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.9e+87) tmp = Float64(y / Float64(a - Float64(t / z))); elseif (z <= 6e+115) tmp = Float64(Float64(x - Float64(z * y)) / Float64(t - Float64(z * a))); else tmp = Float64(Float64(y / a) + Float64(-1.0 / Float64(a * Float64(z / Float64(x - Float64(y * Float64(t / a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.9e+87) tmp = y / (a - (t / z)); elseif (z <= 6e+115) tmp = (x - (z * y)) / (t - (z * a)); else tmp = (y / a) + (-1.0 / (a * (z / (x - (y * (t / a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e+87], N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+115], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] + N[(-1.0 / N[(a * N[(z / N[(x - N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+87}:\\
\;\;\;\;\frac{y}{a - \frac{t}{z}}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+115}:\\
\;\;\;\;\frac{x - z \cdot y}{t - z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} + \frac{-1}{a \cdot \frac{z}{x - y \cdot \frac{t}{a}}}\\
\end{array}
\end{array}
if z < -2.8999999999999998e87Initial program 49.7%
sub-neg49.7%
+-commutative49.7%
neg-sub049.7%
associate-+l-49.7%
sub0-neg49.7%
neg-mul-149.7%
sub-neg49.7%
+-commutative49.7%
neg-sub049.7%
associate-+l-49.7%
sub0-neg49.7%
neg-mul-149.7%
times-frac49.7%
metadata-eval49.7%
*-lft-identity49.7%
*-commutative49.7%
Simplified49.7%
Taylor expanded in y around inf 43.5%
associate-/l*58.0%
Simplified58.0%
Taylor expanded in a around 0 88.0%
mul-1-neg88.0%
unsub-neg88.0%
Simplified88.0%
if -2.8999999999999998e87 < z < 6.0000000000000001e115Initial program 95.7%
if 6.0000000000000001e115 < z Initial program 46.4%
sub-neg46.4%
+-commutative46.4%
neg-sub046.4%
associate-+l-46.4%
sub0-neg46.4%
neg-mul-146.4%
sub-neg46.4%
+-commutative46.4%
neg-sub046.4%
associate-+l-46.4%
sub0-neg46.4%
neg-mul-146.4%
times-frac46.4%
metadata-eval46.4%
*-lft-identity46.4%
*-commutative46.4%
Simplified46.4%
Taylor expanded in z around inf 62.6%
mul-1-neg62.6%
+-commutative62.6%
associate--l+62.6%
associate-/r*74.9%
distribute-neg-frac74.9%
mul-1-neg74.9%
associate-/r*74.9%
associate-*r/74.9%
div-sub74.9%
distribute-lft-out--74.9%
associate-*r/74.9%
Simplified77.6%
clear-num77.4%
inv-pow77.4%
associate-*l/82.6%
sub-div82.6%
Applied egg-rr82.6%
unpow-182.6%
associate-/r/89.5%
Simplified89.5%
Final simplification93.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x) (- (* z a) t))) (t_2 (- a (/ t z))))
(if (<= z -5.4e-17)
(/ y t_2)
(if (<= z -9e-119)
t_1
(if (<= z 4.6e-36)
(/ (- x (* z y)) t)
(if (<= z 3.3e+25)
t_1
(if (<= z 1.6e+93) (/ 1.0 (/ t_2 y)) (/ (- y (/ x z)) a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -x / ((z * a) - t);
double t_2 = a - (t / z);
double tmp;
if (z <= -5.4e-17) {
tmp = y / t_2;
} else if (z <= -9e-119) {
tmp = t_1;
} else if (z <= 4.6e-36) {
tmp = (x - (z * y)) / t;
} else if (z <= 3.3e+25) {
tmp = t_1;
} else if (z <= 1.6e+93) {
tmp = 1.0 / (t_2 / y);
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -x / ((z * a) - t)
t_2 = a - (t / z)
if (z <= (-5.4d-17)) then
tmp = y / t_2
else if (z <= (-9d-119)) then
tmp = t_1
else if (z <= 4.6d-36) then
tmp = (x - (z * y)) / t
else if (z <= 3.3d+25) then
tmp = t_1
else if (z <= 1.6d+93) then
tmp = 1.0d0 / (t_2 / y)
else
tmp = (y - (x / z)) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -x / ((z * a) - t);
double t_2 = a - (t / z);
double tmp;
if (z <= -5.4e-17) {
tmp = y / t_2;
} else if (z <= -9e-119) {
tmp = t_1;
} else if (z <= 4.6e-36) {
tmp = (x - (z * y)) / t;
} else if (z <= 3.3e+25) {
tmp = t_1;
} else if (z <= 1.6e+93) {
tmp = 1.0 / (t_2 / y);
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -x / ((z * a) - t) t_2 = a - (t / z) tmp = 0 if z <= -5.4e-17: tmp = y / t_2 elif z <= -9e-119: tmp = t_1 elif z <= 4.6e-36: tmp = (x - (z * y)) / t elif z <= 3.3e+25: tmp = t_1 elif z <= 1.6e+93: tmp = 1.0 / (t_2 / y) else: tmp = (y - (x / z)) / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-x) / Float64(Float64(z * a) - t)) t_2 = Float64(a - Float64(t / z)) tmp = 0.0 if (z <= -5.4e-17) tmp = Float64(y / t_2); elseif (z <= -9e-119) tmp = t_1; elseif (z <= 4.6e-36) tmp = Float64(Float64(x - Float64(z * y)) / t); elseif (z <= 3.3e+25) tmp = t_1; elseif (z <= 1.6e+93) tmp = Float64(1.0 / Float64(t_2 / y)); else tmp = Float64(Float64(y - Float64(x / z)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -x / ((z * a) - t); t_2 = a - (t / z); tmp = 0.0; if (z <= -5.4e-17) tmp = y / t_2; elseif (z <= -9e-119) tmp = t_1; elseif (z <= 4.6e-36) tmp = (x - (z * y)) / t; elseif (z <= 3.3e+25) tmp = t_1; elseif (z <= 1.6e+93) tmp = 1.0 / (t_2 / y); else tmp = (y - (x / z)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-x) / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e-17], N[(y / t$95$2), $MachinePrecision], If[LessEqual[z, -9e-119], t$95$1, If[LessEqual[z, 4.6e-36], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 3.3e+25], t$95$1, If[LessEqual[z, 1.6e+93], N[(1.0 / N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-x}{z \cdot a - t}\\
t_2 := a - \frac{t}{z}\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{-17}:\\
\;\;\;\;\frac{y}{t_2}\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-36}:\\
\;\;\;\;\frac{x - z \cdot y}{t}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+93}:\\
\;\;\;\;\frac{1}{\frac{t_2}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\end{array}
\end{array}
if z < -5.4000000000000002e-17Initial program 62.3%
sub-neg62.3%
+-commutative62.3%
neg-sub062.3%
associate-+l-62.3%
sub0-neg62.3%
neg-mul-162.3%
sub-neg62.3%
+-commutative62.3%
neg-sub062.3%
associate-+l-62.3%
sub0-neg62.3%
neg-mul-162.3%
times-frac62.3%
metadata-eval62.3%
*-lft-identity62.3%
*-commutative62.3%
Simplified62.3%
Taylor expanded in y around inf 50.4%
associate-/l*60.8%
Simplified60.8%
Taylor expanded in a around 0 83.7%
mul-1-neg83.7%
unsub-neg83.7%
Simplified83.7%
if -5.4000000000000002e-17 < z < -9.0000000000000005e-119 or 4.59999999999999993e-36 < z < 3.3000000000000001e25Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 79.5%
neg-mul-179.5%
Simplified79.5%
if -9.0000000000000005e-119 < z < 4.59999999999999993e-36Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in a around 0 83.8%
associate-*r/83.8%
neg-mul-183.8%
neg-sub083.8%
sub-neg83.8%
+-commutative83.8%
associate--r+83.8%
neg-sub083.8%
remove-double-neg83.8%
*-commutative83.8%
Simplified83.8%
if 3.3000000000000001e25 < z < 1.6000000000000001e93Initial program 70.8%
sub-neg70.8%
+-commutative70.8%
neg-sub070.8%
associate-+l-70.8%
sub0-neg70.8%
neg-mul-170.8%
sub-neg70.8%
+-commutative70.8%
neg-sub070.8%
associate-+l-70.8%
sub0-neg70.8%
neg-mul-170.8%
times-frac70.8%
metadata-eval70.8%
*-lft-identity70.8%
*-commutative70.8%
Simplified70.8%
Taylor expanded in y around inf 51.6%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in a around 0 75.7%
mul-1-neg75.7%
unsub-neg75.7%
Simplified75.7%
clear-num75.7%
inv-pow75.7%
Applied egg-rr75.7%
unpow-175.7%
Simplified75.7%
if 1.6000000000000001e93 < z Initial program 50.2%
sub-neg50.2%
+-commutative50.2%
neg-sub050.2%
associate-+l-50.2%
sub0-neg50.2%
neg-mul-150.2%
sub-neg50.2%
+-commutative50.2%
neg-sub050.2%
associate-+l-50.2%
sub0-neg50.2%
neg-mul-150.2%
times-frac50.2%
metadata-eval50.2%
*-lft-identity50.2%
*-commutative50.2%
Simplified50.2%
Taylor expanded in z around inf 62.8%
mul-1-neg62.8%
+-commutative62.8%
associate--l+62.8%
associate-/r*74.3%
distribute-neg-frac74.3%
mul-1-neg74.3%
associate-/r*74.4%
associate-*r/74.4%
div-sub74.4%
distribute-lft-out--74.4%
associate-*r/74.4%
Simplified76.8%
Taylor expanded in a around inf 87.6%
Final simplification83.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x) (- (* z a) t))) (t_2 (/ y (- a (/ t z)))))
(if (<= z -5.2e-17)
t_2
(if (<= z -4.6e-119)
t_1
(if (<= z 5e-36)
(/ (- x (* z y)) t)
(if (<= z 1.9e+24)
t_1
(if (<= z 1.9e+93) t_2 (/ (- y (/ x z)) a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -x / ((z * a) - t);
double t_2 = y / (a - (t / z));
double tmp;
if (z <= -5.2e-17) {
tmp = t_2;
} else if (z <= -4.6e-119) {
tmp = t_1;
} else if (z <= 5e-36) {
tmp = (x - (z * y)) / t;
} else if (z <= 1.9e+24) {
tmp = t_1;
} else if (z <= 1.9e+93) {
tmp = t_2;
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -x / ((z * a) - t)
t_2 = y / (a - (t / z))
if (z <= (-5.2d-17)) then
tmp = t_2
else if (z <= (-4.6d-119)) then
tmp = t_1
else if (z <= 5d-36) then
tmp = (x - (z * y)) / t
else if (z <= 1.9d+24) then
tmp = t_1
else if (z <= 1.9d+93) then
tmp = t_2
else
tmp = (y - (x / z)) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -x / ((z * a) - t);
double t_2 = y / (a - (t / z));
double tmp;
if (z <= -5.2e-17) {
tmp = t_2;
} else if (z <= -4.6e-119) {
tmp = t_1;
} else if (z <= 5e-36) {
tmp = (x - (z * y)) / t;
} else if (z <= 1.9e+24) {
tmp = t_1;
} else if (z <= 1.9e+93) {
tmp = t_2;
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -x / ((z * a) - t) t_2 = y / (a - (t / z)) tmp = 0 if z <= -5.2e-17: tmp = t_2 elif z <= -4.6e-119: tmp = t_1 elif z <= 5e-36: tmp = (x - (z * y)) / t elif z <= 1.9e+24: tmp = t_1 elif z <= 1.9e+93: tmp = t_2 else: tmp = (y - (x / z)) / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-x) / Float64(Float64(z * a) - t)) t_2 = Float64(y / Float64(a - Float64(t / z))) tmp = 0.0 if (z <= -5.2e-17) tmp = t_2; elseif (z <= -4.6e-119) tmp = t_1; elseif (z <= 5e-36) tmp = Float64(Float64(x - Float64(z * y)) / t); elseif (z <= 1.9e+24) tmp = t_1; elseif (z <= 1.9e+93) tmp = t_2; else tmp = Float64(Float64(y - Float64(x / z)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -x / ((z * a) - t); t_2 = y / (a - (t / z)); tmp = 0.0; if (z <= -5.2e-17) tmp = t_2; elseif (z <= -4.6e-119) tmp = t_1; elseif (z <= 5e-36) tmp = (x - (z * y)) / t; elseif (z <= 1.9e+24) tmp = t_1; elseif (z <= 1.9e+93) tmp = t_2; else tmp = (y - (x / z)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-x) / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e-17], t$95$2, If[LessEqual[z, -4.6e-119], t$95$1, If[LessEqual[z, 5e-36], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.9e+24], t$95$1, If[LessEqual[z, 1.9e+93], t$95$2, N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-x}{z \cdot a - t}\\
t_2 := \frac{y}{a - \frac{t}{z}}\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{-17}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-36}:\\
\;\;\;\;\frac{x - z \cdot y}{t}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+93}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\end{array}
\end{array}
if z < -5.20000000000000006e-17 or 1.90000000000000008e24 < z < 1.8999999999999999e93Initial program 64.3%
sub-neg64.3%
+-commutative64.3%
neg-sub064.3%
associate-+l-64.3%
sub0-neg64.3%
neg-mul-164.3%
sub-neg64.3%
+-commutative64.3%
neg-sub064.3%
associate-+l-64.3%
sub0-neg64.3%
neg-mul-164.3%
times-frac64.3%
metadata-eval64.3%
*-lft-identity64.3%
*-commutative64.3%
Simplified64.3%
Taylor expanded in y around inf 50.7%
associate-/l*63.1%
Simplified63.1%
Taylor expanded in a around 0 81.8%
mul-1-neg81.8%
unsub-neg81.8%
Simplified81.8%
if -5.20000000000000006e-17 < z < -4.59999999999999987e-119 or 5.00000000000000004e-36 < z < 1.90000000000000008e24Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 79.5%
neg-mul-179.5%
Simplified79.5%
if -4.59999999999999987e-119 < z < 5.00000000000000004e-36Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in a around 0 83.8%
associate-*r/83.8%
neg-mul-183.8%
neg-sub083.8%
sub-neg83.8%
+-commutative83.8%
associate--r+83.8%
neg-sub083.8%
remove-double-neg83.8%
*-commutative83.8%
Simplified83.8%
if 1.8999999999999999e93 < z Initial program 50.2%
sub-neg50.2%
+-commutative50.2%
neg-sub050.2%
associate-+l-50.2%
sub0-neg50.2%
neg-mul-150.2%
sub-neg50.2%
+-commutative50.2%
neg-sub050.2%
associate-+l-50.2%
sub0-neg50.2%
neg-mul-150.2%
times-frac50.2%
metadata-eval50.2%
*-lft-identity50.2%
*-commutative50.2%
Simplified50.2%
Taylor expanded in z around inf 62.8%
mul-1-neg62.8%
+-commutative62.8%
associate--l+62.8%
associate-/r*74.3%
distribute-neg-frac74.3%
mul-1-neg74.3%
associate-/r*74.4%
associate-*r/74.4%
div-sub74.4%
distribute-lft-out--74.4%
associate-*r/74.4%
Simplified76.8%
Taylor expanded in a around inf 87.6%
Final simplification83.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.8e-33)
(/ y a)
(if (<= z 3.5e-32)
(/ x t)
(if (<= z 9.5e+58)
(/ (- x) (* z a))
(if (<= z 4.2e+91)
(/ y (/ (- t) z))
(if (<= z 4.6e+160) (/ (/ (- x) z) a) (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e-33) {
tmp = y / a;
} else if (z <= 3.5e-32) {
tmp = x / t;
} else if (z <= 9.5e+58) {
tmp = -x / (z * a);
} else if (z <= 4.2e+91) {
tmp = y / (-t / z);
} else if (z <= 4.6e+160) {
tmp = (-x / z) / a;
} 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.8d-33)) then
tmp = y / a
else if (z <= 3.5d-32) then
tmp = x / t
else if (z <= 9.5d+58) then
tmp = -x / (z * a)
else if (z <= 4.2d+91) then
tmp = y / (-t / z)
else if (z <= 4.6d+160) then
tmp = (-x / z) / a
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.8e-33) {
tmp = y / a;
} else if (z <= 3.5e-32) {
tmp = x / t;
} else if (z <= 9.5e+58) {
tmp = -x / (z * a);
} else if (z <= 4.2e+91) {
tmp = y / (-t / z);
} else if (z <= 4.6e+160) {
tmp = (-x / z) / a;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.8e-33: tmp = y / a elif z <= 3.5e-32: tmp = x / t elif z <= 9.5e+58: tmp = -x / (z * a) elif z <= 4.2e+91: tmp = y / (-t / z) elif z <= 4.6e+160: tmp = (-x / z) / a else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.8e-33) tmp = Float64(y / a); elseif (z <= 3.5e-32) tmp = Float64(x / t); elseif (z <= 9.5e+58) tmp = Float64(Float64(-x) / Float64(z * a)); elseif (z <= 4.2e+91) tmp = Float64(y / Float64(Float64(-t) / z)); elseif (z <= 4.6e+160) tmp = Float64(Float64(Float64(-x) / z) / a); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.8e-33) tmp = y / a; elseif (z <= 3.5e-32) tmp = x / t; elseif (z <= 9.5e+58) tmp = -x / (z * a); elseif (z <= 4.2e+91) tmp = y / (-t / z); elseif (z <= 4.6e+160) tmp = (-x / z) / a; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e-33], N[(y / a), $MachinePrecision], If[LessEqual[z, 3.5e-32], N[(x / t), $MachinePrecision], If[LessEqual[z, 9.5e+58], N[((-x) / N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+91], N[(y / N[((-t) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+160], N[(N[((-x) / z), $MachinePrecision] / a), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{-33}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+58}:\\
\;\;\;\;\frac{-x}{z \cdot a}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+91}:\\
\;\;\;\;\frac{y}{\frac{-t}{z}}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+160}:\\
\;\;\;\;\frac{\frac{-x}{z}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.80000000000000017e-33 or 4.59999999999999975e160 < z Initial program 58.1%
sub-neg58.1%
+-commutative58.1%
neg-sub058.1%
associate-+l-58.1%
sub0-neg58.1%
neg-mul-158.1%
sub-neg58.1%
+-commutative58.1%
neg-sub058.1%
associate-+l-58.1%
sub0-neg58.1%
neg-mul-158.1%
times-frac58.1%
metadata-eval58.1%
*-lft-identity58.1%
*-commutative58.1%
Simplified58.1%
Taylor expanded in z around inf 67.9%
if -1.80000000000000017e-33 < z < 3.4999999999999999e-32Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 60.8%
if 3.4999999999999999e-32 < z < 9.5000000000000002e58Initial program 87.6%
sub-neg87.6%
+-commutative87.6%
neg-sub087.6%
associate-+l-87.6%
sub0-neg87.6%
neg-mul-187.6%
sub-neg87.6%
+-commutative87.6%
neg-sub087.6%
associate-+l-87.6%
sub0-neg87.6%
neg-mul-187.6%
times-frac87.6%
metadata-eval87.6%
*-lft-identity87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in z around inf 62.6%
mul-1-neg62.6%
+-commutative62.6%
associate--l+62.6%
associate-/r*62.7%
distribute-neg-frac62.7%
mul-1-neg62.7%
associate-/r*62.7%
associate-*r/62.7%
div-sub62.7%
distribute-lft-out--62.7%
associate-*r/62.7%
Simplified71.0%
Taylor expanded in y around 0 43.2%
associate-*r/43.2%
neg-mul-143.2%
Simplified43.2%
if 9.5000000000000002e58 < z < 4.20000000000000015e91Initial program 67.8%
sub-neg67.8%
+-commutative67.8%
neg-sub067.8%
associate-+l-67.8%
sub0-neg67.8%
neg-mul-167.8%
sub-neg67.8%
+-commutative67.8%
neg-sub067.8%
associate-+l-67.8%
sub0-neg67.8%
neg-mul-167.8%
times-frac67.8%
metadata-eval67.8%
*-lft-identity67.8%
*-commutative67.8%
Simplified67.8%
Taylor expanded in y around inf 57.1%
associate-/l*78.3%
Simplified78.3%
Taylor expanded in a around 0 78.4%
associate-*r/78.4%
neg-mul-178.4%
Simplified78.4%
if 4.20000000000000015e91 < z < 4.59999999999999975e160Initial program 81.8%
sub-neg81.8%
+-commutative81.8%
neg-sub081.8%
associate-+l-81.8%
sub0-neg81.8%
neg-mul-181.8%
sub-neg81.8%
+-commutative81.8%
neg-sub081.8%
associate-+l-81.8%
sub0-neg81.8%
neg-mul-181.8%
times-frac81.8%
metadata-eval81.8%
*-lft-identity81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in z around inf 69.6%
mul-1-neg69.6%
+-commutative69.6%
associate--l+69.6%
associate-/r*71.1%
distribute-neg-frac71.1%
mul-1-neg71.1%
associate-/r*71.1%
associate-*r/71.1%
div-sub71.1%
distribute-lft-out--71.1%
associate-*r/71.1%
Simplified71.1%
Taylor expanded in x around inf 71.9%
Taylor expanded in y around 0 52.3%
associate-*r/52.3%
neg-mul-152.3%
associate-/l/61.6%
distribute-neg-frac61.6%
Simplified61.6%
Final simplification62.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.9e+87) (/ y (- a (/ t z))) (if (<= z 1.3e+113) (/ (- x (* z y)) (- t (* z a))) (/ (- y (/ x z)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.9e+87) {
tmp = y / (a - (t / z));
} else if (z <= 1.3e+113) {
tmp = (x - (z * y)) / (t - (z * a));
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5.9d+87)) then
tmp = y / (a - (t / z))
else if (z <= 1.3d+113) then
tmp = (x - (z * y)) / (t - (z * a))
else
tmp = (y - (x / z)) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.9e+87) {
tmp = y / (a - (t / z));
} else if (z <= 1.3e+113) {
tmp = (x - (z * y)) / (t - (z * a));
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.9e+87: tmp = y / (a - (t / z)) elif z <= 1.3e+113: tmp = (x - (z * y)) / (t - (z * a)) else: tmp = (y - (x / z)) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.9e+87) tmp = Float64(y / Float64(a - Float64(t / z))); elseif (z <= 1.3e+113) tmp = Float64(Float64(x - Float64(z * y)) / Float64(t - Float64(z * a))); else tmp = Float64(Float64(y - Float64(x / z)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.9e+87) tmp = y / (a - (t / z)); elseif (z <= 1.3e+113) tmp = (x - (z * y)) / (t - (z * a)); else tmp = (y - (x / z)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.9e+87], N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+113], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.9 \cdot 10^{+87}:\\
\;\;\;\;\frac{y}{a - \frac{t}{z}}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+113}:\\
\;\;\;\;\frac{x - z \cdot y}{t - z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\end{array}
\end{array}
if z < -5.8999999999999997e87Initial program 49.7%
sub-neg49.7%
+-commutative49.7%
neg-sub049.7%
associate-+l-49.7%
sub0-neg49.7%
neg-mul-149.7%
sub-neg49.7%
+-commutative49.7%
neg-sub049.7%
associate-+l-49.7%
sub0-neg49.7%
neg-mul-149.7%
times-frac49.7%
metadata-eval49.7%
*-lft-identity49.7%
*-commutative49.7%
Simplified49.7%
Taylor expanded in y around inf 43.5%
associate-/l*58.0%
Simplified58.0%
Taylor expanded in a around 0 88.0%
mul-1-neg88.0%
unsub-neg88.0%
Simplified88.0%
if -5.8999999999999997e87 < z < 1.3e113Initial program 95.7%
if 1.3e113 < z Initial program 46.4%
sub-neg46.4%
+-commutative46.4%
neg-sub046.4%
associate-+l-46.4%
sub0-neg46.4%
neg-mul-146.4%
sub-neg46.4%
+-commutative46.4%
neg-sub046.4%
associate-+l-46.4%
sub0-neg46.4%
neg-mul-146.4%
times-frac46.4%
metadata-eval46.4%
*-lft-identity46.4%
*-commutative46.4%
Simplified46.4%
Taylor expanded in z around inf 62.6%
mul-1-neg62.6%
+-commutative62.6%
associate--l+62.6%
associate-/r*74.9%
distribute-neg-frac74.9%
mul-1-neg74.9%
associate-/r*74.9%
associate-*r/74.9%
div-sub74.9%
distribute-lft-out--74.9%
associate-*r/74.9%
Simplified77.6%
Taylor expanded in a around inf 89.1%
Final simplification93.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.4e-33)
(/ y a)
(if (<= z 56000000.0)
(/ x t)
(if (or (<= z 1.35e+58) (not (<= z 3.7e+109)))
(/ y a)
(/ y (/ (- t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e-33) {
tmp = y / a;
} else if (z <= 56000000.0) {
tmp = x / t;
} else if ((z <= 1.35e+58) || !(z <= 3.7e+109)) {
tmp = y / a;
} else {
tmp = y / (-t / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.4d-33)) then
tmp = y / a
else if (z <= 56000000.0d0) then
tmp = x / t
else if ((z <= 1.35d+58) .or. (.not. (z <= 3.7d+109))) then
tmp = y / a
else
tmp = y / (-t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e-33) {
tmp = y / a;
} else if (z <= 56000000.0) {
tmp = x / t;
} else if ((z <= 1.35e+58) || !(z <= 3.7e+109)) {
tmp = y / a;
} else {
tmp = y / (-t / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.4e-33: tmp = y / a elif z <= 56000000.0: tmp = x / t elif (z <= 1.35e+58) or not (z <= 3.7e+109): tmp = y / a else: tmp = y / (-t / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.4e-33) tmp = Float64(y / a); elseif (z <= 56000000.0) tmp = Float64(x / t); elseif ((z <= 1.35e+58) || !(z <= 3.7e+109)) tmp = Float64(y / a); else tmp = Float64(y / Float64(Float64(-t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.4e-33) tmp = y / a; elseif (z <= 56000000.0) tmp = x / t; elseif ((z <= 1.35e+58) || ~((z <= 3.7e+109))) tmp = y / a; else tmp = y / (-t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.4e-33], N[(y / a), $MachinePrecision], If[LessEqual[z, 56000000.0], N[(x / t), $MachinePrecision], If[Or[LessEqual[z, 1.35e+58], N[Not[LessEqual[z, 3.7e+109]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(y / N[((-t) / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{-33}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 56000000:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+58} \lor \neg \left(z \leq 3.7 \cdot 10^{+109}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{-t}{z}}\\
\end{array}
\end{array}
if z < -1.4e-33 or 5.6e7 < z < 1.3500000000000001e58 or 3.7000000000000002e109 < z Initial program 61.6%
sub-neg61.6%
+-commutative61.6%
neg-sub061.6%
associate-+l-61.6%
sub0-neg61.6%
neg-mul-161.6%
sub-neg61.6%
+-commutative61.6%
neg-sub061.6%
associate-+l-61.6%
sub0-neg61.6%
neg-mul-161.6%
times-frac61.6%
metadata-eval61.6%
*-lft-identity61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in z around inf 63.9%
if -1.4e-33 < z < 5.6e7Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 58.0%
if 1.3500000000000001e58 < z < 3.7000000000000002e109Initial program 75.7%
sub-neg75.7%
+-commutative75.7%
neg-sub075.7%
associate-+l-75.7%
sub0-neg75.7%
neg-mul-175.7%
sub-neg75.7%
+-commutative75.7%
neg-sub075.7%
associate-+l-75.7%
sub0-neg75.7%
neg-mul-175.7%
times-frac75.7%
metadata-eval75.7%
*-lft-identity75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in y around inf 43.8%
associate-/l*59.7%
Simplified59.7%
Taylor expanded in a around 0 60.6%
associate-*r/60.6%
neg-mul-160.6%
Simplified60.6%
Final simplification61.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.1e-33)
(/ y a)
(if (<= z 1050000000.0)
(/ x t)
(if (<= z 3.6e+58)
(/ y a)
(if (<= z 3.7e+109) (* z (/ (- y) t)) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.1e-33) {
tmp = y / a;
} else if (z <= 1050000000.0) {
tmp = x / t;
} else if (z <= 3.6e+58) {
tmp = y / a;
} else if (z <= 3.7e+109) {
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 <= (-5.1d-33)) then
tmp = y / a
else if (z <= 1050000000.0d0) then
tmp = x / t
else if (z <= 3.6d+58) then
tmp = y / a
else if (z <= 3.7d+109) 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 <= -5.1e-33) {
tmp = y / a;
} else if (z <= 1050000000.0) {
tmp = x / t;
} else if (z <= 3.6e+58) {
tmp = y / a;
} else if (z <= 3.7e+109) {
tmp = z * (-y / t);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.1e-33: tmp = y / a elif z <= 1050000000.0: tmp = x / t elif z <= 3.6e+58: tmp = y / a elif z <= 3.7e+109: tmp = z * (-y / t) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.1e-33) tmp = Float64(y / a); elseif (z <= 1050000000.0) tmp = Float64(x / t); elseif (z <= 3.6e+58) tmp = Float64(y / a); elseif (z <= 3.7e+109) 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 <= -5.1e-33) tmp = y / a; elseif (z <= 1050000000.0) tmp = x / t; elseif (z <= 3.6e+58) tmp = y / a; elseif (z <= 3.7e+109) tmp = z * (-y / t); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.1e-33], N[(y / a), $MachinePrecision], If[LessEqual[z, 1050000000.0], N[(x / t), $MachinePrecision], If[LessEqual[z, 3.6e+58], N[(y / a), $MachinePrecision], If[LessEqual[z, 3.7e+109], N[(z * N[((-y) / t), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{-33}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 1050000000:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+58}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+109}:\\
\;\;\;\;z \cdot \frac{-y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -5.10000000000000008e-33 or 1.05e9 < z < 3.59999999999999996e58 or 3.7000000000000002e109 < z Initial program 61.6%
sub-neg61.6%
+-commutative61.6%
neg-sub061.6%
associate-+l-61.6%
sub0-neg61.6%
neg-mul-161.6%
sub-neg61.6%
+-commutative61.6%
neg-sub061.6%
associate-+l-61.6%
sub0-neg61.6%
neg-mul-161.6%
times-frac61.6%
metadata-eval61.6%
*-lft-identity61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in z around inf 63.9%
if -5.10000000000000008e-33 < z < 1.05e9Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 58.0%
if 3.59999999999999996e58 < z < 3.7000000000000002e109Initial program 75.7%
sub-neg75.7%
+-commutative75.7%
neg-sub075.7%
associate-+l-75.7%
sub0-neg75.7%
neg-mul-175.7%
sub-neg75.7%
+-commutative75.7%
neg-sub075.7%
associate-+l-75.7%
sub0-neg75.7%
neg-mul-175.7%
times-frac75.7%
metadata-eval75.7%
*-lft-identity75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in y around inf 43.8%
associate-/l*59.7%
Simplified59.7%
associate-/r/59.6%
*-commutative59.6%
Applied egg-rr59.6%
Taylor expanded in z around 0 60.5%
mul-1-neg60.5%
distribute-neg-frac60.5%
Simplified60.5%
Final simplification61.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.2e-33)
(/ y a)
(if (<= z 2.45e-32)
(/ x t)
(if (<= z 4.6e+58)
(/ (- x) (* z a))
(if (<= z 5.4e+109) (/ y (/ (- t) z)) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e-33) {
tmp = y / a;
} else if (z <= 2.45e-32) {
tmp = x / t;
} else if (z <= 4.6e+58) {
tmp = -x / (z * a);
} else if (z <= 5.4e+109) {
tmp = y / (-t / z);
} 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-33)) then
tmp = y / a
else if (z <= 2.45d-32) then
tmp = x / t
else if (z <= 4.6d+58) then
tmp = -x / (z * a)
else if (z <= 5.4d+109) then
tmp = y / (-t / z)
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-33) {
tmp = y / a;
} else if (z <= 2.45e-32) {
tmp = x / t;
} else if (z <= 4.6e+58) {
tmp = -x / (z * a);
} else if (z <= 5.4e+109) {
tmp = y / (-t / z);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2e-33: tmp = y / a elif z <= 2.45e-32: tmp = x / t elif z <= 4.6e+58: tmp = -x / (z * a) elif z <= 5.4e+109: tmp = y / (-t / z) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2e-33) tmp = Float64(y / a); elseif (z <= 2.45e-32) tmp = Float64(x / t); elseif (z <= 4.6e+58) tmp = Float64(Float64(-x) / Float64(z * a)); elseif (z <= 5.4e+109) tmp = Float64(y / Float64(Float64(-t) / z)); 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-33) tmp = y / a; elseif (z <= 2.45e-32) tmp = x / t; elseif (z <= 4.6e+58) tmp = -x / (z * a); elseif (z <= 5.4e+109) tmp = y / (-t / z); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e-33], N[(y / a), $MachinePrecision], If[LessEqual[z, 2.45e-32], N[(x / t), $MachinePrecision], If[LessEqual[z, 4.6e+58], N[((-x) / N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+109], N[(y / N[((-t) / z), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-33}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+58}:\\
\;\;\;\;\frac{-x}{z \cdot a}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+109}:\\
\;\;\;\;\frac{y}{\frac{-t}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.2e-33 or 5.40000000000000003e109 < z Initial program 59.1%
sub-neg59.1%
+-commutative59.1%
neg-sub059.1%
associate-+l-59.1%
sub0-neg59.1%
neg-mul-159.1%
sub-neg59.1%
+-commutative59.1%
neg-sub059.1%
associate-+l-59.1%
sub0-neg59.1%
neg-mul-159.1%
times-frac59.1%
metadata-eval59.1%
*-lft-identity59.1%
*-commutative59.1%
Simplified59.1%
Taylor expanded in z around inf 65.3%
if -1.2e-33 < z < 2.4499999999999999e-32Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 60.8%
if 2.4499999999999999e-32 < z < 4.60000000000000005e58Initial program 87.6%
sub-neg87.6%
+-commutative87.6%
neg-sub087.6%
associate-+l-87.6%
sub0-neg87.6%
neg-mul-187.6%
sub-neg87.6%
+-commutative87.6%
neg-sub087.6%
associate-+l-87.6%
sub0-neg87.6%
neg-mul-187.6%
times-frac87.6%
metadata-eval87.6%
*-lft-identity87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in z around inf 62.6%
mul-1-neg62.6%
+-commutative62.6%
associate--l+62.6%
associate-/r*62.7%
distribute-neg-frac62.7%
mul-1-neg62.7%
associate-/r*62.7%
associate-*r/62.7%
div-sub62.7%
distribute-lft-out--62.7%
associate-*r/62.7%
Simplified71.0%
Taylor expanded in y around 0 43.2%
associate-*r/43.2%
neg-mul-143.2%
Simplified43.2%
if 4.60000000000000005e58 < z < 5.40000000000000003e109Initial program 75.7%
sub-neg75.7%
+-commutative75.7%
neg-sub075.7%
associate-+l-75.7%
sub0-neg75.7%
neg-mul-175.7%
sub-neg75.7%
+-commutative75.7%
neg-sub075.7%
associate-+l-75.7%
sub0-neg75.7%
neg-mul-175.7%
times-frac75.7%
metadata-eval75.7%
*-lft-identity75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in y around inf 43.8%
associate-/l*59.7%
Simplified59.7%
Taylor expanded in a around 0 60.6%
associate-*r/60.6%
neg-mul-160.6%
Simplified60.6%
Final simplification61.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.3e-33) (not (<= z 9.6e-24))) (/ y (- a (/ t z))) (/ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.3e-33) || !(z <= 9.6e-24)) {
tmp = y / (a - (t / z));
} else {
tmp = x / t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.3d-33)) .or. (.not. (z <= 9.6d-24))) then
tmp = y / (a - (t / z))
else
tmp = x / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.3e-33) || !(z <= 9.6e-24)) {
tmp = y / (a - (t / z));
} else {
tmp = x / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.3e-33) or not (z <= 9.6e-24): tmp = y / (a - (t / z)) else: tmp = x / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.3e-33) || !(z <= 9.6e-24)) tmp = Float64(y / Float64(a - Float64(t / z))); else tmp = Float64(x / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.3e-33) || ~((z <= 9.6e-24))) tmp = y / (a - (t / z)); else tmp = x / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.3e-33], N[Not[LessEqual[z, 9.6e-24]], $MachinePrecision]], N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-33} \lor \neg \left(z \leq 9.6 \cdot 10^{-24}\right):\\
\;\;\;\;\frac{y}{a - \frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t}\\
\end{array}
\end{array}
if z < -2.29999999999999986e-33 or 9.5999999999999993e-24 < z Initial program 64.6%
sub-neg64.6%
+-commutative64.6%
neg-sub064.6%
associate-+l-64.6%
sub0-neg64.6%
neg-mul-164.6%
sub-neg64.6%
+-commutative64.6%
neg-sub064.6%
associate-+l-64.6%
sub0-neg64.6%
neg-mul-164.6%
times-frac64.6%
metadata-eval64.6%
*-lft-identity64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in y around inf 46.0%
associate-/l*56.7%
Simplified56.7%
Taylor expanded in a around 0 74.9%
mul-1-neg74.9%
unsub-neg74.9%
Simplified74.9%
if -2.29999999999999986e-33 < z < 9.5999999999999993e-24Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 59.7%
Final simplification68.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5e-31) (not (<= z 58000000.0))) (/ y (- a (/ t z))) (/ (- x (* z y)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5e-31) || !(z <= 58000000.0)) {
tmp = y / (a - (t / z));
} 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 <= (-5d-31)) .or. (.not. (z <= 58000000.0d0))) then
tmp = y / (a - (t / z))
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 <= -5e-31) || !(z <= 58000000.0)) {
tmp = y / (a - (t / z));
} else {
tmp = (x - (z * y)) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5e-31) or not (z <= 58000000.0): tmp = y / (a - (t / z)) else: tmp = (x - (z * y)) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5e-31) || !(z <= 58000000.0)) tmp = Float64(y / Float64(a - Float64(t / z))); 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 <= -5e-31) || ~((z <= 58000000.0))) tmp = y / (a - (t / z)); else tmp = (x - (z * y)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5e-31], N[Not[LessEqual[z, 58000000.0]], $MachinePrecision]], N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-31} \lor \neg \left(z \leq 58000000\right):\\
\;\;\;\;\frac{y}{a - \frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - z \cdot y}{t}\\
\end{array}
\end{array}
if z < -5e-31 or 5.8e7 < z Initial program 62.6%
sub-neg62.6%
+-commutative62.6%
neg-sub062.6%
associate-+l-62.6%
sub0-neg62.6%
neg-mul-162.6%
sub-neg62.6%
+-commutative62.6%
neg-sub062.6%
associate-+l-62.6%
sub0-neg62.6%
neg-mul-162.6%
times-frac62.6%
metadata-eval62.6%
*-lft-identity62.6%
*-commutative62.6%
Simplified62.6%
Taylor expanded in y around inf 45.7%
associate-/l*57.0%
Simplified57.0%
Taylor expanded in a around 0 76.2%
mul-1-neg76.2%
unsub-neg76.2%
Simplified76.2%
if -5e-31 < z < 5.8e7Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in a around 0 77.4%
associate-*r/77.4%
neg-mul-177.4%
neg-sub077.4%
sub-neg77.4%
+-commutative77.4%
associate--r+77.4%
neg-sub077.4%
remove-double-neg77.4%
*-commutative77.4%
Simplified77.4%
Final simplification76.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.6e-31) (/ y (- a (/ t z))) (if (<= z 3e-5) (/ (- x (* z y)) t) (/ (- y (/ x z)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e-31) {
tmp = y / (a - (t / z));
} else if (z <= 3e-5) {
tmp = (x - (z * y)) / t;
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.6d-31)) then
tmp = y / (a - (t / z))
else if (z <= 3d-5) then
tmp = (x - (z * y)) / t
else
tmp = (y - (x / z)) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e-31) {
tmp = y / (a - (t / z));
} else if (z <= 3e-5) {
tmp = (x - (z * y)) / t;
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.6e-31: tmp = y / (a - (t / z)) elif z <= 3e-5: tmp = (x - (z * y)) / t else: tmp = (y - (x / z)) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.6e-31) tmp = Float64(y / Float64(a - Float64(t / z))); elseif (z <= 3e-5) tmp = Float64(Float64(x - Float64(z * y)) / t); else tmp = Float64(Float64(y - Float64(x / z)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.6e-31) tmp = y / (a - (t / z)); elseif (z <= 3e-5) tmp = (x - (z * y)) / t; else tmp = (y - (x / z)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.6e-31], N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e-5], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-31}:\\
\;\;\;\;\frac{y}{a - \frac{t}{z}}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-5}:\\
\;\;\;\;\frac{x - z \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\end{array}
\end{array}
if z < -2.59999999999999995e-31Initial program 65.4%
sub-neg65.4%
+-commutative65.4%
neg-sub065.4%
associate-+l-65.4%
sub0-neg65.4%
neg-mul-165.4%
sub-neg65.4%
+-commutative65.4%
neg-sub065.4%
associate-+l-65.4%
sub0-neg65.4%
neg-mul-165.4%
times-frac65.4%
metadata-eval65.4%
*-lft-identity65.4%
*-commutative65.4%
Simplified65.4%
Taylor expanded in y around inf 50.4%
associate-/l*60.0%
Simplified60.0%
Taylor expanded in a around 0 81.0%
mul-1-neg81.0%
unsub-neg81.0%
Simplified81.0%
if -2.59999999999999995e-31 < z < 3.00000000000000008e-5Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in a around 0 78.6%
associate-*r/78.6%
neg-mul-178.6%
neg-sub078.6%
sub-neg78.6%
+-commutative78.6%
associate--r+78.6%
neg-sub078.6%
remove-double-neg78.6%
*-commutative78.6%
Simplified78.6%
if 3.00000000000000008e-5 < z Initial program 61.2%
sub-neg61.2%
+-commutative61.2%
neg-sub061.2%
associate-+l-61.2%
sub0-neg61.2%
neg-mul-161.2%
sub-neg61.2%
+-commutative61.2%
neg-sub061.2%
associate-+l-61.2%
sub0-neg61.2%
neg-mul-161.2%
times-frac61.2%
metadata-eval61.2%
*-lft-identity61.2%
*-commutative61.2%
Simplified61.2%
Taylor expanded in z around inf 57.2%
mul-1-neg57.2%
+-commutative57.2%
associate--l+57.2%
associate-/r*65.5%
distribute-neg-frac65.5%
mul-1-neg65.5%
associate-/r*65.6%
associate-*r/65.6%
div-sub65.6%
distribute-lft-out--65.6%
associate-*r/65.6%
Simplified70.0%
Taylor expanded in a around inf 78.2%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.15e-33) (not (<= z 15500000000.0))) (/ y a) (/ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.15e-33) || !(z <= 15500000000.0)) {
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.15d-33)) .or. (.not. (z <= 15500000000.0d0))) 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.15e-33) || !(z <= 15500000000.0)) {
tmp = y / a;
} else {
tmp = x / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.15e-33) or not (z <= 15500000000.0): tmp = y / a else: tmp = x / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.15e-33) || !(z <= 15500000000.0)) 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.15e-33) || ~((z <= 15500000000.0))) tmp = y / a; else tmp = x / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.15e-33], N[Not[LessEqual[z, 15500000000.0]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(x / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{-33} \lor \neg \left(z \leq 15500000000\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t}\\
\end{array}
\end{array}
if z < -2.15000000000000015e-33 or 1.55e10 < z Initial program 62.8%
sub-neg62.8%
+-commutative62.8%
neg-sub062.8%
associate-+l-62.8%
sub0-neg62.8%
neg-mul-162.8%
sub-neg62.8%
+-commutative62.8%
neg-sub062.8%
associate-+l-62.8%
sub0-neg62.8%
neg-mul-162.8%
times-frac62.8%
metadata-eval62.8%
*-lft-identity62.8%
*-commutative62.8%
Simplified62.8%
Taylor expanded in z around inf 59.3%
if -2.15000000000000015e-33 < z < 1.55e10Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 58.0%
Final simplification58.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 79.6%
sub-neg79.6%
+-commutative79.6%
neg-sub079.6%
associate-+l-79.6%
sub0-neg79.6%
neg-mul-179.6%
sub-neg79.6%
+-commutative79.6%
neg-sub079.6%
associate-+l-79.6%
sub0-neg79.6%
neg-mul-179.6%
times-frac79.6%
metadata-eval79.6%
*-lft-identity79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in z around 0 32.0%
Final simplification32.0%
(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 2023207
(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))))