
(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 19 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 (<= y -6e-37)
(+ x (* (- y (/ t y)) (/ -0.3333333333333333 z)))
(if (<= y 9.5e-42)
(- x (/ (* t (/ -0.3333333333333333 z)) y))
(+ x (* (/ -0.3333333333333333 z) (+ y (* t (/ -1.0 y))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6e-37) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else if (y <= 9.5e-42) {
tmp = x - ((t * (-0.3333333333333333 / z)) / y);
} else {
tmp = x + ((-0.3333333333333333 / z) * (y + (t * (-1.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 (y <= (-6d-37)) then
tmp = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
else if (y <= 9.5d-42) then
tmp = x - ((t * ((-0.3333333333333333d0) / z)) / y)
else
tmp = x + (((-0.3333333333333333d0) / z) * (y + (t * ((-1.0d0) / y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6e-37) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else if (y <= 9.5e-42) {
tmp = x - ((t * (-0.3333333333333333 / z)) / y);
} else {
tmp = x + ((-0.3333333333333333 / z) * (y + (t * (-1.0 / y))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6e-37: tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)) elif y <= 9.5e-42: tmp = x - ((t * (-0.3333333333333333 / z)) / y) else: tmp = x + ((-0.3333333333333333 / z) * (y + (t * (-1.0 / y)))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6e-37) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))); elseif (y <= 9.5e-42) tmp = Float64(x - Float64(Float64(t * Float64(-0.3333333333333333 / z)) / y)); else tmp = Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y + Float64(t * Float64(-1.0 / y))))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -6e-37) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); elseif (y <= 9.5e-42) tmp = x - ((t * (-0.3333333333333333 / z)) / y); else tmp = x + ((-0.3333333333333333 / z) * (y + (t * (-1.0 / y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6e-37], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e-42], N[(x - N[(N[(t * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y + N[(t * N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-37}:\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-42}:\\
\;\;\;\;x - \frac{t \cdot \frac{-0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot \left(y + t \cdot \frac{-1}{y}\right)\\
\end{array}
\end{array}
if y < -6e-37Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
sub-neg98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.3%
*-commutative98.3%
neg-mul-198.3%
times-frac98.2%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
if -6e-37 < y < 9.49999999999999948e-42Initial program 93.3%
sub-neg93.3%
associate-+l+93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
sub-neg93.3%
distribute-frac-neg93.3%
neg-mul-193.3%
*-commutative93.3%
associate-/l*93.3%
*-commutative93.3%
neg-mul-193.3%
times-frac89.2%
distribute-lft-out--89.2%
*-commutative89.2%
associate-/r*89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in y around 0 88.3%
neg-mul-188.3%
distribute-neg-frac288.3%
Simplified88.3%
associate-*r/98.0%
frac-2neg98.0%
add-sqr-sqrt43.2%
sqrt-unprod45.9%
sqr-neg45.9%
sqrt-unprod17.9%
add-sqr-sqrt24.2%
add-sqr-sqrt6.3%
sqrt-unprod43.7%
sqr-neg43.7%
sqrt-unprod54.6%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
if 9.49999999999999948e-42 < y Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
sub-neg99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.8%
*-commutative99.8%
neg-mul-199.8%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
div-inv99.7%
Applied egg-rr99.7%
Final simplification99.0%
(FPCore (x y z t) :precision binary64 (if (<= (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))) (- INFINITY)) (* -0.3333333333333333 (/ (- y (/ t y)) z)) (+ (+ x (/ t (* z (* y 3.0)))) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= -((double) INFINITY)) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= -Double.POSITIVE_INFINITY) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= -math.inf: tmp = -0.3333333333333333 * ((y - (t / y)) / z) else: tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) <= Float64(-Inf)) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); else tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= -Inf) tmp = -0.3333333333333333 * ((y - (t / y)) / z); else tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)} \leq -\infty:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) < -inf.0Initial program 88.0%
sub-neg88.0%
associate-+l+88.0%
remove-double-neg88.0%
distribute-frac-neg88.0%
sub-neg88.0%
distribute-frac-neg88.0%
neg-mul-188.0%
*-commutative88.0%
associate-/l*88.0%
*-commutative88.0%
neg-mul-188.0%
times-frac100.0%
distribute-lft-out--100.0%
*-commutative100.0%
associate-/r*99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 99.9%
if -inf.0 < (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) Initial program 98.3%
+-commutative98.3%
associate-+r-98.3%
sub-neg98.3%
associate-*l*98.3%
*-commutative98.3%
distribute-frac-neg298.3%
distribute-rgt-neg-in98.3%
metadata-eval98.3%
Simplified98.3%
Final simplification98.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.1e-37) (not (<= y 9.5e-42))) (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))) (- x (/ (* t (/ -0.3333333333333333 z)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.1e-37) || !(y <= 9.5e-42)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x - ((t * (-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 ((y <= (-3.1d-37)) .or. (.not. (y <= 9.5d-42))) then
tmp = x + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
else
tmp = x - ((t * ((-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 ((y <= -3.1e-37) || !(y <= 9.5e-42)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x - ((t * (-0.3333333333333333 / z)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.1e-37) or not (y <= 9.5e-42): tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)) else: tmp = x - ((t * (-0.3333333333333333 / z)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.1e-37) || !(y <= 9.5e-42)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); else tmp = Float64(x - Float64(Float64(t * Float64(-0.3333333333333333 / z)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.1e-37) || ~((y <= 9.5e-42))) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); else tmp = x - ((t * (-0.3333333333333333 / z)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.1e-37], N[Not[LessEqual[y, 9.5e-42]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(t * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{-37} \lor \neg \left(y \leq 9.5 \cdot 10^{-42}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t \cdot \frac{-0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -3.09999999999999993e-37 or 9.49999999999999948e-42 < y Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
remove-double-neg99.1%
distribute-frac-neg99.1%
sub-neg99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
*-commutative99.1%
associate-/l*99.1%
*-commutative99.1%
neg-mul-199.1%
times-frac99.0%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
if -3.09999999999999993e-37 < y < 9.49999999999999948e-42Initial program 93.3%
sub-neg93.3%
associate-+l+93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
sub-neg93.3%
distribute-frac-neg93.3%
neg-mul-193.3%
*-commutative93.3%
associate-/l*93.3%
*-commutative93.3%
neg-mul-193.3%
times-frac89.2%
distribute-lft-out--89.2%
*-commutative89.2%
associate-/r*89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in y around 0 88.3%
neg-mul-188.3%
distribute-neg-frac288.3%
Simplified88.3%
associate-*r/98.0%
frac-2neg98.0%
add-sqr-sqrt43.2%
sqrt-unprod45.9%
sqr-neg45.9%
sqrt-unprod17.9%
add-sqr-sqrt24.2%
add-sqr-sqrt6.3%
sqrt-unprod43.7%
sqr-neg43.7%
sqrt-unprod54.6%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
Final simplification99.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- y (/ t y))))
(if (<= y -3.1e-37)
(+ x (* t_1 (/ -0.3333333333333333 z)))
(if (<= y 1.5e-40)
(- x (/ (* t (/ -0.3333333333333333 z)) y))
(+ x (* -0.3333333333333333 (/ t_1 z)))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -3.1e-37) {
tmp = x + (t_1 * (-0.3333333333333333 / z));
} else if (y <= 1.5e-40) {
tmp = x - ((t * (-0.3333333333333333 / z)) / y);
} else {
tmp = x + (-0.3333333333333333 * (t_1 / 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) :: t_1
real(8) :: tmp
t_1 = y - (t / y)
if (y <= (-3.1d-37)) then
tmp = x + (t_1 * ((-0.3333333333333333d0) / z))
else if (y <= 1.5d-40) then
tmp = x - ((t * ((-0.3333333333333333d0) / z)) / y)
else
tmp = x + ((-0.3333333333333333d0) * (t_1 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -3.1e-37) {
tmp = x + (t_1 * (-0.3333333333333333 / z));
} else if (y <= 1.5e-40) {
tmp = x - ((t * (-0.3333333333333333 / z)) / y);
} else {
tmp = x + (-0.3333333333333333 * (t_1 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -3.1e-37: tmp = x + (t_1 * (-0.3333333333333333 / z)) elif y <= 1.5e-40: tmp = x - ((t * (-0.3333333333333333 / z)) / y) else: tmp = x + (-0.3333333333333333 * (t_1 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -3.1e-37) tmp = Float64(x + Float64(t_1 * Float64(-0.3333333333333333 / z))); elseif (y <= 1.5e-40) tmp = Float64(x - Float64(Float64(t * Float64(-0.3333333333333333 / z)) / y)); else tmp = Float64(x + Float64(-0.3333333333333333 * Float64(t_1 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -3.1e-37) tmp = x + (t_1 * (-0.3333333333333333 / z)); elseif (y <= 1.5e-40) tmp = x - ((t * (-0.3333333333333333 / z)) / y); else tmp = x + (-0.3333333333333333 * (t_1 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e-37], N[(x + N[(t$95$1 * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-40], N[(x - N[(N[(t * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{-37}:\\
\;\;\;\;x + t\_1 \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-40}:\\
\;\;\;\;x - \frac{t \cdot \frac{-0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{t\_1}{z}\\
\end{array}
\end{array}
if y < -3.09999999999999993e-37Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
sub-neg98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.3%
*-commutative98.3%
neg-mul-198.3%
times-frac98.2%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
if -3.09999999999999993e-37 < y < 1.5000000000000001e-40Initial program 93.3%
sub-neg93.3%
associate-+l+93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
sub-neg93.3%
distribute-frac-neg93.3%
neg-mul-193.3%
*-commutative93.3%
associate-/l*93.3%
*-commutative93.3%
neg-mul-193.3%
times-frac89.2%
distribute-lft-out--89.2%
*-commutative89.2%
associate-/r*89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in y around 0 88.3%
neg-mul-188.3%
distribute-neg-frac288.3%
Simplified88.3%
associate-*r/98.0%
frac-2neg98.0%
add-sqr-sqrt43.2%
sqrt-unprod45.9%
sqr-neg45.9%
sqrt-unprod17.9%
add-sqr-sqrt24.2%
add-sqr-sqrt6.3%
sqrt-unprod43.7%
sqr-neg43.7%
sqrt-unprod54.6%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
if 1.5000000000000001e-40 < y Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
sub-neg99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.8%
*-commutative99.8%
neg-mul-199.8%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.7%
Final simplification99.0%
(FPCore (x y z t) :precision binary64 (if (or (<= z -6e+79) (not (<= z 3.85e+45))) (+ x (* y (/ -0.3333333333333333 z))) (* -0.3333333333333333 (/ (- y (/ t y)) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6e+79) || !(z <= 3.85e+45)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = -0.3333333333333333 * ((y - (t / y)) / 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 ((z <= (-6d+79)) .or. (.not. (z <= 3.85d+45))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6e+79) || !(z <= 3.85e+45)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -6e+79) or not (z <= 3.85e+45): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = -0.3333333333333333 * ((y - (t / y)) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -6e+79) || !(z <= 3.85e+45)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -6e+79) || ~((z <= 3.85e+45))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = -0.3333333333333333 * ((y - (t / y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6e+79], N[Not[LessEqual[z, 3.85e+45]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+79} \lor \neg \left(z \leq 3.85 \cdot 10^{+45}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\end{array}
\end{array}
if z < -5.99999999999999948e79 or 3.85000000000000006e45 < z Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
sub-neg99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
neg-mul-199.7%
times-frac87.9%
distribute-lft-out--87.9%
*-commutative87.9%
associate-/r*88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in y around inf 71.1%
if -5.99999999999999948e79 < z < 3.85000000000000006e45Initial program 94.9%
sub-neg94.9%
associate-+l+94.9%
remove-double-neg94.9%
distribute-frac-neg94.9%
sub-neg94.9%
distribute-frac-neg94.9%
neg-mul-194.9%
*-commutative94.9%
associate-/l*94.9%
*-commutative94.9%
neg-mul-194.9%
times-frac99.1%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 87.1%
Final simplification81.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.5e+65)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 1.65e+59)
(+ x (/ 0.3333333333333333 (* y (/ z t))))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e+65) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.65e+59) {
tmp = x + (0.3333333333333333 / (y * (z / t)));
} else {
tmp = x + (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 <= (-7.5d+65)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 1.65d+59) then
tmp = x + (0.3333333333333333d0 / (y * (z / t)))
else
tmp = x + (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 <= -7.5e+65) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.65e+59) {
tmp = x + (0.3333333333333333 / (y * (z / t)));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.5e+65: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 1.65e+59: tmp = x + (0.3333333333333333 / (y * (z / t))) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.5e+65) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 1.65e+59) tmp = Float64(x + Float64(0.3333333333333333 / Float64(y * Float64(z / t)))); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.5e+65) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 1.65e+59) tmp = x + (0.3333333333333333 / (y * (z / t))); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.5e+65], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+59], N[(x + N[(0.3333333333333333 / N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+65}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+59}:\\
\;\;\;\;x + \frac{0.3333333333333333}{y \cdot \frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -7.50000000000000006e65Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
sub-neg99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
neg-mul-199.7%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.4%
if -7.50000000000000006e65 < y < 1.65e59Initial program 94.6%
sub-neg94.6%
associate-+l+94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
sub-neg94.6%
distribute-frac-neg94.6%
neg-mul-194.6%
*-commutative94.6%
associate-/l*94.6%
*-commutative94.6%
neg-mul-194.6%
times-frac91.7%
distribute-lft-out--92.3%
*-commutative92.3%
associate-/r*92.4%
metadata-eval92.4%
Simplified92.4%
Taylor expanded in y around 0 86.9%
metadata-eval86.9%
times-frac87.1%
*-commutative87.1%
times-frac86.6%
associate-*l/87.1%
*-lft-identity87.1%
Simplified87.1%
div-inv87.0%
metadata-eval87.0%
*-commutative87.0%
times-frac90.3%
Applied egg-rr90.3%
clear-num90.2%
frac-times90.3%
metadata-eval90.3%
Applied egg-rr90.3%
if 1.65e59 < y Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
sub-neg99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.8%
*-commutative99.8%
neg-mul-199.8%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 98.0%
*-commutative98.0%
metadata-eval98.0%
times-frac98.2%
*-rgt-identity98.2%
Simplified98.2%
Final simplification93.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.9e+66)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 1.22e+60)
(+ x (* 0.3333333333333333 (/ (/ t z) y)))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.9e+66) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.22e+60) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x + (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.9d+66)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 1.22d+60) then
tmp = x + (0.3333333333333333d0 * ((t / z) / y))
else
tmp = x + (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.9e+66) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.22e+60) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.9e+66: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 1.22e+60: tmp = x + (0.3333333333333333 * ((t / z) / y)) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.9e+66) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 1.22e+60) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y))); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.9e+66) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 1.22e+60) tmp = x + (0.3333333333333333 * ((t / z) / y)); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.9e+66], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.22e+60], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+66}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{+60}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.9000000000000001e66Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
sub-neg99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
neg-mul-199.7%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.4%
if -1.9000000000000001e66 < y < 1.21999999999999995e60Initial program 94.6%
sub-neg94.6%
associate-+l+94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
sub-neg94.6%
distribute-frac-neg94.6%
neg-mul-194.6%
*-commutative94.6%
associate-/l*94.6%
*-commutative94.6%
neg-mul-194.6%
times-frac91.7%
distribute-lft-out--92.3%
*-commutative92.3%
associate-/r*92.4%
metadata-eval92.4%
Simplified92.4%
Taylor expanded in y around 0 84.1%
neg-mul-184.1%
distribute-neg-frac284.1%
Simplified84.1%
Taylor expanded in z around 0 86.9%
*-commutative86.9%
associate-/r*90.3%
Simplified90.3%
if 1.21999999999999995e60 < y Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
sub-neg99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.8%
*-commutative99.8%
neg-mul-199.8%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 98.0%
*-commutative98.0%
metadata-eval98.0%
times-frac98.2%
*-rgt-identity98.2%
Simplified98.2%
Final simplification93.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -8.2e+65)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 1.9e+65)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.2e+65) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.9e+65) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + (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 <= (-8.2d+65)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 1.9d+65) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
else
tmp = x + (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 <= -8.2e+65) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.9e+65) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.2e+65: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 1.9e+65: tmp = x + (0.3333333333333333 * (t / (y * z))) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.2e+65) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 1.9e+65) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.2e+65) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 1.9e+65) tmp = x + (0.3333333333333333 * (t / (y * z))); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.2e+65], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+65], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+65}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+65}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -8.2000000000000003e65Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
sub-neg99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
neg-mul-199.7%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.4%
if -8.2000000000000003e65 < y < 1.90000000000000006e65Initial program 94.6%
sub-neg94.6%
associate-+l+94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
sub-neg94.6%
distribute-frac-neg94.6%
neg-mul-194.6%
*-commutative94.6%
associate-/l*94.6%
*-commutative94.6%
neg-mul-194.6%
times-frac91.7%
distribute-lft-out--92.3%
*-commutative92.3%
associate-/r*92.4%
metadata-eval92.4%
Simplified92.4%
Taylor expanded in y around 0 86.9%
if 1.90000000000000006e65 < y Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
sub-neg99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.8%
*-commutative99.8%
neg-mul-199.8%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 98.0%
*-commutative98.0%
metadata-eval98.0%
times-frac98.2%
*-rgt-identity98.2%
Simplified98.2%
Final simplification91.5%
(FPCore (x y z t)
:precision binary64
(if (<= z -9.5e-75)
(* y (+ (/ -0.3333333333333333 z) (/ x y)))
(if (<= z 4.9e+45)
(* (- y (/ t y)) (/ -0.3333333333333333 z))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -9.5e-75) {
tmp = y * ((-0.3333333333333333 / z) + (x / y));
} else if (z <= 4.9e+45) {
tmp = (y - (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 (z <= (-9.5d-75)) then
tmp = y * (((-0.3333333333333333d0) / z) + (x / y))
else if (z <= 4.9d+45) then
tmp = (y - (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 (z <= -9.5e-75) {
tmp = y * ((-0.3333333333333333 / z) + (x / y));
} else if (z <= 4.9e+45) {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -9.5e-75: tmp = y * ((-0.3333333333333333 / z) + (x / y)) elif z <= 4.9e+45: tmp = (y - (t / y)) * (-0.3333333333333333 / z) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -9.5e-75) tmp = Float64(y * Float64(Float64(-0.3333333333333333 / z) + Float64(x / y))); elseif (z <= 4.9e+45) tmp = Float64(Float64(y - 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 (z <= -9.5e-75) tmp = y * ((-0.3333333333333333 / z) + (x / y)); elseif (z <= 4.9e+45) tmp = (y - (t / y)) * (-0.3333333333333333 / z); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -9.5e-75], N[(y * N[(N[(-0.3333333333333333 / z), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e+45], N[(N[(y - N[(t / y), $MachinePrecision]), $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}\;z \leq -9.5 \cdot 10^{-75}:\\
\;\;\;\;y \cdot \left(\frac{-0.3333333333333333}{z} + \frac{x}{y}\right)\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{+45}:\\
\;\;\;\;\left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if z < -9.4999999999999991e-75Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.7%
fma-define99.7%
metadata-eval99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 75.0%
cancel-sign-sub-inv75.0%
metadata-eval75.0%
associate-*r/75.0%
metadata-eval75.0%
Simplified75.0%
if -9.4999999999999991e-75 < z < 4.9000000000000002e45Initial program 93.5%
sub-neg93.5%
associate-+l+93.5%
remove-double-neg93.5%
distribute-frac-neg93.5%
sub-neg93.5%
distribute-frac-neg93.5%
neg-mul-193.5%
*-commutative93.5%
associate-/l*93.5%
*-commutative93.5%
neg-mul-193.5%
times-frac99.0%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 90.6%
associate-*r/90.6%
*-rgt-identity90.6%
times-frac90.6%
rem-square-sqrt45.1%
associate-*r/45.1%
/-rgt-identity45.1%
rem-square-sqrt90.6%
Simplified90.6%
if 4.9000000000000002e45 < z Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
sub-neg99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
*-commutative99.6%
neg-mul-199.6%
times-frac88.1%
distribute-lft-out--88.1%
*-commutative88.1%
associate-/r*88.2%
metadata-eval88.2%
Simplified88.2%
Taylor expanded in y around inf 72.2%
Final simplification82.0%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.06e-76)
(* y (+ (/ -0.3333333333333333 z) (/ x y)))
(if (<= z 3e+45)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.06e-76) {
tmp = y * ((-0.3333333333333333 / z) + (x / y));
} else if (z <= 3e+45) {
tmp = -0.3333333333333333 * ((y - (t / y)) / 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 (z <= (-1.06d-76)) then
tmp = y * (((-0.3333333333333333d0) / z) + (x / y))
else if (z <= 3d+45) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / 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 (z <= -1.06e-76) {
tmp = y * ((-0.3333333333333333 / z) + (x / y));
} else if (z <= 3e+45) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.06e-76: tmp = y * ((-0.3333333333333333 / z) + (x / y)) elif z <= 3e+45: tmp = -0.3333333333333333 * ((y - (t / y)) / z) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.06e-76) tmp = Float64(y * Float64(Float64(-0.3333333333333333 / z) + Float64(x / y))); elseif (z <= 3e+45) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / 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 (z <= -1.06e-76) tmp = y * ((-0.3333333333333333 / z) + (x / y)); elseif (z <= 3e+45) tmp = -0.3333333333333333 * ((y - (t / y)) / z); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.06e-76], N[(y * N[(N[(-0.3333333333333333 / z), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+45], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{-76}:\\
\;\;\;\;y \cdot \left(\frac{-0.3333333333333333}{z} + \frac{x}{y}\right)\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+45}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if z < -1.06000000000000003e-76Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.7%
fma-define99.7%
metadata-eval99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 75.0%
cancel-sign-sub-inv75.0%
metadata-eval75.0%
associate-*r/75.0%
metadata-eval75.0%
Simplified75.0%
if -1.06000000000000003e-76 < z < 3.00000000000000011e45Initial program 93.5%
sub-neg93.5%
associate-+l+93.5%
remove-double-neg93.5%
distribute-frac-neg93.5%
sub-neg93.5%
distribute-frac-neg93.5%
neg-mul-193.5%
*-commutative93.5%
associate-/l*93.5%
*-commutative93.5%
neg-mul-193.5%
times-frac99.0%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 90.6%
if 3.00000000000000011e45 < z Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
sub-neg99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
*-commutative99.6%
neg-mul-199.6%
times-frac88.1%
distribute-lft-out--88.1%
*-commutative88.1%
associate-/r*88.2%
metadata-eval88.2%
Simplified88.2%
Taylor expanded in y around inf 72.2%
Final simplification82.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.8e-37) (not (<= y 5.6e-114))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ t (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.8e-37) || !(y <= 5.6e-114)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (y * 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.8d-37)) .or. (.not. (y <= 5.6d-114))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * (t / (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.8e-37) || !(y <= 5.6e-114)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.8e-37) or not (y <= 5.6e-114): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * (t / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.8e-37) || !(y <= 5.6e-114)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.8e-37) || ~((y <= 5.6e-114))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * (t / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.8e-37], N[Not[LessEqual[y, 5.6e-114]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-37} \lor \neg \left(y \leq 5.6 \cdot 10^{-114}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -1.80000000000000004e-37 or 5.6000000000000003e-114 < y Initial program 98.7%
sub-neg98.7%
associate-+l+98.7%
remove-double-neg98.7%
distribute-frac-neg98.7%
sub-neg98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
associate-/l*98.6%
*-commutative98.6%
neg-mul-198.6%
times-frac98.0%
distribute-lft-out--98.6%
*-commutative98.6%
associate-/r*98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in y around inf 83.5%
if -1.80000000000000004e-37 < y < 5.6000000000000003e-114Initial program 93.0%
sub-neg93.0%
associate-+l+93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
sub-neg93.0%
distribute-frac-neg93.0%
neg-mul-193.0%
*-commutative93.0%
associate-/l*93.0%
*-commutative93.0%
neg-mul-193.0%
times-frac89.0%
distribute-lft-out--89.0%
*-commutative89.0%
associate-/r*89.0%
metadata-eval89.0%
Simplified89.0%
Taylor expanded in z around 0 89.0%
Taylor expanded in x around 0 71.6%
associate-*r/71.7%
*-rgt-identity71.7%
times-frac71.7%
rem-square-sqrt36.6%
associate-*r/36.6%
/-rgt-identity36.6%
rem-square-sqrt71.7%
Simplified71.7%
Taylor expanded in y around 0 75.4%
Final simplification80.8%
(FPCore (x y z t) :precision binary64 (if (<= y -2.9e-37) (+ x (* y (/ -0.3333333333333333 z))) (if (<= y 9e-114) (/ (/ t 3.0) (* y z)) (+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.9e-37) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 9e-114) {
tmp = (t / 3.0) / (y * z);
} else {
tmp = x + (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 <= (-2.9d-37)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 9d-114) then
tmp = (t / 3.0d0) / (y * z)
else
tmp = x + (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 <= -2.9e-37) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 9e-114) {
tmp = (t / 3.0) / (y * z);
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.9e-37: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 9e-114: tmp = (t / 3.0) / (y * z) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.9e-37) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 9e-114) tmp = Float64(Float64(t / 3.0) / Float64(y * z)); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.9e-37) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 9e-114) tmp = (t / 3.0) / (y * z); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.9e-37], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e-114], N[(N[(t / 3.0), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-37}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-114}:\\
\;\;\;\;\frac{\frac{t}{3}}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -2.90000000000000005e-37Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
sub-neg98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.3%
*-commutative98.3%
neg-mul-198.3%
times-frac98.2%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 86.0%
if -2.90000000000000005e-37 < y < 8.99999999999999937e-114Initial program 93.0%
sub-neg93.0%
associate-+l+93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
sub-neg93.0%
distribute-frac-neg93.0%
neg-mul-193.0%
*-commutative93.0%
associate-/l*93.0%
*-commutative93.0%
neg-mul-193.0%
times-frac89.0%
distribute-lft-out--89.0%
*-commutative89.0%
associate-/r*89.0%
metadata-eval89.0%
Simplified89.0%
Taylor expanded in z around 0 89.0%
Taylor expanded in x around 0 71.6%
associate-*r/71.7%
*-rgt-identity71.7%
times-frac71.7%
rem-square-sqrt36.6%
associate-*r/36.6%
/-rgt-identity36.6%
rem-square-sqrt71.7%
Simplified71.7%
Taylor expanded in y around 0 75.4%
metadata-eval92.7%
times-frac93.0%
*-commutative93.0%
times-frac92.2%
associate-*l/92.9%
*-lft-identity92.9%
Simplified75.6%
if 8.99999999999999937e-114 < y Initial program 98.9%
sub-neg98.9%
associate-+l+98.9%
remove-double-neg98.9%
distribute-frac-neg98.9%
sub-neg98.9%
distribute-frac-neg98.9%
neg-mul-198.9%
*-commutative98.9%
associate-/l*98.8%
*-commutative98.8%
neg-mul-198.8%
times-frac97.8%
distribute-lft-out--97.8%
*-commutative97.8%
associate-/r*97.6%
metadata-eval97.6%
Simplified97.6%
Taylor expanded in y around inf 81.6%
*-commutative81.6%
metadata-eval81.6%
times-frac81.7%
*-rgt-identity81.7%
Simplified81.7%
Final simplification80.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.85e-37)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 1e-114)
(* 0.3333333333333333 (/ t (* y z)))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e-37) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1e-114) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = x + (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.85d-37)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 1d-114) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else
tmp = x + (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.85e-37) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1e-114) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.85e-37: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 1e-114: tmp = 0.3333333333333333 * (t / (y * z)) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.85e-37) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 1e-114) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.85e-37) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 1e-114) tmp = 0.3333333333333333 * (t / (y * z)); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.85e-37], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-114], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{-37}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 10^{-114}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.85e-37Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
sub-neg98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.3%
*-commutative98.3%
neg-mul-198.3%
times-frac98.2%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 86.0%
if -1.85e-37 < y < 1.0000000000000001e-114Initial program 93.0%
sub-neg93.0%
associate-+l+93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
sub-neg93.0%
distribute-frac-neg93.0%
neg-mul-193.0%
*-commutative93.0%
associate-/l*93.0%
*-commutative93.0%
neg-mul-193.0%
times-frac89.0%
distribute-lft-out--89.0%
*-commutative89.0%
associate-/r*89.0%
metadata-eval89.0%
Simplified89.0%
Taylor expanded in z around 0 89.0%
Taylor expanded in x around 0 71.6%
associate-*r/71.7%
*-rgt-identity71.7%
times-frac71.7%
rem-square-sqrt36.6%
associate-*r/36.6%
/-rgt-identity36.6%
rem-square-sqrt71.7%
Simplified71.7%
Taylor expanded in y around 0 75.4%
if 1.0000000000000001e-114 < y Initial program 98.9%
sub-neg98.9%
associate-+l+98.9%
remove-double-neg98.9%
distribute-frac-neg98.9%
sub-neg98.9%
distribute-frac-neg98.9%
neg-mul-198.9%
*-commutative98.9%
associate-/l*98.8%
*-commutative98.8%
neg-mul-198.8%
times-frac97.8%
distribute-lft-out--97.8%
*-commutative97.8%
associate-/r*97.6%
metadata-eval97.6%
Simplified97.6%
Taylor expanded in y around inf 81.6%
*-commutative81.6%
metadata-eval81.6%
times-frac81.7%
*-rgt-identity81.7%
Simplified81.7%
Final simplification80.8%
(FPCore (x y z t) :precision binary64 (if (<= y -7.4e+65) (* y (/ -0.3333333333333333 z)) (if (<= y 3.4e+72) (* 0.3333333333333333 (/ t (* y z))) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.4e+65) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 3.4e+72) {
tmp = 0.3333333333333333 * (t / (y * z));
} 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 <= (-7.4d+65)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= 3.4d+72) then
tmp = 0.3333333333333333d0 * (t / (y * z))
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 <= -7.4e+65) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 3.4e+72) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.4e+65: tmp = y * (-0.3333333333333333 / z) elif y <= 3.4e+72: tmp = 0.3333333333333333 * (t / (y * z)) else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.4e+65) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= 3.4e+72) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); 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 <= -7.4e+65) tmp = y * (-0.3333333333333333 / z); elseif (y <= 3.4e+72) tmp = 0.3333333333333333 * (t / (y * z)); else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.4e+65], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e+72], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+65}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+72}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -7.39999999999999989e65Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.7%
fma-define99.7%
metadata-eval99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 98.2%
cancel-sign-sub-inv98.2%
metadata-eval98.2%
associate-*r/98.4%
metadata-eval98.4%
Simplified98.4%
Taylor expanded in x around 0 72.1%
if -7.39999999999999989e65 < y < 3.3999999999999998e72Initial program 94.6%
sub-neg94.6%
associate-+l+94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
sub-neg94.6%
distribute-frac-neg94.6%
neg-mul-194.6%
*-commutative94.6%
associate-/l*94.6%
*-commutative94.6%
neg-mul-194.6%
times-frac91.7%
distribute-lft-out--92.4%
*-commutative92.4%
associate-/r*92.4%
metadata-eval92.4%
Simplified92.4%
Taylor expanded in z around 0 92.4%
Taylor expanded in x around 0 64.7%
associate-*r/64.7%
*-rgt-identity64.7%
times-frac64.7%
rem-square-sqrt34.2%
associate-*r/34.2%
/-rgt-identity34.2%
rem-square-sqrt64.7%
Simplified64.7%
Taylor expanded in y around 0 59.5%
if 3.3999999999999998e72 < y Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
times-frac99.7%
fma-define99.7%
metadata-eval99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 97.9%
cancel-sign-sub-inv97.9%
metadata-eval97.9%
associate-*r/97.9%
metadata-eval97.9%
Simplified97.9%
Taylor expanded in x around 0 78.1%
clear-num78.1%
un-div-inv78.1%
div-inv78.3%
metadata-eval78.3%
Applied egg-rr78.3%
(FPCore (x y z t) :precision binary64 (if (<= z -1.06e+75) (* y (/ x y)) (if (<= z 1.45e+102) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.06e+75) {
tmp = y * (x / y);
} else if (z <= 1.45e+102) {
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 <= (-1.06d+75)) then
tmp = y * (x / y)
else if (z <= 1.45d+102) 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 <= -1.06e+75) {
tmp = y * (x / y);
} else if (z <= 1.45e+102) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.06e+75: tmp = y * (x / y) elif z <= 1.45e+102: tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.06e+75) tmp = Float64(y * Float64(x / y)); elseif (z <= 1.45e+102) 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 <= -1.06e+75) tmp = y * (x / y); elseif (z <= 1.45e+102) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.06e+75], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+102], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{+75}:\\
\;\;\;\;y \cdot \frac{x}{y}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+102}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.06e75Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 70.2%
cancel-sign-sub-inv70.2%
metadata-eval70.2%
associate-*r/70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in x around inf 57.5%
if -1.06e75 < z < 1.4500000000000001e102Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.3%
fma-define95.3%
metadata-eval95.3%
associate-*l*95.3%
*-commutative95.3%
Simplified95.3%
Taylor expanded in y around inf 58.2%
cancel-sign-sub-inv58.2%
metadata-eval58.2%
associate-*r/58.3%
metadata-eval58.3%
Simplified58.3%
Taylor expanded in x around 0 45.5%
clear-num45.4%
un-div-inv45.5%
div-inv45.5%
metadata-eval45.5%
Applied egg-rr45.5%
if 1.4500000000000001e102 < z Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
times-frac99.7%
fma-define99.7%
metadata-eval99.7%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 54.2%
(FPCore (x y z t) :precision binary64 (if (<= z -1.05e+73) (* y (/ x y)) (if (<= z 6.8e+96) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.05e+73) {
tmp = y * (x / y);
} else if (z <= 6.8e+96) {
tmp = y * (-0.3333333333333333 / 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 <= (-1.05d+73)) then
tmp = y * (x / y)
else if (z <= 6.8d+96) then
tmp = y * ((-0.3333333333333333d0) / 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 <= -1.05e+73) {
tmp = y * (x / y);
} else if (z <= 6.8e+96) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.05e+73: tmp = y * (x / y) elif z <= 6.8e+96: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.05e+73) tmp = Float64(y * Float64(x / y)); elseif (z <= 6.8e+96) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.05e+73) tmp = y * (x / y); elseif (z <= 6.8e+96) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.05e+73], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+96], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+73}:\\
\;\;\;\;y \cdot \frac{x}{y}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+96}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.0500000000000001e73Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 70.2%
cancel-sign-sub-inv70.2%
metadata-eval70.2%
associate-*r/70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in x around inf 57.5%
if -1.0500000000000001e73 < z < 6.8000000000000002e96Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.3%
fma-define95.3%
metadata-eval95.3%
associate-*l*95.3%
*-commutative95.3%
Simplified95.3%
Taylor expanded in y around inf 58.2%
cancel-sign-sub-inv58.2%
metadata-eval58.2%
associate-*r/58.3%
metadata-eval58.3%
Simplified58.3%
Taylor expanded in x around 0 45.5%
if 6.8000000000000002e96 < z Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
times-frac99.7%
fma-define99.7%
metadata-eval99.7%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 54.2%
(FPCore (x y z t) :precision binary64 (if (<= z -3.2e+78) x (if (<= z 2.8e+96) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.2e+78) {
tmp = x;
} else if (z <= 2.8e+96) {
tmp = y * (-0.3333333333333333 / 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 <= (-3.2d+78)) then
tmp = x
else if (z <= 2.8d+96) then
tmp = y * ((-0.3333333333333333d0) / 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 <= -3.2e+78) {
tmp = x;
} else if (z <= 2.8e+96) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.2e+78: tmp = x elif z <= 2.8e+96: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.2e+78) tmp = x; elseif (z <= 2.8e+96) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.2e+78) tmp = x; elseif (z <= 2.8e+96) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.2e+78], x, If[LessEqual[z, 2.8e+96], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+78}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+96}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.19999999999999994e78 or 2.8e96 < z Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 54.7%
if -3.19999999999999994e78 < z < 2.8e96Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.3%
fma-define95.3%
metadata-eval95.3%
associate-*l*95.3%
*-commutative95.3%
Simplified95.3%
Taylor expanded in y around inf 58.2%
cancel-sign-sub-inv58.2%
metadata-eval58.2%
associate-*r/58.3%
metadata-eval58.3%
Simplified58.3%
Taylor expanded in x around 0 45.5%
(FPCore (x y z t) :precision binary64 (if (<= z -2.45e+69) x (if (<= z 1.85e+105) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.45e+69) {
tmp = x;
} else if (z <= 1.85e+105) {
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.45d+69)) then
tmp = x
else if (z <= 1.85d+105) 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.45e+69) {
tmp = x;
} else if (z <= 1.85e+105) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.45e+69: tmp = x elif z <= 1.85e+105: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.45e+69) tmp = x; elseif (z <= 1.85e+105) 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.45e+69) tmp = x; elseif (z <= 1.85e+105) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.45e+69], x, If[LessEqual[z, 1.85e+105], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+69}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+105}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.45e69 or 1.84999999999999992e105 < z Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 54.7%
if -2.45e69 < z < 1.84999999999999992e105Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.3%
fma-define95.3%
metadata-eval95.3%
associate-*l*95.3%
*-commutative95.3%
Simplified95.3%
Taylor expanded in y around inf 58.2%
cancel-sign-sub-inv58.2%
metadata-eval58.2%
associate-*r/58.3%
metadata-eval58.3%
Simplified58.3%
Taylor expanded in x around 0 45.5%
Taylor expanded in y around 0 45.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 96.7%
sub-neg96.7%
associate-+l+96.7%
distribute-frac-neg96.7%
neg-mul-196.7%
*-commutative96.7%
times-frac96.7%
fma-define96.7%
metadata-eval96.7%
associate-*l*96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in x around inf 26.4%
(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 2024152
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))