
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 20000000.0) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ x (fma -0.3333333333333333 (/ y z) (/ t (* 3.0 (* z y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 20000000.0) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = x + fma(-0.3333333333333333, (y / z), (t / (3.0 * (z * y))));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 20000000.0) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(x + fma(-0.3333333333333333, Float64(y / z), Float64(t / Float64(3.0 * Float64(z * y))))); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 20000000.0], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision] + N[(t / N[(3.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 20000000:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{3 \cdot \left(z \cdot y\right)}\right)\\
\end{array}
\end{array}
if (*.f64 z 3) < 2e7Initial program 93.3%
associate-*l*93.3%
*-commutative93.3%
Simplified93.3%
*-commutative93.3%
associate-*l*93.3%
associate-+l-93.3%
*-commutative93.3%
associate-/r*96.7%
sub-div98.3%
Applied egg-rr98.3%
if 2e7 < (*.f64 z 3) Initial program 99.8%
Simplified99.8%
Taylor expanded in y around 0 99.8%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.15)
(* -0.3333333333333333 (/ y z))
(if (<= y -1.45e-231)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 1.65)
(* (/ t y) (/ 0.3333333333333333 z))
(if (<= y 1.55e+136)
(/ (/ y z) -3.0)
(if (<= y 1e+180) x (/ y (* z -3.0))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= -1.45e-231) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.65) {
tmp = (t / y) * (0.3333333333333333 / z);
} else if (y <= 1.55e+136) {
tmp = (y / z) / -3.0;
} else if (y <= 1e+180) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.15d0)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= (-1.45d-231)) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 1.65d0) then
tmp = (t / y) * (0.3333333333333333d0 / z)
else if (y <= 1.55d+136) then
tmp = (y / z) / (-3.0d0)
else if (y <= 1d+180) then
tmp = x
else
tmp = y / (z * (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= -1.45e-231) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.65) {
tmp = (t / y) * (0.3333333333333333 / z);
} else if (y <= 1.55e+136) {
tmp = (y / z) / -3.0;
} else if (y <= 1e+180) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.15: tmp = -0.3333333333333333 * (y / z) elif y <= -1.45e-231: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 1.65: tmp = (t / y) * (0.3333333333333333 / z) elif y <= 1.55e+136: tmp = (y / z) / -3.0 elif y <= 1e+180: tmp = x else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.15) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= -1.45e-231) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 1.65) tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); elseif (y <= 1.55e+136) tmp = Float64(Float64(y / z) / -3.0); elseif (y <= 1e+180) tmp = x; else tmp = Float64(y / Float64(z * -3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.15) tmp = -0.3333333333333333 * (y / z); elseif (y <= -1.45e-231) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 1.65) tmp = (t / y) * (0.3333333333333333 / z); elseif (y <= 1.55e+136) tmp = (y / z) / -3.0; elseif (y <= 1e+180) tmp = x; else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.15], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.45e-231], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e+136], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[y, 1e+180], x, N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-231}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 1.65:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+136}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\mathbf{elif}\;y \leq 10^{+180}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.1499999999999999Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
*-commutative97.9%
associate-*l*97.9%
associate-+l-97.9%
*-commutative97.9%
associate-/r*97.9%
sub-div99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 69.3%
if -1.1499999999999999 < y < -1.45e-231Initial program 99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
*-commutative99.7%
associate-*l*99.7%
associate-+l-99.7%
*-commutative99.7%
associate-/r*87.9%
sub-div87.9%
Applied egg-rr87.9%
Taylor expanded in y around 0 75.8%
*-commutative75.8%
Simplified75.8%
if -1.45e-231 < y < 1.6499999999999999Initial program 89.8%
associate-*l*89.8%
*-commutative89.8%
Simplified89.8%
*-commutative89.8%
associate-*l*89.8%
associate-+l-89.8%
*-commutative89.8%
associate-/r*93.8%
sub-div93.8%
Applied egg-rr93.8%
Taylor expanded in x around 0 68.5%
associate-*r/68.5%
associate-*l/68.5%
sub-neg68.5%
distribute-frac-neg68.5%
distribute-rgt-out68.5%
+-commutative68.5%
*-commutative68.5%
associate-*r/69.4%
associate-*l/69.3%
neg-mul-169.3%
associate-*r*69.3%
metadata-eval69.3%
*-commutative69.3%
associate-/l/61.4%
times-frac68.5%
*-commutative68.5%
metadata-eval68.5%
distribute-neg-frac68.5%
cancel-sign-sub-inv68.5%
*-commutative68.5%
distribute-lft-out--68.5%
Simplified68.5%
Taylor expanded in t around inf 64.8%
if 1.6499999999999999 < y < 1.54999999999999992e136Initial program 93.3%
associate-*l*93.3%
*-commutative93.3%
Simplified93.3%
*-commutative93.3%
associate-*l*93.3%
associate-+l-93.3%
*-commutative93.3%
associate-/r*93.3%
sub-div99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 59.9%
associate-*r/59.9%
*-commutative59.9%
clear-num60.0%
reciprocal-define31.9%
*-commutative31.9%
associate-/r*31.9%
div-inv31.9%
metadata-eval31.9%
Applied egg-rr31.9%
reciprocal-undefine59.9%
clear-num59.9%
associate-/r*59.9%
Applied egg-rr59.9%
if 1.54999999999999992e136 < y < 1e180Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
unsub-neg99.9%
neg-mul-199.9%
associate-*r/99.9%
associate-*l/99.9%
neg-mul-199.9%
times-frac99.9%
distribute-lft-out--99.9%
*-commutative99.9%
associate-/r*99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 67.7%
if 1e180 < y Initial program 99.9%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
*-commutative99.9%
associate-*l*99.9%
associate-+l-99.9%
*-commutative99.9%
associate-/r*99.9%
sub-div99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 88.2%
*-commutative88.2%
associate-/r/88.2%
div-inv88.4%
metadata-eval88.4%
Applied egg-rr88.4%
Final simplification69.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -600.0)
(* -0.3333333333333333 (/ y z))
(if (<= y 64.0)
(* (/ t y) (/ 0.3333333333333333 z))
(if (<= y 1.55e+136)
(/ (/ y z) -3.0)
(if (<= y 1.25e+180) x (/ y (* z -3.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -600.0) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 64.0) {
tmp = (t / y) * (0.3333333333333333 / z);
} else if (y <= 1.55e+136) {
tmp = (y / z) / -3.0;
} else if (y <= 1.25e+180) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-600.0d0)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= 64.0d0) then
tmp = (t / y) * (0.3333333333333333d0 / z)
else if (y <= 1.55d+136) then
tmp = (y / z) / (-3.0d0)
else if (y <= 1.25d+180) then
tmp = x
else
tmp = y / (z * (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -600.0) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 64.0) {
tmp = (t / y) * (0.3333333333333333 / z);
} else if (y <= 1.55e+136) {
tmp = (y / z) / -3.0;
} else if (y <= 1.25e+180) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -600.0: tmp = -0.3333333333333333 * (y / z) elif y <= 64.0: tmp = (t / y) * (0.3333333333333333 / z) elif y <= 1.55e+136: tmp = (y / z) / -3.0 elif y <= 1.25e+180: tmp = x else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -600.0) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= 64.0) tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); elseif (y <= 1.55e+136) tmp = Float64(Float64(y / z) / -3.0); elseif (y <= 1.25e+180) tmp = x; else tmp = Float64(y / Float64(z * -3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -600.0) tmp = -0.3333333333333333 * (y / z); elseif (y <= 64.0) tmp = (t / y) * (0.3333333333333333 / z); elseif (y <= 1.55e+136) tmp = (y / z) / -3.0; elseif (y <= 1.25e+180) tmp = x; else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -600.0], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 64.0], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e+136], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[y, 1.25e+180], x, N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -600:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 64:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+136}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+180}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -600Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
*-commutative97.9%
associate-*l*97.9%
associate-+l-97.9%
*-commutative97.9%
associate-/r*97.9%
sub-div99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 69.3%
if -600 < y < 64Initial program 92.7%
associate-*l*92.8%
*-commutative92.8%
Simplified92.8%
*-commutative92.8%
associate-*l*92.7%
associate-+l-92.7%
*-commutative92.7%
associate-/r*92.0%
sub-div92.0%
Applied egg-rr92.0%
Taylor expanded in x around 0 68.6%
associate-*r/68.5%
associate-*l/68.5%
sub-neg68.5%
distribute-frac-neg68.5%
distribute-rgt-out68.6%
+-commutative68.6%
*-commutative68.6%
associate-*r/72.6%
associate-*l/72.7%
neg-mul-172.7%
associate-*r*72.7%
metadata-eval72.7%
*-commutative72.7%
associate-/l/67.2%
times-frac68.6%
*-commutative68.6%
metadata-eval68.6%
distribute-neg-frac68.6%
cancel-sign-sub-inv68.6%
*-commutative68.6%
distribute-lft-out--68.5%
Simplified68.5%
Taylor expanded in t around inf 64.5%
if 64 < y < 1.54999999999999992e136Initial program 93.3%
associate-*l*93.3%
*-commutative93.3%
Simplified93.3%
*-commutative93.3%
associate-*l*93.3%
associate-+l-93.3%
*-commutative93.3%
associate-/r*93.3%
sub-div99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 59.9%
associate-*r/59.9%
*-commutative59.9%
clear-num60.0%
reciprocal-define31.9%
*-commutative31.9%
associate-/r*31.9%
div-inv31.9%
metadata-eval31.9%
Applied egg-rr31.9%
reciprocal-undefine59.9%
clear-num59.9%
associate-/r*59.9%
Applied egg-rr59.9%
if 1.54999999999999992e136 < y < 1.2499999999999999e180Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
unsub-neg99.9%
neg-mul-199.9%
associate-*r/99.9%
associate-*l/99.9%
neg-mul-199.9%
times-frac99.9%
distribute-lft-out--99.9%
*-commutative99.9%
associate-/r*99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 67.7%
if 1.2499999999999999e180 < y Initial program 99.9%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
*-commutative99.9%
associate-*l*99.9%
associate-+l-99.9%
*-commutative99.9%
associate-/r*99.9%
sub-div99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 88.2%
*-commutative88.2%
associate-/r/88.2%
div-inv88.4%
metadata-eval88.4%
Applied egg-rr88.4%
Final simplification67.4%
(FPCore (x y z t)
:precision binary64
(if (<= (* z 3.0) -2e+25)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= (* z 3.0) 1e+55)
(* (/ 0.3333333333333333 z) (- (/ t y) y))
(- x (* (/ y z) 0.3333333333333333)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -2e+25) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if ((z * 3.0) <= 1e+55) {
tmp = (0.3333333333333333 / z) * ((t / y) - y);
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= (-2d+25)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if ((z * 3.0d0) <= 1d+55) then
tmp = (0.3333333333333333d0 / z) * ((t / y) - y)
else
tmp = x - ((y / z) * 0.3333333333333333d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -2e+25) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if ((z * 3.0) <= 1e+55) {
tmp = (0.3333333333333333 / z) * ((t / y) - y);
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -2e+25: tmp = x + ((y * -0.3333333333333333) / z) elif (z * 3.0) <= 1e+55: tmp = (0.3333333333333333 / z) * ((t / y) - y) else: tmp = x - ((y / z) * 0.3333333333333333) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -2e+25) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (Float64(z * 3.0) <= 1e+55) tmp = Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y)); else tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -2e+25) tmp = x + ((y * -0.3333333333333333) / z); elseif ((z * 3.0) <= 1e+55) tmp = (0.3333333333333333 / z) * ((t / y) - y); else tmp = x - ((y / z) * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+25], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e+55], N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{+25}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;z \cdot 3 \leq 10^{+55}:\\
\;\;\;\;\frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\end{array}
\end{array}
if (*.f64 z 3) < -2.00000000000000018e25Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.7%
neg-mul-199.7%
times-frac94.0%
distribute-lft-out--94.0%
*-commutative94.0%
associate-/r*94.0%
metadata-eval94.0%
Simplified94.0%
Taylor expanded in y around inf 72.8%
*-commutative72.8%
associate-*r/72.8%
Applied egg-rr72.8%
if -2.00000000000000018e25 < (*.f64 z 3) < 1.00000000000000001e55Initial program 91.7%
associate-*l*91.7%
*-commutative91.7%
Simplified91.7%
*-commutative91.7%
associate-*l*91.7%
associate-+l-91.7%
*-commutative91.7%
associate-/r*97.2%
sub-div99.2%
Applied egg-rr99.2%
Taylor expanded in x around 0 90.3%
associate-*r/90.2%
associate-*l/90.3%
sub-neg90.3%
distribute-frac-neg90.3%
distribute-rgt-out88.3%
+-commutative88.3%
*-commutative88.3%
associate-*r/86.9%
associate-*l/86.9%
neg-mul-186.9%
associate-*r*86.9%
metadata-eval86.9%
*-commutative86.9%
associate-/l/82.8%
times-frac88.3%
*-commutative88.3%
metadata-eval88.3%
distribute-neg-frac88.3%
cancel-sign-sub-inv88.3%
*-commutative88.3%
distribute-lft-out--90.3%
Simplified90.3%
if 1.00000000000000001e55 < (*.f64 z 3) Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 78.0%
Final simplification84.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* y (/ -0.3333333333333333 z)))))
(if (<= y -0.04)
t_1
(if (<= y -2.4e-231)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 2.5e-5) (* (/ t y) (/ 0.3333333333333333 z)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y * (-0.3333333333333333 / z));
double tmp;
if (y <= -0.04) {
tmp = t_1;
} else if (y <= -2.4e-231) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 2.5e-5) {
tmp = (t / y) * (0.3333333333333333 / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * ((-0.3333333333333333d0) / z))
if (y <= (-0.04d0)) then
tmp = t_1
else if (y <= (-2.4d-231)) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 2.5d-5) then
tmp = (t / y) * (0.3333333333333333d0 / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (y * (-0.3333333333333333 / z));
double tmp;
if (y <= -0.04) {
tmp = t_1;
} else if (y <= -2.4e-231) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 2.5e-5) {
tmp = (t / y) * (0.3333333333333333 / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y * (-0.3333333333333333 / z)) tmp = 0 if y <= -0.04: tmp = t_1 elif y <= -2.4e-231: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 2.5e-5: tmp = (t / y) * (0.3333333333333333 / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))) tmp = 0.0 if (y <= -0.04) tmp = t_1; elseif (y <= -2.4e-231) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 2.5e-5) tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y * (-0.3333333333333333 / z)); tmp = 0.0; if (y <= -0.04) tmp = t_1; elseif (y <= -2.4e-231) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 2.5e-5) tmp = (t / y) * (0.3333333333333333 / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.04], t$95$1, If[LessEqual[y, -2.4e-231], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e-5], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -0.04:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-231}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -0.0400000000000000008 or 2.50000000000000012e-5 < y Initial program 97.3%
sub-neg97.3%
associate-+l+97.3%
remove-double-neg97.3%
distribute-frac-neg97.3%
unsub-neg97.3%
neg-mul-197.3%
associate-*r/97.3%
associate-*l/97.2%
neg-mul-197.2%
times-frac97.2%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.4%
if -0.0400000000000000008 < y < -2.39999999999999992e-231Initial program 99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
*-commutative99.7%
associate-*l*99.7%
associate-+l-99.7%
*-commutative99.7%
associate-/r*87.9%
sub-div87.9%
Applied egg-rr87.9%
Taylor expanded in y around 0 75.8%
*-commutative75.8%
Simplified75.8%
if -2.39999999999999992e-231 < y < 2.50000000000000012e-5Initial program 89.8%
associate-*l*89.8%
*-commutative89.8%
Simplified89.8%
*-commutative89.8%
associate-*l*89.8%
associate-+l-89.8%
*-commutative89.8%
associate-/r*93.8%
sub-div93.8%
Applied egg-rr93.8%
Taylor expanded in x around 0 68.5%
associate-*r/68.5%
associate-*l/68.5%
sub-neg68.5%
distribute-frac-neg68.5%
distribute-rgt-out68.5%
+-commutative68.5%
*-commutative68.5%
associate-*r/69.4%
associate-*l/69.3%
neg-mul-169.3%
associate-*r*69.3%
metadata-eval69.3%
*-commutative69.3%
associate-/l/61.4%
times-frac68.5%
*-commutative68.5%
metadata-eval68.5%
distribute-neg-frac68.5%
cancel-sign-sub-inv68.5%
*-commutative68.5%
distribute-lft-out--68.5%
Simplified68.5%
Taylor expanded in t around inf 64.8%
Final simplification80.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -0.25)
(+ x (/ -0.3333333333333333 (/ z y)))
(if (<= y -2.1e-230)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 8.5e-12)
(* (/ t y) (/ 0.3333333333333333 z))
(+ x (* y (/ -0.3333333333333333 z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.25) {
tmp = x + (-0.3333333333333333 / (z / y));
} else if (y <= -2.1e-230) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 8.5e-12) {
tmp = (t / y) * (0.3333333333333333 / z);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-0.25d0)) then
tmp = x + ((-0.3333333333333333d0) / (z / y))
else if (y <= (-2.1d-230)) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 8.5d-12) then
tmp = (t / y) * (0.3333333333333333d0 / z)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.25) {
tmp = x + (-0.3333333333333333 / (z / y));
} else if (y <= -2.1e-230) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 8.5e-12) {
tmp = (t / y) * (0.3333333333333333 / z);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -0.25: tmp = x + (-0.3333333333333333 / (z / y)) elif y <= -2.1e-230: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 8.5e-12: tmp = (t / y) * (0.3333333333333333 / z) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -0.25) tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); elseif (y <= -2.1e-230) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 8.5e-12) tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -0.25) tmp = x + (-0.3333333333333333 / (z / y)); elseif (y <= -2.1e-230) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 8.5e-12) tmp = (t / y) * (0.3333333333333333 / z); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -0.25], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.1e-230], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e-12], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.25:\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-230}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -0.25Initial program 97.9%
sub-neg97.9%
associate-+l+97.9%
remove-double-neg97.9%
distribute-frac-neg97.9%
unsub-neg97.9%
neg-mul-197.9%
associate-*r/97.9%
associate-*l/97.7%
neg-mul-197.7%
times-frac97.7%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.9%
associate-*l/95.0%
associate-/l*95.0%
Applied egg-rr95.0%
if -0.25 < y < -2.0999999999999998e-230Initial program 99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
*-commutative99.7%
associate-*l*99.7%
associate-+l-99.7%
*-commutative99.7%
associate-/r*87.9%
sub-div87.9%
Applied egg-rr87.9%
Taylor expanded in y around 0 75.8%
*-commutative75.8%
Simplified75.8%
if -2.0999999999999998e-230 < y < 8.4999999999999997e-12Initial program 89.8%
associate-*l*89.8%
*-commutative89.8%
Simplified89.8%
*-commutative89.8%
associate-*l*89.8%
associate-+l-89.8%
*-commutative89.8%
associate-/r*93.8%
sub-div93.8%
Applied egg-rr93.8%
Taylor expanded in x around 0 68.5%
associate-*r/68.5%
associate-*l/68.5%
sub-neg68.5%
distribute-frac-neg68.5%
distribute-rgt-out68.5%
+-commutative68.5%
*-commutative68.5%
associate-*r/69.4%
associate-*l/69.3%
neg-mul-169.3%
associate-*r*69.3%
metadata-eval69.3%
*-commutative69.3%
associate-/l/61.4%
times-frac68.5%
*-commutative68.5%
metadata-eval68.5%
distribute-neg-frac68.5%
cancel-sign-sub-inv68.5%
*-commutative68.5%
distribute-lft-out--68.5%
Simplified68.5%
Taylor expanded in t around inf 64.8%
if 8.4999999999999997e-12 < y Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
unsub-neg96.8%
neg-mul-196.8%
associate-*r/96.8%
associate-*l/96.8%
neg-mul-196.8%
times-frac96.8%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.1%
Final simplification80.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.66)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= y -1.35e-230)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 8.6e-12)
(* (/ t y) (/ 0.3333333333333333 z))
(+ x (* y (/ -0.3333333333333333 z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.66) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= -1.35e-230) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 8.6e-12) {
tmp = (t / y) * (0.3333333333333333 / z);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.66d0)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (y <= (-1.35d-230)) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 8.6d-12) then
tmp = (t / y) * (0.3333333333333333d0 / z)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.66) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= -1.35e-230) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 8.6e-12) {
tmp = (t / y) * (0.3333333333333333 / z);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.66: tmp = x + ((y * -0.3333333333333333) / z) elif y <= -1.35e-230: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 8.6e-12: tmp = (t / y) * (0.3333333333333333 / z) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.66) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (y <= -1.35e-230) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 8.6e-12) tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.66) tmp = x + ((y * -0.3333333333333333) / z); elseif (y <= -1.35e-230) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 8.6e-12) tmp = (t / y) * (0.3333333333333333 / z); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.66], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.35e-230], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.6e-12], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.66:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-230}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{-12}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.65999999999999992Initial program 97.9%
sub-neg97.9%
associate-+l+97.9%
remove-double-neg97.9%
distribute-frac-neg97.9%
unsub-neg97.9%
neg-mul-197.9%
associate-*r/97.9%
associate-*l/97.7%
neg-mul-197.7%
times-frac97.7%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.9%
*-commutative94.9%
associate-*r/95.0%
Applied egg-rr95.0%
if -1.65999999999999992 < y < -1.35000000000000006e-230Initial program 99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
*-commutative99.7%
associate-*l*99.7%
associate-+l-99.7%
*-commutative99.7%
associate-/r*87.9%
sub-div87.9%
Applied egg-rr87.9%
Taylor expanded in y around 0 75.8%
*-commutative75.8%
Simplified75.8%
if -1.35000000000000006e-230 < y < 8.59999999999999971e-12Initial program 89.8%
associate-*l*89.8%
*-commutative89.8%
Simplified89.8%
*-commutative89.8%
associate-*l*89.8%
associate-+l-89.8%
*-commutative89.8%
associate-/r*93.8%
sub-div93.8%
Applied egg-rr93.8%
Taylor expanded in x around 0 68.5%
associate-*r/68.5%
associate-*l/68.5%
sub-neg68.5%
distribute-frac-neg68.5%
distribute-rgt-out68.5%
+-commutative68.5%
*-commutative68.5%
associate-*r/69.4%
associate-*l/69.3%
neg-mul-169.3%
associate-*r*69.3%
metadata-eval69.3%
*-commutative69.3%
associate-/l/61.4%
times-frac68.5%
*-commutative68.5%
metadata-eval68.5%
distribute-neg-frac68.5%
cancel-sign-sub-inv68.5%
*-commutative68.5%
distribute-lft-out--68.5%
Simplified68.5%
Taylor expanded in t around inf 64.8%
if 8.59999999999999971e-12 < y Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
unsub-neg96.8%
neg-mul-196.8%
associate-*r/96.8%
associate-*l/96.8%
neg-mul-196.8%
times-frac96.8%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.1%
Final simplification80.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -0.043)
(- x (* (/ y z) 0.3333333333333333))
(if (<= y -5.2e-231)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 8e-12)
(* (/ t y) (/ 0.3333333333333333 z))
(+ x (* y (/ -0.3333333333333333 z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.043) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= -5.2e-231) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 8e-12) {
tmp = (t / y) * (0.3333333333333333 / z);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-0.043d0)) then
tmp = x - ((y / z) * 0.3333333333333333d0)
else if (y <= (-5.2d-231)) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 8d-12) then
tmp = (t / y) * (0.3333333333333333d0 / z)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.043) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= -5.2e-231) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 8e-12) {
tmp = (t / y) * (0.3333333333333333 / z);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -0.043: tmp = x - ((y / z) * 0.3333333333333333) elif y <= -5.2e-231: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 8e-12: tmp = (t / y) * (0.3333333333333333 / z) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -0.043) tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); elseif (y <= -5.2e-231) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 8e-12) tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -0.043) tmp = x - ((y / z) * 0.3333333333333333); elseif (y <= -5.2e-231) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 8e-12) tmp = (t / y) * (0.3333333333333333 / z); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -0.043], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.2e-231], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e-12], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.043:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-231}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-12}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -0.042999999999999997Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around 0 95.0%
if -0.042999999999999997 < y < -5.20000000000000006e-231Initial program 99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
*-commutative99.7%
associate-*l*99.7%
associate-+l-99.7%
*-commutative99.7%
associate-/r*87.9%
sub-div87.9%
Applied egg-rr87.9%
Taylor expanded in y around 0 75.8%
*-commutative75.8%
Simplified75.8%
if -5.20000000000000006e-231 < y < 7.99999999999999984e-12Initial program 89.8%
associate-*l*89.8%
*-commutative89.8%
Simplified89.8%
*-commutative89.8%
associate-*l*89.8%
associate-+l-89.8%
*-commutative89.8%
associate-/r*93.8%
sub-div93.8%
Applied egg-rr93.8%
Taylor expanded in x around 0 68.5%
associate-*r/68.5%
associate-*l/68.5%
sub-neg68.5%
distribute-frac-neg68.5%
distribute-rgt-out68.5%
+-commutative68.5%
*-commutative68.5%
associate-*r/69.4%
associate-*l/69.3%
neg-mul-169.3%
associate-*r*69.3%
metadata-eval69.3%
*-commutative69.3%
associate-/l/61.4%
times-frac68.5%
*-commutative68.5%
metadata-eval68.5%
distribute-neg-frac68.5%
cancel-sign-sub-inv68.5%
*-commutative68.5%
distribute-lft-out--68.5%
Simplified68.5%
Taylor expanded in t around inf 64.8%
if 7.99999999999999984e-12 < y Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
unsub-neg96.8%
neg-mul-196.8%
associate-*r/96.8%
associate-*l/96.8%
neg-mul-196.8%
times-frac96.8%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.1%
Final simplification80.8%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 5000000000.0) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ (/ t (* z (* 3.0 y))) (- x (/ 0.3333333333333333 (/ z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 5000000000.0) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (t / (z * (3.0 * y))) + (x - (0.3333333333333333 / (z / y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= 5000000000.0d0) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = (t / (z * (3.0d0 * y))) + (x - (0.3333333333333333d0 / (z / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 5000000000.0) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (t / (z * (3.0 * y))) + (x - (0.3333333333333333 / (z / y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 5000000000.0: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = (t / (z * (3.0 * y))) + (x - (0.3333333333333333 / (z / y))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 5000000000.0) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(Float64(t / Float64(z * Float64(3.0 * y))) + Float64(x - Float64(0.3333333333333333 / Float64(z / y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 5000000000.0) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = (t / (z * (3.0 * y))) + (x - (0.3333333333333333 / (z / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 5000000000.0], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x - N[(0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 5000000000:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z \cdot \left(3 \cdot y\right)} + \left(x - \frac{0.3333333333333333}{\frac{z}{y}}\right)\\
\end{array}
\end{array}
if (*.f64 z 3) < 5e9Initial program 93.4%
associate-*l*93.4%
*-commutative93.4%
Simplified93.4%
*-commutative93.4%
associate-*l*93.4%
associate-+l-93.4%
*-commutative93.4%
associate-/r*96.7%
sub-div98.3%
Applied egg-rr98.3%
if 5e9 < (*.f64 z 3) Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
clear-num99.7%
inv-pow99.7%
*-commutative99.7%
*-un-lft-identity99.7%
times-frac99.8%
metadata-eval99.8%
Applied egg-rr99.8%
unpow-199.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 20000000.0) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ (- x (/ y (* z 3.0))) (/ t (* z (* 3.0 y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 20000000.0) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= 20000000.0d0) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = (x - (y / (z * 3.0d0))) + (t / (z * (3.0d0 * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 20000000.0) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 20000000.0: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 20000000.0) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(z * Float64(3.0 * y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 20000000.0) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 20000000.0], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 20000000:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(3 \cdot y\right)}\\
\end{array}
\end{array}
if (*.f64 z 3) < 2e7Initial program 93.3%
associate-*l*93.3%
*-commutative93.3%
Simplified93.3%
*-commutative93.3%
associate-*l*93.3%
associate-+l-93.3%
*-commutative93.3%
associate-/r*96.7%
sub-div98.3%
Applied egg-rr98.3%
if 2e7 < (*.f64 z 3) Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.65)
(- x (* (/ y z) 0.3333333333333333))
(if (<= y 0.038)
(+ x (* t (/ 0.3333333333333333 (* z y))))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.65) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 0.038) {
tmp = x + (t * (0.3333333333333333 / (z * y)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.65d0)) then
tmp = x - ((y / z) * 0.3333333333333333d0)
else if (y <= 0.038d0) then
tmp = x + (t * (0.3333333333333333d0 / (z * y)))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.65) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 0.038) {
tmp = x + (t * (0.3333333333333333 / (z * y)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.65: tmp = x - ((y / z) * 0.3333333333333333) elif y <= 0.038: tmp = x + (t * (0.3333333333333333 / (z * y))) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.65) tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); elseif (y <= 0.038) tmp = Float64(x + Float64(t * Float64(0.3333333333333333 / Float64(z * y)))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.65) tmp = x - ((y / z) * 0.3333333333333333); elseif (y <= 0.038) tmp = x + (t * (0.3333333333333333 / (z * y))); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.65], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.038], N[(x + N[(t * N[(0.3333333333333333 / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq 0.038:\\
\;\;\;\;x + t \cdot \frac{0.3333333333333333}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.6499999999999999Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around 0 95.0%
if -1.6499999999999999 < y < 0.0379999999999999991Initial program 92.7%
sub-neg92.7%
associate-+l+92.7%
remove-double-neg92.7%
distribute-frac-neg92.7%
unsub-neg92.7%
neg-mul-192.7%
associate-*r/92.7%
associate-*l/92.7%
neg-mul-192.7%
times-frac92.0%
distribute-lft-out--92.0%
*-commutative92.0%
associate-/r*91.9%
metadata-eval91.9%
Simplified91.9%
Taylor expanded in y around 0 90.2%
*-commutative90.2%
metadata-eval90.2%
times-frac90.2%
associate-*r*90.2%
associate-*r/89.4%
associate-*r*89.4%
*-commutative89.4%
associate-/r*89.4%
metadata-eval89.4%
Simplified89.4%
if 0.0379999999999999991 < y Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
unsub-neg96.8%
neg-mul-196.8%
associate-*r/96.8%
associate-*l/96.8%
neg-mul-196.8%
times-frac96.8%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.1%
Final simplification91.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -1500.0)
(- x (* (/ y z) 0.3333333333333333))
(if (<= y 0.0225)
(+ x (* 0.3333333333333333 (/ t (* z y))))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1500.0) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 0.0225) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1500.0d0)) then
tmp = x - ((y / z) * 0.3333333333333333d0)
else if (y <= 0.0225d0) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1500.0) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 0.0225) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1500.0: tmp = x - ((y / z) * 0.3333333333333333) elif y <= 0.0225: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1500.0) tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); elseif (y <= 0.0225) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1500.0) tmp = x - ((y / z) * 0.3333333333333333); elseif (y <= 0.0225) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1500.0], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0225], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1500:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq 0.0225:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1500Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around 0 95.0%
if -1500 < y < 0.022499999999999999Initial program 92.7%
sub-neg92.7%
associate-+l+92.7%
remove-double-neg92.7%
distribute-frac-neg92.7%
unsub-neg92.7%
neg-mul-192.7%
associate-*r/92.7%
associate-*l/92.7%
neg-mul-192.7%
times-frac92.0%
distribute-lft-out--92.0%
*-commutative92.0%
associate-/r*91.9%
metadata-eval91.9%
Simplified91.9%
Taylor expanded in y around 0 90.2%
+-commutative90.2%
Simplified90.2%
if 0.022499999999999999 < y Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
unsub-neg96.8%
neg-mul-196.8%
associate-*r/96.8%
associate-*l/96.8%
neg-mul-196.8%
times-frac96.8%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.1%
Final simplification92.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -100000.0)
(- x (* (/ y z) 0.3333333333333333))
(if (<= y 0.0062)
(+ x (/ (/ t (* z y)) 3.0))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -100000.0) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 0.0062) {
tmp = x + ((t / (z * y)) / 3.0);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-100000.0d0)) then
tmp = x - ((y / z) * 0.3333333333333333d0)
else if (y <= 0.0062d0) then
tmp = x + ((t / (z * y)) / 3.0d0)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -100000.0) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 0.0062) {
tmp = x + ((t / (z * y)) / 3.0);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -100000.0: tmp = x - ((y / z) * 0.3333333333333333) elif y <= 0.0062: tmp = x + ((t / (z * y)) / 3.0) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -100000.0) tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); elseif (y <= 0.0062) tmp = Float64(x + Float64(Float64(t / Float64(z * y)) / 3.0)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -100000.0) tmp = x - ((y / z) * 0.3333333333333333); elseif (y <= 0.0062) tmp = x + ((t / (z * y)) / 3.0); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -100000.0], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0062], N[(x + N[(N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -100000:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq 0.0062:\\
\;\;\;\;x + \frac{\frac{t}{z \cdot y}}{3}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1e5Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around 0 95.0%
if -1e5 < y < 0.00619999999999999978Initial program 92.7%
sub-neg92.7%
associate-+l+92.7%
remove-double-neg92.7%
distribute-frac-neg92.7%
unsub-neg92.7%
neg-mul-192.7%
associate-*r/92.7%
associate-*l/92.7%
neg-mul-192.7%
times-frac92.0%
distribute-lft-out--92.0%
*-commutative92.0%
associate-/r*91.9%
metadata-eval91.9%
Simplified91.9%
Taylor expanded in y around 0 90.2%
+-commutative90.2%
Simplified90.2%
metadata-eval90.2%
associate-/r*88.0%
times-frac88.1%
*-un-lft-identity88.1%
*-commutative88.1%
associate-/r*88.0%
associate-/r*90.2%
Applied egg-rr90.2%
if 0.00619999999999999978 < y Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
unsub-neg96.8%
neg-mul-196.8%
associate-*r/96.8%
associate-*l/96.8%
neg-mul-196.8%
times-frac96.8%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.1%
Final simplification92.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.9)
(- x (* (/ y z) 0.3333333333333333))
(if (<= y 6.0)
(+ x (/ (/ (* t 0.3333333333333333) z) y))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.9) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 6.0) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.9d0)) then
tmp = x - ((y / z) * 0.3333333333333333d0)
else if (y <= 6.0d0) then
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.9) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 6.0) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.9: tmp = x - ((y / z) * 0.3333333333333333) elif y <= 6.0: tmp = x + (((t * 0.3333333333333333) / z) / y) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.9) tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); elseif (y <= 6.0) tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.9) tmp = x - ((y / z) * 0.3333333333333333); elseif (y <= 6.0) tmp = x + (((t * 0.3333333333333333) / z) / y); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.9], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.0], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.9:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq 6:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.9000000000000004Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around 0 95.0%
if -5.9000000000000004 < y < 6Initial program 92.7%
sub-neg92.7%
associate-+l+92.7%
remove-double-neg92.7%
distribute-frac-neg92.7%
unsub-neg92.7%
neg-mul-192.7%
associate-*r/92.7%
associate-*l/92.7%
neg-mul-192.7%
times-frac92.0%
distribute-lft-out--92.0%
*-commutative92.0%
associate-/r*91.9%
metadata-eval91.9%
Simplified91.9%
Taylor expanded in y around 0 90.2%
+-commutative90.2%
Simplified90.2%
associate-*r/90.2%
*-commutative90.2%
associate-/r*94.3%
*-commutative94.3%
Applied egg-rr94.3%
if 6 < y Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
unsub-neg96.8%
neg-mul-196.8%
associate-*r/96.8%
associate-*l/96.8%
neg-mul-196.8%
times-frac96.8%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.1%
Final simplification94.4%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 3.6e+210) (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))) (+ x (/ (/ t (* z y)) 3.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 3.6e+210) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + ((t / (z * y)) / 3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= 3.6d+210) then
tmp = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
else
tmp = x + ((t / (z * y)) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 3.6e+210) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + ((t / (z * y)) / 3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 3.6e+210: tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)) else: tmp = x + ((t / (z * y)) / 3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 3.6e+210) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))); else tmp = Float64(x + Float64(Float64(t / Float64(z * y)) / 3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 3.6e+210) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); else tmp = x + ((t / (z * y)) / 3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 3.6e+210], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 3.6 \cdot 10^{+210}:\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z \cdot y}}{3}\\
\end{array}
\end{array}
if (*.f64 z 3) < 3.6000000000000003e210Initial program 94.5%
sub-neg94.5%
associate-+l+94.5%
remove-double-neg94.5%
distribute-frac-neg94.5%
unsub-neg94.5%
neg-mul-194.5%
associate-*r/94.5%
associate-*l/94.4%
neg-mul-194.4%
times-frac96.4%
distribute-lft-out--97.7%
*-commutative97.7%
associate-/r*97.7%
metadata-eval97.7%
Simplified97.7%
if 3.6000000000000003e210 < (*.f64 z 3) Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.8%
neg-mul-199.8%
times-frac73.8%
distribute-lft-out--73.8%
*-commutative73.8%
associate-/r*73.8%
metadata-eval73.8%
Simplified73.8%
Taylor expanded in y around 0 92.7%
+-commutative92.7%
Simplified92.7%
metadata-eval92.7%
associate-/r*66.7%
times-frac66.6%
*-un-lft-identity66.6%
*-commutative66.6%
associate-/r*66.7%
associate-/r*92.8%
Applied egg-rr92.8%
Final simplification97.3%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 3.6e+210) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ x (/ (/ t (* z y)) 3.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 3.6e+210) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = x + ((t / (z * y)) / 3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= 3.6d+210) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = x + ((t / (z * y)) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 3.6e+210) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = x + ((t / (z * y)) / 3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 3.6e+210: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = x + ((t / (z * y)) / 3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 3.6e+210) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(t / Float64(z * y)) / 3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 3.6e+210) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = x + ((t / (z * y)) / 3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 3.6e+210], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 3.6 \cdot 10^{+210}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z \cdot y}}{3}\\
\end{array}
\end{array}
if (*.f64 z 3) < 3.6000000000000003e210Initial program 94.5%
associate-*l*94.5%
*-commutative94.5%
Simplified94.5%
*-commutative94.5%
associate-*l*94.5%
associate-+l-94.5%
*-commutative94.5%
associate-/r*96.5%
sub-div97.8%
Applied egg-rr97.8%
if 3.6000000000000003e210 < (*.f64 z 3) Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.8%
neg-mul-199.8%
times-frac73.8%
distribute-lft-out--73.8%
*-commutative73.8%
associate-/r*73.8%
metadata-eval73.8%
Simplified73.8%
Taylor expanded in y around 0 92.7%
+-commutative92.7%
Simplified92.7%
metadata-eval92.7%
associate-/r*66.7%
times-frac66.6%
*-un-lft-identity66.6%
*-commutative66.6%
associate-/r*66.7%
associate-/r*92.8%
Applied egg-rr92.8%
Final simplification97.4%
(FPCore (x y z t) :precision binary64 (if (<= z -2.7e+20) x (if (<= z 1.8e+17) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.7e+20) {
tmp = x;
} else if (z <= 1.8e+17) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-2.7d+20)) then
tmp = x
else if (z <= 1.8d+17) then
tmp = (-0.3333333333333333d0) * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.7e+20) {
tmp = x;
} else if (z <= 1.8e+17) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.7e+20: tmp = x elif z <= 1.8e+17: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.7e+20) tmp = x; elseif (z <= 1.8e+17) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.7e+20) tmp = x; elseif (z <= 1.8e+17) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.7e+20], x, If[LessEqual[z, 1.8e+17], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+20}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+17}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.7e20 or 1.8e17 < z Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.7%
neg-mul-199.7%
times-frac90.6%
distribute-lft-out--90.6%
*-commutative90.6%
associate-/r*90.6%
metadata-eval90.6%
Simplified90.6%
Taylor expanded in x around inf 53.4%
if -2.7e20 < z < 1.8e17Initial program 91.1%
associate-*l*91.1%
*-commutative91.1%
Simplified91.1%
*-commutative91.1%
associate-*l*91.1%
associate-+l-91.1%
*-commutative91.1%
associate-/r*97.7%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 46.3%
Final simplification49.4%
(FPCore (x y z t) :precision binary64 (if (<= z -3.7e+20) x (if (<= z 9e+16) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.7e+20) {
tmp = x;
} else if (z <= 9e+16) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-3.7d+20)) then
tmp = x
else if (z <= 9d+16) then
tmp = y / (z * (-3.0d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.7e+20) {
tmp = x;
} else if (z <= 9e+16) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.7e+20: tmp = x elif z <= 9e+16: tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.7e+20) tmp = x; elseif (z <= 9e+16) tmp = Float64(y / Float64(z * -3.0)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.7e+20) tmp = x; elseif (z <= 9e+16) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.7e+20], x, If[LessEqual[z, 9e+16], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+20}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+16}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.7e20 or 9e16 < z Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.7%
neg-mul-199.7%
times-frac90.6%
distribute-lft-out--90.6%
*-commutative90.6%
associate-/r*90.6%
metadata-eval90.6%
Simplified90.6%
Taylor expanded in x around inf 53.4%
if -3.7e20 < z < 9e16Initial program 91.1%
associate-*l*91.1%
*-commutative91.1%
Simplified91.1%
*-commutative91.1%
associate-*l*91.1%
associate-+l-91.1%
*-commutative91.1%
associate-/r*97.7%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 46.3%
*-commutative46.3%
associate-/r/46.3%
div-inv46.3%
metadata-eval46.3%
Applied egg-rr46.3%
Final simplification49.4%
(FPCore (x y z t) :precision binary64 (if (<= z -3.7e+20) x (if (<= z 42000000000000.0) (/ (/ y z) -3.0) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.7e+20) {
tmp = x;
} else if (z <= 42000000000000.0) {
tmp = (y / z) / -3.0;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-3.7d+20)) then
tmp = x
else if (z <= 42000000000000.0d0) then
tmp = (y / z) / (-3.0d0)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.7e+20) {
tmp = x;
} else if (z <= 42000000000000.0) {
tmp = (y / z) / -3.0;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.7e+20: tmp = x elif z <= 42000000000000.0: tmp = (y / z) / -3.0 else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.7e+20) tmp = x; elseif (z <= 42000000000000.0) tmp = Float64(Float64(y / z) / -3.0); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.7e+20) tmp = x; elseif (z <= 42000000000000.0) tmp = (y / z) / -3.0; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.7e+20], x, If[LessEqual[z, 42000000000000.0], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+20}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 42000000000000:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.7e20 or 4.2e13 < z Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.7%
neg-mul-199.7%
times-frac90.6%
distribute-lft-out--90.6%
*-commutative90.6%
associate-/r*90.6%
metadata-eval90.6%
Simplified90.6%
Taylor expanded in x around inf 53.4%
if -3.7e20 < z < 4.2e13Initial program 91.1%
associate-*l*91.1%
*-commutative91.1%
Simplified91.1%
*-commutative91.1%
associate-*l*91.1%
associate-+l-91.1%
*-commutative91.1%
associate-/r*97.7%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 46.3%
associate-*r/46.3%
*-commutative46.3%
clear-num46.3%
reciprocal-define32.9%
*-commutative32.9%
associate-/r*32.9%
div-inv32.9%
metadata-eval32.9%
Applied egg-rr32.9%
reciprocal-undefine46.3%
clear-num46.3%
associate-/r*46.4%
Applied egg-rr46.4%
Final simplification49.5%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 94.9%
sub-neg94.9%
associate-+l+94.9%
remove-double-neg94.9%
distribute-frac-neg94.9%
unsub-neg94.9%
neg-mul-194.9%
associate-*r/94.9%
associate-*l/94.9%
neg-mul-194.9%
times-frac94.5%
distribute-lft-out--95.7%
*-commutative95.7%
associate-/r*95.7%
metadata-eval95.7%
Simplified95.7%
Taylor expanded in x around inf 28.3%
Final simplification28.3%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2024024
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))