
(FPCore (x y z t a) :precision binary64 (/ (- x (* y z)) (- t (* a z))))
double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x - (y * z)) / (t - (a * z))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
def code(x, y, z, t, a): return (x - (y * z)) / (t - (a * z))
function code(x, y, z, t, a) return Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(a * z))) end
function tmp = code(x, y, z, t, a) tmp = (x - (y * z)) / (t - (a * z)); end
code[x_, y_, z_, t_, a_] := N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y \cdot z}{t - a \cdot z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (- x (* y z)) (- t (* a z))))
double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x - (y * z)) / (t - (a * z))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
def code(x, y, z, t, a): return (x - (y * z)) / (t - (a * z))
function code(x, y, z, t, a) return Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(a * z))) end
function tmp = code(x, y, z, t, a) tmp = (x - (y * z)) / (t - (a * z)); end
code[x_, y_, z_, t_, a_] := N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y \cdot z}{t - a \cdot z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* z a) t)) (t_2 (/ x t_1)))
(if (<= (/ (- x (* y z)) (- t (* z a))) 2e+230)
(- (/ (* y z) t_1) t_2)
(- (/ y a) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * a) - t;
double t_2 = x / t_1;
double tmp;
if (((x - (y * z)) / (t - (z * a))) <= 2e+230) {
tmp = ((y * z) / t_1) - t_2;
} else {
tmp = (y / a) - 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 = (z * a) - t
t_2 = x / t_1
if (((x - (y * z)) / (t - (z * a))) <= 2d+230) then
tmp = ((y * z) / t_1) - t_2
else
tmp = (y / a) - 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 = (z * a) - t;
double t_2 = x / t_1;
double tmp;
if (((x - (y * z)) / (t - (z * a))) <= 2e+230) {
tmp = ((y * z) / t_1) - t_2;
} else {
tmp = (y / a) - t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z * a) - t t_2 = x / t_1 tmp = 0 if ((x - (y * z)) / (t - (z * a))) <= 2e+230: tmp = ((y * z) / t_1) - t_2 else: tmp = (y / a) - t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z * a) - t) t_2 = Float64(x / t_1) tmp = 0.0 if (Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(z * a))) <= 2e+230) tmp = Float64(Float64(Float64(y * z) / t_1) - t_2); else tmp = Float64(Float64(y / a) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z * a) - t; t_2 = x / t_1; tmp = 0.0; if (((x - (y * z)) / (t - (z * a))) <= 2e+230) tmp = ((y * z) / t_1) - t_2; else tmp = (y / a) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]}, Block[{t$95$2 = N[(x / t$95$1), $MachinePrecision]}, If[LessEqual[N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+230], N[(N[(N[(y * z), $MachinePrecision] / t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(y / a), $MachinePrecision] - t$95$2), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot a - t\\
t_2 := \frac{x}{t_1}\\
\mathbf{if}\;\frac{x - y \cdot z}{t - z \cdot a} \leq 2 \cdot 10^{+230}:\\
\;\;\;\;\frac{y \cdot z}{t_1} - t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} - t_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 2.0000000000000002e230Initial program 95.1%
sub-neg95.1%
+-commutative95.1%
neg-sub095.1%
associate-+l-95.1%
sub0-neg95.1%
neg-mul-195.1%
sub-neg95.1%
+-commutative95.1%
neg-sub095.1%
associate-+l-95.1%
sub0-neg95.1%
neg-mul-195.1%
times-frac95.1%
metadata-eval95.1%
*-lft-identity95.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in y around 0 95.1%
if 2.0000000000000002e230 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 34.7%
sub-neg34.7%
+-commutative34.7%
neg-sub034.7%
associate-+l-34.7%
sub0-neg34.7%
neg-mul-134.7%
sub-neg34.7%
+-commutative34.7%
neg-sub034.7%
associate-+l-34.7%
sub0-neg34.7%
neg-mul-134.7%
times-frac34.7%
metadata-eval34.7%
*-lft-identity34.7%
*-commutative34.7%
Simplified34.7%
div-sub34.7%
associate-/l*58.1%
Applied egg-rr58.1%
Taylor expanded in z around inf 93.5%
Final simplification94.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (- x (* y z)) (- t (* z a))))) (if (<= t_1 2e+230) t_1 (- (/ y a) (/ x (- (* z a) t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / (t - (z * a));
double tmp;
if (t_1 <= 2e+230) {
tmp = t_1;
} else {
tmp = (y / a) - (x / ((z * a) - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (x - (y * z)) / (t - (z * a))
if (t_1 <= 2d+230) then
tmp = t_1
else
tmp = (y / a) - (x / ((z * a) - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / (t - (z * a));
double tmp;
if (t_1 <= 2e+230) {
tmp = t_1;
} else {
tmp = (y / a) - (x / ((z * a) - t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - (y * z)) / (t - (z * a)) tmp = 0 if t_1 <= 2e+230: tmp = t_1 else: tmp = (y / a) - (x / ((z * a) - t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(z * a))) tmp = 0.0 if (t_1 <= 2e+230) tmp = t_1; else tmp = Float64(Float64(y / a) - Float64(x / Float64(Float64(z * a) - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - (y * z)) / (t - (z * a)); tmp = 0.0; if (t_1 <= 2e+230) tmp = t_1; else tmp = (y / a) - (x / ((z * a) - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+230], t$95$1, N[(N[(y / a), $MachinePrecision] - N[(x / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y \cdot z}{t - z \cdot a}\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+230}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} - \frac{x}{z \cdot a - t}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 2.0000000000000002e230Initial program 95.1%
if 2.0000000000000002e230 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 34.7%
sub-neg34.7%
+-commutative34.7%
neg-sub034.7%
associate-+l-34.7%
sub0-neg34.7%
neg-mul-134.7%
sub-neg34.7%
+-commutative34.7%
neg-sub034.7%
associate-+l-34.7%
sub0-neg34.7%
neg-mul-134.7%
times-frac34.7%
metadata-eval34.7%
*-lft-identity34.7%
*-commutative34.7%
Simplified34.7%
div-sub34.7%
associate-/l*58.1%
Applied egg-rr58.1%
Taylor expanded in z around inf 93.5%
Final simplification94.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.5e+67)
(/ y a)
(if (<= z -1.8e-165)
(/ x t)
(if (<= z -2.4e-182)
(- (/ x (* z a)))
(if (<= z 9.5e-33)
(/ x t)
(if (<= z 5.8e+61)
(/ (* y (- z)) t)
(if (<= z 3.7e+67) (/ x t) (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+67) {
tmp = y / a;
} else if (z <= -1.8e-165) {
tmp = x / t;
} else if (z <= -2.4e-182) {
tmp = -(x / (z * a));
} else if (z <= 9.5e-33) {
tmp = x / t;
} else if (z <= 5.8e+61) {
tmp = (y * -z) / t;
} else if (z <= 3.7e+67) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-9.5d+67)) then
tmp = y / a
else if (z <= (-1.8d-165)) then
tmp = x / t
else if (z <= (-2.4d-182)) then
tmp = -(x / (z * a))
else if (z <= 9.5d-33) then
tmp = x / t
else if (z <= 5.8d+61) then
tmp = (y * -z) / t
else if (z <= 3.7d+67) then
tmp = x / t
else
tmp = y / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+67) {
tmp = y / a;
} else if (z <= -1.8e-165) {
tmp = x / t;
} else if (z <= -2.4e-182) {
tmp = -(x / (z * a));
} else if (z <= 9.5e-33) {
tmp = x / t;
} else if (z <= 5.8e+61) {
tmp = (y * -z) / t;
} else if (z <= 3.7e+67) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e+67: tmp = y / a elif z <= -1.8e-165: tmp = x / t elif z <= -2.4e-182: tmp = -(x / (z * a)) elif z <= 9.5e-33: tmp = x / t elif z <= 5.8e+61: tmp = (y * -z) / t elif z <= 3.7e+67: tmp = x / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e+67) tmp = Float64(y / a); elseif (z <= -1.8e-165) tmp = Float64(x / t); elseif (z <= -2.4e-182) tmp = Float64(-Float64(x / Float64(z * a))); elseif (z <= 9.5e-33) tmp = Float64(x / t); elseif (z <= 5.8e+61) tmp = Float64(Float64(y * Float64(-z)) / t); elseif (z <= 3.7e+67) tmp = Float64(x / t); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e+67) tmp = y / a; elseif (z <= -1.8e-165) tmp = x / t; elseif (z <= -2.4e-182) tmp = -(x / (z * a)); elseif (z <= 9.5e-33) tmp = x / t; elseif (z <= 5.8e+61) tmp = (y * -z) / t; elseif (z <= 3.7e+67) tmp = x / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+67], N[(y / a), $MachinePrecision], If[LessEqual[z, -1.8e-165], N[(x / t), $MachinePrecision], If[LessEqual[z, -2.4e-182], (-N[(x / N[(z * a), $MachinePrecision]), $MachinePrecision]), If[LessEqual[z, 9.5e-33], N[(x / t), $MachinePrecision], If[LessEqual[z, 5.8e+61], N[(N[(y * (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 3.7e+67], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+67}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-165}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-182}:\\
\;\;\;\;-\frac{x}{z \cdot a}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-33}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+61}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+67}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -9.5000000000000002e67 or 3.6999999999999997e67 < z Initial program 68.2%
sub-neg68.2%
+-commutative68.2%
neg-sub068.2%
associate-+l-68.2%
sub0-neg68.2%
neg-mul-168.2%
sub-neg68.2%
+-commutative68.2%
neg-sub068.2%
associate-+l-68.2%
sub0-neg68.2%
neg-mul-168.2%
times-frac68.2%
metadata-eval68.2%
*-lft-identity68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in z around inf 72.7%
if -9.5000000000000002e67 < z < -1.79999999999999992e-165 or -2.3999999999999998e-182 < z < 9.50000000000000019e-33 or 5.8000000000000001e61 < z < 3.6999999999999997e67Initial program 99.2%
sub-neg99.2%
+-commutative99.2%
neg-sub099.2%
associate-+l-99.2%
sub0-neg99.2%
neg-mul-199.2%
sub-neg99.2%
+-commutative99.2%
neg-sub099.2%
associate-+l-99.2%
sub0-neg99.2%
neg-mul-199.2%
times-frac99.2%
metadata-eval99.2%
*-lft-identity99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in z around 0 60.1%
if -1.79999999999999992e-165 < z < -2.3999999999999998e-182Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
neg-mul-199.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
*-lft-identity99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in y around 0 51.9%
neg-mul-151.9%
Simplified51.9%
Taylor expanded in z around inf 63.0%
if 9.50000000000000019e-33 < z < 5.8000000000000001e61Initial 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 50.9%
associate-*r/50.9%
neg-mul-150.9%
neg-sub050.9%
sub-neg50.9%
+-commutative50.9%
associate--r+50.9%
neg-sub050.9%
remove-double-neg50.9%
*-commutative50.9%
Simplified50.9%
Taylor expanded in x around 0 40.2%
associate-*r*40.2%
neg-mul-140.2%
*-commutative40.2%
Simplified40.2%
Final simplification63.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.7e+24)
(/ (- x (* y z)) t)
(if (<= t 1.2e+45)
(- (/ y a) (/ x (- (* z a) t)))
(- (/ x t) (/ (* y z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.7e+24) {
tmp = (x - (y * z)) / t;
} else if (t <= 1.2e+45) {
tmp = (y / a) - (x / ((z * a) - t));
} else {
tmp = (x / t) - ((y * z) / 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 (t <= (-1.7d+24)) then
tmp = (x - (y * z)) / t
else if (t <= 1.2d+45) then
tmp = (y / a) - (x / ((z * a) - t))
else
tmp = (x / t) - ((y * z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.7e+24) {
tmp = (x - (y * z)) / t;
} else if (t <= 1.2e+45) {
tmp = (y / a) - (x / ((z * a) - t));
} else {
tmp = (x / t) - ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.7e+24: tmp = (x - (y * z)) / t elif t <= 1.2e+45: tmp = (y / a) - (x / ((z * a) - t)) else: tmp = (x / t) - ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.7e+24) tmp = Float64(Float64(x - Float64(y * z)) / t); elseif (t <= 1.2e+45) tmp = Float64(Float64(y / a) - Float64(x / Float64(Float64(z * a) - t))); else tmp = Float64(Float64(x / t) - Float64(Float64(y * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.7e+24) tmp = (x - (y * z)) / t; elseif (t <= 1.2e+45) tmp = (y / a) - (x / ((z * a) - t)); else tmp = (x / t) - ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.7e+24], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 1.2e+45], N[(N[(y / a), $MachinePrecision] - N[(x / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{+24}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+45}:\\
\;\;\;\;\frac{y}{a} - \frac{x}{z \cdot a - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t} - \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if t < -1.7e24Initial program 87.5%
sub-neg87.5%
+-commutative87.5%
neg-sub087.5%
associate-+l-87.5%
sub0-neg87.5%
neg-mul-187.5%
sub-neg87.5%
+-commutative87.5%
neg-sub087.5%
associate-+l-87.5%
sub0-neg87.5%
neg-mul-187.5%
times-frac87.5%
metadata-eval87.5%
*-lft-identity87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in a around 0 72.3%
associate-*r/72.3%
neg-mul-172.3%
neg-sub072.3%
sub-neg72.3%
+-commutative72.3%
associate--r+72.3%
neg-sub072.3%
remove-double-neg72.3%
*-commutative72.3%
Simplified72.3%
if -1.7e24 < t < 1.19999999999999995e45Initial program 87.5%
sub-neg87.5%
+-commutative87.5%
neg-sub087.5%
associate-+l-87.5%
sub0-neg87.5%
neg-mul-187.5%
sub-neg87.5%
+-commutative87.5%
neg-sub087.5%
associate-+l-87.5%
sub0-neg87.5%
neg-mul-187.5%
times-frac87.5%
metadata-eval87.5%
*-lft-identity87.5%
*-commutative87.5%
Simplified87.5%
div-sub87.5%
associate-/l*91.0%
Applied egg-rr91.0%
Taylor expanded in z around inf 84.0%
if 1.19999999999999995e45 < t Initial program 89.6%
sub-neg89.6%
+-commutative89.6%
neg-sub089.6%
associate-+l-89.6%
sub0-neg89.6%
neg-mul-189.6%
sub-neg89.6%
+-commutative89.6%
neg-sub089.6%
associate-+l-89.6%
sub0-neg89.6%
neg-mul-189.6%
times-frac89.6%
metadata-eval89.6%
*-lft-identity89.6%
*-commutative89.6%
Simplified89.6%
Taylor expanded in a around 0 76.5%
associate-*r/76.5%
neg-mul-176.5%
neg-sub076.5%
sub-neg76.5%
+-commutative76.5%
associate--r+76.5%
neg-sub076.5%
remove-double-neg76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in x around 0 76.5%
Final simplification79.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.8e+74) (not (<= z 3.6e+67))) (- (/ y a) (/ (/ x z) a)) (/ (- x) (- (* z a) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.8e+74) || !(z <= 3.6e+67)) {
tmp = (y / a) - ((x / z) / a);
} else {
tmp = -x / ((z * a) - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-6.8d+74)) .or. (.not. (z <= 3.6d+67))) then
tmp = (y / a) - ((x / z) / a)
else
tmp = -x / ((z * a) - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.8e+74) || !(z <= 3.6e+67)) {
tmp = (y / a) - ((x / z) / a);
} else {
tmp = -x / ((z * a) - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.8e+74) or not (z <= 3.6e+67): tmp = (y / a) - ((x / z) / a) else: tmp = -x / ((z * a) - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.8e+74) || !(z <= 3.6e+67)) tmp = Float64(Float64(y / a) - Float64(Float64(x / z) / a)); else tmp = Float64(Float64(-x) / Float64(Float64(z * a) - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.8e+74) || ~((z <= 3.6e+67))) tmp = (y / a) - ((x / z) / a); else tmp = -x / ((z * a) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.8e+74], N[Not[LessEqual[z, 3.6e+67]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] - N[(N[(x / z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[((-x) / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+74} \lor \neg \left(z \leq 3.6 \cdot 10^{+67}\right):\\
\;\;\;\;\frac{y}{a} - \frac{\frac{x}{z}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{z \cdot a - t}\\
\end{array}
\end{array}
if z < -6.7999999999999998e74 or 3.5999999999999999e67 < z Initial program 67.9%
sub-neg67.9%
+-commutative67.9%
neg-sub067.9%
associate-+l-67.9%
sub0-neg67.9%
neg-mul-167.9%
sub-neg67.9%
+-commutative67.9%
neg-sub067.9%
associate-+l-67.9%
sub0-neg67.9%
neg-mul-167.9%
times-frac67.9%
metadata-eval67.9%
*-lft-identity67.9%
*-commutative67.9%
Simplified67.9%
clear-num67.8%
associate-/r/67.7%
Applied egg-rr67.7%
Taylor expanded in a around inf 51.5%
*-commutative51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in z around 0 79.4%
+-commutative79.4%
mul-1-neg79.4%
unsub-neg79.4%
*-commutative79.4%
associate-/r*82.6%
Simplified82.6%
if -6.7999999999999998e74 < z < 3.5999999999999999e67Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
neg-sub099.3%
associate-+l-99.3%
sub0-neg99.3%
neg-mul-199.3%
sub-neg99.3%
+-commutative99.3%
neg-sub099.3%
associate-+l-99.3%
sub0-neg99.3%
neg-mul-199.3%
times-frac99.3%
metadata-eval99.3%
*-lft-identity99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in y around 0 74.7%
neg-mul-174.7%
Simplified74.7%
Final simplification77.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.2e+67)
(/ y a)
(if (<= z -1.55e-165)
(/ x t)
(if (<= z -6.5e-183)
(- (/ x (* z a)))
(if (<= z 3.6e+67) (/ x t) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e+67) {
tmp = y / a;
} else if (z <= -1.55e-165) {
tmp = x / t;
} else if (z <= -6.5e-183) {
tmp = -(x / (z * a));
} else if (z <= 3.6e+67) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-9.2d+67)) then
tmp = y / a
else if (z <= (-1.55d-165)) then
tmp = x / t
else if (z <= (-6.5d-183)) then
tmp = -(x / (z * a))
else if (z <= 3.6d+67) then
tmp = x / t
else
tmp = y / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e+67) {
tmp = y / a;
} else if (z <= -1.55e-165) {
tmp = x / t;
} else if (z <= -6.5e-183) {
tmp = -(x / (z * a));
} else if (z <= 3.6e+67) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.2e+67: tmp = y / a elif z <= -1.55e-165: tmp = x / t elif z <= -6.5e-183: tmp = -(x / (z * a)) elif z <= 3.6e+67: tmp = x / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.2e+67) tmp = Float64(y / a); elseif (z <= -1.55e-165) tmp = Float64(x / t); elseif (z <= -6.5e-183) tmp = Float64(-Float64(x / Float64(z * a))); elseif (z <= 3.6e+67) tmp = Float64(x / t); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.2e+67) tmp = y / a; elseif (z <= -1.55e-165) tmp = x / t; elseif (z <= -6.5e-183) tmp = -(x / (z * a)); elseif (z <= 3.6e+67) tmp = x / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e+67], N[(y / a), $MachinePrecision], If[LessEqual[z, -1.55e-165], N[(x / t), $MachinePrecision], If[LessEqual[z, -6.5e-183], (-N[(x / N[(z * a), $MachinePrecision]), $MachinePrecision]), If[LessEqual[z, 3.6e+67], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+67}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-165}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-183}:\\
\;\;\;\;-\frac{x}{z \cdot a}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+67}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -9.1999999999999994e67 or 3.5999999999999999e67 < z Initial program 68.2%
sub-neg68.2%
+-commutative68.2%
neg-sub068.2%
associate-+l-68.2%
sub0-neg68.2%
neg-mul-168.2%
sub-neg68.2%
+-commutative68.2%
neg-sub068.2%
associate-+l-68.2%
sub0-neg68.2%
neg-mul-168.2%
times-frac68.2%
metadata-eval68.2%
*-lft-identity68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in z around inf 72.7%
if -9.1999999999999994e67 < z < -1.54999999999999998e-165 or -6.50000000000000014e-183 < z < 3.5999999999999999e67Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
neg-sub099.3%
associate-+l-99.3%
sub0-neg99.3%
neg-mul-199.3%
sub-neg99.3%
+-commutative99.3%
neg-sub099.3%
associate-+l-99.3%
sub0-neg99.3%
neg-mul-199.3%
times-frac99.3%
metadata-eval99.3%
*-lft-identity99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in z around 0 54.7%
if -1.54999999999999998e-165 < z < -6.50000000000000014e-183Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
neg-mul-199.6%
sub-neg99.6%
+-commutative99.6%
neg-sub099.6%
associate-+l-99.6%
sub0-neg99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
*-lft-identity99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in y around 0 51.9%
neg-mul-151.9%
Simplified51.9%
Taylor expanded in z around inf 63.0%
Final simplification61.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.2e+85) (/ y a) (if (<= z 9.8e+67) (/ (- x) (- (* z a) t)) (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.2e+85) {
tmp = y / a;
} else if (z <= 9.8e+67) {
tmp = -x / ((z * a) - 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 <= (-7.2d+85)) then
tmp = y / a
else if (z <= 9.8d+67) then
tmp = -x / ((z * a) - 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 <= -7.2e+85) {
tmp = y / a;
} else if (z <= 9.8e+67) {
tmp = -x / ((z * a) - t);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.2e+85: tmp = y / a elif z <= 9.8e+67: tmp = -x / ((z * a) - t) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.2e+85) tmp = Float64(y / a); elseif (z <= 9.8e+67) tmp = Float64(Float64(-x) / Float64(Float64(z * a) - t)); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.2e+85) tmp = y / a; elseif (z <= 9.8e+67) tmp = -x / ((z * a) - t); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.2e+85], N[(y / a), $MachinePrecision], If[LessEqual[z, 9.8e+67], N[((-x) / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+85}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+67}:\\
\;\;\;\;\frac{-x}{z \cdot a - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -7.1999999999999996e85 or 9.7999999999999998e67 < z Initial program 66.4%
sub-neg66.4%
+-commutative66.4%
neg-sub066.4%
associate-+l-66.4%
sub0-neg66.4%
neg-mul-166.4%
sub-neg66.4%
+-commutative66.4%
neg-sub066.4%
associate-+l-66.4%
sub0-neg66.4%
neg-mul-166.4%
times-frac66.4%
metadata-eval66.4%
*-lft-identity66.4%
*-commutative66.4%
Simplified66.4%
Taylor expanded in z around inf 73.4%
if -7.1999999999999996e85 < z < 9.7999999999999998e67Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
neg-sub099.3%
associate-+l-99.3%
sub0-neg99.3%
neg-mul-199.3%
sub-neg99.3%
+-commutative99.3%
neg-sub099.3%
associate-+l-99.3%
sub0-neg99.3%
neg-mul-199.3%
times-frac99.3%
metadata-eval99.3%
*-lft-identity99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in y around 0 74.2%
neg-mul-174.2%
Simplified74.2%
Final simplification73.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.2e+85) (/ y a) (if (<= z 1.5e+69) (/ (- x (* y z)) t) (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+85) {
tmp = y / a;
} else if (z <= 1.5e+69) {
tmp = (x - (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 <= (-3.2d+85)) then
tmp = y / a
else if (z <= 1.5d+69) then
tmp = (x - (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 <= -3.2e+85) {
tmp = y / a;
} else if (z <= 1.5e+69) {
tmp = (x - (y * z)) / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+85: tmp = y / a elif z <= 1.5e+69: tmp = (x - (y * z)) / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+85) tmp = Float64(y / a); elseif (z <= 1.5e+69) tmp = Float64(Float64(x - Float64(y * 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 <= -3.2e+85) tmp = y / a; elseif (z <= 1.5e+69) tmp = (x - (y * z)) / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+85], N[(y / a), $MachinePrecision], If[LessEqual[z, 1.5e+69], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+85}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+69}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -3.20000000000000018e85 or 1.49999999999999992e69 < z Initial program 66.4%
sub-neg66.4%
+-commutative66.4%
neg-sub066.4%
associate-+l-66.4%
sub0-neg66.4%
neg-mul-166.4%
sub-neg66.4%
+-commutative66.4%
neg-sub066.4%
associate-+l-66.4%
sub0-neg66.4%
neg-mul-166.4%
times-frac66.4%
metadata-eval66.4%
*-lft-identity66.4%
*-commutative66.4%
Simplified66.4%
Taylor expanded in z around inf 73.4%
if -3.20000000000000018e85 < z < 1.49999999999999992e69Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
neg-sub099.3%
associate-+l-99.3%
sub0-neg99.3%
neg-mul-199.3%
sub-neg99.3%
+-commutative99.3%
neg-sub099.3%
associate-+l-99.3%
sub0-neg99.3%
neg-mul-199.3%
times-frac99.3%
metadata-eval99.3%
*-lft-identity99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in a around 0 67.6%
associate-*r/67.6%
neg-mul-167.6%
neg-sub067.6%
sub-neg67.6%
+-commutative67.6%
associate--r+67.6%
neg-sub067.6%
remove-double-neg67.6%
*-commutative67.6%
Simplified67.6%
Final simplification69.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.2e+67) (/ y a) (if (<= z 4.95e+67) (/ x t) (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e+67) {
tmp = y / a;
} else if (z <= 4.95e+67) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-9.2d+67)) then
tmp = y / a
else if (z <= 4.95d+67) then
tmp = x / t
else
tmp = y / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e+67) {
tmp = y / a;
} else if (z <= 4.95e+67) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.2e+67: tmp = y / a elif z <= 4.95e+67: tmp = x / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.2e+67) tmp = Float64(y / a); elseif (z <= 4.95e+67) tmp = Float64(x / t); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.2e+67) tmp = y / a; elseif (z <= 4.95e+67) tmp = x / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e+67], N[(y / a), $MachinePrecision], If[LessEqual[z, 4.95e+67], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+67}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 4.95 \cdot 10^{+67}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -9.1999999999999994e67 or 4.9499999999999998e67 < z Initial program 68.2%
sub-neg68.2%
+-commutative68.2%
neg-sub068.2%
associate-+l-68.2%
sub0-neg68.2%
neg-mul-168.2%
sub-neg68.2%
+-commutative68.2%
neg-sub068.2%
associate-+l-68.2%
sub0-neg68.2%
neg-mul-168.2%
times-frac68.2%
metadata-eval68.2%
*-lft-identity68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in z around inf 72.7%
if -9.1999999999999994e67 < z < 4.9499999999999998e67Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
neg-sub099.3%
associate-+l-99.3%
sub0-neg99.3%
neg-mul-199.3%
sub-neg99.3%
+-commutative99.3%
neg-sub099.3%
associate-+l-99.3%
sub0-neg99.3%
neg-mul-199.3%
times-frac99.3%
metadata-eval99.3%
*-lft-identity99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in z around 0 52.3%
Final simplification59.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 88.0%
sub-neg88.0%
+-commutative88.0%
neg-sub088.0%
associate-+l-88.0%
sub0-neg88.0%
neg-mul-188.0%
sub-neg88.0%
+-commutative88.0%
neg-sub088.0%
associate-+l-88.0%
sub0-neg88.0%
neg-mul-188.0%
times-frac88.0%
metadata-eval88.0%
*-lft-identity88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in z around 0 37.4%
Final simplification37.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* a z))) (t_2 (- (/ x t_1) (/ y (- (/ t z) a)))))
(if (< z -32113435955957344.0)
t_2
(if (< z 3.5139522372978296e-86) (* (- x (* y z)) (/ 1.0 t_1)) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * z);
double t_2 = (x / t_1) - (y / ((t / z) - a));
double tmp;
if (z < -32113435955957344.0) {
tmp = t_2;
} else if (z < 3.5139522372978296e-86) {
tmp = (x - (y * z)) * (1.0 / t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t - (a * z)
t_2 = (x / t_1) - (y / ((t / z) - a))
if (z < (-32113435955957344.0d0)) then
tmp = t_2
else if (z < 3.5139522372978296d-86) then
tmp = (x - (y * z)) * (1.0d0 / t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * z);
double t_2 = (x / t_1) - (y / ((t / z) - a));
double tmp;
if (z < -32113435955957344.0) {
tmp = t_2;
} else if (z < 3.5139522372978296e-86) {
tmp = (x - (y * z)) * (1.0 / t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (a * z) t_2 = (x / t_1) - (y / ((t / z) - a)) tmp = 0 if z < -32113435955957344.0: tmp = t_2 elif z < 3.5139522372978296e-86: tmp = (x - (y * z)) * (1.0 / t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(a * z)) t_2 = Float64(Float64(x / t_1) - Float64(y / Float64(Float64(t / z) - a))) tmp = 0.0 if (z < -32113435955957344.0) tmp = t_2; elseif (z < 3.5139522372978296e-86) tmp = Float64(Float64(x - Float64(y * z)) * Float64(1.0 / t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (a * z); t_2 = (x / t_1) - (y / ((t / z) - a)); tmp = 0.0; if (z < -32113435955957344.0) tmp = t_2; elseif (z < 3.5139522372978296e-86) tmp = (x - (y * z)) * (1.0 / t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t$95$1), $MachinePrecision] - N[(y / N[(N[(t / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -32113435955957344.0], t$95$2, If[Less[z, 3.5139522372978296e-86], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - a \cdot z\\
t_2 := \frac{x}{t_1} - \frac{y}{\frac{t}{z} - a}\\
\mathbf{if}\;z < -32113435955957344:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z < 3.5139522372978296 \cdot 10^{-86}:\\
\;\;\;\;\left(x - y \cdot z\right) \cdot \frac{1}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
herbie shell --seed 2023195
(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))))