
(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 17 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 (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / (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))) + (t / (y * (z * 3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}
\end{array}
Initial program 97.1%
Final simplification97.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.56e+69)
(- x (/ y (* z 3.0)))
(if (<= y -4.2)
(/ (* 0.3333333333333333 (- (/ t y) y)) z)
(if (<= y 1.25e-17)
(+ x (/ (/ t (* z 3.0)) y))
(- x (* y (/ 0.3333333333333333 z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.56e+69) {
tmp = x - (y / (z * 3.0));
} else if (y <= -4.2) {
tmp = (0.3333333333333333 * ((t / y) - y)) / z;
} else if (y <= 1.25e-17) {
tmp = x + ((t / (z * 3.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.56d+69)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= (-4.2d0)) then
tmp = (0.3333333333333333d0 * ((t / y) - y)) / z
else if (y <= 1.25d-17) then
tmp = x + ((t / (z * 3.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.56e+69) {
tmp = x - (y / (z * 3.0));
} else if (y <= -4.2) {
tmp = (0.3333333333333333 * ((t / y) - y)) / z;
} else if (y <= 1.25e-17) {
tmp = x + ((t / (z * 3.0)) / y);
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.56e+69: tmp = x - (y / (z * 3.0)) elif y <= -4.2: tmp = (0.3333333333333333 * ((t / y) - y)) / z elif y <= 1.25e-17: tmp = x + ((t / (z * 3.0)) / y) else: tmp = x - (y * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.56e+69) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= -4.2) tmp = Float64(Float64(0.3333333333333333 * Float64(Float64(t / y) - y)) / z); elseif (y <= 1.25e-17) tmp = Float64(x + Float64(Float64(t / Float64(z * 3.0)) / y)); else tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.56e+69) tmp = x - (y / (z * 3.0)); elseif (y <= -4.2) tmp = (0.3333333333333333 * ((t / y) - y)) / z; elseif (y <= 1.25e-17) tmp = x + ((t / (z * 3.0)) / y); else tmp = x - (y * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.56e+69], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.2], N[(N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.25e-17], N[(x + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.56 \cdot 10^{+69}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq -4.2:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-17}:\\
\;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.56000000000000007e69Initial program 97.8%
associate-*l*97.8%
*-commutative97.8%
Simplified97.8%
associate-+l-97.8%
*-commutative97.8%
associate-*l*97.8%
associate-/l/97.8%
sub-div99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 96.2%
if -1.56000000000000007e69 < y < -4.20000000000000018Initial program 99.8%
clear-num99.7%
inv-pow99.7%
*-commutative99.7%
*-un-lft-identity99.7%
times-frac99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 95.0%
fma-neg95.0%
*-commutative95.0%
fma-neg95.0%
associate-*r/95.0%
times-frac95.0%
associate-*l/95.1%
associate-*r/95.3%
div-sub95.3%
distribute-lft-out--95.3%
Simplified95.3%
if -4.20000000000000018 < y < 1.25e-17Initial program 96.3%
associate-*l*96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in y around 0 94.1%
+-commutative94.1%
*-commutative94.1%
associate-/r*89.9%
associate-*l/89.9%
associate-*r/89.9%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in t around 0 94.7%
associate-*r/94.6%
*-commutative94.6%
/-rgt-identity94.6%
associate-/l*94.7%
metadata-eval94.7%
associate-/l/94.8%
Simplified94.8%
if 1.25e-17 < y Initial program 97.2%
Simplified99.9%
Taylor expanded in t around 0 91.5%
neg-mul-191.5%
Simplified91.5%
Final simplification94.3%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* z (* y 3.0)))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / (z * (y * 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))) + (t / (z * (y * 3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / (z * (y * 3.0)));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / (z * (y * 3.0)))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(z * Float64(y * 3.0)))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0))); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(y \cdot 3\right)}
\end{array}
Initial program 97.1%
associate-*l*97.1%
*-commutative97.1%
Simplified97.1%
Final simplification97.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -7e-9)
(- x (/ y (* z 3.0)))
(if (<= y 0.068)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(- x (* y (/ 0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e-9) {
tmp = x - (y / (z * 3.0));
} else if (y <= 0.068) {
tmp = x + (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 <= (-7d-9)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= 0.068d0) then
tmp = x + (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 <= -7e-9) {
tmp = x - (y / (z * 3.0));
} else if (y <= 0.068) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7e-9: tmp = x - (y / (z * 3.0)) elif y <= 0.068: tmp = x + (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 <= -7e-9) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= 0.068) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(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 (y <= -7e-9) tmp = x - (y / (z * 3.0)); elseif (y <= 0.068) tmp = x + (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, -7e-9], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.068], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-9}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 0.068:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -6.9999999999999998e-9Initial program 98.4%
associate-*l*98.4%
*-commutative98.4%
Simplified98.4%
associate-+l-98.4%
*-commutative98.4%
associate-*l*98.4%
associate-/l/98.4%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 89.3%
if -6.9999999999999998e-9 < y < 0.068000000000000005Initial program 96.2%
Simplified91.7%
Taylor expanded in t around inf 94.8%
if 0.068000000000000005 < y Initial program 97.2%
Simplified99.9%
Taylor expanded in t around 0 91.5%
neg-mul-191.5%
Simplified91.5%
Final simplification92.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.5e-8)
(- x (/ y (* z 3.0)))
(if (<= y 0.0112)
(+ x (/ t (* 3.0 (* y z))))
(- x (* y (/ 0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e-8) {
tmp = x - (y / (z * 3.0));
} else if (y <= 0.0112) {
tmp = x + (t / (3.0 * (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 <= (-7.5d-8)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= 0.0112d0) then
tmp = x + (t / (3.0d0 * (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 <= -7.5e-8) {
tmp = x - (y / (z * 3.0));
} else if (y <= 0.0112) {
tmp = x + (t / (3.0 * (y * z)));
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.5e-8: tmp = x - (y / (z * 3.0)) elif y <= 0.0112: tmp = x + (t / (3.0 * (y * z))) else: tmp = x - (y * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.5e-8) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= 0.0112) tmp = Float64(x + Float64(t / Float64(3.0 * Float64(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 (y <= -7.5e-8) tmp = x - (y / (z * 3.0)); elseif (y <= 0.0112) tmp = x + (t / (3.0 * (y * z))); else tmp = x - (y * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.5e-8], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0112], N[(x + N[(t / N[(3.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-8}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 0.0112:\\
\;\;\;\;x + \frac{t}{3 \cdot \left(y \cdot z\right)}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -7.4999999999999997e-8Initial program 98.4%
associate-*l*98.4%
*-commutative98.4%
Simplified98.4%
associate-+l-98.4%
*-commutative98.4%
associate-*l*98.4%
associate-/l/98.4%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 89.3%
if -7.4999999999999997e-8 < y < 0.0111999999999999999Initial program 96.2%
Simplified91.7%
Taylor expanded in t around inf 94.8%
associate-*r/94.9%
*-commutative94.9%
frac-times90.5%
clear-num90.4%
frac-times94.9%
*-un-lft-identity94.9%
div-inv95.0%
metadata-eval95.0%
associate-*l*94.9%
Applied egg-rr94.9%
Taylor expanded in z around 0 94.9%
if 0.0111999999999999999 < y Initial program 97.2%
Simplified99.9%
Taylor expanded in t around 0 91.5%
neg-mul-191.5%
Simplified91.5%
Final simplification92.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.2e-8)
(- x (/ y (* z 3.0)))
(if (<= y 0.00016)
(+ x (/ t (* z (* y 3.0))))
(- x (* y (/ 0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e-8) {
tmp = x - (y / (z * 3.0));
} else if (y <= 0.00016) {
tmp = x + (t / (z * (y * 3.0)));
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.2d-8)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= 0.00016d0) then
tmp = x + (t / (z * (y * 3.0d0)))
else
tmp = x - (y * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e-8) {
tmp = x - (y / (z * 3.0));
} else if (y <= 0.00016) {
tmp = x + (t / (z * (y * 3.0)));
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.2e-8: tmp = x - (y / (z * 3.0)) elif y <= 0.00016: tmp = x + (t / (z * (y * 3.0))) else: tmp = x - (y * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.2e-8) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= 0.00016) tmp = Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))); else tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.2e-8) tmp = x - (y / (z * 3.0)); elseif (y <= 0.00016) tmp = x + (t / (z * (y * 3.0))); else tmp = x - (y * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.2e-8], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00016], N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-8}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 0.00016:\\
\;\;\;\;x + \frac{t}{z \cdot \left(y \cdot 3\right)}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.2000000000000002e-8Initial program 98.4%
associate-*l*98.4%
*-commutative98.4%
Simplified98.4%
associate-+l-98.4%
*-commutative98.4%
associate-*l*98.4%
associate-/l/98.4%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 89.3%
if -5.2000000000000002e-8 < y < 1.60000000000000013e-4Initial program 96.2%
Simplified91.7%
Taylor expanded in t around inf 94.8%
associate-*r/94.9%
*-commutative94.9%
frac-times90.5%
clear-num90.4%
frac-times94.9%
*-un-lft-identity94.9%
div-inv95.0%
metadata-eval95.0%
associate-*l*94.9%
Applied egg-rr94.9%
if 1.60000000000000013e-4 < y Initial program 97.2%
Simplified99.9%
Taylor expanded in t around 0 91.5%
neg-mul-191.5%
Simplified91.5%
Final simplification92.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.18e-7)
(- x (/ y (* z 3.0)))
(if (<= y 6.9e-7)
(+ x (/ (* t (/ 0.3333333333333333 z)) y))
(- x (* y (/ 0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.18e-7) {
tmp = x - (y / (z * 3.0));
} else if (y <= 6.9e-7) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.18d-7)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= 6.9d-7) then
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
else
tmp = x - (y * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.18e-7) {
tmp = x - (y / (z * 3.0));
} else if (y <= 6.9e-7) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.18e-7: tmp = x - (y / (z * 3.0)) elif y <= 6.9e-7: tmp = x + ((t * (0.3333333333333333 / z)) / y) else: tmp = x - (y * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.18e-7) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= 6.9e-7) tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); else tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.18e-7) tmp = x - (y / (z * 3.0)); elseif (y <= 6.9e-7) tmp = x + ((t * (0.3333333333333333 / z)) / y); else tmp = x - (y * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.18e-7], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.9e-7], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.18 \cdot 10^{-7}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 6.9 \cdot 10^{-7}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.18e-7Initial program 98.4%
associate-*l*98.4%
*-commutative98.4%
Simplified98.4%
associate-+l-98.4%
*-commutative98.4%
associate-*l*98.4%
associate-/l/98.4%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 89.3%
if -1.18e-7 < y < 6.8999999999999996e-7Initial program 96.2%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in y around 0 94.8%
+-commutative94.8%
*-commutative94.8%
associate-/r*90.5%
associate-*l/90.5%
associate-*r/90.5%
associate-*l/95.3%
Simplified95.3%
if 6.8999999999999996e-7 < y Initial program 97.2%
Simplified99.9%
Taylor expanded in t around 0 91.5%
neg-mul-191.5%
Simplified91.5%
Final simplification92.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.2e-10)
(- x (/ y (* z 3.0)))
(if (<= y 0.145)
(+ x (/ (/ t (* z 3.0)) y))
(- x (* y (/ 0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.2e-10) {
tmp = x - (y / (z * 3.0));
} else if (y <= 0.145) {
tmp = x + ((t / (z * 3.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 <= (-3.2d-10)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= 0.145d0) then
tmp = x + ((t / (z * 3.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 <= -3.2e-10) {
tmp = x - (y / (z * 3.0));
} else if (y <= 0.145) {
tmp = x + ((t / (z * 3.0)) / y);
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.2e-10: tmp = x - (y / (z * 3.0)) elif y <= 0.145: tmp = x + ((t / (z * 3.0)) / y) else: tmp = x - (y * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.2e-10) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= 0.145) tmp = Float64(x + Float64(Float64(t / Float64(z * 3.0)) / y)); else tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.2e-10) tmp = x - (y / (z * 3.0)); elseif (y <= 0.145) tmp = x + ((t / (z * 3.0)) / y); else tmp = x - (y * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.2e-10], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.145], N[(x + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 0.145:\\
\;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.19999999999999981e-10Initial program 98.4%
associate-*l*98.4%
*-commutative98.4%
Simplified98.4%
associate-+l-98.4%
*-commutative98.4%
associate-*l*98.4%
associate-/l/98.4%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 89.3%
if -3.19999999999999981e-10 < y < 0.14499999999999999Initial program 96.2%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in y around 0 94.8%
+-commutative94.8%
*-commutative94.8%
associate-/r*90.5%
associate-*l/90.5%
associate-*r/90.5%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in t around 0 95.4%
associate-*r/95.3%
*-commutative95.3%
/-rgt-identity95.3%
associate-/l*95.4%
metadata-eval95.4%
associate-/l/95.5%
Simplified95.5%
if 0.14499999999999999 < y Initial program 97.2%
Simplified99.9%
Taylor expanded in t around 0 91.5%
neg-mul-191.5%
Simplified91.5%
Final simplification92.7%
(FPCore (x y z t) :precision binary64 (+ x (* (/ 0.3333333333333333 z) (- (/ t y) y))))
double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 / z) * ((t / y) - 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 + ((0.3333333333333333d0 / z) * ((t / y) - y))
end function
public static double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 / z) * ((t / y) - y));
}
def code(x, y, z, t): return x + ((0.3333333333333333 / z) * ((t / y) - y))
function code(x, y, z, t) return Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y))) end
function tmp = code(x, y, z, t) tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)
\end{array}
Initial program 97.1%
Simplified96.1%
Final simplification96.1%
(FPCore (x y z t) :precision binary64 (+ x (/ (- (/ t y) y) (* z 3.0))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - 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 + (((t / y) - y) / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
def code(x, y, z, t): return x + (((t / y) - y) / (z * 3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Initial program 97.1%
associate-*l*97.1%
*-commutative97.1%
Simplified97.1%
associate-+l-97.1%
*-commutative97.1%
associate-*l*97.1%
associate-/l/95.3%
sub-div96.1%
Applied egg-rr96.1%
Final simplification96.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -0.38) (not (<= y 1.62e-44))) (* y (/ -0.3333333333333333 z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.38) || !(y <= 1.62e-44)) {
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 ((y <= (-0.38d0)) .or. (.not. (y <= 1.62d-44))) 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 ((y <= -0.38) || !(y <= 1.62e-44)) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -0.38) or not (y <= 1.62e-44): tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -0.38) || !(y <= 1.62e-44)) 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 ((y <= -0.38) || ~((y <= 1.62e-44))) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -0.38], N[Not[LessEqual[y, 1.62e-44]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.38 \lor \neg \left(y \leq 1.62 \cdot 10^{-44}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -0.38 or 1.6200000000000001e-44 < y Initial program 97.9%
clear-num97.9%
inv-pow97.9%
*-commutative97.9%
*-un-lft-identity97.9%
times-frac97.8%
metadata-eval97.8%
Applied egg-rr97.8%
Taylor expanded in y around inf 68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in y around 0 68.8%
associate-*r/68.8%
associate-*l/68.8%
metadata-eval68.8%
distribute-neg-frac68.8%
*-commutative68.8%
distribute-neg-frac68.8%
metadata-eval68.8%
Simplified68.8%
if -0.38 < y < 1.6200000000000001e-44Initial program 96.2%
associate-*l*96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in x around inf 30.8%
Final simplification51.4%
(FPCore (x y z t) :precision binary64 (if (<= y -6.5) (/ -0.3333333333333333 (/ z y)) (if (<= y 1.62e-44) x (* y (/ -0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.5) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 1.62e-44) {
tmp = x;
} else {
tmp = 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 <= (-6.5d0)) then
tmp = (-0.3333333333333333d0) / (z / y)
else if (y <= 1.62d-44) then
tmp = x
else
tmp = 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 <= -6.5) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 1.62e-44) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6.5: tmp = -0.3333333333333333 / (z / y) elif y <= 1.62e-44: tmp = x else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6.5) tmp = Float64(-0.3333333333333333 / Float64(z / y)); elseif (y <= 1.62e-44) tmp = x; else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -6.5) tmp = -0.3333333333333333 / (z / y); elseif (y <= 1.62e-44) tmp = x; else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6.5], N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.62e-44], x, N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 1.62 \cdot 10^{-44}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -6.5Initial program 98.4%
clear-num98.3%
inv-pow98.3%
*-commutative98.3%
*-un-lft-identity98.3%
times-frac98.3%
metadata-eval98.3%
Applied egg-rr98.3%
Taylor expanded in y around inf 70.8%
*-commutative70.8%
Simplified70.8%
*-commutative70.8%
clear-num70.8%
un-div-inv70.8%
Applied egg-rr70.8%
if -6.5 < y < 1.6200000000000001e-44Initial program 96.2%
associate-*l*96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in x around inf 30.8%
if 1.6200000000000001e-44 < y Initial program 97.3%
clear-num97.3%
inv-pow97.3%
*-commutative97.3%
*-un-lft-identity97.3%
times-frac97.3%
metadata-eval97.3%
Applied egg-rr97.3%
Taylor expanded in y around inf 66.6%
*-commutative66.6%
Simplified66.6%
Taylor expanded in y around 0 66.6%
associate-*r/66.6%
associate-*l/66.7%
metadata-eval66.7%
distribute-neg-frac66.7%
*-commutative66.7%
distribute-neg-frac66.7%
metadata-eval66.7%
Simplified66.7%
Final simplification51.4%
(FPCore (x y z t) :precision binary64 (if (<= y -0.0105) (/ y (* z -3.0)) (if (<= y 1.62e-44) x (* y (/ -0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.0105) {
tmp = y / (z * -3.0);
} else if (y <= 1.62e-44) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-0.0105d0)) then
tmp = y / (z * (-3.0d0))
else if (y <= 1.62d-44) then
tmp = x
else
tmp = y * ((-0.3333333333333333d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.0105) {
tmp = y / (z * -3.0);
} else if (y <= 1.62e-44) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -0.0105: tmp = y / (z * -3.0) elif y <= 1.62e-44: tmp = x else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -0.0105) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= 1.62e-44) tmp = x; else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -0.0105) tmp = y / (z * -3.0); elseif (y <= 1.62e-44) tmp = x; else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -0.0105], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.62e-44], x, N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0105:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 1.62 \cdot 10^{-44}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -0.0105000000000000007Initial program 98.4%
clear-num98.3%
inv-pow98.3%
*-commutative98.3%
*-un-lft-identity98.3%
times-frac98.3%
metadata-eval98.3%
Applied egg-rr98.3%
Taylor expanded in y around inf 70.8%
*-commutative70.8%
Simplified70.8%
frac-2neg70.8%
associate-*l/70.7%
associate-*r/70.8%
clear-num70.7%
metadata-eval70.7%
frac-2neg70.7%
div-inv70.7%
metadata-eval70.7%
un-div-inv70.9%
add-sqr-sqrt70.7%
sqrt-unprod46.2%
sqr-neg46.2%
sqrt-unprod0.0%
add-sqr-sqrt2.8%
frac-2neg2.8%
add-sqr-sqrt2.8%
sqrt-unprod2.4%
sqr-neg2.4%
sqrt-unprod0.0%
add-sqr-sqrt70.9%
distribute-rgt-neg-in70.9%
metadata-eval70.9%
Applied egg-rr70.9%
if -0.0105000000000000007 < y < 1.6200000000000001e-44Initial program 96.2%
associate-*l*96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in x around inf 30.8%
if 1.6200000000000001e-44 < y Initial program 97.3%
clear-num97.3%
inv-pow97.3%
*-commutative97.3%
*-un-lft-identity97.3%
times-frac97.3%
metadata-eval97.3%
Applied egg-rr97.3%
Taylor expanded in y around inf 66.6%
*-commutative66.6%
Simplified66.6%
Taylor expanded in y around 0 66.6%
associate-*r/66.6%
associate-*l/66.7%
metadata-eval66.7%
distribute-neg-frac66.7%
*-commutative66.7%
distribute-neg-frac66.7%
metadata-eval66.7%
Simplified66.7%
Final simplification51.5%
(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 97.1%
associate-*l*97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in t around 0 63.6%
Final simplification63.6%
(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 97.1%
associate-*l*97.1%
*-commutative97.1%
Simplified97.1%
associate-+l-97.1%
*-commutative97.1%
associate-*l*97.1%
associate-/l/95.3%
sub-div96.1%
Applied egg-rr96.1%
Taylor expanded in y around inf 63.6%
Final simplification63.6%
(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 97.1%
Simplified96.1%
Taylor expanded in t around 0 63.6%
neg-mul-163.6%
Simplified63.6%
Final simplification63.6%
(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 97.1%
associate-*l*97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in x around inf 26.0%
Final simplification26.0%
(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 2023340
(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))))