
(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
(let* ((t_1 (- y (/ t y))))
(if (<= y -1.38e-105)
(+ x (/ t_1 (* z -3.0)))
(if (<= y 9.2e-129)
(+ x (/ (/ t z) (* y 3.0)))
(+ x (/ -0.3333333333333333 (/ z t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -1.38e-105) {
tmp = x + (t_1 / (z * -3.0));
} else if (y <= 9.2e-129) {
tmp = x + ((t / z) / (y * 3.0));
} else {
tmp = x + (-0.3333333333333333 / (z / t_1));
}
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 <= (-1.38d-105)) then
tmp = x + (t_1 / (z * (-3.0d0)))
else if (y <= 9.2d-129) then
tmp = x + ((t / z) / (y * 3.0d0))
else
tmp = x + ((-0.3333333333333333d0) / (z / t_1))
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 <= -1.38e-105) {
tmp = x + (t_1 / (z * -3.0));
} else if (y <= 9.2e-129) {
tmp = x + ((t / z) / (y * 3.0));
} else {
tmp = x + (-0.3333333333333333 / (z / t_1));
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -1.38e-105: tmp = x + (t_1 / (z * -3.0)) elif y <= 9.2e-129: tmp = x + ((t / z) / (y * 3.0)) else: tmp = x + (-0.3333333333333333 / (z / t_1)) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -1.38e-105) tmp = Float64(x + Float64(t_1 / Float64(z * -3.0))); elseif (y <= 9.2e-129) tmp = Float64(x + Float64(Float64(t / z) / Float64(y * 3.0))); else tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -1.38e-105) tmp = x + (t_1 / (z * -3.0)); elseif (y <= 9.2e-129) tmp = x + ((t / z) / (y * 3.0)); else tmp = x + (-0.3333333333333333 / (z / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.38e-105], N[(x + N[(t$95$1 / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.2e-129], N[(x + N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 / N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -1.38 \cdot 10^{-105}:\\
\;\;\;\;x + \frac{t_1}{z \cdot -3}\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{-129}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{t_1}}\\
\end{array}
\end{array}
if y < -1.3800000000000001e-105Initial program 98.6%
Simplified99.7%
clear-num99.7%
associate-*l/99.6%
*-un-lft-identity99.6%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
if -1.3800000000000001e-105 < y < 9.1999999999999998e-129Initial program 91.9%
Simplified88.7%
Taylor expanded in y around 0 91.9%
*-commutative91.9%
associate-/r*88.2%
associate-*l/88.1%
associate-*r/88.2%
Simplified88.2%
associate-*r/88.1%
associate-/l*88.2%
div-inv88.2%
metadata-eval88.2%
associate-/r*91.9%
*-commutative91.9%
associate-*l*91.9%
associate-/r*99.3%
Applied egg-rr99.3%
if 9.1999999999999998e-129 < y Initial program 97.7%
Simplified97.6%
associate-*l/97.7%
associate-/l*97.7%
Applied egg-rr97.7%
Final simplification98.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (* z -3.0))))
(if (<= y -3.2e+36)
t_1
(if (<= y -4.1e-122)
x
(if (<= y 2.2e-11) (* 0.3333333333333333 (/ t (* y z))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y / (z * -3.0);
double tmp;
if (y <= -3.2e+36) {
tmp = t_1;
} else if (y <= -4.1e-122) {
tmp = x;
} else if (y <= 2.2e-11) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = t_1;
}
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 / (z * (-3.0d0))
if (y <= (-3.2d+36)) then
tmp = t_1
else if (y <= (-4.1d-122)) then
tmp = x
else if (y <= 2.2d-11) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y / (z * -3.0);
double tmp;
if (y <= -3.2e+36) {
tmp = t_1;
} else if (y <= -4.1e-122) {
tmp = x;
} else if (y <= 2.2e-11) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (z * -3.0) tmp = 0 if y <= -3.2e+36: tmp = t_1 elif y <= -4.1e-122: tmp = x elif y <= 2.2e-11: tmp = 0.3333333333333333 * (t / (y * z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(z * -3.0)) tmp = 0.0 if (y <= -3.2e+36) tmp = t_1; elseif (y <= -4.1e-122) tmp = x; elseif (y <= 2.2e-11) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (z * -3.0); tmp = 0.0; if (y <= -3.2e+36) tmp = t_1; elseif (y <= -4.1e-122) tmp = x; elseif (y <= 2.2e-11) tmp = 0.3333333333333333 * (t / (y * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.2e+36], t$95$1, If[LessEqual[y, -4.1e-122], x, If[LessEqual[y, 2.2e-11], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z \cdot -3}\\
\mathbf{if}\;y \leq -3.2 \cdot 10^{+36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{-122}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-11}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.1999999999999999e36 or 2.2000000000000002e-11 < y Initial program 97.3%
*-un-lft-identity97.3%
times-frac97.2%
Applied egg-rr97.2%
Taylor expanded in x around 0 70.5%
cancel-sign-sub-inv70.5%
metadata-eval70.5%
+-commutative70.5%
associate-*r/70.5%
associate-*l/70.5%
*-commutative70.5%
associate-*r/70.5%
associate-/l*70.5%
associate-*r/71.3%
metadata-eval71.3%
associate-/r*71.3%
mul-1-neg71.3%
distribute-lft-neg-out71.3%
associate-*r/70.5%
*-commutative70.5%
associate-/l*70.5%
*-commutative70.5%
metadata-eval70.5%
distribute-rgt-neg-in70.5%
distribute-lft-neg-in70.5%
associate-/l*70.5%
associate-/l*70.5%
neg-mul-170.5%
associate-/r*70.5%
Simplified73.0%
Taylor expanded in y around inf 64.9%
associate-*r/64.9%
*-commutative64.9%
/-rgt-identity64.9%
associate-/l*65.0%
metadata-eval65.0%
associate-/l/65.0%
Simplified65.0%
if -3.1999999999999999e36 < y < -4.1e-122Initial program 99.8%
Simplified99.9%
Taylor expanded in x around inf 53.0%
if -4.1e-122 < y < 2.2000000000000002e-11Initial program 93.8%
*-un-lft-identity93.8%
times-frac93.8%
Applied egg-rr93.8%
Taylor expanded in x around 0 68.7%
cancel-sign-sub-inv68.7%
metadata-eval68.7%
+-commutative68.7%
associate-*r/68.7%
associate-*l/68.7%
*-commutative68.7%
associate-*r/68.7%
associate-/l*68.6%
associate-*r/64.9%
metadata-eval64.9%
associate-/r*64.9%
mul-1-neg64.9%
distribute-lft-neg-out64.9%
associate-*r/68.6%
*-commutative68.6%
associate-/l*68.7%
*-commutative68.7%
metadata-eval68.7%
distribute-rgt-neg-in68.7%
distribute-lft-neg-in68.7%
associate-/l*68.6%
associate-/l*68.6%
neg-mul-168.6%
associate-/r*68.6%
Simplified64.5%
Taylor expanded in y around 0 66.2%
Final simplification64.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.9e-105) (not (<= y 2.25e-128))) (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))) (+ x (/ (/ t z) (* y 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.9e-105) || !(y <= 2.25e-128)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} 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 <= (-3.9d-105)) .or. (.not. (y <= 2.25d-128))) then
tmp = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
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 <= -3.9e-105) || !(y <= 2.25e-128)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + ((t / z) / (y * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.9e-105) or not (y <= 2.25e-128): tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)) else: tmp = x + ((t / z) / (y * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.9e-105) || !(y <= 2.25e-128)) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))); 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 <= -3.9e-105) || ~((y <= 2.25e-128))) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); else tmp = x + ((t / z) / (y * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.9e-105], N[Not[LessEqual[y, 2.25e-128]], $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[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{-105} \lor \neg \left(y \leq 2.25 \cdot 10^{-128}\right):\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\end{array}
\end{array}
if y < -3.9e-105 or 2.25e-128 < y Initial program 98.1%
Simplified98.5%
if -3.9e-105 < y < 2.25e-128Initial program 91.9%
Simplified88.7%
Taylor expanded in y around 0 91.9%
*-commutative91.9%
associate-/r*88.2%
associate-*l/88.1%
associate-*r/88.2%
Simplified88.2%
associate-*r/88.1%
associate-/l*88.2%
div-inv88.2%
metadata-eval88.2%
associate-/r*91.9%
*-commutative91.9%
associate-*l*91.9%
associate-/r*99.3%
Applied egg-rr99.3%
Final simplification98.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- y (/ t y))))
(if (<= y -1.7e-103)
(+ x (* t_1 (/ -0.3333333333333333 z)))
(if (<= y 2.75e-129)
(+ x (/ (/ t z) (* y 3.0)))
(+ x (/ -0.3333333333333333 (/ z t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -1.7e-103) {
tmp = x + (t_1 * (-0.3333333333333333 / z));
} else if (y <= 2.75e-129) {
tmp = x + ((t / z) / (y * 3.0));
} else {
tmp = x + (-0.3333333333333333 / (z / t_1));
}
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 <= (-1.7d-103)) then
tmp = x + (t_1 * ((-0.3333333333333333d0) / z))
else if (y <= 2.75d-129) then
tmp = x + ((t / z) / (y * 3.0d0))
else
tmp = x + ((-0.3333333333333333d0) / (z / t_1))
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 <= -1.7e-103) {
tmp = x + (t_1 * (-0.3333333333333333 / z));
} else if (y <= 2.75e-129) {
tmp = x + ((t / z) / (y * 3.0));
} else {
tmp = x + (-0.3333333333333333 / (z / t_1));
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -1.7e-103: tmp = x + (t_1 * (-0.3333333333333333 / z)) elif y <= 2.75e-129: tmp = x + ((t / z) / (y * 3.0)) else: tmp = x + (-0.3333333333333333 / (z / t_1)) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -1.7e-103) tmp = Float64(x + Float64(t_1 * Float64(-0.3333333333333333 / z))); elseif (y <= 2.75e-129) tmp = Float64(x + Float64(Float64(t / z) / Float64(y * 3.0))); else tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -1.7e-103) tmp = x + (t_1 * (-0.3333333333333333 / z)); elseif (y <= 2.75e-129) tmp = x + ((t / z) / (y * 3.0)); else tmp = x + (-0.3333333333333333 / (z / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e-103], N[(x + N[(t$95$1 * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.75e-129], N[(x + N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 / N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{-103}:\\
\;\;\;\;x + t_1 \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{-129}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{t_1}}\\
\end{array}
\end{array}
if y < -1.70000000000000001e-103Initial program 98.6%
Simplified99.7%
if -1.70000000000000001e-103 < y < 2.75000000000000012e-129Initial program 91.9%
Simplified88.7%
Taylor expanded in y around 0 91.9%
*-commutative91.9%
associate-/r*88.2%
associate-*l/88.1%
associate-*r/88.2%
Simplified88.2%
associate-*r/88.1%
associate-/l*88.2%
div-inv88.2%
metadata-eval88.2%
associate-/r*91.9%
*-commutative91.9%
associate-*l*91.9%
associate-/r*99.3%
Applied egg-rr99.3%
if 2.75000000000000012e-129 < y Initial program 97.7%
Simplified97.6%
associate-*l/97.7%
associate-/l*97.7%
Applied egg-rr97.7%
Final simplification98.8%
(FPCore (x y z t) :precision binary64 (if (<= t -4.3e+98) (+ (- 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 (t <= -4.3e+98) {
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 (t <= (-4.3d+98)) 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 (t <= -4.3e+98) {
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 t <= -4.3e+98: 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 (t <= -4.3e+98) 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 (t <= -4.3e+98) 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[t, -4.3e+98], 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}\;t \leq -4.3 \cdot 10^{+98}:\\
\;\;\;\;\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 t < -4.3000000000000001e98Initial program 99.8%
if -4.3000000000000001e98 < t Initial program 95.1%
Simplified97.5%
clear-num97.5%
associate-*l/97.5%
*-un-lft-identity97.5%
div-inv97.6%
metadata-eval97.6%
Applied egg-rr97.6%
Final simplification98.0%
(FPCore (x y z t) :precision binary64 (if (<= t -4.5e+98) (+ x (+ (* -0.3333333333333333 (/ y z)) (/ 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 (t <= -4.5e+98) {
tmp = x + ((-0.3333333333333333 * (y / z)) + (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 (t <= (-4.5d+98)) then
tmp = x + (((-0.3333333333333333d0) * (y / z)) + (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 (t <= -4.5e+98) {
tmp = x + ((-0.3333333333333333 * (y / z)) + (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 t <= -4.5e+98: tmp = x + ((-0.3333333333333333 * (y / z)) + (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 (t <= -4.5e+98) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * Float64(y / z)) + 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 (t <= -4.5e+98) tmp = x + ((-0.3333333333333333 * (y / z)) + (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[t, -4.5e+98], N[(x + N[(N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $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 -4.5 \cdot 10^{+98}:\\
\;\;\;\;x + \left(-0.3333333333333333 \cdot \frac{y}{z} + \frac{t}{z \cdot \left(y \cdot 3\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\end{array}
\end{array}
if t < -4.5000000000000002e98Initial program 99.8%
+-commutative99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r+99.8%
--rgt-identity99.8%
+-commutative99.8%
associate--l+99.8%
associate-+l+99.8%
associate--r-99.8%
neg-sub099.8%
distribute-frac-neg99.8%
remove-double-neg99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
Simplified99.6%
if -4.5000000000000002e98 < t Initial program 95.1%
Simplified97.5%
clear-num97.5%
associate-*l/97.5%
*-un-lft-identity97.5%
div-inv97.6%
metadata-eval97.6%
Applied egg-rr97.6%
Final simplification98.0%
(FPCore (x y z t) :precision binary64 (if (or (<= z -6.5e+69) (not (<= z 1.4e+39))) (+ x (/ y (* z -3.0))) (* (- y (/ t y)) (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.5e+69) || !(z <= 1.4e+39)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = (y - (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 ((z <= (-6.5d+69)) .or. (.not. (z <= 1.4d+39))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = (y - (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 ((z <= -6.5e+69) || !(z <= 1.4e+39)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -6.5e+69) or not (z <= 1.4e+39): tmp = x + (y / (z * -3.0)) else: tmp = (y - (t / y)) * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -6.5e+69) || !(z <= 1.4e+39)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -6.5e+69) || ~((z <= 1.4e+39))) tmp = x + (y / (z * -3.0)); else tmp = (y - (t / y)) * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6.5e+69], N[Not[LessEqual[z, 1.4e+39]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+69} \lor \neg \left(z \leq 1.4 \cdot 10^{+39}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;\left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if z < -6.5000000000000001e69 or 1.40000000000000001e39 < z Initial program 99.0%
Simplified91.2%
associate-*l/91.2%
associate-/l*91.2%
Applied egg-rr91.2%
Taylor expanded in y around inf 78.8%
div-inv78.8%
metadata-eval78.8%
clear-num78.8%
times-frac78.9%
*-commutative78.9%
times-frac78.9%
Applied egg-rr78.9%
associate-*r/78.8%
associate-*l/78.8%
*-lft-identity78.8%
rem-square-sqrt39.6%
associate-/r*39.6%
rem-square-sqrt78.9%
Simplified78.9%
if -6.5000000000000001e69 < z < 1.40000000000000001e39Initial program 93.9%
*-un-lft-identity93.9%
times-frac93.9%
Applied egg-rr93.9%
Taylor expanded in x around 0 85.3%
cancel-sign-sub-inv85.3%
metadata-eval85.3%
+-commutative85.3%
associate-*r/85.3%
associate-*l/85.2%
*-commutative85.2%
associate-*r/85.3%
associate-/l*85.3%
associate-*r/87.9%
metadata-eval87.9%
associate-/r*87.9%
mul-1-neg87.9%
distribute-lft-neg-out87.9%
associate-*r/85.3%
*-commutative85.3%
associate-/l*85.3%
*-commutative85.3%
metadata-eval85.3%
distribute-rgt-neg-in85.3%
distribute-lft-neg-in85.3%
associate-/l*85.2%
associate-/l*85.3%
neg-mul-185.3%
associate-/r*85.3%
Simplified89.3%
Final simplification84.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.6e-55) (not (<= y 2.7e-13))) (+ x (/ y (* z -3.0))) (+ x (* (/ t y) (/ 0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.6e-55) || !(y <= 2.7e-13)) {
tmp = x + (y / (z * -3.0));
} 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 <= (-3.6d-55)) .or. (.not. (y <= 2.7d-13))) then
tmp = x + (y / (z * (-3.0d0)))
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 <= -3.6e-55) || !(y <= 2.7e-13)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + ((t / y) * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.6e-55) or not (y <= 2.7e-13): tmp = x + (y / (z * -3.0)) else: tmp = x + ((t / y) * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.6e-55) || !(y <= 2.7e-13)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); 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 <= -3.6e-55) || ~((y <= 2.7e-13))) tmp = x + (y / (z * -3.0)); else tmp = x + ((t / y) * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.6e-55], N[Not[LessEqual[y, 2.7e-13]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $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 -3.6 \cdot 10^{-55} \lor \neg \left(y \leq 2.7 \cdot 10^{-13}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.6000000000000001e-55 or 2.70000000000000011e-13 < y Initial program 97.6%
Simplified99.6%
associate-*l/99.6%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 89.8%
div-inv89.7%
metadata-eval89.7%
clear-num89.8%
times-frac90.0%
*-commutative90.0%
times-frac89.9%
Applied egg-rr89.9%
associate-*r/89.8%
associate-*l/89.8%
*-lft-identity89.8%
rem-square-sqrt43.7%
associate-/r*43.7%
rem-square-sqrt90.0%
Simplified90.0%
if -3.6000000000000001e-55 < y < 2.70000000000000011e-13Initial program 94.3%
Simplified90.4%
Taylor expanded in y around 0 91.9%
*-commutative91.9%
associate-/r*87.7%
associate-*l/87.7%
associate-*r/87.7%
Simplified87.7%
Final simplification88.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.7e-55) (not (<= y 5.8e-8))) (+ x (/ y (* z -3.0))) (+ x (/ t (* y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.7e-55) || !(y <= 5.8e-8)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (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 ((y <= (-4.7d-55)) .or. (.not. (y <= 5.8d-8))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x + (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 ((y <= -4.7e-55) || !(y <= 5.8e-8)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (t / (y * (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.7e-55) or not (y <= 5.8e-8): tmp = x + (y / (z * -3.0)) else: tmp = x + (t / (y * (z * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.7e-55) || !(y <= 5.8e-8)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(t / Float64(y * Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.7e-55) || ~((y <= 5.8e-8))) tmp = x + (y / (z * -3.0)); else tmp = x + (t / (y * (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.7e-55], N[Not[LessEqual[y, 5.8e-8]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{-55} \lor \neg \left(y \leq 5.8 \cdot 10^{-8}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\end{array}
\end{array}
if y < -4.7e-55 or 5.8000000000000003e-8 < y Initial program 97.6%
Simplified99.6%
associate-*l/99.6%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 89.8%
div-inv89.7%
metadata-eval89.7%
clear-num89.8%
times-frac90.0%
*-commutative90.0%
times-frac89.9%
Applied egg-rr89.9%
associate-*r/89.8%
associate-*l/89.8%
*-lft-identity89.8%
rem-square-sqrt43.7%
associate-/r*43.7%
rem-square-sqrt90.0%
Simplified90.0%
if -4.7e-55 < y < 5.8000000000000003e-8Initial program 94.3%
Simplified90.4%
Taylor expanded in y around 0 91.9%
*-commutative91.9%
associate-/r*87.7%
associate-*l/87.7%
associate-*r/87.7%
Simplified87.7%
associate-*r/87.7%
associate-/l*87.7%
div-inv87.7%
metadata-eval87.7%
associate-/r*92.0%
*-commutative92.0%
associate-*l*91.9%
Applied egg-rr91.9%
Taylor expanded in z around 0 92.0%
*-commutative92.0%
associate-*l*92.0%
Simplified92.0%
Final simplification90.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.7e-55) (not (<= y 7.5e-8))) (+ 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 <= -4.7e-55) || !(y <= 7.5e-8)) {
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 <= (-4.7d-55)) .or. (.not. (y <= 7.5d-8))) 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 <= -4.7e-55) || !(y <= 7.5e-8)) {
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 <= -4.7e-55) or not (y <= 7.5e-8): 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 <= -4.7e-55) || !(y <= 7.5e-8)) 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 <= -4.7e-55) || ~((y <= 7.5e-8))) 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, -4.7e-55], N[Not[LessEqual[y, 7.5e-8]], $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 -4.7 \cdot 10^{-55} \lor \neg \left(y \leq 7.5 \cdot 10^{-8}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\end{array}
\end{array}
if y < -4.7e-55 or 7.4999999999999997e-8 < y Initial program 97.6%
Simplified99.6%
associate-*l/99.6%
associate-/l*99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 89.8%
div-inv89.7%
metadata-eval89.7%
clear-num89.8%
times-frac90.0%
*-commutative90.0%
times-frac89.9%
Applied egg-rr89.9%
associate-*r/89.8%
associate-*l/89.8%
*-lft-identity89.8%
rem-square-sqrt43.7%
associate-/r*43.7%
rem-square-sqrt90.0%
Simplified90.0%
if -4.7e-55 < y < 7.4999999999999997e-8Initial program 94.3%
Simplified90.4%
Taylor expanded in y around 0 91.9%
*-commutative91.9%
associate-/r*87.7%
associate-*l/87.7%
associate-*r/87.7%
Simplified87.7%
associate-*r/87.7%
associate-/l*87.7%
div-inv87.7%
metadata-eval87.7%
associate-/r*92.0%
*-commutative92.0%
associate-*l*91.9%
associate-/r*97.0%
Applied egg-rr97.0%
Final simplification93.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.1e-122) (not (<= y 3.1e-14))) (+ x (/ -0.3333333333333333 (/ z y))) (* 0.3333333333333333 (/ t (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.1e-122) || !(y <= 3.1e-14)) {
tmp = x + (-0.3333333333333333 / (z / y));
} else {
tmp = 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 <= (-4.1d-122)) .or. (.not. (y <= 3.1d-14))) then
tmp = x + ((-0.3333333333333333d0) / (z / y))
else
tmp = 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 <= -4.1e-122) || !(y <= 3.1e-14)) {
tmp = x + (-0.3333333333333333 / (z / y));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.1e-122) or not (y <= 3.1e-14): tmp = x + (-0.3333333333333333 / (z / y)) else: tmp = 0.3333333333333333 * (t / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.1e-122) || !(y <= 3.1e-14)) tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); else tmp = 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 <= -4.1e-122) || ~((y <= 3.1e-14))) tmp = x + (-0.3333333333333333 / (z / y)); else tmp = 0.3333333333333333 * (t / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.1e-122], N[Not[LessEqual[y, 3.1e-14]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{-122} \lor \neg \left(y \leq 3.1 \cdot 10^{-14}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -4.1e-122 or 3.10000000000000004e-14 < y Initial program 97.8%
Simplified99.7%
associate-*l/99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 88.5%
if -4.1e-122 < y < 3.10000000000000004e-14Initial program 93.8%
*-un-lft-identity93.8%
times-frac93.8%
Applied egg-rr93.8%
Taylor expanded in x around 0 68.7%
cancel-sign-sub-inv68.7%
metadata-eval68.7%
+-commutative68.7%
associate-*r/68.7%
associate-*l/68.7%
*-commutative68.7%
associate-*r/68.7%
associate-/l*68.6%
associate-*r/64.9%
metadata-eval64.9%
associate-/r*64.9%
mul-1-neg64.9%
distribute-lft-neg-out64.9%
associate-*r/68.6%
*-commutative68.6%
associate-/l*68.7%
*-commutative68.7%
metadata-eval68.7%
distribute-rgt-neg-in68.7%
distribute-lft-neg-in68.7%
associate-/l*68.6%
associate-/l*68.6%
neg-mul-168.6%
associate-/r*68.6%
Simplified64.5%
Taylor expanded in y around 0 66.2%
Final simplification79.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9.2e-123) (not (<= y 5.4e-14))) (+ x (/ y (* z -3.0))) (* 0.3333333333333333 (/ t (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.2e-123) || !(y <= 5.4e-14)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 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 <= (-9.2d-123)) .or. (.not. (y <= 5.4d-14))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = 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 <= -9.2e-123) || !(y <= 5.4e-14)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9.2e-123) or not (y <= 5.4e-14): tmp = x + (y / (z * -3.0)) else: tmp = 0.3333333333333333 * (t / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9.2e-123) || !(y <= 5.4e-14)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = 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 <= -9.2e-123) || ~((y <= 5.4e-14))) tmp = x + (y / (z * -3.0)); else tmp = 0.3333333333333333 * (t / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9.2e-123], N[Not[LessEqual[y, 5.4e-14]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-123} \lor \neg \left(y \leq 5.4 \cdot 10^{-14}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -9.19999999999999947e-123 or 5.3999999999999997e-14 < y Initial program 97.8%
Simplified99.7%
associate-*l/99.7%
associate-/l*99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 88.5%
div-inv88.4%
metadata-eval88.4%
clear-num88.5%
times-frac88.7%
*-commutative88.7%
times-frac88.6%
Applied egg-rr88.6%
associate-*r/88.5%
associate-*l/88.6%
*-lft-identity88.6%
rem-square-sqrt40.8%
associate-/r*40.7%
rem-square-sqrt88.7%
Simplified88.7%
if -9.19999999999999947e-123 < y < 5.3999999999999997e-14Initial program 93.8%
*-un-lft-identity93.8%
times-frac93.8%
Applied egg-rr93.8%
Taylor expanded in x around 0 68.7%
cancel-sign-sub-inv68.7%
metadata-eval68.7%
+-commutative68.7%
associate-*r/68.7%
associate-*l/68.7%
*-commutative68.7%
associate-*r/68.7%
associate-/l*68.6%
associate-*r/64.9%
metadata-eval64.9%
associate-/r*64.9%
mul-1-neg64.9%
distribute-lft-neg-out64.9%
associate-*r/68.6%
*-commutative68.6%
associate-/l*68.7%
*-commutative68.7%
metadata-eval68.7%
distribute-rgt-neg-in68.7%
distribute-lft-neg-in68.7%
associate-/l*68.6%
associate-/l*68.6%
neg-mul-168.6%
associate-/r*68.6%
Simplified64.5%
Taylor expanded in y around 0 66.2%
Final simplification79.1%
(FPCore (x y z t) :precision binary64 (if (<= x -1.4e+179) x (if (<= x 102000.0) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.4e+179) {
tmp = x;
} else if (x <= 102000.0) {
tmp = -0.3333333333333333 * (y / 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.4d+179)) then
tmp = x
else if (x <= 102000.0d0) then
tmp = (-0.3333333333333333d0) * (y / 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.4e+179) {
tmp = x;
} else if (x <= 102000.0) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.4e+179: tmp = x elif x <= 102000.0: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.4e+179) tmp = x; elseif (x <= 102000.0) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.4e+179) tmp = x; elseif (x <= 102000.0) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.4e+179], x, If[LessEqual[x, 102000.0], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{+179}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 102000:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.4e179 or 102000 < x Initial program 94.8%
Simplified96.8%
Taylor expanded in x around inf 63.3%
if -1.4e179 < x < 102000Initial program 96.8%
*-un-lft-identity96.8%
times-frac96.8%
Applied egg-rr96.8%
Taylor expanded in y around inf 43.1%
Final simplification50.3%
(FPCore (x y z t) :precision binary64 (if (<= x -1.4e+179) x (if (<= x 61000000.0) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.4e+179) {
tmp = x;
} else if (x <= 61000000.0) {
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 <= (-1.4d+179)) then
tmp = x
else if (x <= 61000000.0d0) 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 <= -1.4e+179) {
tmp = x;
} else if (x <= 61000000.0) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.4e+179: tmp = x elif x <= 61000000.0: tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.4e+179) tmp = x; elseif (x <= 61000000.0) 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 <= -1.4e+179) tmp = x; elseif (x <= 61000000.0) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.4e+179], x, If[LessEqual[x, 61000000.0], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{+179}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 61000000:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.4e179 or 6.1e7 < x Initial program 94.8%
Simplified96.8%
Taylor expanded in x around inf 63.3%
if -1.4e179 < x < 6.1e7Initial program 96.8%
*-un-lft-identity96.8%
times-frac96.8%
Applied egg-rr96.8%
Taylor expanded in x around 0 85.5%
cancel-sign-sub-inv85.5%
metadata-eval85.5%
+-commutative85.5%
associate-*r/85.5%
associate-*l/85.5%
*-commutative85.5%
associate-*r/85.4%
associate-/l*85.4%
associate-*r/83.5%
metadata-eval83.5%
associate-/r*83.5%
mul-1-neg83.5%
distribute-lft-neg-out83.5%
associate-*r/85.4%
*-commutative85.4%
associate-/l*85.4%
*-commutative85.4%
metadata-eval85.4%
distribute-rgt-neg-in85.4%
distribute-lft-neg-in85.4%
associate-/l*85.4%
associate-/l*85.4%
neg-mul-185.4%
associate-/r*85.4%
Simplified83.3%
Taylor expanded in y around inf 43.1%
associate-*r/43.1%
*-commutative43.1%
/-rgt-identity43.1%
associate-/l*43.2%
metadata-eval43.2%
associate-/l/43.2%
Simplified43.2%
Final simplification50.4%
(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.1%
Simplified95.3%
Taylor expanded in x around inf 31.2%
Final simplification31.2%
(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 2023336
(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))))