
(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 11 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 (<= y -2.4e-91)
(+ x (/ (- (/ t y) y) (* z 3.0)))
(if (<= y 9e-96)
(+ x (/ (/ (* t 0.3333333333333333) z) y))
(+ x (/ (+ (/ t (* y 3.0)) (* y -0.3333333333333333)) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.4e-91) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else if (y <= 9e-96) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (((t / (y * 3.0)) + (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.4d-91)) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else if (y <= 9d-96) then
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
else
tmp = x + (((t / (y * 3.0d0)) + (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.4e-91) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else if (y <= 9e-96) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (((t / (y * 3.0)) + (y * -0.3333333333333333)) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.4e-91: tmp = x + (((t / y) - y) / (z * 3.0)) elif y <= 9e-96: tmp = x + (((t * 0.3333333333333333) / z) / y) else: tmp = x + (((t / (y * 3.0)) + (y * -0.3333333333333333)) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.4e-91) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); elseif (y <= 9e-96) tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); else tmp = Float64(x + Float64(Float64(Float64(t / Float64(y * 3.0)) + Float64(y * -0.3333333333333333)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.4e-91) tmp = x + (((t / y) - y) / (z * 3.0)); elseif (y <= 9e-96) tmp = x + (((t * 0.3333333333333333) / z) / y); else tmp = x + (((t / (y * 3.0)) + (y * -0.3333333333333333)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.4e-91], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e-96], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / N[(y * 3.0), $MachinePrecision]), $MachinePrecision] + N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-91}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-96}:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y \cdot 3} + y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.40000000000000011e-91Initial program 96.6%
+-commutative96.6%
associate-+r-96.6%
+-commutative96.6%
associate--l+96.6%
sub-neg96.6%
remove-double-neg96.6%
distribute-frac-neg96.6%
distribute-neg-in96.6%
remove-double-neg96.6%
sub-neg96.6%
neg-mul-196.6%
times-frac98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
associate-/l*98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in z around 0 99.6%
metadata-eval99.6%
times-frac99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
if -2.40000000000000011e-91 < y < 9e-96Initial program 92.1%
+-commutative92.1%
associate-+r-92.1%
+-commutative92.1%
associate--l+92.1%
sub-neg92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
distribute-neg-in92.1%
remove-double-neg92.1%
sub-neg92.1%
neg-mul-192.1%
times-frac83.3%
distribute-frac-neg83.3%
neg-mul-183.3%
*-commutative83.3%
associate-/l*83.3%
*-commutative83.3%
Simplified83.4%
Taylor expanded in t around inf 91.2%
associate-*r/92.1%
*-commutative92.1%
associate-/r*99.8%
*-commutative99.8%
Applied egg-rr99.8%
if 9e-96 < y Initial program 98.6%
+-commutative98.6%
associate-+r-98.6%
+-commutative98.6%
associate--l+98.6%
sub-neg98.6%
remove-double-neg98.6%
distribute-frac-neg98.6%
distribute-neg-in98.6%
remove-double-neg98.6%
sub-neg98.6%
neg-mul-198.6%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
associate-*r/99.7%
Simplified99.7%
sub-neg99.7%
distribute-lft-in99.7%
metadata-eval99.7%
times-frac99.8%
*-un-lft-identity99.8%
*-commutative99.8%
Applied egg-rr99.8%
*-commutative99.8%
distribute-rgt-neg-out99.8%
distribute-lft-neg-in99.8%
metadata-eval99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (if (<= t -5e-31) (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))) (+ (+ x (/ 1.0 (* z (/ (* y 3.0) t)))) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5e-31) {
tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
} else {
tmp = (x + (1.0 / (z * ((y * 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 <= (-5d-31)) then
tmp = (x - (y / (z * 3.0d0))) + (t / (y * (z * 3.0d0)))
else
tmp = (x + (1.0d0 / (z * ((y * 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 <= -5e-31) {
tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
} else {
tmp = (x + (1.0 / (z * ((y * 3.0) / t)))) + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -5e-31: tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))) else: tmp = (x + (1.0 / (z * ((y * 3.0) / t)))) + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -5e-31) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))); else tmp = Float64(Float64(x + Float64(1.0 / Float64(z * Float64(Float64(y * 3.0) / t)))) + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -5e-31) tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); else tmp = (x + (1.0 / (z * ((y * 3.0) / t)))) + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -5e-31], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(1.0 / N[(z * N[(N[(y * 3.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-31}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{1}{z \cdot \frac{y \cdot 3}{t}}\right) + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if t < -5e-31Initial program 99.8%
if -5e-31 < t Initial program 94.2%
+-commutative94.2%
associate-+r-94.2%
sub-neg94.2%
associate-*l*94.2%
*-commutative94.2%
distribute-frac-neg294.2%
distribute-rgt-neg-in94.2%
metadata-eval94.2%
Simplified94.2%
clear-num94.2%
inv-pow94.2%
Applied egg-rr94.2%
unpow-194.2%
associate-/l*97.8%
Simplified97.8%
Final simplification98.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.8e-91) (not (<= y 2.1e-96))) (+ 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 <= -3.8e-91) || !(y <= 2.1e-96)) {
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 <= (-3.8d-91)) .or. (.not. (y <= 2.1d-96))) 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 <= -3.8e-91) || !(y <= 2.1e-96)) {
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 <= -3.8e-91) or not (y <= 2.1e-96): 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 <= -3.8e-91) || !(y <= 2.1e-96)) 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 <= -3.8e-91) || ~((y <= 2.1e-96))) 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, -3.8e-91], N[Not[LessEqual[y, 2.1e-96]], $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 -3.8 \cdot 10^{-91} \lor \neg \left(y \leq 2.1 \cdot 10^{-96}\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 < -3.79999999999999978e-91 or 2.10000000000000001e-96 < y Initial program 97.5%
+-commutative97.5%
associate-+r-97.5%
+-commutative97.5%
associate--l+97.5%
sub-neg97.5%
remove-double-neg97.5%
distribute-frac-neg97.5%
distribute-neg-in97.5%
remove-double-neg97.5%
sub-neg97.5%
neg-mul-197.5%
times-frac99.2%
distribute-frac-neg99.2%
neg-mul-199.2%
*-commutative99.2%
associate-/l*99.2%
*-commutative99.2%
Simplified99.1%
if -3.79999999999999978e-91 < y < 2.10000000000000001e-96Initial program 92.1%
+-commutative92.1%
associate-+r-92.1%
+-commutative92.1%
associate--l+92.1%
sub-neg92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
distribute-neg-in92.1%
remove-double-neg92.1%
sub-neg92.1%
neg-mul-192.1%
times-frac83.3%
distribute-frac-neg83.3%
neg-mul-183.3%
*-commutative83.3%
associate-/l*83.3%
*-commutative83.3%
Simplified83.4%
Taylor expanded in t around inf 91.2%
associate-*r/92.1%
*-commutative92.1%
associate-/r*99.8%
*-commutative99.8%
Applied egg-rr99.8%
Final simplification99.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.4e-92) (not (<= y 5.5e-96))) (+ 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 <= -5.4e-92) || !(y <= 5.5e-96)) {
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 <= (-5.4d-92)) .or. (.not. (y <= 5.5d-96))) 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 <= -5.4e-92) || !(y <= 5.5e-96)) {
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 <= -5.4e-92) or not (y <= 5.5e-96): 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 <= -5.4e-92) || !(y <= 5.5e-96)) 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 <= -5.4e-92) || ~((y <= 5.5e-96))) 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, -5.4e-92], N[Not[LessEqual[y, 5.5e-96]], $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 -5.4 \cdot 10^{-92} \lor \neg \left(y \leq 5.5 \cdot 10^{-96}\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 < -5.3999999999999999e-92 or 5.4999999999999997e-96 < y Initial program 97.5%
+-commutative97.5%
associate-+r-97.5%
+-commutative97.5%
associate--l+97.5%
sub-neg97.5%
remove-double-neg97.5%
distribute-frac-neg97.5%
distribute-neg-in97.5%
remove-double-neg97.5%
sub-neg97.5%
neg-mul-197.5%
times-frac99.2%
distribute-frac-neg99.2%
neg-mul-199.2%
*-commutative99.2%
associate-/l*99.2%
*-commutative99.2%
Simplified99.1%
Taylor expanded in z around 0 99.7%
metadata-eval99.7%
times-frac99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
if -5.3999999999999999e-92 < y < 5.4999999999999997e-96Initial program 92.1%
+-commutative92.1%
associate-+r-92.1%
+-commutative92.1%
associate--l+92.1%
sub-neg92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
distribute-neg-in92.1%
remove-double-neg92.1%
sub-neg92.1%
neg-mul-192.1%
times-frac83.3%
distribute-frac-neg83.3%
neg-mul-183.3%
*-commutative83.3%
associate-/l*83.3%
*-commutative83.3%
Simplified83.4%
Taylor expanded in t around inf 91.2%
associate-*r/92.1%
*-commutative92.1%
associate-/r*99.8%
*-commutative99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -960000000000.0)
(+ x (/ y (* z -3.0)))
(if (<= y 4.5e+58)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(+ x (* -0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -960000000000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 4.5e+58) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + (-0.3333333333333333 * (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 <= (-960000000000.0d0)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 4.5d+58) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
else
tmp = x + ((-0.3333333333333333d0) * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -960000000000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 4.5e+58) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + (-0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -960000000000.0: tmp = x + (y / (z * -3.0)) elif y <= 4.5e+58: tmp = x + (0.3333333333333333 * (t / (y * z))) else: tmp = x + (-0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -960000000000.0) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 4.5e+58) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); else tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -960000000000.0) tmp = x + (y / (z * -3.0)); elseif (y <= 4.5e+58) tmp = x + (0.3333333333333333 * (t / (y * z))); else tmp = x + (-0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -960000000000.0], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+58], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -960000000000:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+58}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -9.6e11Initial program 98.5%
+-commutative98.5%
associate-+r-98.5%
+-commutative98.5%
associate--l+98.5%
sub-neg98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
distribute-neg-in98.5%
remove-double-neg98.5%
sub-neg98.5%
neg-mul-198.5%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 98.3%
metadata-eval98.3%
distribute-lft-neg-in98.3%
*-commutative98.3%
associate-*l/98.4%
associate-*r/98.4%
distribute-rgt-neg-in98.4%
distribute-neg-frac98.4%
metadata-eval98.4%
Simplified98.4%
clear-num98.2%
un-div-inv98.3%
div-inv98.5%
metadata-eval98.5%
Applied egg-rr98.5%
if -9.6e11 < y < 4.4999999999999998e58Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
+-commutative93.5%
associate--l+93.5%
sub-neg93.5%
remove-double-neg93.5%
distribute-frac-neg93.5%
distribute-neg-in93.5%
remove-double-neg93.5%
sub-neg93.5%
neg-mul-193.5%
times-frac88.6%
distribute-frac-neg88.6%
neg-mul-188.6%
*-commutative88.6%
associate-/l*88.6%
*-commutative88.6%
Simplified88.7%
Taylor expanded in t around inf 88.7%
if 4.4999999999999998e58 < y Initial program 97.9%
+-commutative97.9%
associate-+r-97.9%
+-commutative97.9%
associate--l+97.9%
sub-neg97.9%
remove-double-neg97.9%
distribute-frac-neg97.9%
distribute-neg-in97.9%
remove-double-neg97.9%
sub-neg97.9%
neg-mul-197.9%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.6%
Taylor expanded in t around 0 91.3%
Final simplification92.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -4200000000000.0)
(+ x (/ y (* z -3.0)))
(if (<= y 2.4e+58)
(+ x (* 0.3333333333333333 (/ (/ t z) y)))
(+ x (* -0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4200000000000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 2.4e+58) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x + (-0.3333333333333333 * (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 <= (-4200000000000.0d0)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 2.4d+58) then
tmp = x + (0.3333333333333333d0 * ((t / z) / y))
else
tmp = x + ((-0.3333333333333333d0) * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4200000000000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 2.4e+58) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x + (-0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4200000000000.0: tmp = x + (y / (z * -3.0)) elif y <= 2.4e+58: tmp = x + (0.3333333333333333 * ((t / z) / y)) else: tmp = x + (-0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4200000000000.0) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 2.4e+58) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y))); else tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4200000000000.0) tmp = x + (y / (z * -3.0)); elseif (y <= 2.4e+58) tmp = x + (0.3333333333333333 * ((t / z) / y)); else tmp = x + (-0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4200000000000.0], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+58], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4200000000000:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+58}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -4.2e12Initial program 98.5%
+-commutative98.5%
associate-+r-98.5%
+-commutative98.5%
associate--l+98.5%
sub-neg98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
distribute-neg-in98.5%
remove-double-neg98.5%
sub-neg98.5%
neg-mul-198.5%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 98.3%
metadata-eval98.3%
distribute-lft-neg-in98.3%
*-commutative98.3%
associate-*l/98.4%
associate-*r/98.4%
distribute-rgt-neg-in98.4%
distribute-neg-frac98.4%
metadata-eval98.4%
Simplified98.4%
clear-num98.2%
un-div-inv98.3%
div-inv98.5%
metadata-eval98.5%
Applied egg-rr98.5%
if -4.2e12 < y < 2.4e58Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
+-commutative93.5%
associate--l+93.5%
sub-neg93.5%
remove-double-neg93.5%
distribute-frac-neg93.5%
distribute-neg-in93.5%
remove-double-neg93.5%
sub-neg93.5%
neg-mul-193.5%
times-frac88.6%
distribute-frac-neg88.6%
neg-mul-188.6%
*-commutative88.6%
associate-/l*88.6%
*-commutative88.6%
Simplified88.7%
Taylor expanded in t around inf 88.7%
div-inv88.6%
*-commutative88.6%
Applied egg-rr88.6%
associate-*r/88.7%
*-rgt-identity88.7%
associate-/r*93.6%
Simplified93.6%
if 2.4e58 < y Initial program 97.9%
+-commutative97.9%
associate-+r-97.9%
+-commutative97.9%
associate--l+97.9%
sub-neg97.9%
remove-double-neg97.9%
distribute-frac-neg97.9%
distribute-neg-in97.9%
remove-double-neg97.9%
sub-neg97.9%
neg-mul-197.9%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.6%
Taylor expanded in t around 0 91.3%
Final simplification94.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -5200000000000.0)
(+ x (/ y (* z -3.0)))
(if (<= y 6.8e+87)
(+ x (* 0.3333333333333333 (/ (/ t z) y)))
(+ x (/ 1.0 (* z (/ -3.0 y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5200000000000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 6.8e+87) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x + (1.0 / (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 <= (-5200000000000.0d0)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 6.8d+87) then
tmp = x + (0.3333333333333333d0 * ((t / z) / y))
else
tmp = x + (1.0d0 / (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 <= -5200000000000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 6.8e+87) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x + (1.0 / (z * (-3.0 / y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5200000000000.0: tmp = x + (y / (z * -3.0)) elif y <= 6.8e+87: tmp = x + (0.3333333333333333 * ((t / z) / y)) else: tmp = x + (1.0 / (z * (-3.0 / y))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5200000000000.0) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 6.8e+87) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y))); else tmp = Float64(x + Float64(1.0 / Float64(z * Float64(-3.0 / y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5200000000000.0) tmp = x + (y / (z * -3.0)); elseif (y <= 6.8e+87) tmp = x + (0.3333333333333333 * ((t / z) / y)); else tmp = x + (1.0 / (z * (-3.0 / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5200000000000.0], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+87], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.0 / N[(z * N[(-3.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5200000000000:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+87}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{z \cdot \frac{-3}{y}}\\
\end{array}
\end{array}
if y < -5.2e12Initial program 98.5%
+-commutative98.5%
associate-+r-98.5%
+-commutative98.5%
associate--l+98.5%
sub-neg98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
distribute-neg-in98.5%
remove-double-neg98.5%
sub-neg98.5%
neg-mul-198.5%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 98.3%
metadata-eval98.3%
distribute-lft-neg-in98.3%
*-commutative98.3%
associate-*l/98.4%
associate-*r/98.4%
distribute-rgt-neg-in98.4%
distribute-neg-frac98.4%
metadata-eval98.4%
Simplified98.4%
clear-num98.2%
un-div-inv98.3%
div-inv98.5%
metadata-eval98.5%
Applied egg-rr98.5%
if -5.2e12 < y < 6.8000000000000004e87Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
+-commutative93.5%
associate--l+93.5%
sub-neg93.5%
remove-double-neg93.5%
distribute-frac-neg93.5%
distribute-neg-in93.5%
remove-double-neg93.5%
sub-neg93.5%
neg-mul-193.5%
times-frac89.7%
distribute-frac-neg89.7%
neg-mul-189.7%
*-commutative89.7%
associate-/l*89.7%
*-commutative89.7%
Simplified89.8%
Taylor expanded in t around inf 87.2%
div-inv87.2%
*-commutative87.2%
Applied egg-rr87.2%
associate-*r/87.2%
*-rgt-identity87.2%
associate-/r*92.2%
Simplified92.2%
if 6.8000000000000004e87 < 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%
associate-*l/99.7%
clear-num99.7%
Applied egg-rr99.7%
Taylor expanded in t around 0 96.2%
associate-*r/96.2%
*-commutative96.2%
associate-/l*96.3%
Simplified96.3%
Final simplification94.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -3900000000000.0)
(+ x (/ y (* z -3.0)))
(if (<= y 3.2e+59)
(+ x (/ (/ (* t 0.3333333333333333) z) y))
(+ x (* -0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3900000000000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.2e+59) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (-0.3333333333333333 * (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 <= (-3900000000000.0d0)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 3.2d+59) then
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
else
tmp = x + ((-0.3333333333333333d0) * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3900000000000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.2e+59) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (-0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3900000000000.0: tmp = x + (y / (z * -3.0)) elif y <= 3.2e+59: tmp = x + (((t * 0.3333333333333333) / z) / y) else: tmp = x + (-0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3900000000000.0) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 3.2e+59) tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); else tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3900000000000.0) tmp = x + (y / (z * -3.0)); elseif (y <= 3.2e+59) tmp = x + (((t * 0.3333333333333333) / z) / y); else tmp = x + (-0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3900000000000.0], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+59], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3900000000000:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+59}:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -3.9e12Initial program 98.5%
+-commutative98.5%
associate-+r-98.5%
+-commutative98.5%
associate--l+98.5%
sub-neg98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
distribute-neg-in98.5%
remove-double-neg98.5%
sub-neg98.5%
neg-mul-198.5%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 98.3%
metadata-eval98.3%
distribute-lft-neg-in98.3%
*-commutative98.3%
associate-*l/98.4%
associate-*r/98.4%
distribute-rgt-neg-in98.4%
distribute-neg-frac98.4%
metadata-eval98.4%
Simplified98.4%
clear-num98.2%
un-div-inv98.3%
div-inv98.5%
metadata-eval98.5%
Applied egg-rr98.5%
if -3.9e12 < y < 3.19999999999999982e59Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
+-commutative93.5%
associate--l+93.5%
sub-neg93.5%
remove-double-neg93.5%
distribute-frac-neg93.5%
distribute-neg-in93.5%
remove-double-neg93.5%
sub-neg93.5%
neg-mul-193.5%
times-frac88.6%
distribute-frac-neg88.6%
neg-mul-188.6%
*-commutative88.6%
associate-/l*88.6%
*-commutative88.6%
Simplified88.7%
Taylor expanded in t around inf 88.7%
associate-*r/89.2%
*-commutative89.2%
associate-/r*94.1%
*-commutative94.1%
Applied egg-rr94.1%
if 3.19999999999999982e59 < y Initial program 97.9%
+-commutative97.9%
associate-+r-97.9%
+-commutative97.9%
associate--l+97.9%
sub-neg97.9%
remove-double-neg97.9%
distribute-frac-neg97.9%
distribute-neg-in97.9%
remove-double-neg97.9%
sub-neg97.9%
neg-mul-197.9%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.6%
Taylor expanded in t around 0 91.3%
Final simplification94.8%
(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.7%
+-commutative95.7%
associate-+r-95.7%
+-commutative95.7%
associate--l+95.7%
sub-neg95.7%
remove-double-neg95.7%
distribute-frac-neg95.7%
distribute-neg-in95.7%
remove-double-neg95.7%
sub-neg95.7%
neg-mul-195.7%
times-frac93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in t around 0 66.8%
Final simplification66.8%
(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.7%
+-commutative95.7%
associate-+r-95.7%
+-commutative95.7%
associate--l+95.7%
sub-neg95.7%
remove-double-neg95.7%
distribute-frac-neg95.7%
distribute-neg-in95.7%
remove-double-neg95.7%
sub-neg95.7%
neg-mul-195.7%
times-frac93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in t around 0 66.8%
metadata-eval66.8%
distribute-lft-neg-in66.8%
*-commutative66.8%
associate-*l/66.8%
associate-*r/66.6%
distribute-rgt-neg-in66.6%
distribute-neg-frac66.6%
metadata-eval66.6%
Simplified66.6%
clear-num66.6%
un-div-inv66.7%
div-inv66.8%
metadata-eval66.8%
Applied egg-rr66.8%
Final simplification66.8%
(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.7%
+-commutative95.7%
associate-+r-95.7%
+-commutative95.7%
associate--l+95.7%
sub-neg95.7%
remove-double-neg95.7%
distribute-frac-neg95.7%
distribute-neg-in95.7%
remove-double-neg95.7%
sub-neg95.7%
neg-mul-195.7%
times-frac93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in x around inf 34.6%
Final simplification34.6%
(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 2024077
(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))))