
(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 -2e-46)
(+ x (/ (+ (* y -0.3333333333333333) (* 0.3333333333333333 (/ t y))) z))
(if (<= y 8.5e-93)
(/ (+ (/ (* t 0.3333333333333333) z) (* x y)) y)
(+ x (/ (* -0.3333333333333333 (- y (/ t y))) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2e-46) {
tmp = x + (((y * -0.3333333333333333) + (0.3333333333333333 * (t / y))) / z);
} else if (y <= 8.5e-93) {
tmp = (((t * 0.3333333333333333) / z) + (x * y)) / y;
} else {
tmp = x + ((-0.3333333333333333 * (y - (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 <= (-2d-46)) then
tmp = x + (((y * (-0.3333333333333333d0)) + (0.3333333333333333d0 * (t / y))) / z)
else if (y <= 8.5d-93) then
tmp = (((t * 0.3333333333333333d0) / z) + (x * y)) / y
else
tmp = x + (((-0.3333333333333333d0) * (y - (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 <= -2e-46) {
tmp = x + (((y * -0.3333333333333333) + (0.3333333333333333 * (t / y))) / z);
} else if (y <= 8.5e-93) {
tmp = (((t * 0.3333333333333333) / z) + (x * y)) / y;
} else {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2e-46: tmp = x + (((y * -0.3333333333333333) + (0.3333333333333333 * (t / y))) / z) elif y <= 8.5e-93: tmp = (((t * 0.3333333333333333) / z) + (x * y)) / y else: tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2e-46) tmp = Float64(x + Float64(Float64(Float64(y * -0.3333333333333333) + Float64(0.3333333333333333 * Float64(t / y))) / z)); elseif (y <= 8.5e-93) tmp = Float64(Float64(Float64(Float64(t * 0.3333333333333333) / z) + Float64(x * y)) / y); else tmp = Float64(x + Float64(Float64(-0.3333333333333333 * Float64(y - Float64(t / y))) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2e-46) tmp = x + (((y * -0.3333333333333333) + (0.3333333333333333 * (t / y))) / z); elseif (y <= 8.5e-93) tmp = (((t * 0.3333333333333333) / z) + (x * y)) / y; else tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2e-46], N[(x + N[(N[(N[(y * -0.3333333333333333), $MachinePrecision] + N[(0.3333333333333333 * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e-93], N[(N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x + N[(N[(-0.3333333333333333 * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-46}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333 + 0.3333333333333333 \cdot \frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-93}:\\
\;\;\;\;\frac{\frac{t \cdot 0.3333333333333333}{z} + x \cdot y}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\
\end{array}
\end{array}
if y < -2.00000000000000005e-46Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
if -2.00000000000000005e-46 < y < 8.5000000000000007e-93Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.3%
fma-define95.3%
metadata-eval95.3%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in y around 0 98.1%
associate-*r/98.1%
Applied egg-rr98.1%
if 8.5000000000000007e-93 < y Initial program 98.6%
sub-neg98.6%
associate-+l+98.6%
distribute-frac-neg98.6%
neg-mul-198.6%
*-commutative98.6%
times-frac98.6%
fma-define98.6%
metadata-eval98.6%
associate-*l*98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in z around -inf 98.6%
mul-1-neg98.6%
metadata-eval98.6%
cancel-sign-sub-inv98.6%
unsub-neg98.6%
distribute-lft-out--98.6%
Simplified98.6%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.4e-40) (not (<= y 5e-94))) (+ x (/ (* -0.3333333333333333 (- y (/ t y))) z)) (/ (+ (/ (* t 0.3333333333333333) z) (* x y)) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.4e-40) || !(y <= 5e-94)) {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
} else {
tmp = (((t * 0.3333333333333333) / z) + (x * y)) / 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.4d-40)) .or. (.not. (y <= 5d-94))) then
tmp = x + (((-0.3333333333333333d0) * (y - (t / y))) / z)
else
tmp = (((t * 0.3333333333333333d0) / z) + (x * y)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.4e-40) || !(y <= 5e-94)) {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
} else {
tmp = (((t * 0.3333333333333333) / z) + (x * y)) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.4e-40) or not (y <= 5e-94): tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z) else: tmp = (((t * 0.3333333333333333) / z) + (x * y)) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.4e-40) || !(y <= 5e-94)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * Float64(y - Float64(t / y))) / z)); else tmp = Float64(Float64(Float64(Float64(t * 0.3333333333333333) / z) + Float64(x * y)) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.4e-40) || ~((y <= 5e-94))) tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z); else tmp = (((t * 0.3333333333333333) / z) + (x * y)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.4e-40], N[Not[LessEqual[y, 5e-94]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-40} \lor \neg \left(y \leq 5 \cdot 10^{-94}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t \cdot 0.3333333333333333}{z} + x \cdot y}{y}\\
\end{array}
\end{array}
if y < -3.39999999999999984e-40 or 4.9999999999999995e-94 < y Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
*-commutative99.1%
times-frac99.1%
fma-define99.1%
metadata-eval99.1%
associate-*l*99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in z around -inf 99.1%
mul-1-neg99.1%
metadata-eval99.1%
cancel-sign-sub-inv99.1%
unsub-neg99.1%
distribute-lft-out--99.1%
Simplified99.1%
if -3.39999999999999984e-40 < y < 4.9999999999999995e-94Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.3%
fma-define95.3%
metadata-eval95.3%
associate-*l*95.3%
*-commutative95.3%
Simplified95.3%
Taylor expanded in y around 0 98.1%
associate-*r/98.1%
Applied egg-rr98.1%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.4e-40) (not (<= y 4.5e-92))) (+ x (/ (* -0.3333333333333333 (- y (/ t y))) z)) (/ (+ (* x y) (* t (/ 0.3333333333333333 z))) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.4e-40) || !(y <= 4.5e-92)) {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
} else {
tmp = ((x * y) + (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.4d-40)) .or. (.not. (y <= 4.5d-92))) then
tmp = x + (((-0.3333333333333333d0) * (y - (t / y))) / z)
else
tmp = ((x * y) + (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.4e-40) || !(y <= 4.5e-92)) {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
} else {
tmp = ((x * y) + (t * (0.3333333333333333 / z))) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.4e-40) or not (y <= 4.5e-92): tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z) else: tmp = ((x * y) + (t * (0.3333333333333333 / z))) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.4e-40) || !(y <= 4.5e-92)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * Float64(y - Float64(t / y))) / z)); else tmp = Float64(Float64(Float64(x * y) + Float64(t * Float64(0.3333333333333333 / z))) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.4e-40) || ~((y <= 4.5e-92))) tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z); else tmp = ((x * y) + (t * (0.3333333333333333 / z))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.4e-40], N[Not[LessEqual[y, 4.5e-92]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-40} \lor \neg \left(y \leq 4.5 \cdot 10^{-92}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + t \cdot \frac{0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -3.39999999999999984e-40 or 4.5e-92 < y Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
*-commutative99.1%
times-frac99.1%
fma-define99.1%
metadata-eval99.1%
associate-*l*99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in z around -inf 99.1%
mul-1-neg99.1%
metadata-eval99.1%
cancel-sign-sub-inv99.1%
unsub-neg99.1%
distribute-lft-out--99.1%
Simplified99.1%
if -3.39999999999999984e-40 < y < 4.5e-92Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.3%
fma-define95.3%
metadata-eval95.3%
associate-*l*95.3%
*-commutative95.3%
Simplified95.3%
Taylor expanded in y around 0 98.1%
associate-*r/98.1%
Applied egg-rr98.1%
*-commutative98.1%
associate-*r/98.1%
Simplified98.1%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -7e-45) (not (<= y 2.65e-95))) (+ x (/ (* -0.3333333333333333 (- y (/ t y))) z)) (/ (+ (* x y) (* 0.3333333333333333 (/ t z))) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7e-45) || !(y <= 2.65e-95)) {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
} else {
tmp = ((x * y) + (0.3333333333333333 * (t / 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 <= (-7d-45)) .or. (.not. (y <= 2.65d-95))) then
tmp = x + (((-0.3333333333333333d0) * (y - (t / y))) / z)
else
tmp = ((x * y) + (0.3333333333333333d0 * (t / z))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7e-45) || !(y <= 2.65e-95)) {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
} else {
tmp = ((x * y) + (0.3333333333333333 * (t / z))) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -7e-45) or not (y <= 2.65e-95): tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z) else: tmp = ((x * y) + (0.3333333333333333 * (t / z))) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -7e-45) || !(y <= 2.65e-95)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * Float64(y - Float64(t / y))) / z)); else tmp = Float64(Float64(Float64(x * y) + Float64(0.3333333333333333 * Float64(t / z))) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -7e-45) || ~((y <= 2.65e-95))) tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z); else tmp = ((x * y) + (0.3333333333333333 * (t / z))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -7e-45], N[Not[LessEqual[y, 2.65e-95]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-45} \lor \neg \left(y \leq 2.65 \cdot 10^{-95}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + 0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -7e-45 or 2.6499999999999999e-95 < y Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
*-commutative99.1%
times-frac99.1%
fma-define99.1%
metadata-eval99.1%
associate-*l*99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in z around -inf 99.1%
mul-1-neg99.1%
metadata-eval99.1%
cancel-sign-sub-inv99.1%
unsub-neg99.1%
distribute-lft-out--99.1%
Simplified99.1%
if -7e-45 < y < 2.6499999999999999e-95Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.3%
fma-define95.3%
metadata-eval95.3%
associate-*l*95.3%
*-commutative95.3%
Simplified95.3%
Taylor expanded in y around 0 98.1%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.6e-189) (not (<= y 1.15e-96))) (+ x (/ (* -0.3333333333333333 (- y (/ t y))) z)) (+ x (/ (* t 0.3333333333333333) (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.6e-189) || !(y <= 1.15e-96)) {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
} else {
tmp = x + ((t * 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 <= (-3.6d-189)) .or. (.not. (y <= 1.15d-96))) then
tmp = x + (((-0.3333333333333333d0) * (y - (t / y))) / z)
else
tmp = x + ((t * 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 <= -3.6e-189) || !(y <= 1.15e-96)) {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
} else {
tmp = x + ((t * 0.3333333333333333) / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.6e-189) or not (y <= 1.15e-96): tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z) else: tmp = x + ((t * 0.3333333333333333) / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.6e-189) || !(y <= 1.15e-96)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * Float64(y - Float64(t / y))) / z)); else tmp = Float64(x + Float64(Float64(t * 0.3333333333333333) / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.6e-189) || ~((y <= 1.15e-96))) tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z); else tmp = x + ((t * 0.3333333333333333) / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.6e-189], N[Not[LessEqual[y, 1.15e-96]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * 0.3333333333333333), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{-189} \lor \neg \left(y \leq 1.15 \cdot 10^{-96}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot 0.3333333333333333}{y \cdot z}\\
\end{array}
\end{array}
if y < -3.60000000000000017e-189 or 1.15e-96 < y Initial program 97.6%
sub-neg97.6%
associate-+l+97.6%
distribute-frac-neg97.6%
neg-mul-197.6%
*-commutative97.6%
times-frac97.6%
fma-define97.6%
metadata-eval97.6%
associate-*l*97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in z around -inf 97.7%
mul-1-neg97.7%
metadata-eval97.7%
cancel-sign-sub-inv97.7%
unsub-neg97.7%
distribute-lft-out--97.7%
Simplified97.7%
if -3.60000000000000017e-189 < y < 1.15e-96Initial program 97.1%
sub-neg97.1%
associate-+l+97.1%
distribute-frac-neg97.1%
neg-mul-197.1%
*-commutative97.1%
times-frac97.1%
fma-define97.1%
metadata-eval97.1%
associate-*l*97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in y around 0 98.6%
associate-*r/98.6%
Applied egg-rr98.6%
*-commutative98.6%
associate-*r/98.6%
Simplified98.6%
Taylor expanded in t around 0 97.0%
associate-*r/97.0%
*-commutative97.0%
Simplified97.0%
Final simplification97.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.1e-56) (not (<= y 2.1e-87))) (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))) (+ x (/ (* t 0.3333333333333333) (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.1e-56) || !(y <= 2.1e-87)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x + ((t * 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 <= (-4.1d-56)) .or. (.not. (y <= 2.1d-87))) then
tmp = x + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
else
tmp = x + ((t * 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 <= -4.1e-56) || !(y <= 2.1e-87)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x + ((t * 0.3333333333333333) / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.1e-56) or not (y <= 2.1e-87): tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)) else: tmp = x + ((t * 0.3333333333333333) / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.1e-56) || !(y <= 2.1e-87)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); else tmp = Float64(x + Float64(Float64(t * 0.3333333333333333) / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.1e-56) || ~((y <= 2.1e-87))) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); else tmp = x + ((t * 0.3333333333333333) / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.1e-56], N[Not[LessEqual[y, 2.1e-87]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * 0.3333333333333333), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{-56} \lor \neg \left(y \leq 2.1 \cdot 10^{-87}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot 0.3333333333333333}{y \cdot z}\\
\end{array}
\end{array}
if y < -4.1000000000000001e-56 or 2.10000000000000007e-87 < y Initial program 98.5%
sub-neg98.5%
associate-+l+98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
sub-neg98.5%
distribute-frac-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.4%
*-commutative98.4%
neg-mul-198.4%
times-frac98.3%
distribute-lft-out--99.0%
*-commutative99.0%
associate-/r*99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in z around 0 99.1%
if -4.1000000000000001e-56 < y < 2.10000000000000007e-87Initial program 96.1%
sub-neg96.1%
associate-+l+96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
times-frac96.1%
fma-define96.1%
metadata-eval96.1%
associate-*l*96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in y around 0 98.1%
associate-*r/98.1%
Applied egg-rr98.1%
*-commutative98.1%
associate-*r/98.1%
Simplified98.1%
Taylor expanded in t around 0 95.2%
associate-*r/95.2%
*-commutative95.2%
Simplified95.2%
Final simplification97.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- y (/ t y))))
(if (<= y -3.7e-56)
(+ x (* (/ -0.3333333333333333 z) t_1))
(if (<= y 1.05e-89)
(+ x (/ (* t 0.3333333333333333) (* y z)))
(+ x (* -0.3333333333333333 (/ t_1 z)))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -3.7e-56) {
tmp = x + ((-0.3333333333333333 / z) * t_1);
} else if (y <= 1.05e-89) {
tmp = x + ((t * 0.3333333333333333) / (y * z));
} else {
tmp = x + (-0.3333333333333333 * (t_1 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y - (t / y)
if (y <= (-3.7d-56)) then
tmp = x + (((-0.3333333333333333d0) / z) * t_1)
else if (y <= 1.05d-89) then
tmp = x + ((t * 0.3333333333333333d0) / (y * z))
else
tmp = x + ((-0.3333333333333333d0) * (t_1 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -3.7e-56) {
tmp = x + ((-0.3333333333333333 / z) * t_1);
} else if (y <= 1.05e-89) {
tmp = x + ((t * 0.3333333333333333) / (y * z));
} else {
tmp = x + (-0.3333333333333333 * (t_1 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -3.7e-56: tmp = x + ((-0.3333333333333333 / z) * t_1) elif y <= 1.05e-89: tmp = x + ((t * 0.3333333333333333) / (y * z)) else: tmp = x + (-0.3333333333333333 * (t_1 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -3.7e-56) tmp = Float64(x + Float64(Float64(-0.3333333333333333 / z) * t_1)); elseif (y <= 1.05e-89) tmp = Float64(x + Float64(Float64(t * 0.3333333333333333) / Float64(y * z))); else tmp = Float64(x + Float64(-0.3333333333333333 * Float64(t_1 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -3.7e-56) tmp = x + ((-0.3333333333333333 / z) * t_1); elseif (y <= 1.05e-89) tmp = x + ((t * 0.3333333333333333) / (y * z)); else tmp = x + (-0.3333333333333333 * (t_1 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.7e-56], N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e-89], N[(x + N[(N[(t * 0.3333333333333333), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -3.7 \cdot 10^{-56}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot t\_1\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-89}:\\
\;\;\;\;x + \frac{t \cdot 0.3333333333333333}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{t\_1}{z}\\
\end{array}
\end{array}
if y < -3.7000000000000002e-56Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
remove-double-neg98.3%
distribute-frac-neg98.3%
sub-neg98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
associate-/l*98.3%
*-commutative98.3%
neg-mul-198.3%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
if -3.7000000000000002e-56 < y < 1.05e-89Initial program 96.1%
sub-neg96.1%
associate-+l+96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
times-frac96.1%
fma-define96.1%
metadata-eval96.1%
associate-*l*96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in y around 0 98.1%
associate-*r/98.1%
Applied egg-rr98.1%
*-commutative98.1%
associate-*r/98.1%
Simplified98.1%
Taylor expanded in t around 0 95.2%
associate-*r/95.2%
*-commutative95.2%
Simplified95.2%
if 1.05e-89 < y Initial program 98.6%
sub-neg98.6%
associate-+l+98.6%
remove-double-neg98.6%
distribute-frac-neg98.6%
sub-neg98.6%
distribute-frac-neg98.6%
neg-mul-198.6%
*-commutative98.6%
associate-/l*98.5%
*-commutative98.5%
neg-mul-198.5%
times-frac97.3%
distribute-lft-out--98.5%
*-commutative98.5%
associate-/r*98.5%
metadata-eval98.5%
Simplified98.5%
Taylor expanded in z around 0 98.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.5e+44)
(+ x (* (/ y z) -0.3333333333333333))
(if (<= y 360.0)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.5e+44) {
tmp = x + ((y / z) * -0.3333333333333333);
} else if (y <= 360.0) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.5d+44)) then
tmp = x + ((y / z) * (-0.3333333333333333d0))
else if (y <= 360.0d0) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
else
tmp = x + ((y * (-0.3333333333333333d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.5e+44) {
tmp = x + ((y / z) * -0.3333333333333333);
} else if (y <= 360.0) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.5e+44: tmp = x + ((y / z) * -0.3333333333333333) elif y <= 360.0: tmp = x + (0.3333333333333333 * (t / (y * z))) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.5e+44) tmp = Float64(x + Float64(Float64(y / z) * -0.3333333333333333)); elseif (y <= 360.0) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); else tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.5e+44) tmp = x + ((y / z) * -0.3333333333333333); elseif (y <= 360.0) tmp = x + (0.3333333333333333 * (t / (y * z))); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.5e+44], N[(x + N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 360.0], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+44}:\\
\;\;\;\;x + \frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{elif}\;y \leq 360:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.5000000000000001e44Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 97.7%
cancel-sign-sub-inv97.7%
metadata-eval97.7%
associate-*r/97.8%
metadata-eval97.8%
Simplified97.8%
Taylor expanded in y around 0 99.8%
+-commutative99.8%
Simplified99.8%
if -5.5000000000000001e44 < y < 360Initial program 96.4%
sub-neg96.4%
associate-+l+96.4%
distribute-frac-neg96.4%
neg-mul-196.4%
*-commutative96.4%
times-frac96.4%
fma-define96.4%
metadata-eval96.4%
associate-*l*96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in y around 0 93.7%
Taylor expanded in t around 0 91.0%
+-commutative91.0%
Simplified91.0%
if 360 < y Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
times-frac98.2%
fma-define98.2%
metadata-eval98.2%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in y around inf 96.8%
cancel-sign-sub-inv96.8%
metadata-eval96.8%
associate-*r/96.9%
metadata-eval96.9%
Simplified96.9%
Taylor expanded in y around 0 96.9%
+-commutative96.9%
Simplified96.9%
associate-*r/97.0%
Applied egg-rr97.0%
Final simplification93.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -6e+44)
(+ x (* (/ y z) -0.3333333333333333))
(if (<= y 210.0)
(+ x (/ (* t 0.3333333333333333) (* y z)))
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6e+44) {
tmp = x + ((y / z) * -0.3333333333333333);
} else if (y <= 210.0) {
tmp = x + ((t * 0.3333333333333333) / (y * z));
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-6d+44)) then
tmp = x + ((y / z) * (-0.3333333333333333d0))
else if (y <= 210.0d0) then
tmp = x + ((t * 0.3333333333333333d0) / (y * z))
else
tmp = x + ((y * (-0.3333333333333333d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6e+44) {
tmp = x + ((y / z) * -0.3333333333333333);
} else if (y <= 210.0) {
tmp = x + ((t * 0.3333333333333333) / (y * z));
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6e+44: tmp = x + ((y / z) * -0.3333333333333333) elif y <= 210.0: tmp = x + ((t * 0.3333333333333333) / (y * z)) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6e+44) tmp = Float64(x + Float64(Float64(y / z) * -0.3333333333333333)); elseif (y <= 210.0) tmp = Float64(x + Float64(Float64(t * 0.3333333333333333) / Float64(y * z))); else tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -6e+44) tmp = x + ((y / z) * -0.3333333333333333); elseif (y <= 210.0) tmp = x + ((t * 0.3333333333333333) / (y * z)); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6e+44], N[(x + N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 210.0], N[(x + N[(N[(t * 0.3333333333333333), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+44}:\\
\;\;\;\;x + \frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{elif}\;y \leq 210:\\
\;\;\;\;x + \frac{t \cdot 0.3333333333333333}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.99999999999999974e44Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 97.7%
cancel-sign-sub-inv97.7%
metadata-eval97.7%
associate-*r/97.8%
metadata-eval97.8%
Simplified97.8%
Taylor expanded in y around 0 99.8%
+-commutative99.8%
Simplified99.8%
if -5.99999999999999974e44 < y < 210Initial program 96.4%
sub-neg96.4%
associate-+l+96.4%
distribute-frac-neg96.4%
neg-mul-196.4%
*-commutative96.4%
times-frac96.4%
fma-define96.4%
metadata-eval96.4%
associate-*l*96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in y around 0 93.7%
associate-*r/93.8%
Applied egg-rr93.8%
*-commutative93.8%
associate-*r/93.7%
Simplified93.7%
Taylor expanded in t around 0 91.0%
associate-*r/91.0%
*-commutative91.0%
Simplified91.0%
if 210 < y Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
times-frac98.2%
fma-define98.2%
metadata-eval98.2%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in y around inf 96.8%
cancel-sign-sub-inv96.8%
metadata-eval96.8%
associate-*r/96.9%
metadata-eval96.9%
Simplified96.9%
Taylor expanded in y around 0 96.9%
+-commutative96.9%
Simplified96.9%
associate-*r/97.0%
Applied egg-rr97.0%
Final simplification93.9%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / (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))) + (t / (y * (z * 3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); end
code[x_, y_, z_, t_] := 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}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}
\end{array}
Initial program 97.5%
Final simplification97.5%
(FPCore (x y z t) :precision binary64 (+ (+ x (/ t (* z (* y 3.0)))) (/ y (* z -3.0))))
double code(double x, double y, double z, double t) {
return (x + (t / (z * (y * 3.0)))) + (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 + (t / (z * (y * 3.0d0)))) + (y / (z * (-3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
}
def code(x, y, z, t): return (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0))
function code(x, y, z, t) return Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(y / Float64(z * -3.0))) end
function tmp = code(x, y, z, t) tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)); end
code[x_, y_, z_, t_] := N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}
\end{array}
Initial program 97.5%
+-commutative97.5%
associate-+r-97.5%
sub-neg97.5%
associate-*l*97.4%
*-commutative97.4%
distribute-frac-neg297.4%
distribute-rgt-neg-in97.4%
metadata-eval97.4%
Simplified97.4%
Final simplification97.4%
(FPCore (x y z t) :precision binary64 (+ x (* 0.3333333333333333 (- (/ t (* y z)) (/ y z)))))
double code(double x, double y, double z, double t) {
return x + (0.3333333333333333 * ((t / (y * z)) - (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 * ((t / (y * z)) - (y / z)))
end function
public static double code(double x, double y, double z, double t) {
return x + (0.3333333333333333 * ((t / (y * z)) - (y / z)));
}
def code(x, y, z, t): return x + (0.3333333333333333 * ((t / (y * z)) - (y / z)))
function code(x, y, z, t) return Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / Float64(y * z)) - Float64(y / z)))) end
function tmp = code(x, y, z, t) tmp = x + (0.3333333333333333 * ((t / (y * z)) - (y / z))); end
code[x_, y_, z_, t_] := N[(x + N[(0.3333333333333333 * N[(N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + 0.3333333333333333 \cdot \left(\frac{t}{y \cdot z} - \frac{y}{z}\right)
\end{array}
Initial program 97.5%
sub-neg97.5%
associate-+l+97.5%
distribute-frac-neg97.5%
neg-mul-197.5%
*-commutative97.5%
times-frac97.4%
fma-define97.4%
metadata-eval97.4%
associate-*l*97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in x around 0 97.4%
+-commutative97.4%
+-commutative97.4%
metadata-eval97.4%
cancel-sign-sub-inv97.4%
distribute-lft-out--97.4%
Simplified97.4%
Final simplification97.4%
(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 97.5%
sub-neg97.5%
associate-+l+97.5%
distribute-frac-neg97.5%
neg-mul-197.5%
*-commutative97.5%
times-frac97.4%
fma-define97.4%
metadata-eval97.4%
associate-*l*97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in y around inf 54.8%
cancel-sign-sub-inv54.8%
metadata-eval54.8%
associate-*r/54.8%
metadata-eval54.8%
Simplified54.8%
Taylor expanded in y around 0 61.1%
+-commutative61.1%
Simplified61.1%
Final simplification61.1%
(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 2024179
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))