
(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 14 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
(let* ((t_1 (- (/ t y) y)))
(if (<= y -4.5e-16)
(+ x (/ (* t_1 0.3333333333333333) z))
(if (<= y 1.85e-72)
(+ x (/ (/ (* t 0.3333333333333333) z) y))
(+ x (/ t_1 (* z 3.0)))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -4.5e-16) {
tmp = x + ((t_1 * 0.3333333333333333) / z);
} else if (y <= 1.85e-72) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (t_1 / (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) :: t_1
real(8) :: tmp
t_1 = (t / y) - y
if (y <= (-4.5d-16)) then
tmp = x + ((t_1 * 0.3333333333333333d0) / z)
else if (y <= 1.85d-72) then
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
else
tmp = x + (t_1 / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -4.5e-16) {
tmp = x + ((t_1 * 0.3333333333333333) / z);
} else if (y <= 1.85e-72) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (t_1 / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / y) - y tmp = 0 if y <= -4.5e-16: tmp = x + ((t_1 * 0.3333333333333333) / z) elif y <= 1.85e-72: tmp = x + (((t * 0.3333333333333333) / z) / y) else: tmp = x + (t_1 / (z * 3.0)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / y) - y) tmp = 0.0 if (y <= -4.5e-16) tmp = Float64(x + Float64(Float64(t_1 * 0.3333333333333333) / z)); elseif (y <= 1.85e-72) tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); else tmp = Float64(x + Float64(t_1 / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / y) - y; tmp = 0.0; if (y <= -4.5e-16) tmp = x + ((t_1 * 0.3333333333333333) / z); elseif (y <= 1.85e-72) tmp = x + (((t * 0.3333333333333333) / z) / y); else tmp = x + (t_1 / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[y, -4.5e-16], N[(x + N[(N[(t$95$1 * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e-72], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{y} - y\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{-16}:\\
\;\;\;\;x + \frac{t\_1 \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-72}:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t\_1}{z \cdot 3}\\
\end{array}
\end{array}
if y < -4.5000000000000002e-16Initial 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-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
*-commutative99.6%
Simplified99.7%
Taylor expanded in z around 0 99.7%
associate-*r/99.8%
Simplified99.8%
if -4.5000000000000002e-16 < y < 1.8499999999999999e-72Initial program 88.7%
+-commutative88.7%
associate-+r-88.7%
+-commutative88.7%
associate--l+88.7%
sub-neg88.7%
remove-double-neg88.7%
distribute-frac-neg88.7%
distribute-neg-in88.7%
remove-double-neg88.7%
sub-neg88.7%
neg-mul-188.7%
times-frac89.7%
distribute-frac-neg89.7%
neg-mul-189.7%
*-commutative89.7%
associate-/l*89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in t around inf 88.5%
associate-/r*89.7%
associate-*r/89.7%
*-commutative89.7%
associate-*r/89.7%
Simplified89.7%
associate-*l/99.8%
associate-*r/99.8%
Applied egg-rr99.8%
if 1.8499999999999999e-72 < y Initial 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.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%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.5e-16) (not (<= y 4.1e-90))) (+ 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 <= -4.5e-16) || !(y <= 4.1e-90)) {
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 <= (-4.5d-16)) .or. (.not. (y <= 4.1d-90))) 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 <= -4.5e-16) || !(y <= 4.1e-90)) {
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 <= -4.5e-16) or not (y <= 4.1e-90): 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 <= -4.5e-16) || !(y <= 4.1e-90)) 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 <= -4.5e-16) || ~((y <= 4.1e-90))) 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, -4.5e-16], N[Not[LessEqual[y, 4.1e-90]], $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 -4.5 \cdot 10^{-16} \lor \neg \left(y \leq 4.1 \cdot 10^{-90}\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 < -4.5000000000000002e-16 or 4.10000000000000035e-90 < 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.8%
if -4.5000000000000002e-16 < y < 4.10000000000000035e-90Initial program 88.2%
+-commutative88.2%
associate-+r-88.2%
+-commutative88.2%
associate--l+88.2%
sub-neg88.2%
remove-double-neg88.2%
distribute-frac-neg88.2%
distribute-neg-in88.2%
remove-double-neg88.2%
sub-neg88.2%
neg-mul-188.2%
times-frac89.3%
distribute-frac-neg89.3%
neg-mul-189.3%
*-commutative89.3%
associate-/l*89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in t around inf 88.1%
associate-/r*89.3%
associate-*r/89.3%
*-commutative89.3%
associate-*r/89.3%
Simplified89.3%
associate-*l/99.8%
associate-*r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ t y) y)))
(if (<= y -2.3e-14)
(+ x (/ (* t_1 0.3333333333333333) z))
(if (<= y 3.4e-90)
(+ x (/ (/ (* t 0.3333333333333333) z) y))
(+ x (* t_1 (/ 0.3333333333333333 z)))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -2.3e-14) {
tmp = x + ((t_1 * 0.3333333333333333) / z);
} else if (y <= 3.4e-90) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (t_1 * (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) :: t_1
real(8) :: tmp
t_1 = (t / y) - y
if (y <= (-2.3d-14)) then
tmp = x + ((t_1 * 0.3333333333333333d0) / z)
else if (y <= 3.4d-90) then
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
else
tmp = x + (t_1 * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -2.3e-14) {
tmp = x + ((t_1 * 0.3333333333333333) / z);
} else if (y <= 3.4e-90) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (t_1 * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / y) - y tmp = 0 if y <= -2.3e-14: tmp = x + ((t_1 * 0.3333333333333333) / z) elif y <= 3.4e-90: tmp = x + (((t * 0.3333333333333333) / z) / y) else: tmp = x + (t_1 * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / y) - y) tmp = 0.0 if (y <= -2.3e-14) tmp = Float64(x + Float64(Float64(t_1 * 0.3333333333333333) / z)); elseif (y <= 3.4e-90) tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); else tmp = Float64(x + Float64(t_1 * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / y) - y; tmp = 0.0; if (y <= -2.3e-14) tmp = x + ((t_1 * 0.3333333333333333) / z); elseif (y <= 3.4e-90) tmp = x + (((t * 0.3333333333333333) / z) / y); else tmp = x + (t_1 * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[y, -2.3e-14], N[(x + N[(N[(t$95$1 * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-90], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{y} - y\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{-14}:\\
\;\;\;\;x + \frac{t\_1 \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-90}:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1 \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.29999999999999998e-14Initial 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-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
*-commutative99.6%
Simplified99.7%
Taylor expanded in z around 0 99.7%
associate-*r/99.8%
Simplified99.8%
if -2.29999999999999998e-14 < y < 3.39999999999999994e-90Initial program 88.2%
+-commutative88.2%
associate-+r-88.2%
+-commutative88.2%
associate--l+88.2%
sub-neg88.2%
remove-double-neg88.2%
distribute-frac-neg88.2%
distribute-neg-in88.2%
remove-double-neg88.2%
sub-neg88.2%
neg-mul-188.2%
times-frac89.3%
distribute-frac-neg89.3%
neg-mul-189.3%
*-commutative89.3%
associate-/l*89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in t around inf 88.1%
associate-/r*89.3%
associate-*r/89.3%
*-commutative89.3%
associate-*r/89.3%
Simplified89.3%
associate-*l/99.8%
associate-*r/99.8%
Applied egg-rr99.8%
if 3.39999999999999994e-90 < y Initial 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.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (if (<= t 7.7e+121) (+ 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 <= 7.7e+121) {
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 <= 7.7d+121) 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 <= 7.7e+121) {
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 <= 7.7e+121: 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 <= 7.7e+121) 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 <= 7.7e+121) 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, 7.7e+121], 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 7.7 \cdot 10^{+121}:\\
\;\;\;\;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 < 7.70000000000000028e121Initial 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-frac98.0%
distribute-frac-neg98.0%
neg-mul-198.0%
*-commutative98.0%
associate-/l*98.0%
*-commutative98.0%
Simplified98.0%
metadata-eval98.0%
associate-/r*98.0%
*-commutative98.0%
associate-*l/98.1%
*-un-lft-identity98.1%
Applied egg-rr98.1%
if 7.70000000000000028e121 < t Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
sub-neg99.8%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification98.4%
(FPCore (x y z t) :precision binary64 (if (<= t 6.5e+138) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ (/ y (* z -3.0)) (+ x (* t (/ (/ 0.3333333333333333 z) y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 6.5e+138) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (y / (z * -3.0)) + (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 (t <= 6.5d+138) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = (y / (z * (-3.0d0))) + (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 (t <= 6.5e+138) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (y / (z * -3.0)) + (x + (t * ((0.3333333333333333 / z) / y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 6.5e+138: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = (y / (z * -3.0)) + (x + (t * ((0.3333333333333333 / z) / y))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 6.5e+138) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(Float64(y / Float64(z * -3.0)) + Float64(x + Float64(t * Float64(Float64(0.3333333333333333 / z) / y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 6.5e+138) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = (y / (z * -3.0)) + (x + (t * ((0.3333333333333333 / z) / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 6.5e+138], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t * N[(N[(0.3333333333333333 / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.5 \cdot 10^{+138}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3} + \left(x + t \cdot \frac{\frac{0.3333333333333333}{z}}{y}\right)\\
\end{array}
\end{array}
if t < 6.50000000000000054e138Initial program 94.4%
+-commutative94.4%
associate-+r-94.4%
+-commutative94.4%
associate--l+94.4%
sub-neg94.4%
remove-double-neg94.4%
distribute-frac-neg94.4%
distribute-neg-in94.4%
remove-double-neg94.4%
sub-neg94.4%
neg-mul-194.4%
times-frac98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
associate-/l*98.1%
*-commutative98.1%
Simplified98.1%
metadata-eval98.1%
associate-/r*98.1%
*-commutative98.1%
associate-*l/98.1%
*-un-lft-identity98.1%
Applied egg-rr98.1%
if 6.50000000000000054e138 < t Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
sub-neg99.8%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
clear-num99.9%
associate-/r/99.9%
*-commutative99.9%
associate-*l*99.7%
associate-/r*99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Final simplification98.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.02e+29)
(+ x (/ (/ y -3.0) z))
(if (<= y 1.25e-5)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.02e+29) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 1.25e-5) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.02d+29)) then
tmp = x + ((y / (-3.0d0)) / z)
else if (y <= 1.25d-5) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.02e+29) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 1.25e-5) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.02e+29: tmp = x + ((y / -3.0) / z) elif y <= 1.25e-5: tmp = x + (0.3333333333333333 * (t / (y * z))) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.02e+29) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); elseif (y <= 1.25e-5) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.02e+29) tmp = x + ((y / -3.0) / z); elseif (y <= 1.25e-5) tmp = x + (0.3333333333333333 * (t / (y * z))); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.02e+29], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e-5], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+29}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-5}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.0200000000000001e29Initial 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-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 98.0%
metadata-eval98.0%
times-frac98.0%
*-un-lft-identity98.0%
associate-/r*98.1%
Applied egg-rr98.1%
if -1.0200000000000001e29 < y < 1.25000000000000006e-5Initial program 90.9%
+-commutative90.9%
associate-+r-90.9%
+-commutative90.9%
associate--l+90.9%
sub-neg90.9%
remove-double-neg90.9%
distribute-frac-neg90.9%
distribute-neg-in90.9%
remove-double-neg90.9%
sub-neg90.9%
neg-mul-190.9%
times-frac91.7%
distribute-frac-neg91.7%
neg-mul-191.7%
*-commutative91.7%
associate-/l*91.7%
*-commutative91.7%
Simplified91.8%
Taylor expanded in t around inf 87.0%
if 1.25000000000000006e-5 < y Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
sub-neg99.9%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around 0 94.4%
Final simplification91.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -7e+29)
(+ x (/ (/ y -3.0) z))
(if (<= y 0.00026)
(+ x (* (/ t y) (/ 0.3333333333333333 z)))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e+29) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 0.00026) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7d+29)) then
tmp = x + ((y / (-3.0d0)) / z)
else if (y <= 0.00026d0) then
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e+29) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 0.00026) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7e+29: tmp = x + ((y / -3.0) / z) elif y <= 0.00026: tmp = x + ((t / y) * (0.3333333333333333 / z)) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7e+29) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); elseif (y <= 0.00026) tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7e+29) tmp = x + ((y / -3.0) / z); elseif (y <= 0.00026) tmp = x + ((t / y) * (0.3333333333333333 / z)); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7e+29], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00026], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+29}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 0.00026:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -6.99999999999999958e29Initial 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-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 98.0%
metadata-eval98.0%
times-frac98.0%
*-un-lft-identity98.0%
associate-/r*98.1%
Applied egg-rr98.1%
if -6.99999999999999958e29 < y < 2.59999999999999977e-4Initial program 90.9%
+-commutative90.9%
associate-+r-90.9%
+-commutative90.9%
associate--l+90.9%
sub-neg90.9%
remove-double-neg90.9%
distribute-frac-neg90.9%
distribute-neg-in90.9%
remove-double-neg90.9%
sub-neg90.9%
neg-mul-190.9%
times-frac91.7%
distribute-frac-neg91.7%
neg-mul-191.7%
*-commutative91.7%
associate-/l*91.7%
*-commutative91.7%
Simplified91.8%
Taylor expanded in t around inf 87.0%
associate-/r*88.0%
associate-*r/88.0%
*-commutative88.0%
associate-*r/88.0%
Simplified88.0%
if 2.59999999999999977e-4 < y Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
sub-neg99.9%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around 0 94.4%
Final simplification92.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.2e+21)
(+ x (/ (/ y -3.0) z))
(if (<= y 2.5e-5)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.2e+21) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 2.5e-5) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-3.2d+21)) then
tmp = x + ((y / (-3.0d0)) / z)
else if (y <= 2.5d-5) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.2e+21) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 2.5e-5) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.2e+21: tmp = x + ((y / -3.0) / z) elif y <= 2.5e-5: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.2e+21) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); elseif (y <= 2.5e-5) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.2e+21) tmp = x + ((y / -3.0) / z); elseif (y <= 2.5e-5) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.2e+21], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e-5], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+21}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-5}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -3.2e21Initial 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-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 98.0%
metadata-eval98.0%
times-frac98.0%
*-un-lft-identity98.0%
associate-/r*98.1%
Applied egg-rr98.1%
if -3.2e21 < y < 2.50000000000000012e-5Initial program 90.9%
+-commutative90.9%
associate-+r-90.9%
+-commutative90.9%
associate--l+90.9%
sub-neg90.9%
remove-double-neg90.9%
distribute-frac-neg90.9%
distribute-neg-in90.9%
remove-double-neg90.9%
sub-neg90.9%
neg-mul-190.9%
times-frac91.7%
distribute-frac-neg91.7%
neg-mul-191.7%
*-commutative91.7%
associate-/l*91.7%
*-commutative91.7%
Simplified91.8%
Taylor expanded in t around inf 87.0%
associate-/r*88.0%
associate-*r/88.0%
*-commutative88.0%
associate-*r/88.0%
Simplified88.0%
associate-*l/96.0%
associate-*r/96.1%
Applied egg-rr96.1%
Taylor expanded in t around 0 87.0%
associate-*r/87.1%
times-frac96.0%
*-commutative96.0%
Simplified96.0%
if 2.50000000000000012e-5 < y Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
sub-neg99.9%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around 0 94.4%
Final simplification96.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.2e+23)
(+ x (/ (/ y -3.0) z))
(if (<= y 0.0001)
(+ x (/ (/ 0.3333333333333333 (/ z t)) y))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e+23) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 0.0001) {
tmp = x + ((0.3333333333333333 / (z / t)) / y);
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.2d+23)) then
tmp = x + ((y / (-3.0d0)) / z)
else if (y <= 0.0001d0) then
tmp = x + ((0.3333333333333333d0 / (z / t)) / y)
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e+23) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 0.0001) {
tmp = x + ((0.3333333333333333 / (z / t)) / y);
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.2e+23: tmp = x + ((y / -3.0) / z) elif y <= 0.0001: tmp = x + ((0.3333333333333333 / (z / t)) / y) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.2e+23) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); elseif (y <= 0.0001) tmp = Float64(x + Float64(Float64(0.3333333333333333 / Float64(z / t)) / y)); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.2e+23) tmp = x + ((y / -3.0) / z); elseif (y <= 0.0001) tmp = x + ((0.3333333333333333 / (z / t)) / y); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.2e+23], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0001], N[(x + N[(N[(0.3333333333333333 / N[(z / t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+23}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 0.0001:\\
\;\;\;\;x + \frac{\frac{0.3333333333333333}{\frac{z}{t}}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -5.19999999999999983e23Initial 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-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 98.0%
metadata-eval98.0%
times-frac98.0%
*-un-lft-identity98.0%
associate-/r*98.1%
Applied egg-rr98.1%
if -5.19999999999999983e23 < y < 1.00000000000000005e-4Initial program 90.9%
+-commutative90.9%
associate-+r-90.9%
+-commutative90.9%
associate--l+90.9%
sub-neg90.9%
remove-double-neg90.9%
distribute-frac-neg90.9%
distribute-neg-in90.9%
remove-double-neg90.9%
sub-neg90.9%
neg-mul-190.9%
times-frac91.7%
distribute-frac-neg91.7%
neg-mul-191.7%
*-commutative91.7%
associate-/l*91.7%
*-commutative91.7%
Simplified91.8%
Taylor expanded in t around inf 87.0%
associate-/r*88.0%
associate-*r/88.0%
*-commutative88.0%
associate-*r/88.0%
Simplified88.0%
associate-*l/96.0%
associate-*r/96.1%
Applied egg-rr96.1%
clear-num96.0%
inv-pow96.0%
div-inv95.9%
clear-num96.0%
*-un-lft-identity96.0%
*-commutative96.0%
times-frac96.0%
metadata-eval96.0%
Applied egg-rr96.0%
unpow-196.0%
*-commutative96.0%
associate-/r*96.0%
associate-/r*96.1%
metadata-eval96.1%
Simplified96.1%
if 1.00000000000000005e-4 < y Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
sub-neg99.9%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around 0 94.4%
Final simplification96.0%
(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 95.3%
+-commutative95.3%
associate-+r-95.3%
+-commutative95.3%
associate--l+95.3%
sub-neg95.3%
remove-double-neg95.3%
distribute-frac-neg95.3%
distribute-neg-in95.3%
remove-double-neg95.3%
sub-neg95.3%
neg-mul-195.3%
times-frac95.7%
distribute-frac-neg95.7%
neg-mul-195.7%
*-commutative95.7%
associate-/l*95.7%
*-commutative95.7%
Simplified95.7%
Taylor expanded in t around 0 65.2%
Final simplification65.2%
(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 95.3%
+-commutative95.3%
associate-+r-95.3%
+-commutative95.3%
associate--l+95.3%
sub-neg95.3%
remove-double-neg95.3%
distribute-frac-neg95.3%
distribute-neg-in95.3%
remove-double-neg95.3%
sub-neg95.3%
neg-mul-195.3%
times-frac95.7%
distribute-frac-neg95.7%
neg-mul-195.7%
*-commutative95.7%
associate-/l*95.7%
*-commutative95.7%
Simplified95.7%
Taylor expanded in t around 0 65.2%
*-commutative65.2%
associate-*l/65.2%
associate-/l*65.2%
Simplified65.2%
Final simplification65.2%
(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 95.3%
+-commutative95.3%
associate-+r-95.3%
sub-neg95.3%
associate-*l*95.3%
*-commutative95.3%
distribute-frac-neg295.3%
distribute-rgt-neg-in95.3%
metadata-eval95.3%
Simplified95.3%
Taylor expanded in t around 0 65.3%
Final simplification65.3%
(FPCore (x y z t) :precision binary64 (+ x (/ (/ y -3.0) z)))
double code(double x, double y, double z, double t) {
return x + ((y / -3.0) / 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 / (-3.0d0)) / z)
end function
public static double code(double x, double y, double z, double t) {
return x + ((y / -3.0) / z);
}
def code(x, y, z, t): return x + ((y / -3.0) / z)
function code(x, y, z, t) return Float64(x + Float64(Float64(y / -3.0) / z)) end
function tmp = code(x, y, z, t) tmp = x + ((y / -3.0) / z); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{y}{-3}}{z}
\end{array}
Initial program 95.3%
+-commutative95.3%
associate-+r-95.3%
+-commutative95.3%
associate--l+95.3%
sub-neg95.3%
remove-double-neg95.3%
distribute-frac-neg95.3%
distribute-neg-in95.3%
remove-double-neg95.3%
sub-neg95.3%
neg-mul-195.3%
times-frac95.7%
distribute-frac-neg95.7%
neg-mul-195.7%
*-commutative95.7%
associate-/l*95.7%
*-commutative95.7%
Simplified95.7%
Taylor expanded in t around 0 65.2%
metadata-eval65.2%
times-frac65.3%
*-un-lft-identity65.3%
associate-/r*65.3%
Applied egg-rr65.3%
Final simplification65.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 95.3%
+-commutative95.3%
associate-+r-95.3%
+-commutative95.3%
associate--l+95.3%
sub-neg95.3%
remove-double-neg95.3%
distribute-frac-neg95.3%
distribute-neg-in95.3%
remove-double-neg95.3%
sub-neg95.3%
neg-mul-195.3%
times-frac95.7%
distribute-frac-neg95.7%
neg-mul-195.7%
*-commutative95.7%
associate-/l*95.7%
*-commutative95.7%
Simplified95.7%
Taylor expanded in t around 0 65.2%
Taylor expanded in x around inf 30.0%
Final simplification30.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 2024067
(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))))