
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.5e-75) (not (<= y 1.6e-223))) (- x (/ (- y (/ t y)) (* z 3.0))) (+ x (/ (/ t z) (* y 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.5e-75) || !(y <= 1.6e-223)) {
tmp = x - ((y - (t / y)) / (z * 3.0));
} else {
tmp = x + ((t / z) / (y * 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 <= (-2.5d-75)) .or. (.not. (y <= 1.6d-223))) then
tmp = x - ((y - (t / y)) / (z * 3.0d0))
else
tmp = x + ((t / z) / (y * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.5e-75) || !(y <= 1.6e-223)) {
tmp = x - ((y - (t / y)) / (z * 3.0));
} else {
tmp = x + ((t / z) / (y * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.5e-75) or not (y <= 1.6e-223): tmp = x - ((y - (t / y)) / (z * 3.0)) else: tmp = x + ((t / z) / (y * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.5e-75) || !(y <= 1.6e-223)) tmp = Float64(x - Float64(Float64(y - Float64(t / y)) / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(t / z) / Float64(y * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.5e-75) || ~((y <= 1.6e-223))) tmp = x - ((y - (t / y)) / (z * 3.0)); else tmp = x + ((t / z) / (y * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.5e-75], N[Not[LessEqual[y, 1.6e-223]], $MachinePrecision]], N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-75} \lor \neg \left(y \leq 1.6 \cdot 10^{-223}\right):\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\end{array}
\end{array}
if y < -2.49999999999999989e-75 or 1.6e-223 < y Initial program 98.3%
associate-*l*98.3%
*-commutative98.3%
Simplified98.3%
associate-+l-98.3%
*-commutative98.3%
associate-*l*98.3%
associate-/l/99.2%
sub-div99.8%
Applied egg-rr99.8%
if -2.49999999999999989e-75 < y < 1.6e-223Initial program 91.1%
associate-*l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in y around 0 90.9%
+-commutative90.9%
*-commutative90.9%
associate-/r*86.1%
associate-*l/86.1%
associate-*r/86.1%
associate-*l/99.8%
Simplified99.8%
associate-/l*91.1%
associate-/r/86.1%
metadata-eval86.1%
associate-/r*86.2%
*-commutative86.2%
div-inv86.1%
div-inv86.1%
*-commutative86.1%
times-frac90.3%
Applied egg-rr90.3%
frac-times86.1%
*-commutative86.1%
associate-*l/99.8%
div-inv99.8%
associate-/r*99.8%
associate-/l/99.9%
Applied egg-rr99.9%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (if (<= t 2.9e+159) (+ x (fma -0.3333333333333333 (/ y z) (* (/ t z) (/ (/ 1.0 y) 3.0)))) (- x (/ (- y (/ t y)) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.9e+159) {
tmp = x + fma(-0.3333333333333333, (y / z), ((t / z) * ((1.0 / y) / 3.0)));
} else {
tmp = x - ((y - (t / y)) / (z * 3.0));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (t <= 2.9e+159) tmp = Float64(x + fma(-0.3333333333333333, Float64(y / z), Float64(Float64(t / z) * Float64(Float64(1.0 / y) / 3.0)))); else tmp = Float64(x - Float64(Float64(y - Float64(t / y)) / Float64(z * 3.0))); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[t, 2.9e+159], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision] + N[(N[(t / z), $MachinePrecision] * N[(N[(1.0 / y), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.9 \cdot 10^{+159}:\\
\;\;\;\;x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{t}{z} \cdot \frac{\frac{1}{y}}{3}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{z \cdot 3}\\
\end{array}
\end{array}
if t < 2.90000000000000014e159Initial program 96.3%
sub-neg96.3%
associate-+l+96.3%
remove-double-neg96.3%
neg-mul-196.3%
*-lft-identity96.3%
metadata-eval96.3%
times-frac96.3%
neg-mul-196.3%
neg-mul-196.3%
distribute-rgt-neg-out96.3%
distribute-neg-frac96.3%
distribute-neg-out96.3%
neg-mul-196.3%
distribute-lft-out96.3%
neg-mul-196.3%
distribute-neg-out96.3%
remove-double-neg96.3%
Simplified96.3%
associate-/r*95.5%
div-inv95.5%
times-frac99.3%
Applied egg-rr99.3%
if 2.90000000000000014e159 < t Initial program 96.8%
associate-*l*96.8%
*-commutative96.8%
Simplified96.8%
associate-+l-96.8%
*-commutative96.8%
associate-*l*96.8%
associate-/l/96.8%
sub-div99.9%
Applied egg-rr99.9%
Final simplification99.4%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -4e+76) (+ (- x (/ y (* z 3.0))) (/ t (* z (* y 3.0)))) (- x (/ (- y (/ t y)) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -4e+76) {
tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0)));
} else {
tmp = x - ((y - (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 ((z * 3.0d0) <= (-4d+76)) then
tmp = (x - (y / (z * 3.0d0))) + (t / (z * (y * 3.0d0)))
else
tmp = x - ((y - (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 ((z * 3.0) <= -4e+76) {
tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0)));
} else {
tmp = x - ((y - (t / y)) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -4e+76: tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0))) else: tmp = x - ((y - (t / y)) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -4e+76) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(z * Float64(y * 3.0)))); else tmp = Float64(x - Float64(Float64(y - Float64(t / y)) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -4e+76) tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0))); else tmp = x - ((y - (t / y)) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -4e+76], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -4 \cdot 10^{+76}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(y \cdot 3\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{z \cdot 3}\\
\end{array}
\end{array}
if (*.f64 z 3) < -4.0000000000000002e76Initial program 99.8%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
if -4.0000000000000002e76 < (*.f64 z 3) Initial program 95.6%
associate-*l*95.6%
*-commutative95.6%
Simplified95.6%
associate-+l-95.6%
*-commutative95.6%
associate-*l*95.6%
associate-/l/98.0%
sub-div98.5%
Applied egg-rr98.5%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -1e+24) (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))) (- x (/ (- y (/ t y)) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -1e+24) {
tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
} else {
tmp = x - ((y - (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 ((z * 3.0d0) <= (-1d+24)) then
tmp = (x - (y / (z * 3.0d0))) + (t / (y * (z * 3.0d0)))
else
tmp = x - ((y - (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 ((z * 3.0) <= -1e+24) {
tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
} else {
tmp = x - ((y - (t / y)) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -1e+24: tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))) else: tmp = x - ((y - (t / y)) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -1e+24) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))); else tmp = Float64(x - Float64(Float64(y - Float64(t / y)) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -1e+24) tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); else tmp = x - ((y - (t / y)) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -1e+24], 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[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{+24}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{z \cdot 3}\\
\end{array}
\end{array}
if (*.f64 z 3) < -9.9999999999999998e23Initial program 99.8%
if -9.9999999999999998e23 < (*.f64 z 3) Initial program 95.5%
associate-*l*95.5%
*-commutative95.5%
Simplified95.5%
associate-+l-95.5%
*-commutative95.5%
associate-*l*95.5%
associate-/l/97.9%
sub-div98.4%
Applied egg-rr98.4%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(if (<= t 1.25e+160)
(-
(+ x (/ (* (/ t z) 0.3333333333333333) y))
(* (/ y z) 0.3333333333333333))
(- x (/ (- y (/ t y)) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.25e+160) {
tmp = (x + (((t / z) * 0.3333333333333333) / y)) - ((y / z) * 0.3333333333333333);
} else {
tmp = x - ((y - (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 <= 1.25d+160) then
tmp = (x + (((t / z) * 0.3333333333333333d0) / y)) - ((y / z) * 0.3333333333333333d0)
else
tmp = x - ((y - (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 <= 1.25e+160) {
tmp = (x + (((t / z) * 0.3333333333333333) / y)) - ((y / z) * 0.3333333333333333);
} else {
tmp = x - ((y - (t / y)) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 1.25e+160: tmp = (x + (((t / z) * 0.3333333333333333) / y)) - ((y / z) * 0.3333333333333333) else: tmp = x - ((y - (t / y)) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 1.25e+160) tmp = Float64(Float64(x + Float64(Float64(Float64(t / z) * 0.3333333333333333) / y)) - Float64(Float64(y / z) * 0.3333333333333333)); else tmp = Float64(x - Float64(Float64(y - Float64(t / y)) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 1.25e+160) tmp = (x + (((t / z) * 0.3333333333333333) / y)) - ((y / z) * 0.3333333333333333); else tmp = x - ((y - (t / y)) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 1.25e+160], N[(N[(x + N[(N[(N[(t / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.25 \cdot 10^{+160}:\\
\;\;\;\;\left(x + \frac{\frac{t}{z} \cdot 0.3333333333333333}{y}\right) - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{z \cdot 3}\\
\end{array}
\end{array}
if t < 1.25e160Initial program 96.3%
associate-*l*96.3%
*-commutative96.3%
Simplified96.3%
+-commutative96.3%
associate-+r-96.3%
*-commutative96.3%
associate-*l*96.3%
associate-/r*99.8%
*-un-lft-identity99.8%
*-commutative99.8%
times-frac99.3%
metadata-eval99.3%
*-un-lft-identity99.3%
*-commutative99.3%
times-frac99.3%
metadata-eval99.3%
Applied egg-rr99.3%
if 1.25e160 < t Initial program 96.8%
associate-*l*96.8%
*-commutative96.8%
Simplified96.8%
associate-+l-96.8%
*-commutative96.8%
associate-*l*96.8%
associate-/l/96.8%
sub-div99.9%
Applied egg-rr99.9%
Final simplification99.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.6e-75) (not (<= y 2e-39))) (+ x (* (/ 0.3333333333333333 z) (- (/ t y) y))) (+ x (/ (/ t z) (* y 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.6e-75) || !(y <= 2e-39)) {
tmp = x + ((0.3333333333333333 / z) * ((t / y) - y));
} else {
tmp = x + ((t / z) / (y * 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.6d-75)) .or. (.not. (y <= 2d-39))) then
tmp = x + ((0.3333333333333333d0 / z) * ((t / y) - y))
else
tmp = x + ((t / z) / (y * 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.6e-75) || !(y <= 2e-39)) {
tmp = x + ((0.3333333333333333 / z) * ((t / y) - y));
} else {
tmp = x + ((t / z) / (y * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.6e-75) or not (y <= 2e-39): tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)) else: tmp = x + ((t / z) / (y * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.6e-75) || !(y <= 2e-39)) tmp = Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y))); else tmp = Float64(x + Float64(Float64(t / z) / Float64(y * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.6e-75) || ~((y <= 2e-39))) tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)); else tmp = x + ((t / z) / (y * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.6e-75], N[Not[LessEqual[y, 2e-39]], $MachinePrecision]], N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{-75} \lor \neg \left(y \leq 2 \cdot 10^{-39}\right):\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\end{array}
\end{array}
if y < -1.59999999999999988e-75 or 1.99999999999999986e-39 < y Initial program 98.6%
Simplified99.7%
if -1.59999999999999988e-75 < y < 1.99999999999999986e-39Initial program 92.9%
associate-*l*92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in y around 0 92.7%
+-commutative92.7%
*-commutative92.7%
associate-/r*90.3%
associate-*l/90.3%
associate-*r/90.3%
associate-*l/99.8%
Simplified99.8%
associate-/l*92.8%
associate-/r/90.3%
metadata-eval90.3%
associate-/r*90.4%
*-commutative90.4%
div-inv90.3%
div-inv90.3%
*-commutative90.3%
times-frac91.4%
Applied egg-rr91.4%
frac-times90.3%
*-commutative90.3%
associate-*l/99.7%
div-inv99.8%
associate-/r*99.8%
associate-/l/99.9%
Applied egg-rr99.9%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.4e-26) (not (<= y 1.36e+69))) (- x (/ y (* z 3.0))) (+ x (* 0.3333333333333333 (/ t (* y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.4e-26) || !(y <= 1.36e+69)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (y * z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.4d-26)) .or. (.not. (y <= 1.36d+69))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.4e-26) || !(y <= 1.36e+69)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (y * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.4e-26) or not (y <= 1.36e+69): tmp = x - (y / (z * 3.0)) else: tmp = x + (0.3333333333333333 * (t / (y * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.4e-26) || !(y <= 1.36e+69)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.4e-26) || ~((y <= 1.36e+69))) tmp = x - (y / (z * 3.0)); else tmp = x + (0.3333333333333333 * (t / (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.4e-26], N[Not[LessEqual[y, 1.36e+69]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-26} \lor \neg \left(y \leq 1.36 \cdot 10^{+69}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -1.4000000000000001e-26 or 1.36000000000000006e69 < y Initial program 99.0%
associate-*l*99.0%
*-commutative99.0%
Simplified99.0%
associate-+l-99.0%
*-commutative99.0%
associate-*l*99.0%
associate-/l/99.0%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 96.4%
if -1.4000000000000001e-26 < y < 1.36000000000000006e69Initial program 93.8%
Simplified92.4%
Taylor expanded in t around inf 91.3%
Final simplification93.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.4e-26) (not (<= y 1.36e+69))) (- x (/ y (* z 3.0))) (+ x (/ 0.3333333333333333 (* y (/ z t))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.4e-26) || !(y <= 1.36e+69)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 / (y * (z / t)));
}
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.4d-26)) .or. (.not. (y <= 1.36d+69))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + (0.3333333333333333d0 / (y * (z / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.4e-26) || !(y <= 1.36e+69)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 / (y * (z / t)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.4e-26) or not (y <= 1.36e+69): tmp = x - (y / (z * 3.0)) else: tmp = x + (0.3333333333333333 / (y * (z / t))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.4e-26) || !(y <= 1.36e+69)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(0.3333333333333333 / Float64(y * Float64(z / t)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.4e-26) || ~((y <= 1.36e+69))) tmp = x - (y / (z * 3.0)); else tmp = x + (0.3333333333333333 / (y * (z / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.4e-26], N[Not[LessEqual[y, 1.36e+69]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 / N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-26} \lor \neg \left(y \leq 1.36 \cdot 10^{+69}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{y \cdot \frac{z}{t}}\\
\end{array}
\end{array}
if y < -1.4000000000000001e-26 or 1.36000000000000006e69 < y Initial program 99.0%
associate-*l*99.0%
*-commutative99.0%
Simplified99.0%
associate-+l-99.0%
*-commutative99.0%
associate-*l*99.0%
associate-/l/99.0%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 96.4%
if -1.4000000000000001e-26 < y < 1.36000000000000006e69Initial program 93.8%
Simplified92.4%
Taylor expanded in t around inf 91.3%
associate-*r/91.3%
*-commutative91.3%
*-commutative91.3%
associate-*r/90.2%
*-commutative90.2%
Simplified90.2%
associate-*r/91.3%
*-commutative91.3%
times-frac96.8%
div-inv96.8%
associate-*l*96.7%
*-commutative96.7%
div-inv96.8%
associate-/l*96.8%
div-inv96.8%
clear-num96.7%
Applied egg-rr96.7%
Final simplification96.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.4e-26) (not (<= y 3.8e+69))) (- x (/ y (* z 3.0))) (+ x (/ 0.3333333333333333 (/ y (/ t z))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.4e-26) || !(y <= 3.8e+69)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 / (y / (t / 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.4d-26)) .or. (.not. (y <= 3.8d+69))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + (0.3333333333333333d0 / (y / (t / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.4e-26) || !(y <= 3.8e+69)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 / (y / (t / z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.4e-26) or not (y <= 3.8e+69): tmp = x - (y / (z * 3.0)) else: tmp = x + (0.3333333333333333 / (y / (t / z))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.4e-26) || !(y <= 3.8e+69)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(0.3333333333333333 / Float64(y / Float64(t / z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.4e-26) || ~((y <= 3.8e+69))) tmp = x - (y / (z * 3.0)); else tmp = x + (0.3333333333333333 / (y / (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.4e-26], N[Not[LessEqual[y, 3.8e+69]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 / N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-26} \lor \neg \left(y \leq 3.8 \cdot 10^{+69}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{\frac{y}{\frac{t}{z}}}\\
\end{array}
\end{array}
if y < -1.4000000000000001e-26 or 3.80000000000000028e69 < y Initial program 99.0%
associate-*l*99.0%
*-commutative99.0%
Simplified99.0%
associate-+l-99.0%
*-commutative99.0%
associate-*l*99.0%
associate-/l/99.0%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 96.4%
if -1.4000000000000001e-26 < y < 3.80000000000000028e69Initial program 93.8%
Simplified92.4%
Taylor expanded in t around inf 91.3%
associate-*r/91.3%
*-commutative91.3%
*-commutative91.3%
associate-*r/90.2%
*-commutative90.2%
Simplified90.2%
associate-*r/91.3%
*-commutative91.3%
times-frac96.8%
div-inv96.8%
associate-*l*96.7%
*-commutative96.7%
div-inv96.8%
associate-/l*96.8%
div-inv96.8%
clear-num96.7%
Applied egg-rr96.7%
clear-num96.8%
un-div-inv96.8%
Applied egg-rr96.8%
Final simplification96.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.4e-26) (not (<= y 1.36e+69))) (- x (/ y (* z 3.0))) (+ x (/ (/ t z) (* y 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.4e-26) || !(y <= 1.36e+69)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t / z) / (y * 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.4d-26)) .or. (.not. (y <= 1.36d+69))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + ((t / z) / (y * 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.4e-26) || !(y <= 1.36e+69)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t / z) / (y * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.4e-26) or not (y <= 1.36e+69): tmp = x - (y / (z * 3.0)) else: tmp = x + ((t / z) / (y * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.4e-26) || !(y <= 1.36e+69)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(t / z) / Float64(y * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.4e-26) || ~((y <= 1.36e+69))) tmp = x - (y / (z * 3.0)); else tmp = x + ((t / z) / (y * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.4e-26], N[Not[LessEqual[y, 1.36e+69]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-26} \lor \neg \left(y \leq 1.36 \cdot 10^{+69}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\end{array}
\end{array}
if y < -1.4000000000000001e-26 or 1.36000000000000006e69 < y Initial program 99.0%
associate-*l*99.0%
*-commutative99.0%
Simplified99.0%
associate-+l-99.0%
*-commutative99.0%
associate-*l*99.0%
associate-/l/99.0%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 96.4%
if -1.4000000000000001e-26 < y < 1.36000000000000006e69Initial program 93.8%
associate-*l*93.7%
*-commutative93.7%
Simplified93.7%
Taylor expanded in y around 0 91.3%
+-commutative91.3%
*-commutative91.3%
associate-/r*89.4%
associate-*l/89.5%
associate-*r/89.4%
associate-*l/96.8%
Simplified96.8%
associate-/l*91.4%
associate-/r/89.4%
metadata-eval89.4%
associate-/r*89.5%
*-commutative89.5%
div-inv89.5%
div-inv89.4%
*-commutative89.4%
times-frac90.3%
Applied egg-rr90.3%
frac-times89.4%
*-commutative89.4%
associate-*l/96.7%
div-inv96.8%
associate-/r*96.8%
associate-/l/96.8%
Applied egg-rr96.8%
Final simplification96.6%
(FPCore (x y z t) :precision binary64 (if (<= y -1.4e-26) (+ x (* y (/ (/ -1.0 z) 3.0))) (if (<= y 1.55e+69) (+ x (/ (/ t z) (* y 3.0))) (- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e-26) {
tmp = x + (y * ((-1.0 / z) / 3.0));
} else if (y <= 1.55e+69) {
tmp = x + ((t / z) / (y * 3.0));
} 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.4d-26)) then
tmp = x + (y * (((-1.0d0) / z) / 3.0d0))
else if (y <= 1.55d+69) then
tmp = x + ((t / z) / (y * 3.0d0))
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.4e-26) {
tmp = x + (y * ((-1.0 / z) / 3.0));
} else if (y <= 1.55e+69) {
tmp = x + ((t / z) / (y * 3.0));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.4e-26: tmp = x + (y * ((-1.0 / z) / 3.0)) elif y <= 1.55e+69: tmp = x + ((t / z) / (y * 3.0)) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.4e-26) tmp = Float64(x + Float64(y * Float64(Float64(-1.0 / z) / 3.0))); elseif (y <= 1.55e+69) tmp = Float64(x + Float64(Float64(t / z) / Float64(y * 3.0))); 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.4e-26) tmp = x + (y * ((-1.0 / z) / 3.0)); elseif (y <= 1.55e+69) tmp = x + ((t / z) / (y * 3.0)); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.4e-26], N[(x + N[(y * N[(N[(-1.0 / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e+69], N[(x + N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $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.4 \cdot 10^{-26}:\\
\;\;\;\;x + y \cdot \frac{\frac{-1}{z}}{3}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+69}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -1.4000000000000001e-26Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 96.9%
metadata-eval96.9%
times-frac97.0%
*-un-lft-identity97.0%
*-commutative97.0%
clear-num97.1%
Applied egg-rr97.1%
associate-/r/97.0%
associate-/r*97.1%
Simplified97.1%
if -1.4000000000000001e-26 < y < 1.5499999999999999e69Initial program 93.8%
associate-*l*93.7%
*-commutative93.7%
Simplified93.7%
Taylor expanded in y around 0 91.3%
+-commutative91.3%
*-commutative91.3%
associate-/r*89.4%
associate-*l/89.5%
associate-*r/89.4%
associate-*l/96.8%
Simplified96.8%
associate-/l*91.4%
associate-/r/89.4%
metadata-eval89.4%
associate-/r*89.5%
*-commutative89.5%
div-inv89.5%
div-inv89.4%
*-commutative89.4%
times-frac90.3%
Applied egg-rr90.3%
frac-times89.4%
*-commutative89.4%
associate-*l/96.7%
div-inv96.8%
associate-/r*96.8%
associate-/l/96.8%
Applied egg-rr96.8%
if 1.5499999999999999e69 < y Initial program 98.2%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
associate-+l-98.2%
*-commutative98.2%
associate-*l*98.2%
associate-/l/98.2%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 95.9%
Final simplification96.7%
(FPCore (x y z t) :precision binary64 (- x (* (/ y z) 0.3333333333333333)))
double code(double x, double y, double z, double t) {
return x - ((y / z) * 0.3333333333333333);
}
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) * 0.3333333333333333d0)
end function
public static double code(double x, double y, double z, double t) {
return x - ((y / z) * 0.3333333333333333);
}
def code(x, y, z, t): return x - ((y / z) * 0.3333333333333333)
function code(x, y, z, t) return Float64(x - Float64(Float64(y / z) * 0.3333333333333333)) end
function tmp = code(x, y, z, t) tmp = x - ((y / z) * 0.3333333333333333); end
code[x_, y_, z_, t_] := N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y}{z} \cdot 0.3333333333333333
\end{array}
Initial program 96.4%
associate-*l*96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in t around 0 66.2%
Final simplification66.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 96.4%
associate-*l*96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in t around 0 66.2%
clear-num66.2%
un-div-inv66.2%
Applied egg-rr66.2%
associate-/r/66.2%
Applied egg-rr66.2%
Final simplification66.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 96.4%
associate-*l*96.4%
*-commutative96.4%
Simplified96.4%
associate-+l-96.4%
*-commutative96.4%
associate-*l*96.4%
associate-/l/95.7%
sub-div96.1%
Applied egg-rr96.1%
Taylor expanded in y around inf 66.2%
Final simplification66.2%
(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.4%
associate-*l*96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in x around inf 29.0%
Final simplification29.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 2024010
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))