
(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 15 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 (or (<= y -3.2e-193) (not (<= y 3.25e-96))) (+ x (/ (- (/ t y) y) (* z 3.0))) (/ (+ (* 0.3333333333333333 (/ t z)) (* x y)) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.2e-193) || !(y <= 3.25e-96)) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = ((0.3333333333333333 * (t / z)) + (x * y)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-3.2d-193)) .or. (.not. (y <= 3.25d-96))) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = ((0.3333333333333333d0 * (t / z)) + (x * y)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.2e-193) || !(y <= 3.25e-96)) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = ((0.3333333333333333 * (t / z)) + (x * y)) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.2e-193) or not (y <= 3.25e-96): tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = ((0.3333333333333333 * (t / z)) + (x * y)) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.2e-193) || !(y <= 3.25e-96)) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(Float64(Float64(0.3333333333333333 * Float64(t / z)) + Float64(x * y)) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.2e-193) || ~((y <= 3.25e-96))) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = ((0.3333333333333333 * (t / z)) + (x * y)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.2e-193], N[Not[LessEqual[y, 3.25e-96]], $MachinePrecision]], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-193} \lor \neg \left(y \leq 3.25 \cdot 10^{-96}\right):\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{z} + x \cdot y}{y}\\
\end{array}
\end{array}
if y < -3.20000000000000006e-193 or 3.25000000000000001e-96 < y Initial program 99.3%
+-commutative99.3%
associate-+r-99.3%
+-commutative99.3%
associate--l+99.3%
sub-neg99.3%
remove-double-neg99.3%
distribute-frac-neg99.3%
distribute-neg-in99.3%
remove-double-neg99.3%
sub-neg99.3%
neg-mul-199.3%
times-frac99.4%
distribute-frac-neg99.4%
neg-mul-199.4%
*-commutative99.4%
associate-/l*99.3%
*-commutative99.3%
Simplified99.3%
metadata-eval99.3%
associate-/r*99.3%
*-commutative99.3%
associate-*l/99.4%
*-un-lft-identity99.4%
Applied egg-rr99.4%
if -3.20000000000000006e-193 < y < 3.25000000000000001e-96Initial program 91.7%
+-commutative91.7%
associate-+r-91.7%
+-commutative91.7%
associate--l+91.7%
sub-neg91.7%
remove-double-neg91.7%
distribute-frac-neg91.7%
distribute-neg-in91.7%
remove-double-neg91.7%
sub-neg91.7%
neg-mul-191.7%
times-frac85.2%
distribute-frac-neg85.2%
neg-mul-185.2%
*-commutative85.2%
associate-/l*85.2%
*-commutative85.2%
Simplified85.1%
Taylor expanded in y around 0 99.7%
Final simplification99.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0))))))
(if (<= t_1 (- INFINITY))
(+ x (/ 1.0 (/ z (* 0.3333333333333333 (- (/ t y) y)))))
t_1)))
double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x + (1.0 / (z / (0.3333333333333333 * ((t / y) - y))));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x + (1.0 / (z / (0.3333333333333333 * ((t / y) - y))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))) tmp = 0 if t_1 <= -math.inf: tmp = x + (1.0 / (z / (0.3333333333333333 * ((t / y) - y)))) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x + Float64(1.0 / Float64(z / Float64(0.3333333333333333 * Float64(Float64(t / y) - y))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); tmp = 0.0; if (t_1 <= -Inf) tmp = x + (1.0 / (z / (0.3333333333333333 * ((t / y) - y)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(1.0 / N[(z / N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x + \frac{1}{\frac{z}{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) < -inf.0Initial program 86.9%
+-commutative86.9%
associate-+r-86.9%
+-commutative86.9%
associate--l+86.9%
sub-neg86.9%
remove-double-neg86.9%
distribute-frac-neg86.9%
distribute-neg-in86.9%
remove-double-neg86.9%
sub-neg86.9%
neg-mul-186.9%
times-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.9%
associate-*l/99.9%
clear-num100.0%
Applied egg-rr100.0%
if -inf.0 < (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) Initial program 99.3%
Final simplification99.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -202000000000.0) (not (<= y 9.2e+20))) (- x (/ y (* z 3.0))) (+ x (/ t (* y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -202000000000.0) || !(y <= 9.2e+20)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (t / (y * (z * 3.0)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-202000000000.0d0)) .or. (.not. (y <= 9.2d+20))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + (t / (y * (z * 3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -202000000000.0) || !(y <= 9.2e+20)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (t / (y * (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -202000000000.0) or not (y <= 9.2e+20): tmp = x - (y / (z * 3.0)) else: tmp = x + (t / (y * (z * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -202000000000.0) || !(y <= 9.2e+20)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(t / Float64(y * Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -202000000000.0) || ~((y <= 9.2e+20))) tmp = x - (y / (z * 3.0)); else tmp = x + (t / (y * (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -202000000000.0], N[Not[LessEqual[y, 9.2e+20]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -202000000000 \lor \neg \left(y \leq 9.2 \cdot 10^{+20}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\end{array}
\end{array}
if y < -2.02e11 or 9.2e20 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.8%
*-commutative99.8%
Simplified99.8%
metadata-eval99.8%
associate-/r*99.8%
*-commutative99.8%
associate-*l/99.9%
*-un-lft-identity99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 93.8%
neg-mul-193.8%
Simplified93.8%
if -2.02e11 < y < 9.2e20Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
+-commutative94.6%
associate--l+94.6%
sub-neg94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
distribute-neg-in94.6%
remove-double-neg94.6%
sub-neg94.6%
neg-mul-194.6%
times-frac91.0%
distribute-frac-neg91.0%
neg-mul-191.0%
*-commutative91.0%
associate-/l*91.0%
*-commutative91.0%
Simplified90.9%
Taylor expanded in t around inf 89.7%
*-commutative89.7%
associate-*l/89.6%
associate-*r/89.6%
associate-/l/89.7%
Simplified89.7%
clear-num89.6%
un-div-inv89.6%
div-inv89.6%
clear-num89.6%
div-inv89.7%
metadata-eval89.7%
Applied egg-rr89.7%
Final simplification91.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.35e+17) (not (<= y 7.8e+20))) (- x (/ y (* z 3.0))) (+ x (* 0.3333333333333333 (/ t (* y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.35e+17) || !(y <= 7.8e+20)) {
tmp = x - (y / (z * 3.0));
} 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 <= (-1.35d+17)) .or. (.not. (y <= 7.8d+20))) then
tmp = x - (y / (z * 3.0d0))
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 <= -1.35e+17) || !(y <= 7.8e+20)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (y * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.35e+17) or not (y <= 7.8e+20): tmp = x - (y / (z * 3.0)) else: tmp = x + (0.3333333333333333 * (t / (y * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.35e+17) || !(y <= 7.8e+20)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); 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 <= -1.35e+17) || ~((y <= 7.8e+20))) tmp = x - (y / (z * 3.0)); else tmp = x + (0.3333333333333333 * (t / (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.35e+17], N[Not[LessEqual[y, 7.8e+20]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $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 -1.35 \cdot 10^{+17} \lor \neg \left(y \leq 7.8 \cdot 10^{+20}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -1.35e17 or 7.8e20 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.8%
*-commutative99.8%
Simplified99.8%
metadata-eval99.8%
associate-/r*99.8%
*-commutative99.8%
associate-*l/99.9%
*-un-lft-identity99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 93.8%
neg-mul-193.8%
Simplified93.8%
if -1.35e17 < y < 7.8e20Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
+-commutative94.6%
associate--l+94.6%
sub-neg94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
distribute-neg-in94.6%
remove-double-neg94.6%
sub-neg94.6%
neg-mul-194.6%
times-frac91.0%
distribute-frac-neg91.0%
neg-mul-191.0%
*-commutative91.0%
associate-/l*91.0%
*-commutative91.0%
Simplified90.9%
Taylor expanded in t around inf 89.7%
Final simplification91.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -420000.0) (not (<= y 8.2e-165))) (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -420000.0) || !(y <= 8.2e-165)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = (t / (z * 3.0)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-420000.0d0)) .or. (.not. (y <= 8.2d-165))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = (t / (z * 3.0d0)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -420000.0) || !(y <= 8.2e-165)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = (t / (z * 3.0)) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -420000.0) or not (y <= 8.2e-165): tmp = x - (y / (z * 3.0)) else: tmp = (t / (z * 3.0)) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -420000.0) || !(y <= 8.2e-165)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(Float64(t / Float64(z * 3.0)) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -420000.0) || ~((y <= 8.2e-165))) tmp = x - (y / (z * 3.0)); else tmp = (t / (z * 3.0)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -420000.0], N[Not[LessEqual[y, 8.2e-165]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -420000 \lor \neg \left(y \leq 8.2 \cdot 10^{-165}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t}{z \cdot 3}}{y}\\
\end{array}
\end{array}
if y < -4.2e5 or 8.2000000000000004e-165 < y Initial program 99.2%
+-commutative99.2%
associate-+r-99.2%
+-commutative99.2%
associate--l+99.2%
sub-neg99.2%
remove-double-neg99.2%
distribute-frac-neg99.2%
distribute-neg-in99.2%
remove-double-neg99.2%
sub-neg99.2%
neg-mul-199.2%
times-frac98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.7%
*-commutative98.7%
Simplified98.6%
metadata-eval98.6%
associate-/r*98.7%
*-commutative98.7%
associate-*l/98.7%
*-un-lft-identity98.7%
Applied egg-rr98.7%
Taylor expanded in t around 0 86.3%
neg-mul-186.3%
Simplified86.3%
if -4.2e5 < y < 8.2000000000000004e-165Initial program 93.3%
+-commutative93.3%
associate-+r-93.3%
+-commutative93.3%
associate--l+93.3%
sub-neg93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
sub-neg93.3%
neg-mul-193.3%
times-frac89.2%
distribute-frac-neg89.2%
neg-mul-189.2%
*-commutative89.2%
associate-/l*89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y around 0 94.8%
Taylor expanded in t around inf 72.6%
associate-*r/72.6%
associate-*l/72.5%
associate-/r/71.5%
Simplified71.5%
associate-/r/72.5%
Applied egg-rr72.5%
*-commutative72.5%
clear-num72.5%
un-div-inv72.6%
div-inv72.7%
metadata-eval72.7%
Applied egg-rr72.7%
Final simplification81.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -550000.0) (not (<= y 8.2e-165))) (+ x (/ (* y -0.3333333333333333) z)) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -550000.0) || !(y <= 8.2e-165)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = (t / (z * 3.0)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-550000.0d0)) .or. (.not. (y <= 8.2d-165))) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else
tmp = (t / (z * 3.0d0)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -550000.0) || !(y <= 8.2e-165)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = (t / (z * 3.0)) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -550000.0) or not (y <= 8.2e-165): tmp = x + ((y * -0.3333333333333333) / z) else: tmp = (t / (z * 3.0)) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -550000.0) || !(y <= 8.2e-165)) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); else tmp = Float64(Float64(t / Float64(z * 3.0)) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -550000.0) || ~((y <= 8.2e-165))) tmp = x + ((y * -0.3333333333333333) / z); else tmp = (t / (z * 3.0)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -550000.0], N[Not[LessEqual[y, 8.2e-165]], $MachinePrecision]], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -550000 \lor \neg \left(y \leq 8.2 \cdot 10^{-165}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t}{z \cdot 3}}{y}\\
\end{array}
\end{array}
if y < -5.5e5 or 8.2000000000000004e-165 < y Initial program 99.2%
+-commutative99.2%
associate-+r-99.2%
+-commutative99.2%
associate--l+99.2%
sub-neg99.2%
remove-double-neg99.2%
distribute-frac-neg99.2%
distribute-neg-in99.2%
remove-double-neg99.2%
sub-neg99.2%
neg-mul-199.2%
times-frac98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.7%
*-commutative98.7%
Simplified98.6%
Taylor expanded in t around 0 86.2%
*-commutative86.2%
associate-*l/86.2%
Simplified86.2%
if -5.5e5 < y < 8.2000000000000004e-165Initial program 93.3%
+-commutative93.3%
associate-+r-93.3%
+-commutative93.3%
associate--l+93.3%
sub-neg93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
sub-neg93.3%
neg-mul-193.3%
times-frac89.2%
distribute-frac-neg89.2%
neg-mul-189.2%
*-commutative89.2%
associate-/l*89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y around 0 94.8%
Taylor expanded in t around inf 72.6%
associate-*r/72.6%
associate-*l/72.5%
associate-/r/71.5%
Simplified71.5%
associate-/r/72.5%
Applied egg-rr72.5%
*-commutative72.5%
clear-num72.5%
un-div-inv72.6%
div-inv72.7%
metadata-eval72.7%
Applied egg-rr72.7%
Final simplification81.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -420000.0) (not (<= y 6e-165))) (+ x (/ (* y -0.3333333333333333) z)) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -420000.0) || !(y <= 6e-165)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-420000.0d0)) .or. (.not. (y <= 6d-165))) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else
tmp = 0.3333333333333333d0 * ((t / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -420000.0) || !(y <= 6e-165)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -420000.0) or not (y <= 6e-165): tmp = x + ((y * -0.3333333333333333) / z) else: tmp = 0.3333333333333333 * ((t / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -420000.0) || !(y <= 6e-165)) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); else tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -420000.0) || ~((y <= 6e-165))) tmp = x + ((y * -0.3333333333333333) / z); else tmp = 0.3333333333333333 * ((t / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -420000.0], N[Not[LessEqual[y, 6e-165]], $MachinePrecision]], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -420000 \lor \neg \left(y \leq 6 \cdot 10^{-165}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -4.2e5 or 5.99999999999999958e-165 < y Initial program 99.2%
+-commutative99.2%
associate-+r-99.2%
+-commutative99.2%
associate--l+99.2%
sub-neg99.2%
remove-double-neg99.2%
distribute-frac-neg99.2%
distribute-neg-in99.2%
remove-double-neg99.2%
sub-neg99.2%
neg-mul-199.2%
times-frac98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.7%
*-commutative98.7%
Simplified98.6%
Taylor expanded in t around 0 86.2%
*-commutative86.2%
associate-*l/86.2%
Simplified86.2%
if -4.2e5 < y < 5.99999999999999958e-165Initial program 93.3%
+-commutative93.3%
associate-+r-93.3%
+-commutative93.3%
associate--l+93.3%
sub-neg93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
sub-neg93.3%
neg-mul-193.3%
times-frac89.2%
distribute-frac-neg89.2%
neg-mul-189.2%
*-commutative89.2%
associate-/l*89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y around 0 94.8%
Taylor expanded in t around inf 72.6%
associate-*r/72.6%
associate-*l/72.5%
associate-/r/71.5%
Simplified71.5%
div-inv71.5%
associate-/l*71.6%
clear-num72.6%
Applied egg-rr72.6%
Final simplification81.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -420000.0) (not (<= y 8.2e-165))) (+ x (* -0.3333333333333333 (/ y z))) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -420000.0) || !(y <= 8.2e-165)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-420000.0d0)) .or. (.not. (y <= 8.2d-165))) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else
tmp = 0.3333333333333333d0 * ((t / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -420000.0) || !(y <= 8.2e-165)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -420000.0) or not (y <= 8.2e-165): tmp = x + (-0.3333333333333333 * (y / z)) else: tmp = 0.3333333333333333 * ((t / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -420000.0) || !(y <= 8.2e-165)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); else tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -420000.0) || ~((y <= 8.2e-165))) tmp = x + (-0.3333333333333333 * (y / z)); else tmp = 0.3333333333333333 * ((t / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -420000.0], N[Not[LessEqual[y, 8.2e-165]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -420000 \lor \neg \left(y \leq 8.2 \cdot 10^{-165}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -4.2e5 or 8.2000000000000004e-165 < y Initial program 99.2%
+-commutative99.2%
associate-+r-99.2%
+-commutative99.2%
associate--l+99.2%
sub-neg99.2%
remove-double-neg99.2%
distribute-frac-neg99.2%
distribute-neg-in99.2%
remove-double-neg99.2%
sub-neg99.2%
neg-mul-199.2%
times-frac98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.7%
*-commutative98.7%
Simplified98.6%
Taylor expanded in t around 0 86.2%
if -4.2e5 < y < 8.2000000000000004e-165Initial program 93.3%
+-commutative93.3%
associate-+r-93.3%
+-commutative93.3%
associate--l+93.3%
sub-neg93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
sub-neg93.3%
neg-mul-193.3%
times-frac89.2%
distribute-frac-neg89.2%
neg-mul-189.2%
*-commutative89.2%
associate-/l*89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y around 0 94.8%
Taylor expanded in t around inf 72.6%
associate-*r/72.6%
associate-*l/72.5%
associate-/r/71.5%
Simplified71.5%
div-inv71.5%
associate-/l*71.6%
clear-num72.6%
Applied egg-rr72.6%
Final simplification81.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -420000.0)
(+ x (* -0.3333333333333333 (/ y z)))
(if (<= y 8.2e-165)
(* 0.3333333333333333 (/ (/ t z) y))
(+ x (/ -0.3333333333333333 (/ z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -420000.0) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 8.2e-165) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x + (-0.3333333333333333 / (z / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-420000.0d0)) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else if (y <= 8.2d-165) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else
tmp = x + ((-0.3333333333333333d0) / (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -420000.0) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 8.2e-165) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x + (-0.3333333333333333 / (z / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -420000.0: tmp = x + (-0.3333333333333333 * (y / z)) elif y <= 8.2e-165: tmp = 0.3333333333333333 * ((t / z) / y) else: tmp = x + (-0.3333333333333333 / (z / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -420000.0) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); elseif (y <= 8.2e-165) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); else tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -420000.0) tmp = x + (-0.3333333333333333 * (y / z)); elseif (y <= 8.2e-165) tmp = 0.3333333333333333 * ((t / z) / y); else tmp = x + (-0.3333333333333333 / (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -420000.0], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e-165], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -420000:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-165}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\end{array}
\end{array}
if y < -4.2e5Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
sub-neg99.9%
neg-mul-199.9%
times-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.8%
Taylor expanded in t around 0 93.9%
if -4.2e5 < y < 8.2000000000000004e-165Initial program 93.3%
+-commutative93.3%
associate-+r-93.3%
+-commutative93.3%
associate--l+93.3%
sub-neg93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
sub-neg93.3%
neg-mul-193.3%
times-frac89.2%
distribute-frac-neg89.2%
neg-mul-189.2%
*-commutative89.2%
associate-/l*89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y around 0 94.8%
Taylor expanded in t around inf 72.6%
associate-*r/72.6%
associate-*l/72.5%
associate-/r/71.5%
Simplified71.5%
div-inv71.5%
associate-/l*71.6%
clear-num72.6%
Applied egg-rr72.6%
if 8.2000000000000004e-165 < y Initial program 98.8%
+-commutative98.8%
associate-+r-98.8%
+-commutative98.8%
associate--l+98.8%
sub-neg98.8%
remove-double-neg98.8%
distribute-frac-neg98.8%
distribute-neg-in98.8%
remove-double-neg98.8%
sub-neg98.8%
neg-mul-198.8%
times-frac98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
associate-/l*98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in t around 0 81.5%
*-commutative81.5%
associate-*l/81.6%
Simplified81.6%
clear-num81.6%
inv-pow81.6%
*-un-lft-identity81.6%
*-commutative81.6%
times-frac81.6%
metadata-eval81.6%
Applied egg-rr81.6%
unpow-181.6%
associate-/r*81.6%
metadata-eval81.6%
Simplified81.6%
(FPCore (x y z t) :precision binary64 (if (<= z -1.26e+33) x (if (<= z 2.65e+67) (* 0.3333333333333333 (/ (/ t z) y)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.26e+33) {
tmp = x;
} else if (z <= 2.65e+67) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.26d+33)) then
tmp = x
else if (z <= 2.65d+67) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.26e+33) {
tmp = x;
} else if (z <= 2.65e+67) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.26e+33: tmp = x elif z <= 2.65e+67: tmp = 0.3333333333333333 * ((t / z) / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.26e+33) tmp = x; elseif (z <= 2.65e+67) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.26e+33) tmp = x; elseif (z <= 2.65e+67) tmp = 0.3333333333333333 * ((t / z) / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.26e+33], x, If[LessEqual[z, 2.65e+67], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.26 \cdot 10^{+33}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{+67}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.26e33 or 2.65e67 < z Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate--l+99.7%
sub-neg99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
sub-neg99.7%
neg-mul-199.7%
times-frac90.8%
distribute-frac-neg90.8%
neg-mul-190.8%
*-commutative90.8%
associate-/l*90.8%
*-commutative90.8%
Simplified90.7%
Taylor expanded in x around inf 58.8%
if -1.26e33 < z < 2.65e67Initial program 95.1%
+-commutative95.1%
associate-+r-95.1%
+-commutative95.1%
associate--l+95.1%
sub-neg95.1%
remove-double-neg95.1%
distribute-frac-neg95.1%
distribute-neg-in95.1%
remove-double-neg95.1%
sub-neg95.1%
neg-mul-195.1%
times-frac99.2%
distribute-frac-neg99.2%
neg-mul-199.2%
*-commutative99.2%
associate-/l*99.2%
*-commutative99.2%
Simplified99.1%
Taylor expanded in y around 0 61.4%
Taylor expanded in t around inf 49.7%
associate-*r/49.7%
associate-*l/49.7%
associate-/r/49.7%
Simplified49.7%
div-inv49.7%
associate-/l*49.7%
clear-num49.7%
Applied egg-rr49.7%
(FPCore (x y z t) :precision binary64 (if (<= x -9e+66) x (if (<= x 8.5e-46) (* 0.3333333333333333 (/ t (* y z))) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -9e+66) {
tmp = x;
} else if (x <= 8.5e-46) {
tmp = 0.3333333333333333 * (t / (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 (x <= (-9d+66)) then
tmp = x
else if (x <= 8.5d-46) then
tmp = 0.3333333333333333d0 * (t / (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 (x <= -9e+66) {
tmp = x;
} else if (x <= 8.5e-46) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -9e+66: tmp = x elif x <= 8.5e-46: tmp = 0.3333333333333333 * (t / (y * z)) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -9e+66) tmp = x; elseif (x <= 8.5e-46) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -9e+66) tmp = x; elseif (x <= 8.5e-46) tmp = 0.3333333333333333 * (t / (y * z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -9e+66], x, If[LessEqual[x, 8.5e-46], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+66}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-46}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -8.9999999999999997e66 or 8.5000000000000001e-46 < x Initial program 98.4%
+-commutative98.4%
associate-+r-98.4%
+-commutative98.4%
associate--l+98.4%
sub-neg98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
distribute-neg-in98.4%
remove-double-neg98.4%
sub-neg98.4%
neg-mul-198.4%
times-frac94.8%
distribute-frac-neg94.8%
neg-mul-194.8%
*-commutative94.8%
associate-/l*94.8%
*-commutative94.8%
Simplified94.8%
Taylor expanded in x around inf 55.3%
if -8.9999999999999997e66 < x < 8.5000000000000001e-46Initial program 96.0%
+-commutative96.0%
associate-+r-96.0%
+-commutative96.0%
associate--l+96.0%
sub-neg96.0%
remove-double-neg96.0%
distribute-frac-neg96.0%
distribute-neg-in96.0%
remove-double-neg96.0%
sub-neg96.0%
neg-mul-196.0%
times-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.0%
*-commutative96.0%
Simplified95.9%
Taylor expanded in y around 0 58.2%
Taylor expanded in t around inf 50.3%
associate-*r/50.3%
associate-*l/50.2%
associate-/r/49.5%
Simplified49.5%
Taylor expanded in z around 0 44.3%
(FPCore (x y z t) :precision binary64 (+ (+ x (/ t (* z (* y 3.0)))) (/ y (* z -3.0))))
double code(double x, double y, double z, double t) {
return (x + (t / (z * (y * 3.0)))) + (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 / (z * (y * 3.0d0)))) + (y / (z * (-3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
}
def code(x, y, z, t): return (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0))
function code(x, y, z, t) return Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(y / Float64(z * -3.0))) end
function tmp = code(x, y, z, t) tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)); end
code[x_, y_, z_, t_] := N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}
\end{array}
Initial program 97.2%
+-commutative97.2%
associate-+r-97.2%
sub-neg97.2%
associate-*l*97.2%
*-commutative97.2%
distribute-frac-neg297.2%
distribute-rgt-neg-in97.2%
metadata-eval97.2%
Simplified97.2%
Final simplification97.2%
(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.2%
+-commutative97.2%
associate-+r-97.2%
+-commutative97.2%
associate--l+97.2%
sub-neg97.2%
remove-double-neg97.2%
distribute-frac-neg97.2%
distribute-neg-in97.2%
remove-double-neg97.2%
sub-neg97.2%
neg-mul-197.2%
times-frac95.5%
distribute-frac-neg95.5%
neg-mul-195.5%
*-commutative95.5%
associate-/l*95.4%
*-commutative95.4%
Simplified95.3%
metadata-eval95.3%
associate-/r*95.4%
*-commutative95.4%
associate-*l/95.5%
*-un-lft-identity95.5%
Applied egg-rr95.5%
(FPCore (x y z t) :precision binary64 (+ x (* (- (/ t y) y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - 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 + (((t / y) - y) * (0.3333333333333333d0 / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) * (0.3333333333333333 / z));
}
def code(x, y, z, t): return x + (((t / y) - y) * (0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) * (0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}
\end{array}
Initial program 97.2%
+-commutative97.2%
associate-+r-97.2%
+-commutative97.2%
associate--l+97.2%
sub-neg97.2%
remove-double-neg97.2%
distribute-frac-neg97.2%
distribute-neg-in97.2%
remove-double-neg97.2%
sub-neg97.2%
neg-mul-197.2%
times-frac95.5%
distribute-frac-neg95.5%
neg-mul-195.5%
*-commutative95.5%
associate-/l*95.4%
*-commutative95.4%
Simplified95.3%
Final simplification95.3%
(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.2%
+-commutative97.2%
associate-+r-97.2%
+-commutative97.2%
associate--l+97.2%
sub-neg97.2%
remove-double-neg97.2%
distribute-frac-neg97.2%
distribute-neg-in97.2%
remove-double-neg97.2%
sub-neg97.2%
neg-mul-197.2%
times-frac95.5%
distribute-frac-neg95.5%
neg-mul-195.5%
*-commutative95.5%
associate-/l*95.4%
*-commutative95.4%
Simplified95.3%
Taylor expanded in x around inf 32.8%
(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 2024139
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))