
(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 16 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 (<= (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))) 5e+292) (+ (+ x (/ t (* z (* y 3.0)))) (/ y (* z -3.0))) (+ x (/ (* 0.3333333333333333 (- (/ t y) y)) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= 5e+292) {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
} 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 (((x - (y / (z * 3.0d0))) + (t / (y * (z * 3.0d0)))) <= 5d+292) then
tmp = (x + (t / (z * (y * 3.0d0)))) + (y / (z * (-3.0d0)))
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 (((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= 5e+292) {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
} else {
tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= 5e+292: tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)) else: tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) <= 5e+292) tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(y / Float64(z * -3.0))); 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 (((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= 5e+292) tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)); else tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+292], N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $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}\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)} \leq 5 \cdot 10^{+292}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) < 4.9999999999999996e292Initial program 98.2%
+-commutative98.2%
associate-+r-98.2%
sub-neg98.2%
associate-*l*98.2%
*-commutative98.2%
distribute-frac-neg298.2%
distribute-rgt-neg-in98.2%
metadata-eval98.2%
Simplified98.2%
if 4.9999999999999996e292 < (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) Initial program 85.3%
sub-neg85.3%
associate-+l+85.3%
+-commutative85.3%
remove-double-neg85.3%
distribute-frac-neg85.3%
distribute-neg-in85.3%
remove-double-neg85.3%
sub-neg85.3%
neg-mul-185.3%
times-frac98.0%
distribute-frac-neg98.0%
neg-mul-198.0%
*-commutative98.0%
associate-/l*98.0%
*-commutative98.0%
Simplified99.9%
associate-*l/100.0%
Applied egg-rr100.0%
Final simplification98.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.6e-104) (not (<= y 6e-135))) (+ x (/ (* 0.3333333333333333 (- (/ t y) y)) z)) (+ x (/ (/ t z) (* y 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.6e-104) || !(y <= 6e-135)) {
tmp = x + ((0.3333333333333333 * ((t / y) - y)) / 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 <= (-4.6d-104)) .or. (.not. (y <= 6d-135))) then
tmp = x + ((0.3333333333333333d0 * ((t / y) - y)) / 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 <= -4.6e-104) || !(y <= 6e-135)) {
tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z);
} else {
tmp = x + ((t / z) / (y * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.6e-104) or not (y <= 6e-135): tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z) else: tmp = x + ((t / z) / (y * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.6e-104) || !(y <= 6e-135)) tmp = Float64(x + Float64(Float64(0.3333333333333333 * Float64(Float64(t / y) - y)) / 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 <= -4.6e-104) || ~((y <= 6e-135))) tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z); else tmp = x + ((t / z) / (y * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.6e-104], N[Not[LessEqual[y, 6e-135]], $MachinePrecision]], N[(x + N[(N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] / z), $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.6 \cdot 10^{-104} \lor \neg \left(y \leq 6 \cdot 10^{-135}\right):\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\end{array}
\end{array}
if y < -4.5999999999999999e-104 or 6.00000000000000024e-135 < y Initial program 97.8%
sub-neg97.8%
associate-+l+97.8%
+-commutative97.8%
remove-double-neg97.8%
distribute-frac-neg97.8%
distribute-neg-in97.8%
remove-double-neg97.8%
sub-neg97.8%
neg-mul-197.8%
times-frac97.5%
distribute-frac-neg97.5%
neg-mul-197.5%
*-commutative97.5%
associate-/l*97.4%
*-commutative97.4%
Simplified98.0%
associate-*l/98.1%
Applied egg-rr98.1%
if -4.5999999999999999e-104 < y < 6.00000000000000024e-135Initial program 91.4%
sub-neg91.4%
associate-+l+91.4%
+-commutative91.4%
remove-double-neg91.4%
distribute-frac-neg91.4%
distribute-neg-in91.4%
remove-double-neg91.4%
sub-neg91.4%
neg-mul-191.4%
times-frac86.0%
distribute-frac-neg86.0%
neg-mul-186.0%
*-commutative86.0%
associate-/l*86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in t around inf 91.4%
*-commutative91.4%
metadata-eval91.4%
times-frac91.4%
*-rgt-identity91.4%
*-commutative91.4%
associate-*r*91.4%
associate-/r*99.0%
Simplified99.0%
Final simplification98.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.75e-106) (not (<= y 5.6e-135))) (+ x (* 0.3333333333333333 (/ (- (/ t y) y) z))) (+ x (/ (/ t z) (* y 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.75e-106) || !(y <= 5.6e-135)) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / 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.75d-106)) .or. (.not. (y <= 5.6d-135))) then
tmp = x + (0.3333333333333333d0 * (((t / y) - y) / 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.75e-106) || !(y <= 5.6e-135)) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = x + ((t / z) / (y * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.75e-106) or not (y <= 5.6e-135): tmp = x + (0.3333333333333333 * (((t / y) - y) / z)) else: tmp = x + ((t / z) / (y * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.75e-106) || !(y <= 5.6e-135)) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / 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.75e-106) || ~((y <= 5.6e-135))) tmp = x + (0.3333333333333333 * (((t / y) - y) / z)); else tmp = x + ((t / z) / (y * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.75e-106], N[Not[LessEqual[y, 5.6e-135]], $MachinePrecision]], N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / 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.75 \cdot 10^{-106} \lor \neg \left(y \leq 5.6 \cdot 10^{-135}\right):\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\end{array}
\end{array}
if y < -3.7500000000000001e-106 or 5.60000000000000047e-135 < y Initial program 97.8%
sub-neg97.8%
associate-+l+97.8%
+-commutative97.8%
remove-double-neg97.8%
distribute-frac-neg97.8%
distribute-neg-in97.8%
remove-double-neg97.8%
sub-neg97.8%
neg-mul-197.8%
times-frac97.5%
distribute-frac-neg97.5%
neg-mul-197.5%
*-commutative97.5%
associate-/l*97.4%
*-commutative97.4%
Simplified98.0%
Taylor expanded in z around 0 98.0%
if -3.7500000000000001e-106 < y < 5.60000000000000047e-135Initial program 91.4%
sub-neg91.4%
associate-+l+91.4%
+-commutative91.4%
remove-double-neg91.4%
distribute-frac-neg91.4%
distribute-neg-in91.4%
remove-double-neg91.4%
sub-neg91.4%
neg-mul-191.4%
times-frac86.0%
distribute-frac-neg86.0%
neg-mul-186.0%
*-commutative86.0%
associate-/l*86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in t around inf 91.4%
*-commutative91.4%
metadata-eval91.4%
times-frac91.4%
*-rgt-identity91.4%
*-commutative91.4%
associate-*r*91.4%
associate-/r*99.0%
Simplified99.0%
Final simplification98.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.9e-49)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 1.2e+72)
(+ x (/ (/ t z) (* y 3.0)))
(* y (+ (/ x y) (* 0.3333333333333333 (/ -1.0 z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.9e-49) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.2e+72) {
tmp = x + ((t / z) / (y * 3.0));
} else {
tmp = y * ((x / y) + (0.3333333333333333 * (-1.0 / 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.9d-49)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 1.2d+72) then
tmp = x + ((t / z) / (y * 3.0d0))
else
tmp = y * ((x / y) + (0.3333333333333333d0 * ((-1.0d0) / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.9e-49) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.2e+72) {
tmp = x + ((t / z) / (y * 3.0));
} else {
tmp = y * ((x / y) + (0.3333333333333333 * (-1.0 / z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.9e-49: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 1.2e+72: tmp = x + ((t / z) / (y * 3.0)) else: tmp = y * ((x / y) + (0.3333333333333333 * (-1.0 / z))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.9e-49) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 1.2e+72) tmp = Float64(x + Float64(Float64(t / z) / Float64(y * 3.0))); else tmp = Float64(y * Float64(Float64(x / y) + Float64(0.3333333333333333 * Float64(-1.0 / z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.9e-49) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 1.2e+72) tmp = x + ((t / z) / (y * 3.0)); else tmp = y * ((x / y) + (0.3333333333333333 * (-1.0 / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.9e-49], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+72], N[(x + N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(x / y), $MachinePrecision] + N[(0.3333333333333333 * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-49}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+72}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{x}{y} + 0.3333333333333333 \cdot \frac{-1}{z}\right)\\
\end{array}
\end{array}
if y < -1.8999999999999999e-49Initial program 98.3%
Taylor expanded in t around 0 93.8%
if -1.8999999999999999e-49 < y < 1.20000000000000005e72Initial program 93.3%
sub-neg93.3%
associate-+l+93.3%
+-commutative93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
sub-neg93.3%
neg-mul-193.3%
times-frac89.8%
distribute-frac-neg89.8%
neg-mul-189.8%
*-commutative89.8%
associate-/l*89.8%
*-commutative89.8%
Simplified89.8%
Taylor expanded in t around inf 88.5%
*-commutative88.5%
metadata-eval88.5%
times-frac88.6%
*-rgt-identity88.6%
*-commutative88.6%
associate-*r*88.7%
associate-/r*93.3%
Simplified93.3%
if 1.20000000000000005e72 < y Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 99.8%
Final simplification94.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.9e-49)
(/ (/ y -3.0) z)
(if (<= y 0.000225)
(* 0.3333333333333333 (/ (/ t z) y))
(if (<= y 3.75e+90) x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.9e-49) {
tmp = (y / -3.0) / z;
} else if (y <= 0.000225) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 3.75e+90) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.9d-49)) then
tmp = (y / (-3.0d0)) / z
else if (y <= 0.000225d0) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else if (y <= 3.75d+90) then
tmp = x
else
tmp = y / (z * (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.9e-49) {
tmp = (y / -3.0) / z;
} else if (y <= 0.000225) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 3.75e+90) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.9e-49: tmp = (y / -3.0) / z elif y <= 0.000225: tmp = 0.3333333333333333 * ((t / z) / y) elif y <= 3.75e+90: tmp = x else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.9e-49) tmp = Float64(Float64(y / -3.0) / z); elseif (y <= 0.000225) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); elseif (y <= 3.75e+90) tmp = x; else tmp = Float64(y / Float64(z * -3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.9e-49) tmp = (y / -3.0) / z; elseif (y <= 0.000225) tmp = 0.3333333333333333 * ((t / z) / y); elseif (y <= 3.75e+90) tmp = x; else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.9e-49], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 0.000225], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.75e+90], x, N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-49}:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 0.000225:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{elif}\;y \leq 3.75 \cdot 10^{+90}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.8999999999999999e-49Initial 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.3%
*-commutative98.3%
Simplified98.3%
Taylor expanded in y around inf 93.6%
Taylor expanded in x around 0 63.3%
clear-num63.3%
un-div-inv63.5%
div-inv63.5%
metadata-eval63.5%
Applied egg-rr63.5%
*-commutative63.5%
associate-/r*63.5%
Simplified63.5%
if -1.8999999999999999e-49 < y < 2.2499999999999999e-4Initial program 92.5%
sub-neg92.5%
associate-+l+92.5%
+-commutative92.5%
remove-double-neg92.5%
distribute-frac-neg92.5%
distribute-neg-in92.5%
remove-double-neg92.5%
sub-neg92.5%
neg-mul-192.5%
times-frac88.5%
distribute-frac-neg88.5%
neg-mul-188.5%
*-commutative88.5%
associate-/l*88.5%
*-commutative88.5%
Simplified88.5%
Taylor expanded in t around inf 88.5%
Taylor expanded in x around 0 65.2%
*-commutative65.2%
associate-/r*69.0%
Simplified69.0%
if 2.2499999999999999e-4 < y < 3.75000000000000007e90Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
times-frac100.0%
fma-define100.0%
metadata-eval100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 69.5%
if 3.75000000000000007e90 < y Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 99.8%
Taylor expanded in x around 0 83.0%
clear-num82.9%
un-div-inv83.0%
div-inv83.2%
metadata-eval83.2%
Applied egg-rr83.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.9e-49)
(/ (/ y -3.0) z)
(if (<= y 0.00033)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y 1.5e+94) x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.9e-49) {
tmp = (y / -3.0) / z;
} else if (y <= 0.00033) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 1.5e+94) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.9d-49)) then
tmp = (y / (-3.0d0)) / z
else if (y <= 0.00033d0) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= 1.5d+94) then
tmp = x
else
tmp = y / (z * (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.9e-49) {
tmp = (y / -3.0) / z;
} else if (y <= 0.00033) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 1.5e+94) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.9e-49: tmp = (y / -3.0) / z elif y <= 0.00033: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= 1.5e+94: tmp = x else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.9e-49) tmp = Float64(Float64(y / -3.0) / z); elseif (y <= 0.00033) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= 1.5e+94) tmp = x; else tmp = Float64(y / Float64(z * -3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.9e-49) tmp = (y / -3.0) / z; elseif (y <= 0.00033) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= 1.5e+94) tmp = x; else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.9e-49], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 0.00033], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+94], x, N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-49}:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 0.00033:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+94}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.8999999999999999e-49Initial 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.3%
*-commutative98.3%
Simplified98.3%
Taylor expanded in y around inf 93.6%
Taylor expanded in x around 0 63.3%
clear-num63.3%
un-div-inv63.5%
div-inv63.5%
metadata-eval63.5%
Applied egg-rr63.5%
*-commutative63.5%
associate-/r*63.5%
Simplified63.5%
if -1.8999999999999999e-49 < y < 3.3e-4Initial program 92.5%
sub-neg92.5%
associate-+l+92.5%
+-commutative92.5%
remove-double-neg92.5%
distribute-frac-neg92.5%
distribute-neg-in92.5%
remove-double-neg92.5%
sub-neg92.5%
neg-mul-192.5%
times-frac88.5%
distribute-frac-neg88.5%
neg-mul-188.5%
*-commutative88.5%
associate-/l*88.5%
*-commutative88.5%
Simplified88.5%
Taylor expanded in t around inf 88.5%
Taylor expanded in x around 0 65.2%
if 3.3e-4 < y < 1.5e94Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
times-frac100.0%
fma-define100.0%
metadata-eval100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 69.5%
if 1.5e94 < y Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 99.8%
Taylor expanded in x around 0 83.0%
clear-num82.9%
un-div-inv83.0%
div-inv83.2%
metadata-eval83.2%
Applied egg-rr83.2%
(FPCore (x y z t)
:precision binary64
(if (<= x -1.08e+120)
x
(if (<= x 3.7e-57)
(/ (/ y -3.0) z)
(if (<= x 1.2e+261) (/ y (/ y x)) (/ (* x y) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.08e+120) {
tmp = x;
} else if (x <= 3.7e-57) {
tmp = (y / -3.0) / z;
} else if (x <= 1.2e+261) {
tmp = y / (y / x);
} else {
tmp = (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 (x <= (-1.08d+120)) then
tmp = x
else if (x <= 3.7d-57) then
tmp = (y / (-3.0d0)) / z
else if (x <= 1.2d+261) then
tmp = y / (y / x)
else
tmp = (x * y) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.08e+120) {
tmp = x;
} else if (x <= 3.7e-57) {
tmp = (y / -3.0) / z;
} else if (x <= 1.2e+261) {
tmp = y / (y / x);
} else {
tmp = (x * y) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.08e+120: tmp = x elif x <= 3.7e-57: tmp = (y / -3.0) / z elif x <= 1.2e+261: tmp = y / (y / x) else: tmp = (x * y) / y return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.08e+120) tmp = x; elseif (x <= 3.7e-57) tmp = Float64(Float64(y / -3.0) / z); elseif (x <= 1.2e+261) tmp = Float64(y / Float64(y / x)); else tmp = Float64(Float64(x * y) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.08e+120) tmp = x; elseif (x <= 3.7e-57) tmp = (y / -3.0) / z; elseif (x <= 1.2e+261) tmp = y / (y / x); else tmp = (x * y) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.08e+120], x, If[LessEqual[x, 3.7e-57], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 1.2e+261], N[(y / N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.08 \cdot 10^{+120}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-57}:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+261}:\\
\;\;\;\;\frac{y}{\frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{y}\\
\end{array}
\end{array}
if x < -1.0799999999999999e120Initial program 95.2%
sub-neg95.2%
associate-+l+95.2%
distribute-frac-neg95.2%
neg-mul-195.2%
*-commutative95.2%
times-frac95.2%
fma-define95.2%
metadata-eval95.2%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in x around inf 70.6%
if -1.0799999999999999e120 < x < 3.7e-57Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.2%
fma-define95.2%
metadata-eval95.2%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in y around inf 51.6%
Taylor expanded in x around 0 43.6%
clear-num43.5%
un-div-inv43.6%
div-inv43.7%
metadata-eval43.7%
Applied egg-rr43.7%
*-commutative43.7%
associate-/r*43.7%
Simplified43.7%
if 3.7e-57 < x < 1.1999999999999999e261Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
times-frac98.4%
fma-define98.4%
metadata-eval98.4%
associate-*l*98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in y around inf 65.7%
Taylor expanded in x around inf 45.5%
clear-num45.4%
un-div-inv46.6%
Applied egg-rr46.6%
if 1.1999999999999999e261 < x Initial program 87.4%
sub-neg87.4%
associate-+l+87.4%
distribute-frac-neg87.4%
neg-mul-187.4%
*-commutative87.4%
times-frac87.4%
fma-define87.4%
metadata-eval87.4%
associate-*l*87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y around 0 86.7%
Taylor expanded in t around 0 73.3%
*-commutative73.3%
Simplified73.3%
Final simplification50.4%
(FPCore (x y z t)
:precision binary64
(if (<= x -3.9e+120)
x
(if (<= x 1.05e-52)
(/ y (* z -3.0))
(if (<= x 2.9e+263) (/ y (/ y x)) (/ (* x y) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.9e+120) {
tmp = x;
} else if (x <= 1.05e-52) {
tmp = y / (z * -3.0);
} else if (x <= 2.9e+263) {
tmp = y / (y / x);
} else {
tmp = (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 (x <= (-3.9d+120)) then
tmp = x
else if (x <= 1.05d-52) then
tmp = y / (z * (-3.0d0))
else if (x <= 2.9d+263) then
tmp = y / (y / x)
else
tmp = (x * y) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.9e+120) {
tmp = x;
} else if (x <= 1.05e-52) {
tmp = y / (z * -3.0);
} else if (x <= 2.9e+263) {
tmp = y / (y / x);
} else {
tmp = (x * y) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.9e+120: tmp = x elif x <= 1.05e-52: tmp = y / (z * -3.0) elif x <= 2.9e+263: tmp = y / (y / x) else: tmp = (x * y) / y return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.9e+120) tmp = x; elseif (x <= 1.05e-52) tmp = Float64(y / Float64(z * -3.0)); elseif (x <= 2.9e+263) tmp = Float64(y / Float64(y / x)); else tmp = Float64(Float64(x * y) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.9e+120) tmp = x; elseif (x <= 1.05e-52) tmp = y / (z * -3.0); elseif (x <= 2.9e+263) tmp = y / (y / x); else tmp = (x * y) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.9e+120], x, If[LessEqual[x, 1.05e-52], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.9e+263], N[(y / N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{+120}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-52}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+263}:\\
\;\;\;\;\frac{y}{\frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{y}\\
\end{array}
\end{array}
if x < -3.8999999999999998e120Initial program 95.2%
sub-neg95.2%
associate-+l+95.2%
distribute-frac-neg95.2%
neg-mul-195.2%
*-commutative95.2%
times-frac95.2%
fma-define95.2%
metadata-eval95.2%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in x around inf 70.6%
if -3.8999999999999998e120 < x < 1.0499999999999999e-52Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.2%
fma-define95.2%
metadata-eval95.2%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in y around inf 51.6%
Taylor expanded in x around 0 43.6%
clear-num43.5%
un-div-inv43.6%
div-inv43.7%
metadata-eval43.7%
Applied egg-rr43.7%
if 1.0499999999999999e-52 < x < 2.90000000000000012e263Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
times-frac98.4%
fma-define98.4%
metadata-eval98.4%
associate-*l*98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in y around inf 65.7%
Taylor expanded in x around inf 45.5%
clear-num45.4%
un-div-inv46.6%
Applied egg-rr46.6%
if 2.90000000000000012e263 < x Initial program 87.4%
sub-neg87.4%
associate-+l+87.4%
distribute-frac-neg87.4%
neg-mul-187.4%
*-commutative87.4%
times-frac87.4%
fma-define87.4%
metadata-eval87.4%
associate-*l*87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y around 0 86.7%
Taylor expanded in t around 0 73.3%
*-commutative73.3%
Simplified73.3%
Final simplification50.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.9e-49) (not (<= y 2.8e+71))) (- x (* 0.3333333333333333 (/ y z))) (+ x (/ (/ t z) (* y 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.9e-49) || !(y <= 2.8e+71)) {
tmp = x - (0.3333333333333333 * (y / 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 <= (-1.9d-49)) .or. (.not. (y <= 2.8d+71))) then
tmp = x - (0.3333333333333333d0 * (y / 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 <= -1.9e-49) || !(y <= 2.8e+71)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = x + ((t / z) / (y * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.9e-49) or not (y <= 2.8e+71): tmp = x - (0.3333333333333333 * (y / z)) else: tmp = x + ((t / z) / (y * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.9e-49) || !(y <= 2.8e+71)) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / 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 <= -1.9e-49) || ~((y <= 2.8e+71))) tmp = x - (0.3333333333333333 * (y / z)); else tmp = x + ((t / z) / (y * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.9e-49], N[Not[LessEqual[y, 2.8e+71]], $MachinePrecision]], N[(x - N[(0.3333333333333333 * N[(y / 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 -1.9 \cdot 10^{-49} \lor \neg \left(y \leq 2.8 \cdot 10^{+71}\right):\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\end{array}
\end{array}
if y < -1.8999999999999999e-49 or 2.80000000000000002e71 < y Initial program 98.9%
Taylor expanded in t around 0 96.0%
if -1.8999999999999999e-49 < y < 2.80000000000000002e71Initial program 93.3%
sub-neg93.3%
associate-+l+93.3%
+-commutative93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
sub-neg93.3%
neg-mul-193.3%
times-frac89.7%
distribute-frac-neg89.7%
neg-mul-189.7%
*-commutative89.7%
associate-/l*89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in t around inf 88.5%
*-commutative88.5%
metadata-eval88.5%
times-frac88.5%
*-rgt-identity88.5%
*-commutative88.5%
associate-*r*88.6%
associate-/r*93.2%
Simplified93.2%
Final simplification94.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.9e-49) (not (<= y 5.6e+71))) (- x (* 0.3333333333333333 (/ y z))) (+ x (* 0.3333333333333333 (/ t (* y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.9e-49) || !(y <= 5.6e+71)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = x + (0.3333333333333333 * (t / (y * z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.9d-49)) .or. (.not. (y <= 5.6d+71))) then
tmp = x - (0.3333333333333333d0 * (y / z))
else
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.9e-49) || !(y <= 5.6e+71)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = x + (0.3333333333333333 * (t / (y * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.9e-49) or not (y <= 5.6e+71): tmp = x - (0.3333333333333333 * (y / z)) else: tmp = x + (0.3333333333333333 * (t / (y * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.9e-49) || !(y <= 5.6e+71)) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.9e-49) || ~((y <= 5.6e+71))) tmp = x - (0.3333333333333333 * (y / z)); else tmp = x + (0.3333333333333333 * (t / (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.9e-49], N[Not[LessEqual[y, 5.6e+71]], $MachinePrecision]], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-49} \lor \neg \left(y \leq 5.6 \cdot 10^{+71}\right):\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -1.8999999999999999e-49 or 5.60000000000000004e71 < y Initial program 98.9%
Taylor expanded in t around 0 96.0%
if -1.8999999999999999e-49 < y < 5.60000000000000004e71Initial program 93.3%
sub-neg93.3%
associate-+l+93.3%
+-commutative93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
sub-neg93.3%
neg-mul-193.3%
times-frac89.7%
distribute-frac-neg89.7%
neg-mul-189.7%
*-commutative89.7%
associate-/l*89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in t around inf 88.5%
Final simplification91.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.08e-79) (not (<= y 0.00017))) (- x (* 0.3333333333333333 (/ y z))) (/ (/ (* t 0.3333333333333333) z) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.08e-79) || !(y <= 0.00017)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = ((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 <= (-1.08d-79)) .or. (.not. (y <= 0.00017d0))) then
tmp = x - (0.3333333333333333d0 * (y / z))
else
tmp = ((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 <= -1.08e-79) || !(y <= 0.00017)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = ((t * 0.3333333333333333) / z) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.08e-79) or not (y <= 0.00017): tmp = x - (0.3333333333333333 * (y / z)) else: tmp = ((t * 0.3333333333333333) / z) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.08e-79) || !(y <= 0.00017)) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); else tmp = Float64(Float64(Float64(t * 0.3333333333333333) / z) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.08e-79) || ~((y <= 0.00017))) tmp = x - (0.3333333333333333 * (y / z)); else tmp = ((t * 0.3333333333333333) / z) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.08e-79], N[Not[LessEqual[y, 0.00017]], $MachinePrecision]], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.08 \cdot 10^{-79} \lor \neg \left(y \leq 0.00017\right):\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -1.0800000000000001e-79 or 1.7e-4 < y Initial program 99.1%
Taylor expanded in t around 0 92.5%
if -1.0800000000000001e-79 < y < 1.7e-4Initial program 92.1%
sub-neg92.1%
associate-+l+92.1%
distribute-frac-neg92.1%
neg-mul-192.1%
*-commutative92.1%
times-frac92.1%
fma-define92.1%
metadata-eval92.1%
associate-*l*92.1%
*-commutative92.1%
Simplified92.1%
Taylor expanded in y around 0 92.1%
Taylor expanded in t around inf 70.5%
associate-*r/70.6%
Applied egg-rr70.6%
Final simplification81.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6e-77) (not (<= y 3.55e-6))) (- x (* 0.3333333333333333 (/ y z))) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6e-77) || !(y <= 3.55e-6)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = 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 <= (-6d-77)) .or. (.not. (y <= 3.55d-6))) then
tmp = x - (0.3333333333333333d0 * (y / z))
else
tmp = 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 <= -6e-77) || !(y <= 3.55e-6)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6e-77) or not (y <= 3.55e-6): tmp = x - (0.3333333333333333 * (y / z)) else: tmp = 0.3333333333333333 * ((t / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6e-77) || !(y <= 3.55e-6)) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); else tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6e-77) || ~((y <= 3.55e-6))) tmp = x - (0.3333333333333333 * (y / z)); else tmp = 0.3333333333333333 * ((t / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6e-77], N[Not[LessEqual[y, 3.55e-6]], $MachinePrecision]], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-77} \lor \neg \left(y \leq 3.55 \cdot 10^{-6}\right):\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -6.00000000000000033e-77 or 3.5499999999999999e-6 < y Initial program 99.1%
Taylor expanded in t around 0 92.5%
if -6.00000000000000033e-77 < y < 3.5499999999999999e-6Initial program 92.1%
sub-neg92.1%
associate-+l+92.1%
+-commutative92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
distribute-neg-in92.1%
remove-double-neg92.1%
sub-neg92.1%
neg-mul-192.1%
times-frac88.0%
distribute-frac-neg88.0%
neg-mul-188.0%
*-commutative88.0%
associate-/l*88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in t around inf 88.0%
Taylor expanded in x around 0 66.5%
*-commutative66.5%
associate-/r*70.6%
Simplified70.6%
Final simplification81.4%
(FPCore (x y z t) :precision binary64 (if (<= x -4.9e+120) x (if (<= x 1.05e-52) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.9e+120) {
tmp = x;
} else if (x <= 1.05e-52) {
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 <= (-4.9d+120)) then
tmp = x
else if (x <= 1.05d-52) 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 <= -4.9e+120) {
tmp = x;
} else if (x <= 1.05e-52) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4.9e+120: tmp = x elif x <= 1.05e-52: tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4.9e+120) tmp = x; elseif (x <= 1.05e-52) 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 <= -4.9e+120) tmp = x; elseif (x <= 1.05e-52) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.9e+120], x, If[LessEqual[x, 1.05e-52], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.9 \cdot 10^{+120}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-52}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.9000000000000001e120 or 1.0499999999999999e-52 < x Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
times-frac95.9%
fma-define95.9%
metadata-eval95.9%
associate-*l*95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in x around inf 54.7%
if -4.9000000000000001e120 < x < 1.0499999999999999e-52Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.2%
fma-define95.2%
metadata-eval95.2%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in y around inf 51.6%
Taylor expanded in x around 0 43.6%
clear-num43.5%
un-div-inv43.6%
div-inv43.7%
metadata-eval43.7%
Applied egg-rr43.7%
(FPCore (x y z t) :precision binary64 (if (<= x -7e+119) x (if (<= x 7.5e-53) (* (/ y z) -0.3333333333333333) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7e+119) {
tmp = x;
} else if (x <= 7.5e-53) {
tmp = (y / z) * -0.3333333333333333;
} 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 <= (-7d+119)) then
tmp = x
else if (x <= 7.5d-53) then
tmp = (y / z) * (-0.3333333333333333d0)
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 <= -7e+119) {
tmp = x;
} else if (x <= 7.5e-53) {
tmp = (y / z) * -0.3333333333333333;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -7e+119: tmp = x elif x <= 7.5e-53: tmp = (y / z) * -0.3333333333333333 else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -7e+119) tmp = x; elseif (x <= 7.5e-53) tmp = Float64(Float64(y / z) * -0.3333333333333333); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -7e+119) tmp = x; elseif (x <= 7.5e-53) tmp = (y / z) * -0.3333333333333333; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -7e+119], x, If[LessEqual[x, 7.5e-53], N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{+119}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -7.0000000000000001e119 or 7.5000000000000001e-53 < x Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
times-frac95.9%
fma-define95.9%
metadata-eval95.9%
associate-*l*95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in x around inf 54.7%
if -7.0000000000000001e119 < x < 7.5000000000000001e-53Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.2%
fma-define95.2%
metadata-eval95.2%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in y around inf 51.6%
Taylor expanded in x around 0 43.6%
clear-num43.5%
un-div-inv43.6%
div-inv43.7%
metadata-eval43.7%
Applied egg-rr43.7%
*-commutative43.7%
associate-/r*43.7%
Simplified43.7%
clear-num43.6%
associate-/r/43.6%
associate-*r/43.6%
*-commutative43.6%
metadata-eval43.6%
Applied egg-rr43.6%
(FPCore (x y z t) :precision binary64 (if (<= x -1.7e+120) x (if (<= x 6.8e-54) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.7e+120) {
tmp = x;
} else if (x <= 6.8e-54) {
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.7d+120)) then
tmp = x
else if (x <= 6.8d-54) 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.7e+120) {
tmp = x;
} else if (x <= 6.8e-54) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.7e+120: tmp = x elif x <= 6.8e-54: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.7e+120) tmp = x; elseif (x <= 6.8e-54) 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.7e+120) tmp = x; elseif (x <= 6.8e-54) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.7e+120], x, If[LessEqual[x, 6.8e-54], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+120}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{-54}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.69999999999999999e120 or 6.79999999999999975e-54 < x Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
times-frac95.9%
fma-define95.9%
metadata-eval95.9%
associate-*l*95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in x around inf 54.7%
if -1.69999999999999999e120 < x < 6.79999999999999975e-54Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.2%
fma-define95.2%
metadata-eval95.2%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
Taylor expanded in y around inf 51.6%
Taylor expanded in x around 0 43.6%
(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.6%
sub-neg95.6%
associate-+l+95.6%
distribute-frac-neg95.6%
neg-mul-195.6%
*-commutative95.6%
times-frac95.5%
fma-define95.5%
metadata-eval95.5%
associate-*l*95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in x around inf 30.6%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2024132
(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))))