
(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 13 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 -8e-133)
(+ x (* (- y (/ t y)) (/ -0.3333333333333333 z)))
(if (<= y 1.5e-135)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(+ x (/ (* 0.3333333333333333 (- (/ t y) y)) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e-133) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else if (y <= 1.5e-135) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((0.3333333333333333 * ((t / y) - 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 <= (-8d-133)) then
tmp = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
else if (y <= 1.5d-135) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x + ((0.3333333333333333d0 * ((t / y) - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e-133) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else if (y <= 1.5e-135) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8e-133: tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)) elif y <= 1.5e-135: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8e-133) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))); elseif (y <= 1.5e-135) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x + Float64(Float64(0.3333333333333333 * Float64(Float64(t / y) - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8e-133) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); elseif (y <= 1.5e-135) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8e-133], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-135], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-133}:\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-135}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\
\end{array}
\end{array}
if y < -8.0000000000000005e-133Initial program 96.8%
associate-+l-96.8%
sub-neg96.8%
sub-neg96.8%
distribute-neg-in96.8%
unsub-neg96.8%
neg-mul-196.8%
associate-*r/96.8%
associate-*l/96.8%
distribute-neg-frac96.8%
neg-mul-196.8%
times-frac98.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
if -8.0000000000000005e-133 < y < 1.50000000000000006e-135Initial program 89.7%
associate-+l-89.7%
sub-neg89.7%
sub-neg89.7%
distribute-neg-in89.7%
unsub-neg89.7%
neg-mul-189.7%
associate-*r/89.7%
associate-*l/89.7%
distribute-neg-frac89.7%
neg-mul-189.7%
times-frac83.1%
distribute-lft-out--83.1%
*-commutative83.1%
associate-/r*83.1%
metadata-eval83.1%
Simplified83.1%
Taylor expanded in y around 0 89.4%
associate-*r/89.5%
Applied egg-rr89.5%
*-commutative89.5%
*-commutative89.5%
times-frac96.8%
Applied egg-rr96.8%
if 1.50000000000000006e-135 < y Initial program 98.8%
associate-+l-98.8%
sub-neg98.8%
sub-neg98.8%
distribute-neg-in98.8%
unsub-neg98.8%
neg-mul-198.8%
associate-*r/98.8%
associate-*l/98.8%
distribute-neg-frac98.8%
neg-mul-198.8%
times-frac98.7%
distribute-lft-out--98.7%
*-commutative98.7%
associate-/r*98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in y around 0 98.7%
+-commutative98.7%
metadata-eval98.7%
cancel-sign-sub-inv98.7%
associate-/r*98.6%
associate-*r/98.6%
associate-*r/98.7%
div-sub98.7%
distribute-lft-out--98.7%
Simplified98.7%
Final simplification98.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* 0.3333333333333333 (/ t (* y z)))))
(t_2 (+ x (/ (* -0.3333333333333333 y) z))))
(if (<= y -8e+17)
t_2
(if (<= y 2.7e-229)
t_1
(if (<= y 1.95e-155)
(+ x (* (/ t y) (/ 0.3333333333333333 z)))
(if (<= y 4.5e-33) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (0.3333333333333333 * (t / (y * z)));
double t_2 = x + ((-0.3333333333333333 * y) / z);
double tmp;
if (y <= -8e+17) {
tmp = t_2;
} else if (y <= 2.7e-229) {
tmp = t_1;
} else if (y <= 1.95e-155) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else if (y <= 4.5e-33) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = x + (0.3333333333333333d0 * (t / (y * z)))
t_2 = x + (((-0.3333333333333333d0) * y) / z)
if (y <= (-8d+17)) then
tmp = t_2
else if (y <= 2.7d-229) then
tmp = t_1
else if (y <= 1.95d-155) then
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
else if (y <= 4.5d-33) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (0.3333333333333333 * (t / (y * z)));
double t_2 = x + ((-0.3333333333333333 * y) / z);
double tmp;
if (y <= -8e+17) {
tmp = t_2;
} else if (y <= 2.7e-229) {
tmp = t_1;
} else if (y <= 1.95e-155) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else if (y <= 4.5e-33) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (0.3333333333333333 * (t / (y * z))) t_2 = x + ((-0.3333333333333333 * y) / z) tmp = 0 if y <= -8e+17: tmp = t_2 elif y <= 2.7e-229: tmp = t_1 elif y <= 1.95e-155: tmp = x + ((t / y) * (0.3333333333333333 / z)) elif y <= 4.5e-33: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))) t_2 = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z)) tmp = 0.0 if (y <= -8e+17) tmp = t_2; elseif (y <= 2.7e-229) tmp = t_1; elseif (y <= 1.95e-155) tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); elseif (y <= 4.5e-33) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (0.3333333333333333 * (t / (y * z))); t_2 = x + ((-0.3333333333333333 * y) / z); tmp = 0.0; if (y <= -8e+17) tmp = t_2; elseif (y <= 2.7e-229) tmp = t_1; elseif (y <= 1.95e-155) tmp = x + ((t / y) * (0.3333333333333333 / z)); elseif (y <= 4.5e-33) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8e+17], t$95$2, If[LessEqual[y, 2.7e-229], t$95$1, If[LessEqual[y, 1.95e-155], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-33], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
t_2 := x + \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{if}\;y \leq -8 \cdot 10^{+17}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-229}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-155}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -8e17 or 4.49999999999999991e-33 < y Initial program 99.0%
associate-+l-99.0%
sub-neg99.0%
sub-neg99.0%
distribute-neg-in99.0%
unsub-neg99.0%
neg-mul-199.0%
associate-*r/99.0%
associate-*l/99.0%
distribute-neg-frac99.0%
neg-mul-199.0%
times-frac98.2%
distribute-lft-out--99.0%
*-commutative99.0%
associate-/r*98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in y around inf 91.1%
associate-*l/91.1%
Applied egg-rr91.1%
if -8e17 < y < 2.6999999999999998e-229 or 1.9500000000000002e-155 < y < 4.49999999999999991e-33Initial program 95.7%
associate-+l-95.7%
sub-neg95.7%
sub-neg95.7%
distribute-neg-in95.7%
unsub-neg95.7%
neg-mul-195.7%
associate-*r/95.7%
associate-*l/95.8%
distribute-neg-frac95.8%
neg-mul-195.8%
times-frac90.7%
distribute-lft-out--90.7%
*-commutative90.7%
associate-/r*90.7%
metadata-eval90.7%
Simplified90.7%
Taylor expanded in y around 0 90.7%
if 2.6999999999999998e-229 < y < 1.9500000000000002e-155Initial program 61.9%
associate-+l-61.9%
sub-neg61.9%
sub-neg61.9%
distribute-neg-in61.9%
unsub-neg61.9%
neg-mul-161.9%
associate-*r/61.9%
associate-*l/61.9%
distribute-neg-frac61.9%
neg-mul-161.9%
times-frac99.9%
distribute-lft-out--99.9%
*-commutative99.9%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 61.5%
*-commutative61.5%
associate-*l/61.6%
times-frac99.8%
Simplified99.8%
Final simplification91.4%
(FPCore (x y z t) :precision binary64 (if (<= t 1.12e-100) (+ (* -0.3333333333333333 (/ (- y (/ t y)) z)) x) (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.12e-100) {
tmp = (-0.3333333333333333 * ((y - (t / y)) / z)) + x;
} else {
tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 1.12d-100) then
tmp = ((-0.3333333333333333d0) * ((y - (t / y)) / z)) + x
else
tmp = (x - (y / (z * 3.0d0))) + (t / (y * (z * 3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.12e-100) {
tmp = (-0.3333333333333333 * ((y - (t / y)) / z)) + x;
} else {
tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 1.12e-100: tmp = (-0.3333333333333333 * ((y - (t / y)) / z)) + x else: tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 1.12e-100) tmp = Float64(Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)) + x); else tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 1.12e-100) tmp = (-0.3333333333333333 * ((y - (t / y)) / z)) + x; else tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 1.12e-100], N[(N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.12 \cdot 10^{-100}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z} + x\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\end{array}
\end{array}
if t < 1.11999999999999996e-100Initial program 94.2%
associate-+l-94.2%
sub-neg94.2%
sub-neg94.2%
distribute-neg-in94.2%
unsub-neg94.2%
neg-mul-194.2%
associate-*r/94.2%
associate-*l/94.3%
distribute-neg-frac94.3%
neg-mul-194.3%
times-frac98.6%
distribute-lft-out--98.6%
*-commutative98.6%
associate-/r*98.5%
metadata-eval98.5%
Simplified98.5%
Taylor expanded in x around 0 98.5%
if 1.11999999999999996e-100 < t Initial program 98.7%
Final simplification98.6%
(FPCore (x y z t) :precision binary64 (if (<= t 6e-101) (+ (* -0.3333333333333333 (/ (- y (/ t y)) z)) x) (+ (- x (/ y (* z 3.0))) (/ t (* 3.0 (* y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 6e-101) {
tmp = (-0.3333333333333333 * ((y - (t / y)) / z)) + x;
} else {
tmp = (x - (y / (z * 3.0))) + (t / (3.0 * (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 (t <= 6d-101) then
tmp = ((-0.3333333333333333d0) * ((y - (t / y)) / z)) + x
else
tmp = (x - (y / (z * 3.0d0))) + (t / (3.0d0 * (y * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 6e-101) {
tmp = (-0.3333333333333333 * ((y - (t / y)) / z)) + x;
} else {
tmp = (x - (y / (z * 3.0))) + (t / (3.0 * (y * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 6e-101: tmp = (-0.3333333333333333 * ((y - (t / y)) / z)) + x else: tmp = (x - (y / (z * 3.0))) + (t / (3.0 * (y * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 6e-101) tmp = Float64(Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)) + x); else tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(3.0 * Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 6e-101) tmp = (-0.3333333333333333 * ((y - (t / y)) / z)) + x; else tmp = (x - (y / (z * 3.0))) + (t / (3.0 * (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 6e-101], N[(N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(3.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6 \cdot 10^{-101}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z} + x\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{3 \cdot \left(y \cdot z\right)}\\
\end{array}
\end{array}
if t < 6.0000000000000006e-101Initial program 94.2%
associate-+l-94.2%
sub-neg94.2%
sub-neg94.2%
distribute-neg-in94.2%
unsub-neg94.2%
neg-mul-194.2%
associate-*r/94.2%
associate-*l/94.3%
distribute-neg-frac94.3%
neg-mul-194.3%
times-frac98.6%
distribute-lft-out--98.6%
*-commutative98.6%
associate-/r*98.5%
metadata-eval98.5%
Simplified98.5%
Taylor expanded in x around 0 98.5%
if 6.0000000000000006e-101 < t Initial program 98.7%
Taylor expanded in z around 0 98.7%
Final simplification98.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.5e-133) (not (<= y 1.8e-136))) (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))) (+ x (* (/ t z) (/ 0.3333333333333333 y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.5e-133) || !(y <= 1.8e-136)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / 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.5d-133)) .or. (.not. (y <= 1.8d-136))) then
tmp = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
else
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.5e-133) || !(y <= 1.8e-136)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.5e-133) or not (y <= 1.8e-136): tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)) else: tmp = x + ((t / z) * (0.3333333333333333 / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.5e-133) || !(y <= 1.8e-136)) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))); else tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5.5e-133) || ~((y <= 1.8e-136))) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); else tmp = x + ((t / z) * (0.3333333333333333 / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.5e-133], N[Not[LessEqual[y, 1.8e-136]], $MachinePrecision]], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-133} \lor \neg \left(y \leq 1.8 \cdot 10^{-136}\right):\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -5.49999999999999977e-133 or 1.7999999999999999e-136 < y Initial program 97.8%
associate-+l-97.8%
sub-neg97.8%
sub-neg97.8%
distribute-neg-in97.8%
unsub-neg97.8%
neg-mul-197.8%
associate-*r/97.8%
associate-*l/97.8%
distribute-neg-frac97.8%
neg-mul-197.8%
times-frac98.7%
distribute-lft-out--99.2%
*-commutative99.2%
associate-/r*99.2%
metadata-eval99.2%
Simplified99.2%
if -5.49999999999999977e-133 < y < 1.7999999999999999e-136Initial program 89.7%
associate-+l-89.7%
sub-neg89.7%
sub-neg89.7%
distribute-neg-in89.7%
unsub-neg89.7%
neg-mul-189.7%
associate-*r/89.7%
associate-*l/89.7%
distribute-neg-frac89.7%
neg-mul-189.7%
times-frac83.1%
distribute-lft-out--83.1%
*-commutative83.1%
associate-/r*83.1%
metadata-eval83.1%
Simplified83.1%
Taylor expanded in y around 0 89.4%
associate-*r/89.5%
Applied egg-rr89.5%
*-commutative89.5%
*-commutative89.5%
times-frac96.8%
Applied egg-rr96.8%
Final simplification98.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.05e+18) (not (<= y 4.5e-33))) (+ x (/ (* -0.3333333333333333 y) z)) (+ x (* (/ t y) (/ 0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.05e+18) || !(y <= 4.5e-33)) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else {
tmp = x + ((t / y) * (0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.05d+18)) .or. (.not. (y <= 4.5d-33))) then
tmp = x + (((-0.3333333333333333d0) * y) / z)
else
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.05e+18) || !(y <= 4.5e-33)) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else {
tmp = x + ((t / y) * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.05e+18) or not (y <= 4.5e-33): tmp = x + ((-0.3333333333333333 * y) / z) else: tmp = x + ((t / y) * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.05e+18) || !(y <= 4.5e-33)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z)); else tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.05e+18) || ~((y <= 4.5e-33))) tmp = x + ((-0.3333333333333333 * y) / z); else tmp = x + ((t / y) * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.05e+18], N[Not[LessEqual[y, 4.5e-33]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+18} \lor \neg \left(y \leq 4.5 \cdot 10^{-33}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.05e18 or 4.49999999999999991e-33 < y Initial program 99.0%
associate-+l-99.0%
sub-neg99.0%
sub-neg99.0%
distribute-neg-in99.0%
unsub-neg99.0%
neg-mul-199.0%
associate-*r/99.0%
associate-*l/99.0%
distribute-neg-frac99.0%
neg-mul-199.0%
times-frac98.2%
distribute-lft-out--99.0%
*-commutative99.0%
associate-/r*98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in y around inf 91.1%
associate-*l/91.1%
Applied egg-rr91.1%
if -1.05e18 < y < 4.49999999999999991e-33Initial program 92.5%
associate-+l-92.5%
sub-neg92.5%
sub-neg92.5%
distribute-neg-in92.5%
unsub-neg92.5%
neg-mul-192.5%
associate-*r/92.5%
associate-*l/92.6%
distribute-neg-frac92.6%
neg-mul-192.6%
times-frac91.6%
distribute-lft-out--91.6%
*-commutative91.6%
associate-/r*91.6%
metadata-eval91.6%
Simplified91.6%
Taylor expanded in y around 0 88.0%
*-commutative88.0%
associate-*l/88.0%
times-frac87.0%
Simplified87.0%
Final simplification89.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -7e+17) (not (<= y 2e-33))) (+ x (/ (* -0.3333333333333333 y) z)) (+ x (* (/ t z) (/ 0.3333333333333333 y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7e+17) || !(y <= 2e-33)) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else {
tmp = x + ((t / z) * (0.3333333333333333 / 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 <= (-7d+17)) .or. (.not. (y <= 2d-33))) then
tmp = x + (((-0.3333333333333333d0) * y) / z)
else
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7e+17) || !(y <= 2e-33)) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -7e+17) or not (y <= 2e-33): tmp = x + ((-0.3333333333333333 * y) / z) else: tmp = x + ((t / z) * (0.3333333333333333 / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -7e+17) || !(y <= 2e-33)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z)); else tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -7e+17) || ~((y <= 2e-33))) tmp = x + ((-0.3333333333333333 * y) / z); else tmp = x + ((t / z) * (0.3333333333333333 / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -7e+17], N[Not[LessEqual[y, 2e-33]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+17} \lor \neg \left(y \leq 2 \cdot 10^{-33}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -7e17 or 2.0000000000000001e-33 < y Initial program 99.0%
associate-+l-99.0%
sub-neg99.0%
sub-neg99.0%
distribute-neg-in99.0%
unsub-neg99.0%
neg-mul-199.0%
associate-*r/99.0%
associate-*l/99.0%
distribute-neg-frac99.0%
neg-mul-199.0%
times-frac98.2%
distribute-lft-out--99.0%
*-commutative99.0%
associate-/r*98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in y around inf 91.1%
associate-*l/91.1%
Applied egg-rr91.1%
if -7e17 < y < 2.0000000000000001e-33Initial program 92.5%
associate-+l-92.5%
sub-neg92.5%
sub-neg92.5%
distribute-neg-in92.5%
unsub-neg92.5%
neg-mul-192.5%
associate-*r/92.5%
associate-*l/92.6%
distribute-neg-frac92.6%
neg-mul-192.6%
times-frac91.6%
distribute-lft-out--91.6%
*-commutative91.6%
associate-/r*91.6%
metadata-eval91.6%
Simplified91.6%
Taylor expanded in y around 0 88.0%
associate-*r/88.0%
Applied egg-rr88.0%
*-commutative88.0%
*-commutative88.0%
times-frac93.8%
Applied egg-rr93.8%
Final simplification92.4%
(FPCore (x y z t) :precision binary64 (if (<= x -1.25e-13) x (if (<= x 7.6e-22) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.25e-13) {
tmp = x;
} else if (x <= 7.6e-22) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-1.25d-13)) then
tmp = x
else if (x <= 7.6d-22) then
tmp = y * ((-0.3333333333333333d0) / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.25e-13) {
tmp = x;
} else if (x <= 7.6e-22) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.25e-13: tmp = x elif x <= 7.6e-22: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.25e-13) tmp = x; elseif (x <= 7.6e-22) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.25e-13) tmp = x; elseif (x <= 7.6e-22) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.25e-13], x, If[LessEqual[x, 7.6e-22], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{-13}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{-22}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.24999999999999997e-13 or 7.60000000000000046e-22 < x Initial program 95.1%
associate-+l-95.1%
sub-neg95.1%
sub-neg95.1%
distribute-neg-in95.1%
unsub-neg95.1%
neg-mul-195.1%
associate-*r/95.1%
associate-*l/95.2%
distribute-neg-frac95.2%
neg-mul-195.2%
times-frac95.1%
distribute-lft-out--96.0%
*-commutative96.0%
associate-/r*95.9%
metadata-eval95.9%
Simplified95.9%
Taylor expanded in x around inf 56.6%
if -1.24999999999999997e-13 < x < 7.60000000000000046e-22Initial program 96.5%
Taylor expanded in z around 0 96.4%
Taylor expanded in y around inf 46.1%
associate-*r/46.2%
*-commutative46.2%
associate-*r/46.2%
Simplified46.2%
Final simplification51.2%
(FPCore (x y z t) :precision binary64 (if (<= x -2.75e-11) x (if (<= x 7.6e-22) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.75e-11) {
tmp = x;
} else if (x <= 7.6e-22) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-2.75d-11)) then
tmp = x
else if (x <= 7.6d-22) then
tmp = y / (z * (-3.0d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.75e-11) {
tmp = x;
} else if (x <= 7.6e-22) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.75e-11: tmp = x elif x <= 7.6e-22: tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.75e-11) tmp = x; elseif (x <= 7.6e-22) tmp = Float64(y / Float64(z * -3.0)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -2.75e-11) tmp = x; elseif (x <= 7.6e-22) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.75e-11], x, If[LessEqual[x, 7.6e-22], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.75 \cdot 10^{-11}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{-22}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.74999999999999987e-11 or 7.60000000000000046e-22 < x Initial program 95.1%
associate-+l-95.1%
sub-neg95.1%
sub-neg95.1%
distribute-neg-in95.1%
unsub-neg95.1%
neg-mul-195.1%
associate-*r/95.1%
associate-*l/95.2%
distribute-neg-frac95.2%
neg-mul-195.2%
times-frac95.1%
distribute-lft-out--96.0%
*-commutative96.0%
associate-/r*95.9%
metadata-eval95.9%
Simplified95.9%
Taylor expanded in x around inf 56.6%
if -2.74999999999999987e-11 < x < 7.60000000000000046e-22Initial program 96.5%
Taylor expanded in z around 0 96.4%
Taylor expanded in y around inf 46.1%
associate-*r/46.2%
*-commutative46.2%
associate-*r/46.2%
Simplified46.2%
clear-num46.2%
inv-pow46.2%
Applied egg-rr46.2%
unpow-146.2%
Simplified46.2%
un-div-inv46.2%
div-inv46.2%
metadata-eval46.2%
Applied egg-rr46.2%
Final simplification51.2%
(FPCore (x y z t) :precision binary64 (+ x (* y (/ 1.0 (/ z -0.3333333333333333)))))
double code(double x, double y, double z, double t) {
return x + (y * (1.0 / (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 * (1.0d0 / (z / (-0.3333333333333333d0))))
end function
public static double code(double x, double y, double z, double t) {
return x + (y * (1.0 / (z / -0.3333333333333333)));
}
def code(x, y, z, t): return x + (y * (1.0 / (z / -0.3333333333333333)))
function code(x, y, z, t) return Float64(x + Float64(y * Float64(1.0 / Float64(z / -0.3333333333333333)))) end
function tmp = code(x, y, z, t) tmp = x + (y * (1.0 / (z / -0.3333333333333333))); end
code[x_, y_, z_, t_] := N[(x + N[(y * N[(1.0 / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{1}{\frac{z}{-0.3333333333333333}}
\end{array}
Initial program 95.8%
associate-+l-95.8%
sub-neg95.8%
sub-neg95.8%
distribute-neg-in95.8%
unsub-neg95.8%
neg-mul-195.8%
associate-*r/95.8%
associate-*l/95.8%
distribute-neg-frac95.8%
neg-mul-195.8%
times-frac94.9%
distribute-lft-out--95.3%
*-commutative95.3%
associate-/r*95.3%
metadata-eval95.3%
Simplified95.3%
Taylor expanded in y around inf 64.3%
clear-num34.5%
inv-pow34.5%
Applied egg-rr64.3%
unpow-134.5%
Simplified64.3%
Final simplification64.3%
(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.8%
associate-+l-95.8%
sub-neg95.8%
sub-neg95.8%
distribute-neg-in95.8%
unsub-neg95.8%
neg-mul-195.8%
associate-*r/95.8%
associate-*l/95.8%
distribute-neg-frac95.8%
neg-mul-195.8%
times-frac94.9%
distribute-lft-out--95.3%
*-commutative95.3%
associate-/r*95.3%
metadata-eval95.3%
Simplified95.3%
Taylor expanded in y around inf 64.3%
Final simplification64.3%
(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(Float64(-0.3333333333333333 * 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[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{-0.3333333333333333 \cdot y}{z}
\end{array}
Initial program 95.8%
associate-+l-95.8%
sub-neg95.8%
sub-neg95.8%
distribute-neg-in95.8%
unsub-neg95.8%
neg-mul-195.8%
associate-*r/95.8%
associate-*l/95.8%
distribute-neg-frac95.8%
neg-mul-195.8%
times-frac94.9%
distribute-lft-out--95.3%
*-commutative95.3%
associate-/r*95.3%
metadata-eval95.3%
Simplified95.3%
Taylor expanded in y around inf 64.3%
associate-*l/64.3%
Applied egg-rr64.3%
Final simplification64.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.8%
associate-+l-95.8%
sub-neg95.8%
sub-neg95.8%
distribute-neg-in95.8%
unsub-neg95.8%
neg-mul-195.8%
associate-*r/95.8%
associate-*l/95.8%
distribute-neg-frac95.8%
neg-mul-195.8%
times-frac94.9%
distribute-lft-out--95.3%
*-commutative95.3%
associate-/r*95.3%
metadata-eval95.3%
Simplified95.3%
Taylor expanded in x around inf 30.9%
Final simplification30.9%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2023230
(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))))