
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 2e-43) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 2e-43) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * 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 ((z * 3.0d0) <= 2d-43) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 2e-43) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 2e-43: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 2e-43) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 2e-43) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-43], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 2 \cdot 10^{-43}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < 2.00000000000000015e-43Initial 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-frac98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.8%
*-commutative98.8%
Simplified99.3%
metadata-eval99.3%
associate-/r*99.3%
*-commutative99.3%
associate-*l/99.4%
*-un-lft-identity99.4%
Applied egg-rr99.4%
if 2.00000000000000015e-43 < (*.f64 z #s(literal 3 binary64)) Initial program 99.8%
(FPCore (x y z t) :precision binary64 (if (<= y -1.8e-27) (- x (* 0.3333333333333333 (/ y z))) (if (<= y 3.3e-16) (+ x (/ (/ t (* z 3.0)) y)) (- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.8e-27) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 3.3e-16) {
tmp = x + ((t / (z * 3.0)) / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.8d-27)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 3.3d-16) then
tmp = x + ((t / (z * 3.0d0)) / y)
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.8e-27) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 3.3e-16) {
tmp = x + ((t / (z * 3.0)) / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.8e-27: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 3.3e-16: tmp = x + ((t / (z * 3.0)) / y) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.8e-27) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 3.3e-16) tmp = Float64(x + Float64(Float64(t / Float64(z * 3.0)) / y)); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.8e-27) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 3.3e-16) tmp = x + ((t / (z * 3.0)) / y); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.8e-27], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e-16], N[(x + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-27}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-16}:\\
\;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -1.7999999999999999e-27Initial program 98.0%
Taylor expanded in t around 0 90.6%
if -1.7999999999999999e-27 < y < 3.29999999999999988e-16Initial program 90.1%
sub-neg90.1%
associate-+l+90.1%
+-commutative90.1%
remove-double-neg90.1%
distribute-frac-neg90.1%
distribute-neg-in90.1%
remove-double-neg90.1%
sub-neg90.1%
neg-mul-190.1%
times-frac94.7%
distribute-frac-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.7%
*-commutative94.7%
Simplified94.8%
Taylor expanded in t around inf 87.8%
associate-*r/87.8%
*-commutative87.8%
times-frac91.8%
*-commutative91.8%
Simplified91.8%
*-commutative91.8%
associate-*r/95.4%
Applied egg-rr95.4%
*-commutative95.4%
metadata-eval95.4%
associate-/r*95.4%
*-commutative95.4%
un-div-inv95.4%
Applied egg-rr95.4%
if 3.29999999999999988e-16 < y Initial program 99.9%
Taylor expanded in t around 0 96.9%
metadata-eval96.9%
times-frac97.0%
*-un-lft-identity97.0%
*-commutative97.0%
Applied egg-rr97.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.95e-27)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 1.05e-18)
(+ x (/ (* t (/ 0.3333333333333333 z)) y))
(- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.95e-27) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.05e-18) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.95d-27)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 1.05d-18) then
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.95e-27) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.05e-18) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.95e-27: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 1.05e-18: tmp = x + ((t * (0.3333333333333333 / z)) / y) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.95e-27) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 1.05e-18) tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.95e-27) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 1.05e-18) tmp = x + ((t * (0.3333333333333333 / z)) / y); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.95e-27], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e-18], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{-27}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-18}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -1.94999999999999986e-27Initial program 98.0%
Taylor expanded in t around 0 90.6%
if -1.94999999999999986e-27 < y < 1.05e-18Initial program 90.1%
sub-neg90.1%
associate-+l+90.1%
+-commutative90.1%
remove-double-neg90.1%
distribute-frac-neg90.1%
distribute-neg-in90.1%
remove-double-neg90.1%
sub-neg90.1%
neg-mul-190.1%
times-frac94.7%
distribute-frac-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.7%
*-commutative94.7%
Simplified94.8%
Taylor expanded in t around inf 87.8%
associate-*r/87.8%
*-commutative87.8%
times-frac91.8%
*-commutative91.8%
Simplified91.8%
*-commutative91.8%
associate-*r/95.4%
Applied egg-rr95.4%
if 1.05e-18 < y Initial program 99.9%
Taylor expanded in t around 0 96.9%
metadata-eval96.9%
times-frac97.0%
*-un-lft-identity97.0%
*-commutative97.0%
Applied egg-rr97.0%
Final simplification94.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -9.2e-34)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 1.45e-18)
(+ x (* (/ t y) (/ 0.3333333333333333 z)))
(- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.2e-34) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.45e-18) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-9.2d-34)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 1.45d-18) then
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.2e-34) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.45e-18) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.2e-34: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 1.45e-18: tmp = x + ((t / y) * (0.3333333333333333 / z)) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.2e-34) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 1.45e-18) tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9.2e-34) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 1.45e-18) tmp = x + ((t / y) * (0.3333333333333333 / z)); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.2e-34], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e-18], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-34}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-18}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -9.20000000000000045e-34Initial program 98.0%
Taylor expanded in t around 0 90.6%
if -9.20000000000000045e-34 < y < 1.45e-18Initial program 90.1%
sub-neg90.1%
associate-+l+90.1%
+-commutative90.1%
remove-double-neg90.1%
distribute-frac-neg90.1%
distribute-neg-in90.1%
remove-double-neg90.1%
sub-neg90.1%
neg-mul-190.1%
times-frac94.7%
distribute-frac-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.7%
*-commutative94.7%
Simplified94.8%
Taylor expanded in t around inf 87.8%
associate-*r/87.8%
*-commutative87.8%
times-frac91.8%
*-commutative91.8%
Simplified91.8%
if 1.45e-18 < y Initial program 99.9%
Taylor expanded in t around 0 96.9%
metadata-eval96.9%
times-frac97.0%
*-un-lft-identity97.0%
*-commutative97.0%
Applied egg-rr97.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.4e-27)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 5.4e-17)
(+ x (* 0.3333333333333333 (/ t (* z y))))
(- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.4e-27) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 5.4e-17) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.4d-27)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 5.4d-17) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.4e-27) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 5.4e-17) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.4e-27: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 5.4e-17: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.4e-27) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 5.4e-17) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.4e-27) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 5.4e-17) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.4e-27], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e-17], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-27}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-17}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -2.40000000000000002e-27Initial program 98.0%
Taylor expanded in t around 0 90.6%
if -2.40000000000000002e-27 < y < 5.4000000000000002e-17Initial program 90.1%
sub-neg90.1%
associate-+l+90.1%
+-commutative90.1%
remove-double-neg90.1%
distribute-frac-neg90.1%
distribute-neg-in90.1%
remove-double-neg90.1%
sub-neg90.1%
neg-mul-190.1%
times-frac94.7%
distribute-frac-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.7%
*-commutative94.7%
Simplified94.8%
Taylor expanded in t around inf 87.8%
if 5.4000000000000002e-17 < y Initial program 99.9%
Taylor expanded in t around 0 96.9%
metadata-eval96.9%
times-frac97.0%
*-un-lft-identity97.0%
*-commutative97.0%
Applied egg-rr97.0%
Final simplification91.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6.6e-132) (not (<= y 7.5e-145))) (- x (* 0.3333333333333333 (/ y z))) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.6e-132) || !(y <= 7.5e-145)) {
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 <= (-6.6d-132)) .or. (.not. (y <= 7.5d-145))) 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 <= -6.6e-132) || !(y <= 7.5e-145)) {
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 <= -6.6e-132) or not (y <= 7.5e-145): 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 <= -6.6e-132) || !(y <= 7.5e-145)) 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 <= -6.6e-132) || ~((y <= 7.5e-145))) 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, -6.6e-132], N[Not[LessEqual[y, 7.5e-145]], $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.6 \cdot 10^{-132} \lor \neg \left(y \leq 7.5 \cdot 10^{-145}\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.5999999999999994e-132 or 7.4999999999999996e-145 < y Initial program 98.2%
Taylor expanded in t around 0 83.1%
if -6.5999999999999994e-132 < y < 7.4999999999999996e-145Initial program 86.8%
sub-neg86.8%
associate-+l+86.8%
+-commutative86.8%
remove-double-neg86.8%
distribute-frac-neg86.8%
distribute-neg-in86.8%
remove-double-neg86.8%
sub-neg86.8%
neg-mul-186.8%
times-frac92.9%
distribute-frac-neg92.9%
neg-mul-192.9%
*-commutative92.9%
associate-/l*92.9%
*-commutative92.9%
Simplified93.1%
Taylor expanded in t around inf 86.8%
associate-*r/86.8%
*-commutative86.8%
times-frac93.1%
*-commutative93.1%
Simplified93.1%
*-commutative93.1%
associate-*r/97.5%
Applied egg-rr97.5%
*-commutative97.5%
metadata-eval97.5%
associate-/r*97.5%
*-commutative97.5%
un-div-inv97.6%
Applied egg-rr97.6%
Taylor expanded in x around 0 69.2%
*-commutative69.2%
associate-/r*76.3%
Simplified76.3%
Final simplification80.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.02e-133) (not (<= y 7.5e-145))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.02e-133) || !(y <= 7.5e-145)) {
tmp = x + (y * (-0.3333333333333333 / 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 <= (-1.02d-133)) .or. (.not. (y <= 7.5d-145))) then
tmp = x + (y * ((-0.3333333333333333d0) / 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 <= -1.02e-133) || !(y <= 7.5e-145)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.02e-133) or not (y <= 7.5e-145): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * ((t / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.02e-133) || !(y <= 7.5e-145)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / 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 <= -1.02e-133) || ~((y <= 7.5e-145))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * ((t / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.02e-133], N[Not[LessEqual[y, 7.5e-145]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / 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 -1.02 \cdot 10^{-133} \lor \neg \left(y \leq 7.5 \cdot 10^{-145}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -1.02e-133 or 7.4999999999999996e-145 < y Initial program 98.2%
sub-neg98.2%
associate-+l+98.2%
+-commutative98.2%
remove-double-neg98.2%
distribute-frac-neg98.2%
distribute-neg-in98.2%
remove-double-neg98.2%
sub-neg98.2%
neg-mul-198.2%
times-frac98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.7%
*-commutative98.7%
Simplified99.2%
Taylor expanded in t around 0 83.1%
metadata-eval83.1%
distribute-lft-neg-in83.1%
*-commutative83.1%
associate-*l/83.1%
associate-*r/83.1%
distribute-rgt-neg-in83.1%
distribute-neg-frac83.1%
metadata-eval83.1%
Simplified83.1%
if -1.02e-133 < y < 7.4999999999999996e-145Initial program 86.8%
sub-neg86.8%
associate-+l+86.8%
+-commutative86.8%
remove-double-neg86.8%
distribute-frac-neg86.8%
distribute-neg-in86.8%
remove-double-neg86.8%
sub-neg86.8%
neg-mul-186.8%
times-frac92.9%
distribute-frac-neg92.9%
neg-mul-192.9%
*-commutative92.9%
associate-/l*92.9%
*-commutative92.9%
Simplified93.1%
Taylor expanded in t around inf 86.8%
associate-*r/86.8%
*-commutative86.8%
times-frac93.1%
*-commutative93.1%
Simplified93.1%
*-commutative93.1%
associate-*r/97.5%
Applied egg-rr97.5%
*-commutative97.5%
metadata-eval97.5%
associate-/r*97.5%
*-commutative97.5%
un-div-inv97.6%
Applied egg-rr97.6%
Taylor expanded in x around 0 69.2%
*-commutative69.2%
associate-/r*76.3%
Simplified76.3%
Final simplification80.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.6e-135)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 4.8e-146)
(* 0.3333333333333333 (/ (/ t z) y))
(- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.6e-135) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 4.8e-146) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-3.6d-135)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 4.8d-146) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.6e-135) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 4.8e-146) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.6e-135: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 4.8e-146: tmp = 0.3333333333333333 * ((t / z) / y) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.6e-135) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 4.8e-146) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.6e-135) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 4.8e-146) tmp = 0.3333333333333333 * ((t / z) / y); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.6e-135], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-146], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{-135}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-146}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -3.59999999999999978e-135Initial program 98.4%
Taylor expanded in t around 0 83.1%
if -3.59999999999999978e-135 < y < 4.8000000000000003e-146Initial program 86.8%
sub-neg86.8%
associate-+l+86.8%
+-commutative86.8%
remove-double-neg86.8%
distribute-frac-neg86.8%
distribute-neg-in86.8%
remove-double-neg86.8%
sub-neg86.8%
neg-mul-186.8%
times-frac92.9%
distribute-frac-neg92.9%
neg-mul-192.9%
*-commutative92.9%
associate-/l*92.9%
*-commutative92.9%
Simplified93.1%
Taylor expanded in t around inf 86.8%
associate-*r/86.8%
*-commutative86.8%
times-frac93.1%
*-commutative93.1%
Simplified93.1%
*-commutative93.1%
associate-*r/97.5%
Applied egg-rr97.5%
*-commutative97.5%
metadata-eval97.5%
associate-/r*97.5%
*-commutative97.5%
un-div-inv97.6%
Applied egg-rr97.6%
Taylor expanded in x around 0 69.2%
*-commutative69.2%
associate-/r*76.3%
Simplified76.3%
if 4.8000000000000003e-146 < y Initial program 98.1%
Taylor expanded in t around 0 83.1%
metadata-eval83.1%
times-frac83.2%
*-un-lft-identity83.2%
*-commutative83.2%
Applied egg-rr83.2%
(FPCore (x y z t) :precision binary64 (if (<= y -2.4e-27) (* (/ y z) -0.3333333333333333) (if (<= y 1.15e-18) (* 0.3333333333333333 (/ (/ t z) y)) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.4e-27) {
tmp = (y / z) * -0.3333333333333333;
} else if (y <= 1.15e-18) {
tmp = 0.3333333333333333 * ((t / z) / y);
} 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 <= (-2.4d-27)) then
tmp = (y / z) * (-0.3333333333333333d0)
else if (y <= 1.15d-18) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
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 <= -2.4e-27) {
tmp = (y / z) * -0.3333333333333333;
} else if (y <= 1.15e-18) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.4e-27: tmp = (y / z) * -0.3333333333333333 elif y <= 1.15e-18: tmp = 0.3333333333333333 * ((t / z) / y) else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.4e-27) tmp = Float64(Float64(y / z) * -0.3333333333333333); elseif (y <= 1.15e-18) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); 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 <= -2.4e-27) tmp = (y / z) * -0.3333333333333333; elseif (y <= 1.15e-18) tmp = 0.3333333333333333 * ((t / z) / y); else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.4e-27], N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], If[LessEqual[y, 1.15e-18], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-27}:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-18}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -2.40000000000000002e-27Initial program 98.0%
Taylor expanded in t around 0 90.6%
metadata-eval90.6%
times-frac90.6%
*-un-lft-identity90.6%
*-commutative90.6%
Applied egg-rr90.6%
*-commutative90.6%
metadata-eval90.6%
distribute-lft-neg-in90.6%
distribute-neg-frac290.6%
distribute-frac-neg90.6%
neg-mul-190.6%
times-frac90.6%
metadata-eval90.6%
associate-/l*90.6%
*-commutative90.6%
associate-*r/90.5%
Simplified90.5%
Taylor expanded in x around 0 58.6%
if -2.40000000000000002e-27 < y < 1.15e-18Initial program 90.1%
sub-neg90.1%
associate-+l+90.1%
+-commutative90.1%
remove-double-neg90.1%
distribute-frac-neg90.1%
distribute-neg-in90.1%
remove-double-neg90.1%
sub-neg90.1%
neg-mul-190.1%
times-frac94.7%
distribute-frac-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.7%
*-commutative94.7%
Simplified94.8%
Taylor expanded in t around inf 87.8%
associate-*r/87.8%
*-commutative87.8%
times-frac91.8%
*-commutative91.8%
Simplified91.8%
*-commutative91.8%
associate-*r/95.4%
Applied egg-rr95.4%
*-commutative95.4%
metadata-eval95.4%
associate-/r*95.4%
*-commutative95.4%
un-div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in x around 0 60.9%
*-commutative60.9%
associate-/r*66.2%
Simplified66.2%
if 1.15e-18 < y Initial program 99.9%
Taylor expanded in t around 0 96.9%
metadata-eval96.9%
times-frac97.0%
*-un-lft-identity97.0%
*-commutative97.0%
Applied egg-rr97.0%
*-commutative97.0%
metadata-eval97.0%
distribute-lft-neg-in97.0%
distribute-neg-frac297.0%
distribute-frac-neg97.0%
neg-mul-197.0%
times-frac96.9%
metadata-eval96.9%
associate-/l*96.8%
*-commutative96.8%
associate-*r/96.8%
Simplified96.8%
Taylor expanded in x around 0 66.8%
*-commutative66.8%
associate-*l/66.8%
associate-*r/66.7%
clear-num66.7%
un-div-inv66.8%
div-inv67.0%
metadata-eval67.0%
Applied egg-rr67.0%
Final simplification64.9%
(FPCore (x y z t) :precision binary64 (if (<= y -2e-27) (* (/ y z) -0.3333333333333333) (if (<= y 1.6e-15) (* 0.3333333333333333 (/ t (* z y))) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2e-27) {
tmp = (y / z) * -0.3333333333333333;
} else if (y <= 1.6e-15) {
tmp = 0.3333333333333333 * (t / (z * y));
} 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 <= (-2d-27)) then
tmp = (y / z) * (-0.3333333333333333d0)
else if (y <= 1.6d-15) then
tmp = 0.3333333333333333d0 * (t / (z * y))
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 <= -2e-27) {
tmp = (y / z) * -0.3333333333333333;
} else if (y <= 1.6e-15) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2e-27: tmp = (y / z) * -0.3333333333333333 elif y <= 1.6e-15: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2e-27) tmp = Float64(Float64(y / z) * -0.3333333333333333); elseif (y <= 1.6e-15) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); 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 <= -2e-27) tmp = (y / z) * -0.3333333333333333; elseif (y <= 1.6e-15) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2e-27], N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], If[LessEqual[y, 1.6e-15], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-27}:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-15}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -2.0000000000000001e-27Initial program 98.0%
Taylor expanded in t around 0 90.6%
metadata-eval90.6%
times-frac90.6%
*-un-lft-identity90.6%
*-commutative90.6%
Applied egg-rr90.6%
*-commutative90.6%
metadata-eval90.6%
distribute-lft-neg-in90.6%
distribute-neg-frac290.6%
distribute-frac-neg90.6%
neg-mul-190.6%
times-frac90.6%
metadata-eval90.6%
associate-/l*90.6%
*-commutative90.6%
associate-*r/90.5%
Simplified90.5%
Taylor expanded in x around 0 58.6%
if -2.0000000000000001e-27 < y < 1.6e-15Initial program 90.1%
sub-neg90.1%
associate-+l+90.1%
+-commutative90.1%
remove-double-neg90.1%
distribute-frac-neg90.1%
distribute-neg-in90.1%
remove-double-neg90.1%
sub-neg90.1%
neg-mul-190.1%
times-frac94.7%
distribute-frac-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.7%
*-commutative94.7%
Simplified94.8%
Taylor expanded in t around inf 87.8%
associate-*r/87.8%
*-commutative87.8%
times-frac91.8%
*-commutative91.8%
Simplified91.8%
*-commutative91.8%
associate-*r/95.4%
Applied egg-rr95.4%
*-commutative95.4%
metadata-eval95.4%
associate-/r*95.4%
*-commutative95.4%
un-div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in x around 0 60.9%
if 1.6e-15 < y Initial program 99.9%
Taylor expanded in t around 0 96.9%
metadata-eval96.9%
times-frac97.0%
*-un-lft-identity97.0%
*-commutative97.0%
Applied egg-rr97.0%
*-commutative97.0%
metadata-eval97.0%
distribute-lft-neg-in97.0%
distribute-neg-frac297.0%
distribute-frac-neg97.0%
neg-mul-197.0%
times-frac96.9%
metadata-eval96.9%
associate-/l*96.8%
*-commutative96.8%
associate-*r/96.8%
Simplified96.8%
Taylor expanded in x around 0 66.8%
*-commutative66.8%
associate-*l/66.8%
associate-*r/66.7%
clear-num66.7%
un-div-inv66.8%
div-inv67.0%
metadata-eval67.0%
Applied egg-rr67.0%
Final simplification62.2%
(FPCore (x y z t) :precision binary64 (if (<= z -4.8e-100) x (if (<= z 1.3e+24) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.8e-100) {
tmp = x;
} else if (z <= 1.3e+24) {
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 (z <= (-4.8d-100)) then
tmp = x
else if (z <= 1.3d+24) 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 (z <= -4.8e-100) {
tmp = x;
} else if (z <= 1.3e+24) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.8e-100: tmp = x elif z <= 1.3e+24: tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.8e-100) tmp = x; elseif (z <= 1.3e+24) 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 (z <= -4.8e-100) tmp = x; elseif (z <= 1.3e+24) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.8e-100], x, If[LessEqual[z, 1.3e+24], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-100}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+24}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.8000000000000005e-100 or 1.2999999999999999e24 < z Initial program 99.0%
sub-neg99.0%
associate-+l+99.0%
distribute-frac-neg99.0%
neg-mul-199.0%
*-commutative99.0%
times-frac99.0%
fma-define99.0%
metadata-eval99.0%
associate-*l*99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in x around inf 56.0%
if -4.8000000000000005e-100 < z < 1.2999999999999999e24Initial program 90.2%
Taylor expanded in t around 0 56.6%
metadata-eval56.6%
times-frac56.6%
*-un-lft-identity56.6%
*-commutative56.6%
Applied egg-rr56.6%
*-commutative56.6%
metadata-eval56.6%
distribute-lft-neg-in56.6%
distribute-neg-frac256.6%
distribute-frac-neg56.6%
neg-mul-156.6%
times-frac56.6%
metadata-eval56.6%
associate-/l*56.5%
*-commutative56.5%
associate-*r/56.5%
Simplified56.5%
Taylor expanded in x around 0 49.3%
*-commutative49.3%
associate-*l/49.3%
associate-*r/49.3%
clear-num49.3%
un-div-inv49.3%
div-inv49.4%
metadata-eval49.4%
Applied egg-rr49.4%
(FPCore (x y z t) :precision binary64 (if (<= z -4.8e-100) x (if (<= z 7e+22) (* (/ y z) -0.3333333333333333) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.8e-100) {
tmp = x;
} else if (z <= 7e+22) {
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 (z <= (-4.8d-100)) then
tmp = x
else if (z <= 7d+22) 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 (z <= -4.8e-100) {
tmp = x;
} else if (z <= 7e+22) {
tmp = (y / z) * -0.3333333333333333;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.8e-100: tmp = x elif z <= 7e+22: tmp = (y / z) * -0.3333333333333333 else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.8e-100) tmp = x; elseif (z <= 7e+22) 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 (z <= -4.8e-100) tmp = x; elseif (z <= 7e+22) tmp = (y / z) * -0.3333333333333333; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.8e-100], x, If[LessEqual[z, 7e+22], N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-100}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+22}:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.8000000000000005e-100 or 7e22 < z Initial program 99.0%
sub-neg99.0%
associate-+l+99.0%
distribute-frac-neg99.0%
neg-mul-199.0%
*-commutative99.0%
times-frac99.0%
fma-define99.0%
metadata-eval99.0%
associate-*l*99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in x around inf 56.0%
if -4.8000000000000005e-100 < z < 7e22Initial program 90.2%
Taylor expanded in t around 0 56.6%
metadata-eval56.6%
times-frac56.6%
*-un-lft-identity56.6%
*-commutative56.6%
Applied egg-rr56.6%
*-commutative56.6%
metadata-eval56.6%
distribute-lft-neg-in56.6%
distribute-neg-frac256.6%
distribute-frac-neg56.6%
neg-mul-156.6%
times-frac56.6%
metadata-eval56.6%
associate-/l*56.5%
*-commutative56.5%
associate-*r/56.5%
Simplified56.5%
Taylor expanded in x around 0 49.3%
Final simplification52.6%
(FPCore (x y z t) :precision binary64 (+ x (/ (- (/ t y) y) (* z 3.0))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((t / y) - y) / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
def code(x, y, z, t): return x + (((t / y) - y) / (z * 3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Initial program 94.5%
sub-neg94.5%
associate-+l+94.5%
+-commutative94.5%
remove-double-neg94.5%
distribute-frac-neg94.5%
distribute-neg-in94.5%
remove-double-neg94.5%
sub-neg94.5%
neg-mul-194.5%
times-frac96.8%
distribute-frac-neg96.8%
neg-mul-196.8%
*-commutative96.8%
associate-/l*96.8%
*-commutative96.8%
Simplified97.2%
metadata-eval97.2%
associate-/r*97.2%
*-commutative97.2%
associate-*l/97.2%
*-un-lft-identity97.2%
Applied egg-rr97.2%
(FPCore (x y z t) :precision binary64 (+ x (* (- (/ t y) y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - y) * (0.3333333333333333 / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((t / y) - y) * (0.3333333333333333d0 / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) * (0.3333333333333333 / z));
}
def code(x, y, z, t): return x + (((t / y) - y) * (0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) * (0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}
\end{array}
Initial program 94.5%
sub-neg94.5%
associate-+l+94.5%
+-commutative94.5%
remove-double-neg94.5%
distribute-frac-neg94.5%
distribute-neg-in94.5%
remove-double-neg94.5%
sub-neg94.5%
neg-mul-194.5%
times-frac96.8%
distribute-frac-neg96.8%
neg-mul-196.8%
*-commutative96.8%
associate-/l*96.8%
*-commutative96.8%
Simplified97.2%
Final simplification97.2%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 94.5%
sub-neg94.5%
associate-+l+94.5%
distribute-frac-neg94.5%
neg-mul-194.5%
*-commutative94.5%
times-frac94.4%
fma-define94.4%
metadata-eval94.4%
associate-*l*94.4%
*-commutative94.4%
Simplified94.4%
Taylor expanded in x around inf 32.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 2024143
(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))))