
(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 18 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 (<= t -1e-40) (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))) (+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1e-40) {
tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
} else {
tmp = x + (((t / y) - 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 (t <= (-1d-40)) then
tmp = (x - (y / (z * 3.0d0))) + (t / (y * (z * 3.0d0)))
else
tmp = x + (((t / y) - 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 (t <= -1e-40) {
tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1e-40: tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))) else: tmp = x + (((t / y) - y) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1e-40) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))); else tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1e-40) tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); else tmp = x + (((t / y) - y) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1e-40], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-40}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if t < -9.9999999999999993e-41Initial program 99.8%
if -9.9999999999999993e-41 < t Initial program 94.5%
associate-+l-94.5%
*-commutative94.5%
Simplified94.5%
sub-neg94.5%
associate-/r*98.2%
sub-div98.2%
Applied egg-rr98.2%
sub-neg98.2%
Simplified98.2%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* -0.3333333333333333 (/ (- y (/ t y)) z))))
(if (<= (* z 3.0) -4e+168)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= (* z 3.0) -4e+49)
t_1
(if (<= (* z 3.0) -5e-13)
(- x (/ y (* z 3.0)))
(if (<= (* z 3.0) 5e-36)
t_1
(- x (/ y (/ z 0.3333333333333333)))))))))
double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 * ((y - (t / y)) / z);
double tmp;
if ((z * 3.0) <= -4e+168) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if ((z * 3.0) <= -4e+49) {
tmp = t_1;
} else if ((z * 3.0) <= -5e-13) {
tmp = x - (y / (z * 3.0));
} else if ((z * 3.0) <= 5e-36) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-0.3333333333333333d0) * ((y - (t / y)) / z)
if ((z * 3.0d0) <= (-4d+168)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if ((z * 3.0d0) <= (-4d+49)) then
tmp = t_1
else if ((z * 3.0d0) <= (-5d-13)) then
tmp = x - (y / (z * 3.0d0))
else if ((z * 3.0d0) <= 5d-36) then
tmp = t_1
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 t_1 = -0.3333333333333333 * ((y - (t / y)) / z);
double tmp;
if ((z * 3.0) <= -4e+168) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if ((z * 3.0) <= -4e+49) {
tmp = t_1;
} else if ((z * 3.0) <= -5e-13) {
tmp = x - (y / (z * 3.0));
} else if ((z * 3.0) <= 5e-36) {
tmp = t_1;
} else {
tmp = x - (y / (z / 0.3333333333333333));
}
return tmp;
}
def code(x, y, z, t): t_1 = -0.3333333333333333 * ((y - (t / y)) / z) tmp = 0 if (z * 3.0) <= -4e+168: tmp = x + (y * (-0.3333333333333333 / z)) elif (z * 3.0) <= -4e+49: tmp = t_1 elif (z * 3.0) <= -5e-13: tmp = x - (y / (z * 3.0)) elif (z * 3.0) <= 5e-36: tmp = t_1 else: tmp = x - (y / (z / 0.3333333333333333)) return tmp
function code(x, y, z, t) t_1 = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)) tmp = 0.0 if (Float64(z * 3.0) <= -4e+168) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (Float64(z * 3.0) <= -4e+49) tmp = t_1; elseif (Float64(z * 3.0) <= -5e-13) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (Float64(z * 3.0) <= 5e-36) tmp = t_1; else tmp = Float64(x - Float64(y / Float64(z / 0.3333333333333333))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -0.3333333333333333 * ((y - (t / y)) / z); tmp = 0.0; if ((z * 3.0) <= -4e+168) tmp = x + (y * (-0.3333333333333333 / z)); elseif ((z * 3.0) <= -4e+49) tmp = t_1; elseif ((z * 3.0) <= -5e-13) tmp = x - (y / (z * 3.0)); elseif ((z * 3.0) <= 5e-36) tmp = t_1; else tmp = x - (y / (z / 0.3333333333333333)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * 3.0), $MachinePrecision], -4e+168], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], -4e+49], t$95$1, If[LessEqual[N[(z * 3.0), $MachinePrecision], -5e-13], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 5e-36], t$95$1, N[(x - N[(y / N[(z / 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{if}\;z \cdot 3 \leq -4 \cdot 10^{+168}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;z \cdot 3 \leq -4 \cdot 10^{+49}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \cdot 3 \leq -5 \cdot 10^{-13}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;z \cdot 3 \leq 5 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{z}{0.3333333333333333}}\\
\end{array}
\end{array}
if (*.f64 z 3) < -3.9999999999999997e168Initial program 97.1%
sub-neg97.1%
distribute-frac-neg97.1%
associate-+l+97.1%
remove-double-neg97.1%
distribute-frac-neg97.1%
sub-neg97.1%
neg-mul-197.1%
associate-*l/97.1%
neg-mul-197.1%
times-frac86.2%
distribute-lft-out--86.2%
*-commutative86.2%
associate-/r*86.2%
metadata-eval86.2%
Simplified86.2%
Taylor expanded in y around inf 71.8%
if -3.9999999999999997e168 < (*.f64 z 3) < -3.99999999999999979e49 or -4.9999999999999999e-13 < (*.f64 z 3) < 5.00000000000000004e-36Initial program 93.3%
sub-neg93.3%
distribute-frac-neg93.3%
associate-+l+93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
sub-neg93.3%
neg-mul-193.3%
associate-*l/93.2%
neg-mul-193.2%
times-frac97.6%
distribute-lft-out--97.6%
*-commutative97.6%
associate-/r*97.6%
metadata-eval97.6%
Simplified97.6%
Taylor expanded in z around 0 97.6%
Taylor expanded in x around 0 92.4%
if -3.99999999999999979e49 < (*.f64 z 3) < -4.9999999999999999e-13Initial program 99.9%
sub-neg99.9%
distribute-frac-neg99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
sub-neg99.9%
neg-mul-199.9%
associate-*l/99.7%
neg-mul-199.7%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 91.1%
Taylor expanded in x around 0 91.1%
metadata-eval91.1%
cancel-sign-sub-inv91.1%
*-commutative91.1%
associate-*l/91.4%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in z around 0 91.4%
*-commutative91.4%
Simplified91.4%
if 5.00000000000000004e-36 < (*.f64 z 3) Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
associate-*l/99.8%
neg-mul-199.8%
times-frac92.5%
distribute-lft-out--92.5%
*-commutative92.5%
associate-/r*92.5%
metadata-eval92.5%
Simplified92.5%
Taylor expanded in y around inf 77.0%
Taylor expanded in x around 0 77.0%
metadata-eval77.0%
cancel-sign-sub-inv77.0%
*-commutative77.0%
associate-*l/77.1%
associate-/l*77.1%
Simplified77.1%
Final simplification84.9%
(FPCore (x y z t)
:precision binary64
(if (<= t -1.1e+73)
(+
(- x (* y (/ 0.3333333333333333 z)))
(* t (/ (/ 0.3333333333333333 z) y)))
(+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.1e+73) {
tmp = (x - (y * (0.3333333333333333 / z))) + (t * ((0.3333333333333333 / z) / y));
} else {
tmp = x + (((t / y) - 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 (t <= (-1.1d+73)) then
tmp = (x - (y * (0.3333333333333333d0 / z))) + (t * ((0.3333333333333333d0 / z) / y))
else
tmp = x + (((t / y) - 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 (t <= -1.1e+73) {
tmp = (x - (y * (0.3333333333333333 / z))) + (t * ((0.3333333333333333 / z) / y));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.1e+73: tmp = (x - (y * (0.3333333333333333 / z))) + (t * ((0.3333333333333333 / z) / y)) else: tmp = x + (((t / y) - y) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.1e+73) tmp = Float64(Float64(x - Float64(y * Float64(0.3333333333333333 / z))) + Float64(t * Float64(Float64(0.3333333333333333 / z) / y))); else tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.1e+73) tmp = (x - (y * (0.3333333333333333 / z))) + (t * ((0.3333333333333333 / z) / y)); else tmp = x + (((t / y) - y) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.1e+73], N[(N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(0.3333333333333333 / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+73}:\\
\;\;\;\;\left(x - y \cdot \frac{0.3333333333333333}{z}\right) + t \cdot \frac{\frac{0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if t < -1.1e73Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
Simplified99.7%
associate--r-99.7%
div-inv99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
div-inv99.7%
*-commutative99.7%
associate-/r*99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Applied egg-rr99.7%
if -1.1e73 < t Initial program 95.1%
associate-+l-95.1%
*-commutative95.1%
Simplified95.1%
sub-neg95.1%
associate-/r*98.4%
sub-div98.4%
Applied egg-rr98.4%
sub-neg98.4%
Simplified98.4%
Final simplification98.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9.2e-38) (not (<= y 5.4e-124))) (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))) (+ x (* (/ t z) (/ 0.3333333333333333 y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.2e-38) || !(y <= 5.4e-124)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / 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 <= (-9.2d-38)) .or. (.not. (y <= 5.4d-124))) then
tmp = x + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
else
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.2e-38) || !(y <= 5.4e-124)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9.2e-38) or not (y <= 5.4e-124): tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)) else: tmp = x + ((t / z) * (0.3333333333333333 / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9.2e-38) || !(y <= 5.4e-124)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); else tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9.2e-38) || ~((y <= 5.4e-124))) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); else tmp = x + ((t / z) * (0.3333333333333333 / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9.2e-38], N[Not[LessEqual[y, 5.4e-124]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-38} \lor \neg \left(y \leq 5.4 \cdot 10^{-124}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -9.20000000000000007e-38 or 5.40000000000000035e-124 < y Initial program 98.6%
sub-neg98.6%
distribute-frac-neg98.6%
associate-+l+98.6%
remove-double-neg98.6%
distribute-frac-neg98.6%
sub-neg98.6%
neg-mul-198.6%
associate-*l/98.5%
neg-mul-198.5%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
if -9.20000000000000007e-38 < y < 5.40000000000000035e-124Initial program 92.1%
sub-neg92.1%
distribute-frac-neg92.1%
associate-+l+92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
sub-neg92.1%
neg-mul-192.1%
associate-*l/92.1%
neg-mul-192.1%
times-frac86.4%
distribute-lft-out--86.4%
*-commutative86.4%
associate-/r*86.5%
metadata-eval86.5%
Simplified86.5%
Taylor expanded in y around 0 91.3%
associate-/r*84.7%
associate-*r/84.7%
associate-*l/84.7%
associate-*r/94.7%
associate-*l/91.2%
/-rgt-identity91.2%
associate-*r/91.2%
associate-*l/94.7%
associate-*r/84.7%
*-commutative84.7%
associate-*r/84.7%
*-commutative84.7%
associate-*r/84.7%
*-commutative84.7%
associate-/r*91.3%
associate-/l*91.3%
associate-/r*84.8%
metadata-eval84.8%
associate-/r*84.7%
associate-/l/91.2%
associate-*r*91.3%
*-commutative91.3%
Simplified91.3%
associate-/r*94.6%
div-inv94.6%
Applied egg-rr94.6%
*-commutative94.6%
associate-/r*94.7%
metadata-eval94.7%
Simplified94.7%
Final simplification97.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9.2e-38) (not (<= y 5.9e-124))) (+ x (/ (* (- y (/ t y)) -0.3333333333333333) z)) (+ x (* (/ t z) (/ 0.3333333333333333 y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.2e-38) || !(y <= 5.9e-124)) {
tmp = x + (((y - (t / y)) * -0.3333333333333333) / z);
} else {
tmp = x + ((t / z) * (0.3333333333333333 / 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 <= (-9.2d-38)) .or. (.not. (y <= 5.9d-124))) then
tmp = x + (((y - (t / y)) * (-0.3333333333333333d0)) / z)
else
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.2e-38) || !(y <= 5.9e-124)) {
tmp = x + (((y - (t / y)) * -0.3333333333333333) / z);
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9.2e-38) or not (y <= 5.9e-124): tmp = x + (((y - (t / y)) * -0.3333333333333333) / z) else: tmp = x + ((t / z) * (0.3333333333333333 / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9.2e-38) || !(y <= 5.9e-124)) tmp = Float64(x + Float64(Float64(Float64(y - Float64(t / y)) * -0.3333333333333333) / z)); else tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9.2e-38) || ~((y <= 5.9e-124))) tmp = x + (((y - (t / y)) * -0.3333333333333333) / z); else tmp = x + ((t / z) * (0.3333333333333333 / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9.2e-38], N[Not[LessEqual[y, 5.9e-124]], $MachinePrecision]], N[(x + N[(N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-38} \lor \neg \left(y \leq 5.9 \cdot 10^{-124}\right):\\
\;\;\;\;x + \frac{\left(y - \frac{t}{y}\right) \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -9.20000000000000007e-38 or 5.9000000000000002e-124 < y Initial program 98.6%
sub-neg98.6%
distribute-frac-neg98.6%
associate-+l+98.6%
remove-double-neg98.6%
distribute-frac-neg98.6%
sub-neg98.6%
neg-mul-198.6%
associate-*l/98.5%
neg-mul-198.5%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
if -9.20000000000000007e-38 < y < 5.9000000000000002e-124Initial program 92.1%
sub-neg92.1%
distribute-frac-neg92.1%
associate-+l+92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
sub-neg92.1%
neg-mul-192.1%
associate-*l/92.1%
neg-mul-192.1%
times-frac86.4%
distribute-lft-out--86.4%
*-commutative86.4%
associate-/r*86.5%
metadata-eval86.5%
Simplified86.5%
Taylor expanded in y around 0 91.3%
associate-/r*84.7%
associate-*r/84.7%
associate-*l/84.7%
associate-*r/94.7%
associate-*l/91.2%
/-rgt-identity91.2%
associate-*r/91.2%
associate-*l/94.7%
associate-*r/84.7%
*-commutative84.7%
associate-*r/84.7%
*-commutative84.7%
associate-*r/84.7%
*-commutative84.7%
associate-/r*91.3%
associate-/l*91.3%
associate-/r*84.8%
metadata-eval84.8%
associate-/r*84.7%
associate-/l/91.2%
associate-*r*91.3%
*-commutative91.3%
Simplified91.3%
associate-/r*94.6%
div-inv94.6%
Applied egg-rr94.6%
*-commutative94.6%
associate-/r*94.7%
metadata-eval94.7%
Simplified94.7%
Final simplification97.8%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -1e-20) x (if (<= (* z 3.0) 500000000000.0) (/ (- y) (* z 3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -1e-20) {
tmp = x;
} else if ((z * 3.0) <= 500000000000.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.0d0) <= (-1d-20)) then
tmp = x
else if ((z * 3.0d0) <= 500000000000.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.0) <= -1e-20) {
tmp = x;
} else if ((z * 3.0) <= 500000000000.0) {
tmp = -y / (z * 3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -1e-20: tmp = x elif (z * 3.0) <= 500000000000.0: tmp = -y / (z * 3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -1e-20) tmp = x; elseif (Float64(z * 3.0) <= 500000000000.0) tmp = Float64(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.0) <= -1e-20) tmp = x; elseif ((z * 3.0) <= 500000000000.0) tmp = -y / (z * 3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -1e-20], x, If[LessEqual[N[(z * 3.0), $MachinePrecision], 500000000000.0], N[((-y) / N[(z * 3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \cdot 3 \leq 500000000000:\\
\;\;\;\;\frac{-y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if (*.f64 z 3) < -9.99999999999999945e-21 or 5e11 < (*.f64 z 3) Initial program 99.1%
sub-neg99.1%
distribute-frac-neg99.1%
associate-+l+99.1%
remove-double-neg99.1%
distribute-frac-neg99.1%
sub-neg99.1%
neg-mul-199.1%
associate-*l/99.1%
neg-mul-199.1%
times-frac90.1%
distribute-lft-out--90.1%
*-commutative90.1%
associate-/r*90.1%
metadata-eval90.1%
Simplified90.1%
Taylor expanded in x around inf 50.7%
if -9.99999999999999945e-21 < (*.f64 z 3) < 5e11Initial program 92.6%
sub-neg92.6%
distribute-frac-neg92.6%
associate-+l+92.6%
remove-double-neg92.6%
distribute-frac-neg92.6%
sub-neg92.6%
neg-mul-192.6%
associate-*l/92.5%
neg-mul-192.5%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 94.8%
Taylor expanded in y around inf 50.3%
*-commutative50.3%
metadata-eval50.3%
distribute-rgt-neg-in50.3%
associate-/r/50.3%
distribute-neg-frac50.3%
div-inv50.3%
metadata-eval50.3%
Applied egg-rr50.3%
Final simplification50.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3e+45) (not (<= y 6e-7))) (- x (/ (* y 0.3333333333333333) z)) (+ x (* 0.3333333333333333 (/ t (* y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3e+45) || !(y <= 6e-7)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = x + (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 <= (-3d+45)) .or. (.not. (y <= 6d-7))) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else
tmp = x + (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 <= -3e+45) || !(y <= 6e-7)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = x + (0.3333333333333333 * (t / (y * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3e+45) or not (y <= 6e-7): tmp = x - ((y * 0.3333333333333333) / z) else: tmp = x + (0.3333333333333333 * (t / (y * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3e+45) || !(y <= 6e-7)) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); else tmp = Float64(x + 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 <= -3e+45) || ~((y <= 6e-7))) tmp = x - ((y * 0.3333333333333333) / z); else tmp = x + (0.3333333333333333 * (t / (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3e+45], N[Not[LessEqual[y, 6e-7]], $MachinePrecision]], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+45} \lor \neg \left(y \leq 6 \cdot 10^{-7}\right):\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -3.00000000000000011e45 or 5.9999999999999997e-7 < y Initial program 99.1%
associate-+l-99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in t around 0 93.3%
associate-*r/93.4%
*-commutative93.4%
Applied egg-rr93.4%
if -3.00000000000000011e45 < y < 5.9999999999999997e-7Initial program 93.6%
sub-neg93.6%
distribute-frac-neg93.6%
associate-+l+93.6%
remove-double-neg93.6%
distribute-frac-neg93.6%
sub-neg93.6%
neg-mul-193.6%
associate-*l/93.6%
neg-mul-193.6%
times-frac90.2%
distribute-lft-out--90.2%
*-commutative90.2%
associate-/r*90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in y around 0 88.1%
Final simplification90.5%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -1e-20) x (if (<= (* z 3.0) 500000000000.0) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -1e-20) {
tmp = x;
} else if ((z * 3.0) <= 500000000000.0) {
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 * 3.0d0) <= (-1d-20)) then
tmp = x
else if ((z * 3.0d0) <= 500000000000.0d0) 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 * 3.0) <= -1e-20) {
tmp = x;
} else if ((z * 3.0) <= 500000000000.0) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -1e-20: tmp = x elif (z * 3.0) <= 500000000000.0: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -1e-20) tmp = x; elseif (Float64(z * 3.0) <= 500000000000.0) 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 * 3.0) <= -1e-20) tmp = x; elseif ((z * 3.0) <= 500000000000.0) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -1e-20], x, If[LessEqual[N[(z * 3.0), $MachinePrecision], 500000000000.0], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \cdot 3 \leq 500000000000:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if (*.f64 z 3) < -9.99999999999999945e-21 or 5e11 < (*.f64 z 3) Initial program 99.1%
sub-neg99.1%
distribute-frac-neg99.1%
associate-+l+99.1%
remove-double-neg99.1%
distribute-frac-neg99.1%
sub-neg99.1%
neg-mul-199.1%
associate-*l/99.1%
neg-mul-199.1%
times-frac90.1%
distribute-lft-out--90.1%
*-commutative90.1%
associate-/r*90.1%
metadata-eval90.1%
Simplified90.1%
Taylor expanded in x around inf 50.7%
if -9.99999999999999945e-21 < (*.f64 z 3) < 5e11Initial program 92.6%
sub-neg92.6%
distribute-frac-neg92.6%
associate-+l+92.6%
remove-double-neg92.6%
distribute-frac-neg92.6%
sub-neg92.6%
neg-mul-192.6%
associate-*l/92.5%
neg-mul-192.5%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 94.8%
Taylor expanded in y around inf 50.3%
Final simplification50.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.45e-38)
(- x (/ y (/ z 0.3333333333333333)))
(if (<= y 1.82e-84)
(* -0.3333333333333333 (* (/ t z) (/ -1.0 y)))
(- x (/ (* y 0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e-38) {
tmp = x - (y / (z / 0.3333333333333333));
} else if (y <= 1.82e-84) {
tmp = -0.3333333333333333 * ((t / z) * (-1.0 / 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.45d-38)) then
tmp = x - (y / (z / 0.3333333333333333d0))
else if (y <= 1.82d-84) then
tmp = (-0.3333333333333333d0) * ((t / z) * ((-1.0d0) / 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.45e-38) {
tmp = x - (y / (z / 0.3333333333333333));
} else if (y <= 1.82e-84) {
tmp = -0.3333333333333333 * ((t / z) * (-1.0 / y));
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.45e-38: tmp = x - (y / (z / 0.3333333333333333)) elif y <= 1.82e-84: tmp = -0.3333333333333333 * ((t / z) * (-1.0 / y)) else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.45e-38) tmp = Float64(x - Float64(y / Float64(z / 0.3333333333333333))); elseif (y <= 1.82e-84) tmp = Float64(-0.3333333333333333 * Float64(Float64(t / z) * Float64(-1.0 / y))); else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.45e-38) tmp = x - (y / (z / 0.3333333333333333)); elseif (y <= 1.82e-84) tmp = -0.3333333333333333 * ((t / z) * (-1.0 / y)); else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.45e-38], N[(x - N[(y / N[(z / 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.82e-84], N[(-0.3333333333333333 * N[(N[(t / z), $MachinePrecision] * N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{-38}:\\
\;\;\;\;x - \frac{y}{\frac{z}{0.3333333333333333}}\\
\mathbf{elif}\;y \leq 1.82 \cdot 10^{-84}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(\frac{t}{z} \cdot \frac{-1}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.44999999999999997e-38Initial program 98.4%
sub-neg98.4%
distribute-frac-neg98.4%
associate-+l+98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
sub-neg98.4%
neg-mul-198.4%
associate-*l/98.2%
neg-mul-198.2%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 85.6%
Taylor expanded in x around 0 85.6%
metadata-eval85.6%
cancel-sign-sub-inv85.6%
*-commutative85.6%
associate-*l/85.6%
associate-/l*85.6%
Simplified85.6%
if -1.44999999999999997e-38 < y < 1.81999999999999991e-84Initial program 91.5%
sub-neg91.5%
distribute-frac-neg91.5%
associate-+l+91.5%
remove-double-neg91.5%
distribute-frac-neg91.5%
sub-neg91.5%
neg-mul-191.5%
associate-*l/91.5%
neg-mul-191.5%
times-frac87.1%
distribute-lft-out--87.1%
*-commutative87.1%
associate-/r*87.1%
metadata-eval87.1%
Simplified87.1%
Taylor expanded in z around 0 87.1%
Taylor expanded in x around 0 63.0%
Taylor expanded in y around 0 67.5%
*-commutative67.5%
associate-*r/67.5%
neg-mul-167.5%
*-commutative67.5%
Simplified67.5%
neg-mul-167.5%
times-frac70.2%
Applied egg-rr70.2%
if 1.81999999999999991e-84 < y Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 86.9%
associate-*r/87.0%
*-commutative87.0%
Applied egg-rr87.0%
Final simplification79.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -750.0)
(- x (/ y (/ z 0.3333333333333333)))
(if (<= y 3.6e-7)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(- x (/ (* y 0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -750.0) {
tmp = x - (y / (z / 0.3333333333333333));
} else if (y <= 3.6e-7) {
tmp = x + ((t / z) * (0.3333333333333333 / 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 <= (-750.0d0)) then
tmp = x - (y / (z / 0.3333333333333333d0))
else if (y <= 3.6d-7) then
tmp = x + ((t / z) * (0.3333333333333333d0 / 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 <= -750.0) {
tmp = x - (y / (z / 0.3333333333333333));
} else if (y <= 3.6e-7) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -750.0: tmp = x - (y / (z / 0.3333333333333333)) elif y <= 3.6e-7: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -750.0) tmp = Float64(x - Float64(y / Float64(z / 0.3333333333333333))); elseif (y <= 3.6e-7) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -750.0) tmp = x - (y / (z / 0.3333333333333333)); elseif (y <= 3.6e-7) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -750.0], N[(x - N[(y / N[(z / 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e-7], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -750:\\
\;\;\;\;x - \frac{y}{\frac{z}{0.3333333333333333}}\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-7}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -750Initial program 98.1%
sub-neg98.1%
distribute-frac-neg98.1%
associate-+l+98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
sub-neg98.1%
neg-mul-198.1%
associate-*l/98.0%
neg-mul-198.0%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 89.9%
Taylor expanded in x around 0 89.9%
metadata-eval89.9%
cancel-sign-sub-inv89.9%
*-commutative89.9%
associate-*l/90.0%
associate-/l*90.0%
Simplified90.0%
if -750 < y < 3.59999999999999994e-7Initial program 93.0%
sub-neg93.0%
distribute-frac-neg93.0%
associate-+l+93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
sub-neg93.0%
neg-mul-193.0%
associate-*l/93.0%
neg-mul-193.0%
times-frac89.4%
distribute-lft-out--89.4%
*-commutative89.4%
associate-/r*89.5%
metadata-eval89.5%
Simplified89.5%
Taylor expanded in y around 0 89.3%
associate-/r*84.3%
associate-*r/84.2%
associate-*l/84.3%
associate-*r/91.9%
associate-*l/89.3%
/-rgt-identity89.3%
associate-*r/89.3%
associate-*l/91.9%
associate-*r/84.3%
*-commutative84.3%
associate-*r/84.2%
*-commutative84.2%
associate-*r/84.3%
*-commutative84.3%
associate-/r*89.3%
associate-/l*89.3%
associate-/r*84.3%
metadata-eval84.3%
associate-/r*84.2%
associate-/l/89.3%
associate-*r*89.3%
*-commutative89.3%
Simplified89.3%
associate-/r*92.0%
div-inv91.9%
Applied egg-rr91.9%
*-commutative91.9%
associate-/r*92.0%
metadata-eval92.0%
Simplified92.0%
if 3.59999999999999994e-7 < y Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 92.9%
associate-*r/93.1%
*-commutative93.1%
Applied egg-rr93.1%
Final simplification91.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.7e-16)
(- x (/ y (/ z 0.3333333333333333)))
(if (<= y 1.08e-85)
(* -0.3333333333333333 (/ (- t) (* y z)))
(- x (/ (* y 0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.7e-16) {
tmp = x - (y / (z / 0.3333333333333333));
} else if (y <= 1.08e-85) {
tmp = -0.3333333333333333 * (-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 (y <= (-1.7d-16)) then
tmp = x - (y / (z / 0.3333333333333333d0))
else if (y <= 1.08d-85) then
tmp = (-0.3333333333333333d0) * (-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 (y <= -1.7e-16) {
tmp = x - (y / (z / 0.3333333333333333));
} else if (y <= 1.08e-85) {
tmp = -0.3333333333333333 * (-t / (y * z));
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.7e-16: tmp = x - (y / (z / 0.3333333333333333)) elif y <= 1.08e-85: tmp = -0.3333333333333333 * (-t / (y * z)) else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.7e-16) tmp = Float64(x - Float64(y / Float64(z / 0.3333333333333333))); elseif (y <= 1.08e-85) tmp = Float64(-0.3333333333333333 * Float64(Float64(-t) / Float64(y * z))); else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.7e-16) tmp = x - (y / (z / 0.3333333333333333)); elseif (y <= 1.08e-85) tmp = -0.3333333333333333 * (-t / (y * z)); else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.7e-16], N[(x - N[(y / N[(z / 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.08e-85], N[(-0.3333333333333333 * N[((-t) / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-16}:\\
\;\;\;\;x - \frac{y}{\frac{z}{0.3333333333333333}}\\
\mathbf{elif}\;y \leq 1.08 \cdot 10^{-85}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{-t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.7e-16Initial program 98.3%
sub-neg98.3%
distribute-frac-neg98.3%
associate-+l+98.3%
remove-double-neg98.3%
distribute-frac-neg98.3%
sub-neg98.3%
neg-mul-198.3%
associate-*l/98.1%
neg-mul-198.1%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 87.8%
Taylor expanded in x around 0 87.8%
metadata-eval87.8%
cancel-sign-sub-inv87.8%
*-commutative87.8%
associate-*l/87.8%
associate-/l*87.8%
Simplified87.8%
if -1.7e-16 < y < 1.07999999999999997e-85Initial program 91.8%
sub-neg91.8%
distribute-frac-neg91.8%
associate-+l+91.8%
remove-double-neg91.8%
distribute-frac-neg91.8%
sub-neg91.8%
neg-mul-191.8%
associate-*l/91.8%
neg-mul-191.8%
times-frac87.5%
distribute-lft-out--87.5%
*-commutative87.5%
associate-/r*87.6%
metadata-eval87.6%
Simplified87.6%
Taylor expanded in z around 0 87.6%
Taylor expanded in x around 0 63.5%
Taylor expanded in y around 0 66.9%
*-commutative66.9%
associate-*r/66.9%
neg-mul-166.9%
*-commutative66.9%
Simplified66.9%
if 1.07999999999999997e-85 < y Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 86.9%
associate-*r/87.0%
*-commutative87.0%
Applied egg-rr87.0%
Final simplification78.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.5e-18)
(- x (/ y (/ z 0.3333333333333333)))
(if (<= y 2.45e-80)
(/ 0.3333333333333333 (/ z (/ t y)))
(- x (/ (* y 0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.5e-18) {
tmp = x - (y / (z / 0.3333333333333333));
} else if (y <= 2.45e-80) {
tmp = 0.3333333333333333 / (z / (t / 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 <= (-2.5d-18)) then
tmp = x - (y / (z / 0.3333333333333333d0))
else if (y <= 2.45d-80) then
tmp = 0.3333333333333333d0 / (z / (t / 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 <= -2.5e-18) {
tmp = x - (y / (z / 0.3333333333333333));
} else if (y <= 2.45e-80) {
tmp = 0.3333333333333333 / (z / (t / y));
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.5e-18: tmp = x - (y / (z / 0.3333333333333333)) elif y <= 2.45e-80: tmp = 0.3333333333333333 / (z / (t / y)) else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.5e-18) tmp = Float64(x - Float64(y / Float64(z / 0.3333333333333333))); elseif (y <= 2.45e-80) tmp = Float64(0.3333333333333333 / Float64(z / Float64(t / y))); else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.5e-18) tmp = x - (y / (z / 0.3333333333333333)); elseif (y <= 2.45e-80) tmp = 0.3333333333333333 / (z / (t / y)); else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.5e-18], N[(x - N[(y / N[(z / 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.45e-80], N[(0.3333333333333333 / N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-18}:\\
\;\;\;\;x - \frac{y}{\frac{z}{0.3333333333333333}}\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{-80}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{z}{\frac{t}{y}}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.50000000000000018e-18Initial program 98.3%
sub-neg98.3%
distribute-frac-neg98.3%
associate-+l+98.3%
remove-double-neg98.3%
distribute-frac-neg98.3%
sub-neg98.3%
neg-mul-198.3%
associate-*l/98.1%
neg-mul-198.1%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 87.8%
Taylor expanded in x around 0 87.8%
metadata-eval87.8%
cancel-sign-sub-inv87.8%
*-commutative87.8%
associate-*l/87.8%
associate-/l*87.8%
Simplified87.8%
if -2.50000000000000018e-18 < y < 2.44999999999999995e-80Initial program 91.8%
sub-neg91.8%
distribute-frac-neg91.8%
associate-+l+91.8%
remove-double-neg91.8%
distribute-frac-neg91.8%
sub-neg91.8%
neg-mul-191.8%
associate-*l/91.8%
neg-mul-191.8%
times-frac87.5%
distribute-lft-out--87.5%
*-commutative87.5%
associate-/r*87.6%
metadata-eval87.6%
Simplified87.6%
Taylor expanded in z around 0 87.6%
Taylor expanded in x around 0 63.5%
Taylor expanded in y around 0 66.9%
*-commutative66.9%
associate-*r/66.9%
neg-mul-166.9%
*-commutative66.9%
Simplified66.9%
associate-*r/66.8%
neg-mul-166.8%
associate-*r*66.8%
metadata-eval66.8%
associate-/l*66.7%
add-sqr-sqrt25.6%
sqrt-unprod21.8%
sqr-neg21.8%
sqrt-unprod0.8%
*-commutative0.8%
add-sqr-sqrt1.5%
associate-/l*1.5%
add-sqr-sqrt0.7%
sqrt-unprod21.9%
sqr-neg21.9%
sqrt-unprod24.7%
add-sqr-sqrt59.9%
Applied egg-rr59.9%
if 2.44999999999999995e-80 < y Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 86.9%
associate-*r/87.0%
*-commutative87.0%
Applied egg-rr87.0%
Final simplification75.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.9e-18)
(- x (/ y (/ z 0.3333333333333333)))
(if (<= y 9.6e-79)
(/ t (/ (* y z) 0.3333333333333333))
(- x (/ (* y 0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.9e-18) {
tmp = x - (y / (z / 0.3333333333333333));
} else if (y <= 9.6e-79) {
tmp = t / ((y * z) / 0.3333333333333333);
} 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 <= (-3.9d-18)) then
tmp = x - (y / (z / 0.3333333333333333d0))
else if (y <= 9.6d-79) then
tmp = t / ((y * z) / 0.3333333333333333d0)
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 <= -3.9e-18) {
tmp = x - (y / (z / 0.3333333333333333));
} else if (y <= 9.6e-79) {
tmp = t / ((y * z) / 0.3333333333333333);
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.9e-18: tmp = x - (y / (z / 0.3333333333333333)) elif y <= 9.6e-79: tmp = t / ((y * z) / 0.3333333333333333) else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.9e-18) tmp = Float64(x - Float64(y / Float64(z / 0.3333333333333333))); elseif (y <= 9.6e-79) tmp = Float64(t / Float64(Float64(y * z) / 0.3333333333333333)); else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.9e-18) tmp = x - (y / (z / 0.3333333333333333)); elseif (y <= 9.6e-79) tmp = t / ((y * z) / 0.3333333333333333); else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.9e-18], N[(x - N[(y / N[(z / 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e-79], N[(t / N[(N[(y * z), $MachinePrecision] / 0.3333333333333333), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{-18}:\\
\;\;\;\;x - \frac{y}{\frac{z}{0.3333333333333333}}\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{-79}:\\
\;\;\;\;\frac{t}{\frac{y \cdot z}{0.3333333333333333}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.90000000000000005e-18Initial program 98.3%
sub-neg98.3%
distribute-frac-neg98.3%
associate-+l+98.3%
remove-double-neg98.3%
distribute-frac-neg98.3%
sub-neg98.3%
neg-mul-198.3%
associate-*l/98.1%
neg-mul-198.1%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 87.8%
Taylor expanded in x around 0 87.8%
metadata-eval87.8%
cancel-sign-sub-inv87.8%
*-commutative87.8%
associate-*l/87.8%
associate-/l*87.8%
Simplified87.8%
if -3.90000000000000005e-18 < y < 9.60000000000000023e-79Initial program 91.8%
sub-neg91.8%
distribute-frac-neg91.8%
associate-+l+91.8%
remove-double-neg91.8%
distribute-frac-neg91.8%
sub-neg91.8%
neg-mul-191.8%
associate-*l/91.8%
neg-mul-191.8%
times-frac87.5%
distribute-lft-out--87.5%
*-commutative87.5%
associate-/r*87.6%
metadata-eval87.6%
Simplified87.6%
Taylor expanded in z around 0 87.6%
Taylor expanded in x around 0 63.5%
Taylor expanded in y around 0 66.9%
*-commutative66.9%
associate-*r/66.9%
neg-mul-166.9%
*-commutative66.9%
Simplified66.9%
associate-*r/66.8%
neg-mul-166.8%
associate-*r*66.8%
metadata-eval66.8%
*-commutative66.8%
associate-/l*66.8%
*-commutative66.8%
Applied egg-rr66.8%
if 9.60000000000000023e-79 < y Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 86.9%
associate-*r/87.0%
*-commutative87.0%
Applied egg-rr87.0%
Final simplification78.7%
(FPCore (x y z t) :precision binary64 (+ x (* y (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + (y * (-0.3333333333333333 / z));
}
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 * ((-0.3333333333333333d0) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (y * (-0.3333333333333333 / z));
}
def code(x, y, z, t): return x + (y * (-0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(y * Float64(-0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + (y * (-0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{-0.3333333333333333}{z}
\end{array}
Initial program 96.1%
sub-neg96.1%
distribute-frac-neg96.1%
associate-+l+96.1%
remove-double-neg96.1%
distribute-frac-neg96.1%
sub-neg96.1%
neg-mul-196.1%
associate-*l/96.0%
neg-mul-196.0%
times-frac94.6%
distribute-lft-out--94.6%
*-commutative94.6%
associate-/r*94.6%
metadata-eval94.6%
Simplified94.6%
Taylor expanded in y around inf 63.1%
Final simplification63.1%
(FPCore (x y z t) :precision binary64 (- x (* 0.3333333333333333 (/ y z))))
double code(double x, double y, double z, double t) {
return x - (0.3333333333333333 * (y / z));
}
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 - (0.3333333333333333d0 * (y / z))
end function
public static double code(double x, double y, double z, double t) {
return x - (0.3333333333333333 * (y / z));
}
def code(x, y, z, t): return x - (0.3333333333333333 * (y / z))
function code(x, y, z, t) return Float64(x - Float64(0.3333333333333333 * Float64(y / z))) end
function tmp = code(x, y, z, t) tmp = x - (0.3333333333333333 * (y / z)); end
code[x_, y_, z_, t_] := N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - 0.3333333333333333 \cdot \frac{y}{z}
\end{array}
Initial program 96.1%
associate-+l-96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in t around 0 63.1%
Final simplification63.1%
(FPCore (x y z t) :precision binary64 (- x (/ y (* z 3.0))))
double code(double x, double y, double z, double t) {
return x - (y / (z * 3.0));
}
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))
end function
public static double code(double x, double y, double z, double t) {
return x - (y / (z * 3.0));
}
def code(x, y, z, t): return x - (y / (z * 3.0))
function code(x, y, z, t) return Float64(x - Float64(y / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x - (y / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y}{z \cdot 3}
\end{array}
Initial program 96.1%
sub-neg96.1%
distribute-frac-neg96.1%
associate-+l+96.1%
remove-double-neg96.1%
distribute-frac-neg96.1%
sub-neg96.1%
neg-mul-196.1%
associate-*l/96.0%
neg-mul-196.0%
times-frac94.6%
distribute-lft-out--94.6%
*-commutative94.6%
associate-/r*94.6%
metadata-eval94.6%
Simplified94.6%
Taylor expanded in y around inf 63.1%
Taylor expanded in x around 0 63.1%
metadata-eval63.1%
cancel-sign-sub-inv63.1%
*-commutative63.1%
associate-*l/63.1%
associate-/l*63.1%
Simplified63.1%
Taylor expanded in z around 0 63.1%
*-commutative63.1%
Simplified63.1%
Final simplification63.1%
(FPCore (x y z t) :precision binary64 (- x (/ (* y 0.3333333333333333) z)))
double code(double x, double y, double z, double t) {
return x - ((y * 0.3333333333333333) / z);
}
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 * 0.3333333333333333d0) / z)
end function
public static double code(double x, double y, double z, double t) {
return x - ((y * 0.3333333333333333) / z);
}
def code(x, y, z, t): return x - ((y * 0.3333333333333333) / z)
function code(x, y, z, t) return Float64(x - Float64(Float64(y * 0.3333333333333333) / z)) end
function tmp = code(x, y, z, t) tmp = x - ((y * 0.3333333333333333) / z); end
code[x_, y_, z_, t_] := N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot 0.3333333333333333}{z}
\end{array}
Initial program 96.1%
associate-+l-96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in t around 0 63.1%
associate-*r/63.1%
*-commutative63.1%
Applied egg-rr63.1%
Final simplification63.1%
(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.1%
sub-neg96.1%
distribute-frac-neg96.1%
associate-+l+96.1%
remove-double-neg96.1%
distribute-frac-neg96.1%
sub-neg96.1%
neg-mul-196.1%
associate-*l/96.0%
neg-mul-196.0%
times-frac94.6%
distribute-lft-out--94.6%
*-commutative94.6%
associate-/r*94.6%
metadata-eval94.6%
Simplified94.6%
Taylor expanded in x around inf 30.4%
Final simplification30.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 2023301
(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))))