
(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 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (- x (* y z)) (- t (* a z))))
double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x - (y * z)) / (t - (a * z))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
def code(x, y, z, t, a): return (x - (y * z)) / (t - (a * z))
function code(x, y, z, t, a) return Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(a * z))) end
function tmp = code(x, y, z, t, a) tmp = (x - (y * z)) / (t - (a * z)); end
code[x_, y_, z_, t_, a_] := N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y \cdot z}{t - a \cdot z}
\end{array}
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (- x (* y z)) (- t (* z a))))) (if (<= t_1 5e+217) 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 <= 5e+217) {
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 <= 5d+217) 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 <= 5e+217) {
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 <= 5e+217: 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 <= 5e+217) 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 <= 5e+217) 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, 5e+217], 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 5 \cdot 10^{+217}:\\
\;\;\;\;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))) < 5.00000000000000041e217Initial program 96.4%
if 5.00000000000000041e217 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 52.7%
sub-neg52.7%
+-commutative52.7%
neg-sub052.7%
associate-+l-52.7%
sub0-neg52.7%
neg-mul-152.7%
sub-neg52.7%
+-commutative52.7%
neg-sub052.7%
associate-+l-52.7%
sub0-neg52.7%
neg-mul-152.7%
times-frac52.7%
metadata-eval52.7%
*-lft-identity52.7%
*-commutative52.7%
Simplified52.7%
div-sub52.7%
associate-/l*70.7%
Applied egg-rr70.7%
Taylor expanded in z around inf 100.0%
Final simplification96.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -8.2e-5)
(- (/ x t) (/ z (/ t y)))
(if (<= t 4e-96)
(- (/ y a) (/ x (* z a)))
(if (<= t 2.75e-43)
(/ x (- t (* z a)))
(if (<= t 3.3e-17) (/ y (- a (/ t z))) (/ (- x (* y z)) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.2e-5) {
tmp = (x / t) - (z / (t / y));
} else if (t <= 4e-96) {
tmp = (y / a) - (x / (z * a));
} else if (t <= 2.75e-43) {
tmp = x / (t - (z * a));
} else if (t <= 3.3e-17) {
tmp = y / (a - (t / z));
} else {
tmp = (x - (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 <= (-8.2d-5)) then
tmp = (x / t) - (z / (t / y))
else if (t <= 4d-96) then
tmp = (y / a) - (x / (z * a))
else if (t <= 2.75d-43) then
tmp = x / (t - (z * a))
else if (t <= 3.3d-17) then
tmp = y / (a - (t / z))
else
tmp = (x - (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 <= -8.2e-5) {
tmp = (x / t) - (z / (t / y));
} else if (t <= 4e-96) {
tmp = (y / a) - (x / (z * a));
} else if (t <= 2.75e-43) {
tmp = x / (t - (z * a));
} else if (t <= 3.3e-17) {
tmp = y / (a - (t / z));
} else {
tmp = (x - (y * z)) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8.2e-5: tmp = (x / t) - (z / (t / y)) elif t <= 4e-96: tmp = (y / a) - (x / (z * a)) elif t <= 2.75e-43: tmp = x / (t - (z * a)) elif t <= 3.3e-17: tmp = y / (a - (t / z)) else: tmp = (x - (y * z)) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8.2e-5) tmp = Float64(Float64(x / t) - Float64(z / Float64(t / y))); elseif (t <= 4e-96) tmp = Float64(Float64(y / a) - Float64(x / Float64(z * a))); elseif (t <= 2.75e-43) tmp = Float64(x / Float64(t - Float64(z * a))); elseif (t <= 3.3e-17) tmp = Float64(y / Float64(a - Float64(t / z))); else tmp = Float64(Float64(x - Float64(y * z)) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8.2e-5) tmp = (x / t) - (z / (t / y)); elseif (t <= 4e-96) tmp = (y / a) - (x / (z * a)); elseif (t <= 2.75e-43) tmp = x / (t - (z * a)); elseif (t <= 3.3e-17) tmp = y / (a - (t / z)); else tmp = (x - (y * z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8.2e-5], N[(N[(x / t), $MachinePrecision] - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e-96], N[(N[(y / a), $MachinePrecision] - N[(x / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.75e-43], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e-17], N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{x}{t} - \frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-96}:\\
\;\;\;\;\frac{y}{a} - \frac{x}{z \cdot a}\\
\mathbf{elif}\;t \leq 2.75 \cdot 10^{-43}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-17}:\\
\;\;\;\;\frac{y}{a - \frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\end{array}
\end{array}
if t < -8.20000000000000009e-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 93.4%
associate-*r/93.4%
neg-mul-193.4%
neg-sub093.4%
sub-neg93.4%
+-commutative93.4%
associate--r+93.4%
neg-sub093.4%
remove-double-neg93.4%
*-commutative93.4%
Simplified93.4%
div-sub93.4%
associate-/l*93.5%
Applied egg-rr93.5%
if -8.20000000000000009e-5 < t < 3.9999999999999996e-96Initial program 85.6%
sub-neg85.6%
+-commutative85.6%
neg-sub085.6%
associate-+l-85.6%
sub0-neg85.6%
neg-mul-185.6%
sub-neg85.6%
+-commutative85.6%
neg-sub085.6%
associate-+l-85.6%
sub0-neg85.6%
neg-mul-185.6%
times-frac85.6%
metadata-eval85.6%
*-lft-identity85.6%
*-commutative85.6%
Simplified85.6%
div-sub85.6%
associate-/l*92.0%
Applied egg-rr92.0%
Taylor expanded in z around inf 88.3%
Taylor expanded in z around inf 82.3%
if 3.9999999999999996e-96 < t < 2.75000000000000006e-43Initial program 86.2%
sub-neg86.2%
+-commutative86.2%
neg-sub086.2%
associate-+l-86.2%
sub0-neg86.2%
neg-mul-186.2%
sub-neg86.2%
+-commutative86.2%
neg-sub086.2%
associate-+l-86.2%
sub0-neg86.2%
neg-mul-186.2%
times-frac86.2%
metadata-eval86.2%
*-lft-identity86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in y around 0 79.3%
neg-mul-179.3%
Simplified79.3%
Taylor expanded in x around 0 79.3%
associate-*r/79.3%
*-commutative79.3%
associate-*l/79.1%
metadata-eval79.1%
associate-/r*79.1%
neg-mul-179.1%
associate-*l/79.3%
*-lft-identity79.3%
neg-sub079.3%
sub-neg79.3%
+-commutative79.3%
associate--r+79.3%
neg-sub079.3%
remove-double-neg79.3%
Simplified79.3%
if 2.75000000000000006e-43 < t < 3.3e-17Initial program 79.4%
sub-neg79.4%
+-commutative79.4%
neg-sub079.4%
associate-+l-79.4%
sub0-neg79.4%
neg-mul-179.4%
sub-neg79.4%
+-commutative79.4%
neg-sub079.4%
associate-+l-79.4%
sub0-neg79.4%
neg-mul-179.4%
times-frac79.4%
metadata-eval79.4%
*-lft-identity79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in y around inf 69.5%
*-commutative69.5%
associate-*r/70.4%
*-commutative70.4%
Simplified70.4%
clear-num70.7%
*-commutative70.7%
div-inv70.7%
Applied egg-rr70.7%
Taylor expanded in y around 0 69.5%
associate-/l*70.7%
*-commutative70.7%
div-sub70.7%
*-commutative70.7%
associate-*l/70.6%
associate-/r/90.0%
*-inverses90.0%
/-rgt-identity90.0%
Simplified90.0%
if 3.3e-17 < t Initial program 99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
times-frac99.9%
metadata-eval99.9%
*-lft-identity99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in a around 0 98.9%
associate-*r/98.9%
neg-mul-198.9%
neg-sub098.9%
sub-neg98.9%
+-commutative98.9%
associate--r+98.9%
neg-sub098.9%
remove-double-neg98.9%
*-commutative98.9%
Simplified98.9%
Final simplification87.7%
(FPCore (x y z t a) :precision binary64 (if (<= t -5.6e+48) (- (/ x t) (/ z (/ t y))) (if (<= t 3.4e-12) (- (/ y a) (/ x (- (* z a) t))) (/ (- x (* y z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.6e+48) {
tmp = (x / t) - (z / (t / y));
} else if (t <= 3.4e-12) {
tmp = (y / a) - (x / ((z * a) - t));
} else {
tmp = (x - (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 <= (-5.6d+48)) then
tmp = (x / t) - (z / (t / y))
else if (t <= 3.4d-12) then
tmp = (y / a) - (x / ((z * a) - t))
else
tmp = (x - (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 <= -5.6e+48) {
tmp = (x / t) - (z / (t / y));
} else if (t <= 3.4e-12) {
tmp = (y / a) - (x / ((z * a) - t));
} else {
tmp = (x - (y * z)) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.6e+48: tmp = (x / t) - (z / (t / y)) elif t <= 3.4e-12: tmp = (y / a) - (x / ((z * a) - t)) else: tmp = (x - (y * z)) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.6e+48) tmp = Float64(Float64(x / t) - Float64(z / Float64(t / y))); elseif (t <= 3.4e-12) tmp = Float64(Float64(y / a) - Float64(x / Float64(Float64(z * a) - t))); else tmp = Float64(Float64(x - Float64(y * z)) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.6e+48) tmp = (x / t) - (z / (t / y)); elseif (t <= 3.4e-12) tmp = (y / a) - (x / ((z * a) - t)); else tmp = (x - (y * z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.6e+48], N[(N[(x / t), $MachinePrecision] - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-12], N[(N[(y / a), $MachinePrecision] - N[(x / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+48}:\\
\;\;\;\;\frac{x}{t} - \frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-12}:\\
\;\;\;\;\frac{y}{a} - \frac{x}{z \cdot a - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\end{array}
\end{array}
if t < -5.60000000000000025e48Initial program 99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
times-frac99.9%
metadata-eval99.9%
*-lft-identity99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
associate-*r/99.9%
neg-mul-199.9%
neg-sub099.9%
sub-neg99.9%
+-commutative99.9%
associate--r+99.9%
neg-sub099.9%
remove-double-neg99.9%
*-commutative99.9%
Simplified99.9%
div-sub99.9%
associate-/l*100.0%
Applied egg-rr100.0%
if -5.60000000000000025e48 < t < 3.4000000000000001e-12Initial program 86.2%
sub-neg86.2%
+-commutative86.2%
neg-sub086.2%
associate-+l-86.2%
sub0-neg86.2%
neg-mul-186.2%
sub-neg86.2%
+-commutative86.2%
neg-sub086.2%
associate-+l-86.2%
sub0-neg86.2%
neg-mul-186.2%
times-frac86.2%
metadata-eval86.2%
*-lft-identity86.2%
*-commutative86.2%
Simplified86.2%
div-sub86.2%
associate-/l*91.4%
Applied egg-rr91.4%
Taylor expanded in z around inf 85.1%
if 3.4000000000000001e-12 < t Initial program 99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
times-frac99.9%
metadata-eval99.9%
*-lft-identity99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in a around 0 98.9%
associate-*r/98.9%
neg-mul-198.9%
neg-sub098.9%
sub-neg98.9%
+-commutative98.9%
associate--r+98.9%
neg-sub098.9%
remove-double-neg98.9%
*-commutative98.9%
Simplified98.9%
Final simplification89.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z) t))))
(if (<= z -2.15e-14)
(/ y a)
(if (<= z -4.9e-88)
t_1
(if (<= z 1.15e-44) (/ x t) (if (<= z 3.6e+104) t_1 (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (-z / t);
double tmp;
if (z <= -2.15e-14) {
tmp = y / a;
} else if (z <= -4.9e-88) {
tmp = t_1;
} else if (z <= 1.15e-44) {
tmp = x / t;
} else if (z <= 3.6e+104) {
tmp = t_1;
} else {
tmp = y / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (-z / t)
if (z <= (-2.15d-14)) then
tmp = y / a
else if (z <= (-4.9d-88)) then
tmp = t_1
else if (z <= 1.15d-44) then
tmp = x / t
else if (z <= 3.6d+104) then
tmp = t_1
else
tmp = y / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (-z / t);
double tmp;
if (z <= -2.15e-14) {
tmp = y / a;
} else if (z <= -4.9e-88) {
tmp = t_1;
} else if (z <= 1.15e-44) {
tmp = x / t;
} else if (z <= 3.6e+104) {
tmp = t_1;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (-z / t) tmp = 0 if z <= -2.15e-14: tmp = y / a elif z <= -4.9e-88: tmp = t_1 elif z <= 1.15e-44: tmp = x / t elif z <= 3.6e+104: tmp = t_1 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(-z) / t)) tmp = 0.0 if (z <= -2.15e-14) tmp = Float64(y / a); elseif (z <= -4.9e-88) tmp = t_1; elseif (z <= 1.15e-44) tmp = Float64(x / t); elseif (z <= 3.6e+104) tmp = t_1; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (-z / t); tmp = 0.0; if (z <= -2.15e-14) tmp = y / a; elseif (z <= -4.9e-88) tmp = t_1; elseif (z <= 1.15e-44) tmp = x / t; elseif (z <= 3.6e+104) tmp = t_1; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[((-z) / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.15e-14], N[(y / a), $MachinePrecision], If[LessEqual[z, -4.9e-88], t$95$1, If[LessEqual[z, 1.15e-44], N[(x / t), $MachinePrecision], If[LessEqual[z, 3.6e+104], t$95$1, N[(y / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-z}{t}\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{-14}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{-88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-44}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+104}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -2.14999999999999999e-14 or 3.60000000000000001e104 < z Initial program 72.1%
sub-neg72.1%
+-commutative72.1%
neg-sub072.1%
associate-+l-72.1%
sub0-neg72.1%
neg-mul-172.1%
sub-neg72.1%
+-commutative72.1%
neg-sub072.1%
associate-+l-72.1%
sub0-neg72.1%
neg-mul-172.1%
times-frac72.1%
metadata-eval72.1%
*-lft-identity72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in z around inf 57.5%
if -2.14999999999999999e-14 < z < -4.90000000000000028e-88 or 1.14999999999999999e-44 < z < 3.60000000000000001e104Initial program 97.8%
sub-neg97.8%
+-commutative97.8%
neg-sub097.8%
associate-+l-97.8%
sub0-neg97.8%
neg-mul-197.8%
sub-neg97.8%
+-commutative97.8%
neg-sub097.8%
associate-+l-97.8%
sub0-neg97.8%
neg-mul-197.8%
times-frac97.8%
metadata-eval97.8%
*-lft-identity97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in y around inf 60.7%
*-commutative60.7%
associate-*r/58.5%
*-commutative58.5%
Simplified58.5%
Taylor expanded in z around 0 45.1%
associate-*r/45.1%
neg-mul-145.1%
Simplified45.1%
if -4.90000000000000028e-88 < z < 1.14999999999999999e-44Initial 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 63.2%
Final simplification57.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.08e-13)
(/ y a)
(if (<= z -4.9e-88)
(* z (/ y (- t)))
(if (<= z 1.32e-49)
(/ x t)
(if (<= z 5e+104) (* y (/ (- z) t)) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.08e-13) {
tmp = y / a;
} else if (z <= -4.9e-88) {
tmp = z * (y / -t);
} else if (z <= 1.32e-49) {
tmp = x / t;
} else if (z <= 5e+104) {
tmp = y * (-z / t);
} else {
tmp = y / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.08d-13)) then
tmp = y / a
else if (z <= (-4.9d-88)) then
tmp = z * (y / -t)
else if (z <= 1.32d-49) then
tmp = x / t
else if (z <= 5d+104) then
tmp = y * (-z / t)
else
tmp = y / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.08e-13) {
tmp = y / a;
} else if (z <= -4.9e-88) {
tmp = z * (y / -t);
} else if (z <= 1.32e-49) {
tmp = x / t;
} else if (z <= 5e+104) {
tmp = y * (-z / t);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.08e-13: tmp = y / a elif z <= -4.9e-88: tmp = z * (y / -t) elif z <= 1.32e-49: tmp = x / t elif z <= 5e+104: tmp = y * (-z / t) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.08e-13) tmp = Float64(y / a); elseif (z <= -4.9e-88) tmp = Float64(z * Float64(y / Float64(-t))); elseif (z <= 1.32e-49) tmp = Float64(x / t); elseif (z <= 5e+104) tmp = Float64(y * Float64(Float64(-z) / t)); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.08e-13) tmp = y / a; elseif (z <= -4.9e-88) tmp = z * (y / -t); elseif (z <= 1.32e-49) tmp = x / t; elseif (z <= 5e+104) tmp = y * (-z / t); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.08e-13], N[(y / a), $MachinePrecision], If[LessEqual[z, -4.9e-88], N[(z * N[(y / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.32e-49], N[(x / t), $MachinePrecision], If[LessEqual[z, 5e+104], N[(y * N[((-z) / t), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.08 \cdot 10^{-13}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{-88}:\\
\;\;\;\;z \cdot \frac{y}{-t}\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-49}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \frac{-z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.0799999999999999e-13 or 4.9999999999999997e104 < z Initial program 72.1%
sub-neg72.1%
+-commutative72.1%
neg-sub072.1%
associate-+l-72.1%
sub0-neg72.1%
neg-mul-172.1%
sub-neg72.1%
+-commutative72.1%
neg-sub072.1%
associate-+l-72.1%
sub0-neg72.1%
neg-mul-172.1%
times-frac72.1%
metadata-eval72.1%
*-lft-identity72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in z around inf 57.5%
if -1.0799999999999999e-13 < z < -4.90000000000000028e-88Initial 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 inf 61.1%
*-commutative61.1%
associate-*r/56.2%
*-commutative56.2%
Simplified56.2%
Taylor expanded in z around 0 43.9%
associate-*r/43.9%
neg-mul-143.9%
Simplified43.9%
frac-2neg43.9%
remove-double-neg43.9%
associate-*r/48.8%
Applied egg-rr48.8%
associate-*l/48.6%
Simplified48.6%
if -4.90000000000000028e-88 < z < 1.3199999999999999e-49Initial 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 63.2%
if 1.3199999999999999e-49 < z < 4.9999999999999997e104Initial program 95.9%
sub-neg95.9%
+-commutative95.9%
neg-sub095.9%
associate-+l-95.9%
sub0-neg95.9%
neg-mul-195.9%
sub-neg95.9%
+-commutative95.9%
neg-sub095.9%
associate-+l-95.9%
sub0-neg95.9%
neg-mul-195.9%
times-frac95.9%
metadata-eval95.9%
*-lft-identity95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in y around inf 60.4%
*-commutative60.4%
associate-*r/60.4%
*-commutative60.4%
Simplified60.4%
Taylor expanded in z around 0 46.3%
associate-*r/46.3%
neg-mul-146.3%
Simplified46.3%
Final simplification58.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.2e-14)
(/ y a)
(if (<= z -2.6e-88)
(* z (/ y (- t)))
(if (<= z 2.5e-44)
(/ x t)
(if (<= z 7e+106) (/ y (/ (- t) z)) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.2e-14) {
tmp = y / a;
} else if (z <= -2.6e-88) {
tmp = z * (y / -t);
} else if (z <= 2.5e-44) {
tmp = x / t;
} else if (z <= 7e+106) {
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 <= (-2.2d-14)) then
tmp = y / a
else if (z <= (-2.6d-88)) then
tmp = z * (y / -t)
else if (z <= 2.5d-44) then
tmp = x / t
else if (z <= 7d+106) 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 <= -2.2e-14) {
tmp = y / a;
} else if (z <= -2.6e-88) {
tmp = z * (y / -t);
} else if (z <= 2.5e-44) {
tmp = x / t;
} else if (z <= 7e+106) {
tmp = y / (-t / z);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.2e-14: tmp = y / a elif z <= -2.6e-88: tmp = z * (y / -t) elif z <= 2.5e-44: tmp = x / t elif z <= 7e+106: tmp = y / (-t / z) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.2e-14) tmp = Float64(y / a); elseif (z <= -2.6e-88) tmp = Float64(z * Float64(y / Float64(-t))); elseif (z <= 2.5e-44) tmp = Float64(x / t); elseif (z <= 7e+106) 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 <= -2.2e-14) tmp = y / a; elseif (z <= -2.6e-88) tmp = z * (y / -t); elseif (z <= 2.5e-44) tmp = x / t; elseif (z <= 7e+106) tmp = y / (-t / z); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.2e-14], N[(y / a), $MachinePrecision], If[LessEqual[z, -2.6e-88], N[(z * N[(y / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-44], N[(x / t), $MachinePrecision], If[LessEqual[z, 7e+106], N[(y / N[((-t) / z), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{-14}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-88}:\\
\;\;\;\;z \cdot \frac{y}{-t}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-44}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+106}:\\
\;\;\;\;\frac{y}{\frac{-t}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -2.2000000000000001e-14 or 6.99999999999999962e106 < z Initial program 72.1%
sub-neg72.1%
+-commutative72.1%
neg-sub072.1%
associate-+l-72.1%
sub0-neg72.1%
neg-mul-172.1%
sub-neg72.1%
+-commutative72.1%
neg-sub072.1%
associate-+l-72.1%
sub0-neg72.1%
neg-mul-172.1%
times-frac72.1%
metadata-eval72.1%
*-lft-identity72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in z around inf 57.5%
if -2.2000000000000001e-14 < z < -2.60000000000000014e-88Initial 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 inf 61.1%
*-commutative61.1%
associate-*r/56.2%
*-commutative56.2%
Simplified56.2%
Taylor expanded in z around 0 43.9%
associate-*r/43.9%
neg-mul-143.9%
Simplified43.9%
frac-2neg43.9%
remove-double-neg43.9%
associate-*r/48.8%
Applied egg-rr48.8%
associate-*l/48.6%
Simplified48.6%
if -2.60000000000000014e-88 < z < 2.50000000000000019e-44Initial 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 63.2%
if 2.50000000000000019e-44 < z < 6.99999999999999962e106Initial program 95.9%
sub-neg95.9%
+-commutative95.9%
neg-sub095.9%
associate-+l-95.9%
sub0-neg95.9%
neg-mul-195.9%
sub-neg95.9%
+-commutative95.9%
neg-sub095.9%
associate-+l-95.9%
sub0-neg95.9%
neg-mul-195.9%
times-frac95.9%
metadata-eval95.9%
*-lft-identity95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in y around inf 60.4%
*-commutative60.4%
associate-*r/60.4%
*-commutative60.4%
Simplified60.4%
Taylor expanded in z around 0 46.3%
associate-*r/46.3%
neg-mul-146.3%
Simplified46.3%
frac-2neg46.3%
remove-double-neg46.3%
associate-*r/46.3%
Applied egg-rr46.3%
associate-/l*46.6%
Simplified46.6%
Final simplification58.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.3e-13)
(/ y a)
(if (<= z -4.9e-88)
(/ (* y (- z)) t)
(if (<= z 5.4e-49)
(/ x t)
(if (<= z 2.6e+104) (/ y (/ (- t) z)) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e-13) {
tmp = y / a;
} else if (z <= -4.9e-88) {
tmp = (y * -z) / t;
} else if (z <= 5.4e-49) {
tmp = x / t;
} else if (z <= 2.6e+104) {
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 <= (-2.3d-13)) then
tmp = y / a
else if (z <= (-4.9d-88)) then
tmp = (y * -z) / t
else if (z <= 5.4d-49) then
tmp = x / t
else if (z <= 2.6d+104) 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 <= -2.3e-13) {
tmp = y / a;
} else if (z <= -4.9e-88) {
tmp = (y * -z) / t;
} else if (z <= 5.4e-49) {
tmp = x / t;
} else if (z <= 2.6e+104) {
tmp = y / (-t / z);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e-13: tmp = y / a elif z <= -4.9e-88: tmp = (y * -z) / t elif z <= 5.4e-49: tmp = x / t elif z <= 2.6e+104: tmp = y / (-t / z) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e-13) tmp = Float64(y / a); elseif (z <= -4.9e-88) tmp = Float64(Float64(y * Float64(-z)) / t); elseif (z <= 5.4e-49) tmp = Float64(x / t); elseif (z <= 2.6e+104) 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 <= -2.3e-13) tmp = y / a; elseif (z <= -4.9e-88) tmp = (y * -z) / t; elseif (z <= 5.4e-49) tmp = x / t; elseif (z <= 2.6e+104) tmp = y / (-t / z); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e-13], N[(y / a), $MachinePrecision], If[LessEqual[z, -4.9e-88], N[(N[(y * (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 5.4e-49], N[(x / t), $MachinePrecision], If[LessEqual[z, 2.6e+104], N[(y / N[((-t) / z), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-13}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{-88}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-49}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+104}:\\
\;\;\;\;\frac{y}{\frac{-t}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -2.29999999999999979e-13 or 2.6e104 < z Initial program 72.1%
sub-neg72.1%
+-commutative72.1%
neg-sub072.1%
associate-+l-72.1%
sub0-neg72.1%
neg-mul-172.1%
sub-neg72.1%
+-commutative72.1%
neg-sub072.1%
associate-+l-72.1%
sub0-neg72.1%
neg-mul-172.1%
times-frac72.1%
metadata-eval72.1%
*-lft-identity72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in z around inf 57.5%
if -2.29999999999999979e-13 < z < -4.90000000000000028e-88Initial 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 64.2%
associate-*r/64.2%
neg-mul-164.2%
neg-sub064.2%
sub-neg64.2%
+-commutative64.2%
associate--r+64.2%
neg-sub064.2%
remove-double-neg64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in x around 0 48.8%
associate-*r*48.8%
neg-mul-148.8%
*-commutative48.8%
Simplified48.8%
if -4.90000000000000028e-88 < z < 5.3999999999999999e-49Initial 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 63.2%
if 5.3999999999999999e-49 < z < 2.6e104Initial program 95.9%
sub-neg95.9%
+-commutative95.9%
neg-sub095.9%
associate-+l-95.9%
sub0-neg95.9%
neg-mul-195.9%
sub-neg95.9%
+-commutative95.9%
neg-sub095.9%
associate-+l-95.9%
sub0-neg95.9%
neg-mul-195.9%
times-frac95.9%
metadata-eval95.9%
*-lft-identity95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in y around inf 60.4%
*-commutative60.4%
associate-*r/60.4%
*-commutative60.4%
Simplified60.4%
Taylor expanded in z around 0 46.3%
associate-*r/46.3%
neg-mul-146.3%
Simplified46.3%
frac-2neg46.3%
remove-double-neg46.3%
associate-*r/46.3%
Applied egg-rr46.3%
associate-/l*46.6%
Simplified46.6%
Final simplification58.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.8e+37) (not (<= x 1.75e-70))) (/ x (- t (* z a))) (/ y (- a (/ t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.8e+37) || !(x <= 1.75e-70)) {
tmp = x / (t - (z * a));
} else {
tmp = y / (a - (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 ((x <= (-2.8d+37)) .or. (.not. (x <= 1.75d-70))) then
tmp = x / (t - (z * a))
else
tmp = y / (a - (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 ((x <= -2.8e+37) || !(x <= 1.75e-70)) {
tmp = x / (t - (z * a));
} else {
tmp = y / (a - (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.8e+37) or not (x <= 1.75e-70): tmp = x / (t - (z * a)) else: tmp = y / (a - (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.8e+37) || !(x <= 1.75e-70)) tmp = Float64(x / Float64(t - Float64(z * a))); else tmp = Float64(y / Float64(a - Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.8e+37) || ~((x <= 1.75e-70))) tmp = x / (t - (z * a)); else tmp = y / (a - (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.8e+37], N[Not[LessEqual[x, 1.75e-70]], $MachinePrecision]], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{+37} \lor \neg \left(x \leq 1.75 \cdot 10^{-70}\right):\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a - \frac{t}{z}}\\
\end{array}
\end{array}
if x < -2.7999999999999998e37 or 1.74999999999999987e-70 < x Initial program 90.1%
sub-neg90.1%
+-commutative90.1%
neg-sub090.1%
associate-+l-90.1%
sub0-neg90.1%
neg-mul-190.1%
sub-neg90.1%
+-commutative90.1%
neg-sub090.1%
associate-+l-90.1%
sub0-neg90.1%
neg-mul-190.1%
times-frac90.1%
metadata-eval90.1%
*-lft-identity90.1%
*-commutative90.1%
Simplified90.1%
Taylor expanded in y around 0 77.1%
neg-mul-177.1%
Simplified77.1%
Taylor expanded in x around 0 77.1%
associate-*r/77.1%
*-commutative77.1%
associate-*l/77.0%
metadata-eval77.0%
associate-/r*77.0%
neg-mul-177.0%
associate-*l/77.1%
*-lft-identity77.1%
neg-sub077.1%
sub-neg77.1%
+-commutative77.1%
associate--r+77.1%
neg-sub077.1%
remove-double-neg77.1%
Simplified77.1%
if -2.7999999999999998e37 < x < 1.74999999999999987e-70Initial program 91.6%
sub-neg91.6%
+-commutative91.6%
neg-sub091.6%
associate-+l-91.6%
sub0-neg91.6%
neg-mul-191.6%
sub-neg91.6%
+-commutative91.6%
neg-sub091.6%
associate-+l-91.6%
sub0-neg91.6%
neg-mul-191.6%
times-frac91.6%
metadata-eval91.6%
*-lft-identity91.6%
*-commutative91.6%
Simplified91.6%
Taylor expanded in y around inf 70.2%
*-commutative70.2%
associate-*r/68.3%
*-commutative68.3%
Simplified68.3%
clear-num67.3%
*-commutative67.3%
div-inv67.4%
Applied egg-rr67.4%
Taylor expanded in y around 0 70.2%
associate-/l*67.4%
*-commutative67.4%
div-sub67.4%
*-commutative67.4%
associate-*l/65.3%
associate-/r/72.8%
*-inverses72.8%
/-rgt-identity72.8%
Simplified72.8%
Final simplification75.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.75e+79) (/ y a) (if (<= z 1.35e+88) (/ x (- t (* z a))) (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e+79) {
tmp = y / a;
} else if (z <= 1.35e+88) {
tmp = x / (t - (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.75d+79)) then
tmp = y / a
else if (z <= 1.35d+88) then
tmp = x / (t - (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.75e+79) {
tmp = y / a;
} else if (z <= 1.35e+88) {
tmp = x / (t - (z * a));
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.75e+79: tmp = y / a elif z <= 1.35e+88: tmp = x / (t - (z * a)) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.75e+79) tmp = Float64(y / a); elseif (z <= 1.35e+88) tmp = Float64(x / Float64(t - Float64(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.75e+79) tmp = y / a; elseif (z <= 1.35e+88) tmp = x / (t - (z * a)); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.75e+79], N[(y / a), $MachinePrecision], If[LessEqual[z, 1.35e+88], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+79}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+88}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.7499999999999999e79 or 1.35000000000000008e88 < z Initial program 68.1%
sub-neg68.1%
+-commutative68.1%
neg-sub068.1%
associate-+l-68.1%
sub0-neg68.1%
neg-mul-168.1%
sub-neg68.1%
+-commutative68.1%
neg-sub068.1%
associate-+l-68.1%
sub0-neg68.1%
neg-mul-168.1%
times-frac68.1%
metadata-eval68.1%
*-lft-identity68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in z around inf 62.3%
if -1.7499999999999999e79 < z < 1.35000000000000008e88Initial program 98.8%
sub-neg98.8%
+-commutative98.8%
neg-sub098.8%
associate-+l-98.8%
sub0-neg98.8%
neg-mul-198.8%
sub-neg98.8%
+-commutative98.8%
neg-sub098.8%
associate-+l-98.8%
sub0-neg98.8%
neg-mul-198.8%
times-frac98.8%
metadata-eval98.8%
*-lft-identity98.8%
*-commutative98.8%
Simplified98.8%
Taylor expanded in y around 0 69.8%
neg-mul-169.8%
Simplified69.8%
Taylor expanded in x around 0 69.8%
associate-*r/69.8%
*-commutative69.8%
associate-*l/69.7%
metadata-eval69.7%
associate-/r*69.7%
neg-mul-169.7%
associate-*l/69.8%
*-lft-identity69.8%
neg-sub069.8%
sub-neg69.8%
+-commutative69.8%
associate--r+69.8%
neg-sub069.8%
remove-double-neg69.8%
Simplified69.8%
Final simplification67.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -7e-40) (/ y a) (if (<= z 3e-7) (/ x t) (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7e-40) {
tmp = y / a;
} else if (z <= 3e-7) {
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 <= (-7d-40)) then
tmp = y / a
else if (z <= 3d-7) 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 <= -7e-40) {
tmp = y / a;
} else if (z <= 3e-7) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7e-40: tmp = y / a elif z <= 3e-7: tmp = x / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7e-40) tmp = Float64(y / a); elseif (z <= 3e-7) 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 <= -7e-40) tmp = y / a; elseif (z <= 3e-7) tmp = x / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7e-40], N[(y / a), $MachinePrecision], If[LessEqual[z, 3e-7], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-40}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-7}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -7.0000000000000003e-40 or 2.9999999999999999e-7 < z Initial program 78.5%
sub-neg78.5%
+-commutative78.5%
neg-sub078.5%
associate-+l-78.5%
sub0-neg78.5%
neg-mul-178.5%
sub-neg78.5%
+-commutative78.5%
neg-sub078.5%
associate-+l-78.5%
sub0-neg78.5%
neg-mul-178.5%
times-frac78.5%
metadata-eval78.5%
*-lft-identity78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in z around inf 48.4%
if -7.0000000000000003e-40 < z < 2.9999999999999999e-7Initial program 99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
times-frac99.9%
metadata-eval99.9%
*-lft-identity99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 58.5%
Final simplification54.2%
(FPCore (x y z t a) :precision binary64 (/ x t))
double code(double x, double y, double z, double t, double a) {
return x / t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x / t
end function
public static double code(double x, double y, double z, double t, double a) {
return x / t;
}
def code(x, y, z, t, a): return x / t
function code(x, y, z, t, a) return Float64(x / t) end
function tmp = code(x, y, z, t, a) tmp = x / t; end
code[x_, y_, z_, t_, a_] := N[(x / t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{t}
\end{array}
Initial program 90.8%
sub-neg90.8%
+-commutative90.8%
neg-sub090.8%
associate-+l-90.8%
sub0-neg90.8%
neg-mul-190.8%
sub-neg90.8%
+-commutative90.8%
neg-sub090.8%
associate-+l-90.8%
sub0-neg90.8%
neg-mul-190.8%
times-frac90.8%
metadata-eval90.8%
*-lft-identity90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in z around 0 39.7%
Final simplification39.7%
(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 2023278
(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))))