
(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 12 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 2000000.0) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2000000.0) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (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 (t <= 2000000.0d0) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = (x - (y / (z * 3.0d0))) + (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 (t <= 2000000.0) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 2000000.0: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 2000000.0) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 2000000.0) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 2000000.0], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2000000:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\end{array}
\end{array}
if t < 2e6Initial program 94.3%
+-commutative94.3%
associate-+r-94.3%
+-commutative94.3%
associate--l+94.3%
sub-neg94.3%
remove-double-neg94.3%
distribute-frac-neg94.3%
distribute-neg-in94.3%
remove-double-neg94.3%
sub-neg94.3%
neg-mul-194.3%
times-frac99.3%
distribute-frac-neg99.3%
neg-mul-199.3%
*-commutative99.3%
associate-/l*99.3%
*-commutative99.3%
Simplified99.2%
*-commutative99.2%
clear-num99.2%
div-inv99.3%
metadata-eval99.3%
un-div-inv99.3%
Applied egg-rr99.3%
if 2e6 < t Initial program 99.8%
Final simplification99.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -9e+34)
(- x (/ (/ y 3.0) z))
(if (<= y -3.9e-291)
(+ x (/ (/ t y) (* z 3.0)))
(if (<= y 170000000.0)
(+ x (/ t (* y (* z 3.0))))
(+ x (* y (/ -0.3333333333333333 z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9e+34) {
tmp = x - ((y / 3.0) / z);
} else if (y <= -3.9e-291) {
tmp = x + ((t / y) / (z * 3.0));
} else if (y <= 170000000.0) {
tmp = x + (t / (y * (z * 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 <= (-9d+34)) then
tmp = x - ((y / 3.0d0) / z)
else if (y <= (-3.9d-291)) then
tmp = x + ((t / y) / (z * 3.0d0))
else if (y <= 170000000.0d0) then
tmp = x + (t / (y * (z * 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 <= -9e+34) {
tmp = x - ((y / 3.0) / z);
} else if (y <= -3.9e-291) {
tmp = x + ((t / y) / (z * 3.0));
} else if (y <= 170000000.0) {
tmp = x + (t / (y * (z * 3.0)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9e+34: tmp = x - ((y / 3.0) / z) elif y <= -3.9e-291: tmp = x + ((t / y) / (z * 3.0)) elif y <= 170000000.0: tmp = x + (t / (y * (z * 3.0))) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9e+34) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); elseif (y <= -3.9e-291) tmp = Float64(x + Float64(Float64(t / y) / Float64(z * 3.0))); elseif (y <= 170000000.0) tmp = Float64(x + Float64(t / Float64(y * Float64(z * 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 <= -9e+34) tmp = x - ((y / 3.0) / z); elseif (y <= -3.9e-291) tmp = x + ((t / y) / (z * 3.0)); elseif (y <= 170000000.0) tmp = x + (t / (y * (z * 3.0))); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9e+34], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.9e-291], N[(x + N[(N[(t / y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 170000000.0], N[(x + N[(t / N[(y * N[(z * 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 -9 \cdot 10^{+34}:\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{elif}\;y \leq -3.9 \cdot 10^{-291}:\\
\;\;\;\;x + \frac{\frac{t}{y}}{z \cdot 3}\\
\mathbf{elif}\;y \leq 170000000:\\
\;\;\;\;x + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -9.0000000000000001e34Initial program 99.8%
Taylor expanded in t around 0 95.5%
metadata-eval95.5%
times-frac95.6%
*-un-lft-identity95.6%
associate-/r*95.7%
Applied egg-rr95.7%
if -9.0000000000000001e34 < y < -3.90000000000000016e-291Initial program 87.4%
+-commutative87.4%
associate-+r-87.4%
+-commutative87.4%
associate--l+87.4%
sub-neg87.4%
remove-double-neg87.4%
distribute-frac-neg87.4%
distribute-neg-in87.4%
remove-double-neg87.4%
sub-neg87.4%
neg-mul-187.4%
times-frac94.4%
distribute-frac-neg94.4%
neg-mul-194.4%
*-commutative94.4%
associate-/l*94.4%
*-commutative94.4%
Simplified94.3%
Taylor expanded in t around inf 81.9%
*-commutative81.9%
associate-*l/81.8%
associate-*r/81.8%
metadata-eval81.8%
associate-*r/81.8%
associate-*r/81.8%
metadata-eval81.8%
*-commutative81.8%
associate-/r*81.8%
Simplified81.8%
div-inv81.8%
metadata-eval81.8%
associate-/r*81.9%
*-commutative81.9%
associate-*l/81.9%
*-un-lft-identity81.9%
associate-/l*88.8%
div-inv88.8%
Applied egg-rr88.8%
if -3.90000000000000016e-291 < y < 1.7e8Initial 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-frac89.2%
distribute-frac-neg89.2%
neg-mul-189.2%
*-commutative89.2%
associate-/l*89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in t around inf 95.6%
*-commutative95.6%
associate-*l/95.7%
associate-*r/94.3%
metadata-eval94.3%
associate-*r/94.3%
associate-*r/94.3%
metadata-eval94.3%
*-commutative94.3%
associate-/r*94.3%
Simplified94.3%
div-inv94.3%
metadata-eval94.3%
associate-/r*94.3%
*-commutative94.3%
associate-*l/94.4%
*-un-lft-identity94.4%
associate-/l*86.5%
div-inv86.6%
associate-/l/95.7%
Applied egg-rr95.7%
if 1.7e8 < 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.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in t around 0 99.8%
metadata-eval99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
associate-*l/99.8%
associate-*r/99.9%
distribute-rgt-neg-in99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification94.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.06e-117) (not (<= y 1.35e-147))) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ x (/ (/ (* t 0.3333333333333333) z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.06e-117) || !(y <= 1.35e-147)) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = x + (((t * 0.3333333333333333) / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.06d-117)) .or. (.not. (y <= 1.35d-147))) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.06e-117) || !(y <= 1.35e-147)) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = x + (((t * 0.3333333333333333) / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.06e-117) or not (y <= 1.35e-147): tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = x + (((t * 0.3333333333333333) / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.06e-117) || !(y <= 1.35e-147)) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.06e-117) || ~((y <= 1.35e-147))) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = x + (((t * 0.3333333333333333) / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.06e-117], N[Not[LessEqual[y, 1.35e-147]], $MachinePrecision]], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{-117} \lor \neg \left(y \leq 1.35 \cdot 10^{-147}\right):\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -1.06000000000000008e-117 or 1.35e-147 < 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.3%
distribute-frac-neg99.3%
neg-mul-199.3%
*-commutative99.3%
associate-/l*99.3%
*-commutative99.3%
Simplified99.2%
*-commutative99.2%
clear-num99.2%
div-inv99.3%
metadata-eval99.3%
un-div-inv99.3%
Applied egg-rr99.3%
if -1.06000000000000008e-117 < y < 1.35e-147Initial program 87.0%
+-commutative87.0%
associate-+r-87.0%
+-commutative87.0%
associate--l+87.0%
sub-neg87.0%
remove-double-neg87.0%
distribute-frac-neg87.0%
distribute-neg-in87.0%
remove-double-neg87.0%
sub-neg87.0%
neg-mul-187.0%
times-frac85.9%
distribute-frac-neg85.9%
neg-mul-185.9%
*-commutative85.9%
associate-/l*85.9%
*-commutative85.9%
Simplified85.8%
Taylor expanded in t around inf 86.9%
*-commutative86.9%
associate-*l/86.9%
associate-*r/85.6%
metadata-eval85.6%
associate-*r/85.6%
associate-*r/85.6%
metadata-eval85.6%
*-commutative85.6%
associate-/r*85.7%
Simplified85.7%
associate-*r/98.3%
metadata-eval98.3%
associate-/r*98.3%
*-commutative98.3%
un-div-inv98.4%
Applied egg-rr98.4%
Taylor expanded in t around 0 98.4%
associate-*r/98.4%
Simplified98.4%
Final simplification99.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6.8e-75) (not (<= y 3.2e-140))) (+ x (* (- (/ t y) y) (/ 0.3333333333333333 z))) (+ x (/ (/ (* t 0.3333333333333333) z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.8e-75) || !(y <= 3.2e-140)) {
tmp = x + (((t / y) - y) * (0.3333333333333333 / z));
} else {
tmp = x + (((t * 0.3333333333333333) / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-6.8d-75)) .or. (.not. (y <= 3.2d-140))) then
tmp = x + (((t / y) - y) * (0.3333333333333333d0 / z))
else
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.8e-75) || !(y <= 3.2e-140)) {
tmp = x + (((t / y) - y) * (0.3333333333333333 / z));
} else {
tmp = x + (((t * 0.3333333333333333) / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6.8e-75) or not (y <= 3.2e-140): tmp = x + (((t / y) - y) * (0.3333333333333333 / z)) else: tmp = x + (((t * 0.3333333333333333) / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6.8e-75) || !(y <= 3.2e-140)) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z))); else tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6.8e-75) || ~((y <= 3.2e-140))) tmp = x + (((t / y) - y) * (0.3333333333333333 / z)); else tmp = x + (((t * 0.3333333333333333) / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6.8e-75], N[Not[LessEqual[y, 3.2e-140]], $MachinePrecision]], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{-75} \lor \neg \left(y \leq 3.2 \cdot 10^{-140}\right):\\
\;\;\;\;x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -6.8000000000000003e-75 or 3.2000000000000001e-140 < 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.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.7%
if -6.8000000000000003e-75 < y < 3.2000000000000001e-140Initial program 89.3%
+-commutative89.3%
associate-+r-89.3%
+-commutative89.3%
associate--l+89.3%
sub-neg89.3%
remove-double-neg89.3%
distribute-frac-neg89.3%
distribute-neg-in89.3%
remove-double-neg89.3%
sub-neg89.3%
neg-mul-189.3%
times-frac87.3%
distribute-frac-neg87.3%
neg-mul-187.3%
*-commutative87.3%
associate-/l*87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in t around inf 88.2%
*-commutative88.2%
associate-*l/88.2%
associate-*r/87.1%
metadata-eval87.1%
associate-*r/87.1%
associate-*r/87.1%
metadata-eval87.1%
*-commutative87.1%
associate-/r*87.1%
Simplified87.1%
associate-*r/97.6%
metadata-eval97.6%
associate-/r*97.6%
*-commutative97.6%
un-div-inv97.6%
Applied egg-rr97.6%
Taylor expanded in t around 0 97.6%
associate-*r/97.6%
Simplified97.6%
Final simplification99.0%
(FPCore (x y z t) :precision binary64 (if (<= t 2000000.0) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ (+ x (/ t (* z (* y 3.0)))) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2000000.0) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x + (t / (z * (y * 3.0)))) + (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 <= 2000000.0d0) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = (x + (t / (z * (y * 3.0d0)))) + (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 <= 2000000.0) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 2000000.0: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 2000000.0) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 2000000.0) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 2000000.0], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2000000:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if t < 2e6Initial program 94.3%
+-commutative94.3%
associate-+r-94.3%
+-commutative94.3%
associate--l+94.3%
sub-neg94.3%
remove-double-neg94.3%
distribute-frac-neg94.3%
distribute-neg-in94.3%
remove-double-neg94.3%
sub-neg94.3%
neg-mul-194.3%
times-frac99.3%
distribute-frac-neg99.3%
neg-mul-199.3%
*-commutative99.3%
associate-/l*99.3%
*-commutative99.3%
Simplified99.2%
*-commutative99.2%
clear-num99.2%
div-inv99.3%
metadata-eval99.3%
un-div-inv99.3%
Applied egg-rr99.3%
if 2e6 < t Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
sub-neg99.8%
associate-*l*99.8%
*-commutative99.8%
distribute-frac-neg299.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.2e+37)
(- x (/ (/ y 3.0) z))
(if (<= y 5500000.0)
(+ x (/ (/ (* t 0.3333333333333333) z) y))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+37) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 5500000.0) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.2d+37)) then
tmp = x - ((y / 3.0d0) / z)
else if (y <= 5500000.0d0) then
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+37) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 5500000.0) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.2e+37: tmp = x - ((y / 3.0) / z) elif y <= 5500000.0: tmp = x + (((t * 0.3333333333333333) / z) / y) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.2e+37) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); elseif (y <= 5500000.0) tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.2e+37) tmp = x - ((y / 3.0) / z); elseif (y <= 5500000.0) tmp = x + (((t * 0.3333333333333333) / z) / y); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.2e+37], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5500000.0], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+37}:\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{elif}\;y \leq 5500000:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.2000000000000001e37Initial program 99.8%
Taylor expanded in t around 0 95.5%
metadata-eval95.5%
times-frac95.6%
*-un-lft-identity95.6%
associate-/r*95.7%
Applied egg-rr95.7%
if -2.2000000000000001e37 < y < 5.5e6Initial program 93.0%
+-commutative93.0%
associate-+r-93.0%
+-commutative93.0%
associate--l+93.0%
sub-neg93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
sub-neg93.0%
neg-mul-193.0%
times-frac91.8%
distribute-frac-neg91.8%
neg-mul-191.8%
*-commutative91.8%
associate-/l*91.8%
*-commutative91.8%
Simplified91.7%
Taylor expanded in t around inf 88.8%
*-commutative88.8%
associate-*l/88.9%
associate-*r/88.1%
metadata-eval88.1%
associate-*r/88.1%
associate-*r/88.1%
metadata-eval88.1%
*-commutative88.1%
associate-/r*88.1%
Simplified88.1%
associate-*r/94.9%
metadata-eval94.9%
associate-/r*94.9%
*-commutative94.9%
un-div-inv94.9%
Applied egg-rr94.9%
Taylor expanded in t around 0 94.9%
associate-*r/94.9%
Simplified94.9%
if 5.5e6 < 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.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in t around 0 99.8%
metadata-eval99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
associate-*l/99.8%
associate-*r/99.9%
distribute-rgt-neg-in99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification96.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.2e+34)
(- x (/ (/ y 3.0) z))
(if (<= y 210000000.0)
(+ 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.2e+34) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 210000000.0) {
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.2d+34)) then
tmp = x - ((y / 3.0d0) / z)
else if (y <= 210000000.0d0) 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.2e+34) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 210000000.0) {
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.2e+34: tmp = x - ((y / 3.0) / z) elif y <= 210000000.0: 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.2e+34) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); elseif (y <= 210000000.0) 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.2e+34) tmp = x - ((y / 3.0) / z); elseif (y <= 210000000.0) 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.2e+34], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 210000000.0], 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.2 \cdot 10^{+34}:\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{elif}\;y \leq 210000000:\\
\;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.19999999999999993e34Initial program 99.8%
Taylor expanded in t around 0 95.5%
metadata-eval95.5%
times-frac95.6%
*-un-lft-identity95.6%
associate-/r*95.7%
Applied egg-rr95.7%
if -1.19999999999999993e34 < y < 2.1e8Initial program 93.0%
+-commutative93.0%
associate-+r-93.0%
+-commutative93.0%
associate--l+93.0%
sub-neg93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
sub-neg93.0%
neg-mul-193.0%
times-frac91.8%
distribute-frac-neg91.8%
neg-mul-191.8%
*-commutative91.8%
associate-/l*91.8%
*-commutative91.8%
Simplified91.7%
Taylor expanded in t around inf 88.8%
*-commutative88.8%
associate-*l/88.9%
associate-*r/88.1%
metadata-eval88.1%
associate-*r/88.1%
associate-*r/88.1%
metadata-eval88.1%
*-commutative88.1%
associate-/r*88.1%
Simplified88.1%
associate-*r/94.9%
metadata-eval94.9%
associate-/r*94.9%
*-commutative94.9%
un-div-inv94.9%
Applied egg-rr94.9%
if 2.1e8 < 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.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in t around 0 99.8%
metadata-eval99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
associate-*l/99.8%
associate-*r/99.9%
distribute-rgt-neg-in99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.5e+39)
(- x (/ (/ y 3.0) z))
(if (<= y 240000000.0)
(+ x (/ t (* y (* z 3.0))))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e+39) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 240000000.0) {
tmp = x + (t / (y * (z * 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 <= (-7.5d+39)) then
tmp = x - ((y / 3.0d0) / z)
else if (y <= 240000000.0d0) then
tmp = x + (t / (y * (z * 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 <= -7.5e+39) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 240000000.0) {
tmp = x + (t / (y * (z * 3.0)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.5e+39: tmp = x - ((y / 3.0) / z) elif y <= 240000000.0: tmp = x + (t / (y * (z * 3.0))) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.5e+39) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); elseif (y <= 240000000.0) tmp = Float64(x + Float64(t / Float64(y * Float64(z * 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 <= -7.5e+39) tmp = x - ((y / 3.0) / z); elseif (y <= 240000000.0) tmp = x + (t / (y * (z * 3.0))); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.5e+39], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 240000000.0], N[(x + N[(t / N[(y * N[(z * 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 -7.5 \cdot 10^{+39}:\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{elif}\;y \leq 240000000:\\
\;\;\;\;x + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -7.5000000000000005e39Initial program 99.8%
Taylor expanded in t around 0 95.5%
metadata-eval95.5%
times-frac95.6%
*-un-lft-identity95.6%
associate-/r*95.7%
Applied egg-rr95.7%
if -7.5000000000000005e39 < y < 2.4e8Initial program 93.0%
+-commutative93.0%
associate-+r-93.0%
+-commutative93.0%
associate--l+93.0%
sub-neg93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
sub-neg93.0%
neg-mul-193.0%
times-frac91.8%
distribute-frac-neg91.8%
neg-mul-191.8%
*-commutative91.8%
associate-/l*91.8%
*-commutative91.8%
Simplified91.7%
Taylor expanded in t around inf 88.8%
*-commutative88.8%
associate-*l/88.9%
associate-*r/88.1%
metadata-eval88.1%
associate-*r/88.1%
associate-*r/88.1%
metadata-eval88.1%
*-commutative88.1%
associate-/r*88.1%
Simplified88.1%
div-inv88.1%
metadata-eval88.1%
associate-/r*88.2%
*-commutative88.2%
associate-*l/88.2%
*-un-lft-identity88.2%
associate-/l*87.6%
div-inv87.7%
associate-/l/88.9%
Applied egg-rr88.9%
if 2.4e8 < 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.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in t around 0 99.8%
metadata-eval99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
associate-*l/99.8%
associate-*r/99.9%
distribute-rgt-neg-in99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification93.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -2e+41)
(- x (/ (/ y 3.0) z))
(if (<= y 1700000.0)
(+ 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 <= -2e+41) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 1700000.0) {
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 <= (-2d+41)) then
tmp = x - ((y / 3.0d0) / z)
else if (y <= 1700000.0d0) 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 <= -2e+41) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 1700000.0) {
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 <= -2e+41: tmp = x - ((y / 3.0) / z) elif y <= 1700000.0: 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 <= -2e+41) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); elseif (y <= 1700000.0) 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 <= -2e+41) tmp = x - ((y / 3.0) / z); elseif (y <= 1700000.0) 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, -2e+41], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1700000.0], 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 -2 \cdot 10^{+41}:\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{elif}\;y \leq 1700000:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.00000000000000001e41Initial program 99.8%
Taylor expanded in t around 0 95.5%
metadata-eval95.5%
times-frac95.6%
*-un-lft-identity95.6%
associate-/r*95.7%
Applied egg-rr95.7%
if -2.00000000000000001e41 < y < 1.7e6Initial program 93.0%
+-commutative93.0%
associate-+r-93.0%
+-commutative93.0%
associate--l+93.0%
sub-neg93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
sub-neg93.0%
neg-mul-193.0%
times-frac91.8%
distribute-frac-neg91.8%
neg-mul-191.8%
*-commutative91.8%
associate-/l*91.8%
*-commutative91.8%
Simplified91.7%
Taylor expanded in t around inf 88.8%
if 1.7e6 < 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.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in t around 0 99.8%
metadata-eval99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
associate-*l/99.8%
associate-*r/99.9%
distribute-rgt-neg-in99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
(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%
Taylor expanded in t around 0 63.0%
metadata-eval63.0%
times-frac63.1%
*-un-lft-identity63.1%
*-commutative63.1%
Applied egg-rr63.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(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%
+-commutative96.1%
associate-+r-96.1%
+-commutative96.1%
associate--l+96.1%
sub-neg96.1%
remove-double-neg96.1%
distribute-frac-neg96.1%
distribute-neg-in96.1%
remove-double-neg96.1%
sub-neg96.1%
neg-mul-196.1%
times-frac95.4%
distribute-frac-neg95.4%
neg-mul-195.4%
*-commutative95.4%
associate-/l*95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in t around 0 63.0%
metadata-eval63.0%
distribute-lft-neg-in63.0%
*-commutative63.0%
associate-*l/63.1%
associate-*r/63.1%
distribute-rgt-neg-in63.1%
distribute-neg-frac63.1%
metadata-eval63.1%
Simplified63.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%
+-commutative96.1%
associate-+r-96.1%
+-commutative96.1%
associate--l+96.1%
sub-neg96.1%
remove-double-neg96.1%
distribute-frac-neg96.1%
distribute-neg-in96.1%
remove-double-neg96.1%
sub-neg96.1%
neg-mul-196.1%
times-frac95.4%
distribute-frac-neg95.4%
neg-mul-195.4%
*-commutative95.4%
associate-/l*95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in x around inf 31.9%
(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 2024107
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))