
(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 (<= (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))) 2e+301) (+ (+ x (/ t (* z (* y 3.0)))) (/ y (* z -3.0))) (+ x (* (/ 0.3333333333333333 z) (- (/ 1.0 (/ y t)) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= 2e+301) {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
} else {
tmp = x + ((0.3333333333333333 / z) * ((1.0 / (y / t)) - 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 - (y / (z * 3.0d0))) + (t / (y * (z * 3.0d0)))) <= 2d+301) then
tmp = (x + (t / (z * (y * 3.0d0)))) + (y / (z * (-3.0d0)))
else
tmp = x + ((0.3333333333333333d0 / z) * ((1.0d0 / (y / t)) - y))
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)))) <= 2e+301) {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
} else {
tmp = x + ((0.3333333333333333 / z) * ((1.0 / (y / t)) - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= 2e+301: tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)) else: tmp = x + ((0.3333333333333333 / z) * ((1.0 / (y / t)) - y)) 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)))) <= 2e+301) 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 / z) * Float64(Float64(1.0 / Float64(y / t)) - y))); 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)))) <= 2e+301) tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)); else tmp = x + ((0.3333333333333333 / z) * ((1.0 / (y / t)) - y)); 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], 2e+301], 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 / z), $MachinePrecision] * N[(N[(1.0 / N[(y / t), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $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 2 \cdot 10^{+301}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \left(\frac{1}{\frac{y}{t}} - y\right)\\
\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))) < 2.00000000000000011e301Initial program 98.3%
+-commutative98.3%
associate-+r-98.3%
sub-neg98.3%
associate-*l*98.3%
*-commutative98.3%
distribute-frac-neg298.3%
distribute-rgt-neg-in98.3%
metadata-eval98.3%
Simplified98.3%
if 2.00000000000000011e301 < (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) Initial program 77.2%
sub-neg77.2%
associate-+l+77.2%
+-commutative77.2%
remove-double-neg77.2%
distribute-frac-neg77.2%
distribute-neg-in77.2%
remove-double-neg77.2%
sub-neg77.2%
neg-mul-177.2%
times-frac90.8%
distribute-frac-neg90.8%
neg-mul-190.8%
*-commutative90.8%
associate-/l*90.8%
*-commutative90.8%
Simplified99.9%
clear-num99.9%
inv-pow99.9%
Applied egg-rr99.9%
unpow-199.9%
Simplified99.9%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.5e+36)
(/ (* y -0.3333333333333333) z)
(if (<= y -1.35e-102)
x
(if (<= y 1.4e-18)
(* (/ t z) (/ 0.3333333333333333 y))
(* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.5e+36) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= -1.35e-102) {
tmp = x;
} else if (y <= 1.4e-18) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.5d+36)) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= (-1.35d-102)) then
tmp = x
else if (y <= 1.4d-18) then
tmp = (t / z) * (0.3333333333333333d0 / y)
else
tmp = y * ((-0.3333333333333333d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.5e+36) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= -1.35e-102) {
tmp = x;
} else if (y <= 1.4e-18) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.5e+36: tmp = (y * -0.3333333333333333) / z elif y <= -1.35e-102: tmp = x elif y <= 1.4e-18: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.5e+36) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= -1.35e-102) tmp = x; elseif (y <= 1.4e-18) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.5e+36) tmp = (y * -0.3333333333333333) / z; elseif (y <= -1.35e-102) tmp = x; elseif (y <= 1.4e-18) tmp = (t / z) * (0.3333333333333333 / y); else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.5e+36], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -1.35e-102], x, If[LessEqual[y, 1.4e-18], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+36}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-102}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-18}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.5e36Initial program 96.0%
Taylor expanded in z around 0 79.8%
Taylor expanded in t around 0 72.5%
*-commutative72.5%
Simplified72.5%
if -1.5e36 < y < -1.35e-102Initial program 97.4%
sub-neg97.4%
associate-+l+97.4%
+-commutative97.4%
remove-double-neg97.4%
distribute-frac-neg97.4%
distribute-neg-in97.4%
remove-double-neg97.4%
sub-neg97.4%
neg-mul-197.4%
times-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 62.8%
if -1.35e-102 < y < 1.40000000000000006e-18Initial program 91.0%
Taylor expanded in z around 0 64.9%
Taylor expanded in t around inf 62.2%
associate-*r/62.2%
Simplified62.2%
associate-/l/63.7%
*-commutative63.7%
times-frac66.8%
Applied egg-rr66.8%
if 1.40000000000000006e-18 < y Initial program 94.7%
Taylor expanded in z around 0 69.6%
Taylor expanded in t around 0 59.7%
*-commutative59.7%
Simplified59.7%
clear-num59.8%
inv-pow59.8%
*-un-lft-identity59.8%
*-commutative59.8%
times-frac59.8%
metadata-eval59.8%
Applied egg-rr59.8%
unpow-159.8%
associate-/r*59.8%
metadata-eval59.8%
Simplified59.8%
associate-/r/59.8%
Applied egg-rr59.8%
Final simplification65.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.02e+41)
(/ (* y -0.3333333333333333) z)
(if (<= y -8.1e-103)
x
(if (<= y 1.35e-18)
(* (/ 0.3333333333333333 z) (/ t y))
(* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.02e+41) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= -8.1e-103) {
tmp = x;
} else if (y <= 1.35e-18) {
tmp = (0.3333333333333333 / z) * (t / y);
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.02d+41)) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= (-8.1d-103)) then
tmp = x
else if (y <= 1.35d-18) then
tmp = (0.3333333333333333d0 / z) * (t / y)
else
tmp = y * ((-0.3333333333333333d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.02e+41) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= -8.1e-103) {
tmp = x;
} else if (y <= 1.35e-18) {
tmp = (0.3333333333333333 / z) * (t / y);
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.02e+41: tmp = (y * -0.3333333333333333) / z elif y <= -8.1e-103: tmp = x elif y <= 1.35e-18: tmp = (0.3333333333333333 / z) * (t / y) else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.02e+41) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= -8.1e-103) tmp = x; elseif (y <= 1.35e-18) tmp = Float64(Float64(0.3333333333333333 / z) * Float64(t / y)); else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.02e+41) tmp = (y * -0.3333333333333333) / z; elseif (y <= -8.1e-103) tmp = x; elseif (y <= 1.35e-18) tmp = (0.3333333333333333 / z) * (t / y); else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.02e+41], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -8.1e-103], x, If[LessEqual[y, 1.35e-18], N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+41}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -8.1 \cdot 10^{-103}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-18}:\\
\;\;\;\;\frac{0.3333333333333333}{z} \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.01999999999999992e41Initial program 96.0%
Taylor expanded in z around 0 79.8%
Taylor expanded in t around 0 72.5%
*-commutative72.5%
Simplified72.5%
if -1.01999999999999992e41 < y < -8.09999999999999979e-103Initial program 97.4%
sub-neg97.4%
associate-+l+97.4%
+-commutative97.4%
remove-double-neg97.4%
distribute-frac-neg97.4%
distribute-neg-in97.4%
remove-double-neg97.4%
sub-neg97.4%
neg-mul-197.4%
times-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 62.8%
if -8.09999999999999979e-103 < y < 1.34999999999999994e-18Initial program 91.0%
Taylor expanded in z around 0 64.9%
Taylor expanded in t around inf 62.2%
associate-*r/62.2%
Simplified62.2%
associate-/r*63.7%
*-commutative63.7%
times-frac62.2%
Applied egg-rr62.2%
if 1.34999999999999994e-18 < y Initial program 94.7%
Taylor expanded in z around 0 69.6%
Taylor expanded in t around 0 59.7%
*-commutative59.7%
Simplified59.7%
clear-num59.8%
inv-pow59.8%
*-un-lft-identity59.8%
*-commutative59.8%
times-frac59.8%
metadata-eval59.8%
Applied egg-rr59.8%
unpow-159.8%
associate-/r*59.8%
metadata-eval59.8%
Simplified59.8%
associate-/r/59.8%
Applied egg-rr59.8%
Final simplification63.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.6e+66)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 1.05e-19)
(+ x (* 0.3333333333333333 (* (/ 1.0 y) (/ t z))))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.6e+66) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1.05e-19) {
tmp = x + (0.3333333333333333 * ((1.0 / y) * (t / z)));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7.6d+66)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 1.05d-19) then
tmp = x + (0.3333333333333333d0 * ((1.0d0 / y) * (t / z)))
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.6e+66) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1.05e-19) {
tmp = x + (0.3333333333333333 * ((1.0 / y) * (t / z)));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.6e+66: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 1.05e-19: tmp = x + (0.3333333333333333 * ((1.0 / y) * (t / z))) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.6e+66) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 1.05e-19) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(1.0 / y) * Float64(t / z)))); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.6e+66) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 1.05e-19) tmp = x + (0.3333333333333333 * ((1.0 / y) * (t / z))); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.6e+66], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e-19], N[(x + N[(0.3333333333333333 * N[(N[(1.0 / y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+66}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-19}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \left(\frac{1}{y} \cdot \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -7.6000000000000004e66Initial program 95.5%
sub-neg95.5%
associate-+l+95.5%
+-commutative95.5%
remove-double-neg95.5%
distribute-frac-neg95.5%
distribute-neg-in95.5%
remove-double-neg95.5%
sub-neg95.5%
neg-mul-195.5%
times-frac95.5%
distribute-frac-neg95.5%
neg-mul-195.5%
*-commutative95.5%
associate-/l*95.5%
*-commutative95.5%
Simplified99.6%
Taylor expanded in t around 0 97.7%
metadata-eval97.7%
cancel-sign-sub-inv97.7%
associate-*r/97.7%
Simplified97.7%
if -7.6000000000000004e66 < y < 1.0499999999999999e-19Initial program 92.8%
sub-neg92.8%
associate-+l+92.8%
+-commutative92.8%
remove-double-neg92.8%
distribute-frac-neg92.8%
distribute-neg-in92.8%
remove-double-neg92.8%
sub-neg92.8%
neg-mul-192.8%
times-frac94.1%
distribute-frac-neg94.1%
neg-mul-194.1%
*-commutative94.1%
associate-/l*94.1%
*-commutative94.1%
Simplified94.2%
Taylor expanded in t around inf 89.2%
*-un-lft-identity89.2%
times-frac94.4%
Applied egg-rr94.4%
if 1.0499999999999999e-19 < y Initial program 94.7%
Taylor expanded in t around 0 90.0%
Final simplification94.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.6e+66)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 1e-18)
(+ x (* 0.3333333333333333 (/ (/ t z) y)))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.6e+66) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1e-18) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7.6d+66)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 1d-18) then
tmp = x + (0.3333333333333333d0 * ((t / z) / y))
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.6e+66) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1e-18) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.6e+66: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 1e-18: tmp = x + (0.3333333333333333 * ((t / z) / y)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.6e+66) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 1e-18) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y))); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.6e+66) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 1e-18) tmp = x + (0.3333333333333333 * ((t / z) / y)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.6e+66], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-18], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+66}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 10^{-18}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -7.6000000000000004e66Initial program 95.5%
sub-neg95.5%
associate-+l+95.5%
+-commutative95.5%
remove-double-neg95.5%
distribute-frac-neg95.5%
distribute-neg-in95.5%
remove-double-neg95.5%
sub-neg95.5%
neg-mul-195.5%
times-frac95.5%
distribute-frac-neg95.5%
neg-mul-195.5%
*-commutative95.5%
associate-/l*95.5%
*-commutative95.5%
Simplified99.6%
Taylor expanded in t around 0 97.7%
metadata-eval97.7%
cancel-sign-sub-inv97.7%
associate-*r/97.7%
Simplified97.7%
if -7.6000000000000004e66 < y < 1.0000000000000001e-18Initial program 92.8%
sub-neg92.8%
associate-+l+92.8%
+-commutative92.8%
remove-double-neg92.8%
distribute-frac-neg92.8%
distribute-neg-in92.8%
remove-double-neg92.8%
sub-neg92.8%
neg-mul-192.8%
times-frac94.1%
distribute-frac-neg94.1%
neg-mul-194.1%
*-commutative94.1%
associate-/l*94.1%
*-commutative94.1%
Simplified94.2%
clear-num94.2%
inv-pow94.2%
Applied egg-rr94.2%
unpow-194.2%
Simplified94.2%
Taylor expanded in y around 0 89.2%
*-commutative89.2%
associate-/r*94.4%
Simplified94.4%
if 1.0000000000000001e-18 < y Initial program 94.7%
Taylor expanded in t around 0 90.0%
Final simplification94.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.6e+66)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 1.75e+31)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.6e+66) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1.75e+31) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7.6d+66)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 1.75d+31) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.6e+66) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1.75e+31) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.6e+66: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 1.75e+31: tmp = x + (0.3333333333333333 * (t / (y * z))) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.6e+66) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 1.75e+31) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.6e+66) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 1.75e+31) tmp = x + (0.3333333333333333 * (t / (y * z))); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.6e+66], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+31], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+66}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+31}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -7.6000000000000004e66Initial program 95.5%
sub-neg95.5%
associate-+l+95.5%
+-commutative95.5%
remove-double-neg95.5%
distribute-frac-neg95.5%
distribute-neg-in95.5%
remove-double-neg95.5%
sub-neg95.5%
neg-mul-195.5%
times-frac95.5%
distribute-frac-neg95.5%
neg-mul-195.5%
*-commutative95.5%
associate-/l*95.5%
*-commutative95.5%
Simplified99.6%
Taylor expanded in t around 0 97.7%
metadata-eval97.7%
cancel-sign-sub-inv97.7%
associate-*r/97.7%
Simplified97.7%
if -7.6000000000000004e66 < y < 1.75e31Initial 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-frac94.6%
distribute-frac-neg94.6%
neg-mul-194.6%
*-commutative94.6%
associate-/l*94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in t around inf 87.7%
if 1.75e31 < y Initial program 93.2%
Taylor expanded in t around 0 95.5%
Final simplification90.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.25e-102) (not (<= y 6.6e-37))) (- x (* 0.3333333333333333 (/ y z))) (* (/ t z) (/ 0.3333333333333333 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.25e-102) || !(y <= 6.6e-37)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.25d-102)) .or. (.not. (y <= 6.6d-37))) then
tmp = x - (0.3333333333333333d0 * (y / z))
else
tmp = (t / z) * (0.3333333333333333d0 / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.25e-102) || !(y <= 6.6e-37)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.25e-102) or not (y <= 6.6e-37): tmp = x - (0.3333333333333333 * (y / z)) else: tmp = (t / z) * (0.3333333333333333 / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.25e-102) || !(y <= 6.6e-37)) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); else tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.25e-102) || ~((y <= 6.6e-37))) tmp = x - (0.3333333333333333 * (y / z)); else tmp = (t / z) * (0.3333333333333333 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.25e-102], N[Not[LessEqual[y, 6.6e-37]], $MachinePrecision]], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{-102} \lor \neg \left(y \leq 6.6 \cdot 10^{-37}\right):\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -2.25e-102 or 6.59999999999999964e-37 < y Initial program 95.9%
Taylor expanded in t around 0 84.9%
if -2.25e-102 < y < 6.59999999999999964e-37Initial program 90.7%
Taylor expanded in z around 0 64.8%
Taylor expanded in t around inf 63.0%
associate-*r/62.9%
Simplified62.9%
associate-/l/64.5%
*-commutative64.5%
times-frac67.6%
Applied egg-rr67.6%
Final simplification77.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.2e-104) (not (<= y 2.6e-38))) (+ x (* y (/ -0.3333333333333333 z))) (* (/ t z) (/ 0.3333333333333333 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.2e-104) || !(y <= 2.6e-38)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-5.2d-104)) .or. (.not. (y <= 2.6d-38))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = (t / z) * (0.3333333333333333d0 / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.2e-104) || !(y <= 2.6e-38)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.2e-104) or not (y <= 2.6e-38): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = (t / z) * (0.3333333333333333 / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.2e-104) || !(y <= 2.6e-38)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5.2e-104) || ~((y <= 2.6e-38))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = (t / z) * (0.3333333333333333 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.2e-104], N[Not[LessEqual[y, 2.6e-38]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-104} \lor \neg \left(y \leq 2.6 \cdot 10^{-38}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -5.20000000000000005e-104 or 2.60000000000000011e-38 < y Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
+-commutative95.9%
remove-double-neg95.9%
distribute-frac-neg95.9%
distribute-neg-in95.9%
remove-double-neg95.9%
sub-neg95.9%
neg-mul-195.9%
times-frac96.5%
distribute-frac-neg96.5%
neg-mul-196.5%
*-commutative96.5%
associate-/l*96.4%
*-commutative96.4%
Simplified99.7%
clear-num99.7%
inv-pow99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
associate-*l/99.8%
clear-num99.8%
distribute-lft-out--99.8%
clear-num99.7%
*-un-lft-identity99.7%
distribute-lft-out--99.7%
clear-num99.7%
times-frac99.8%
metadata-eval99.8%
clear-num99.8%
Applied egg-rr99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around 0 84.9%
associate-*r/84.9%
*-commutative84.9%
associate-*r/84.8%
Simplified84.8%
if -5.20000000000000005e-104 < y < 2.60000000000000011e-38Initial program 90.7%
Taylor expanded in z around 0 64.8%
Taylor expanded in t around inf 63.0%
associate-*r/62.9%
Simplified62.9%
associate-/l/64.5%
*-commutative64.5%
times-frac67.6%
Applied egg-rr67.6%
Final simplification77.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.1e-103)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 2.22e-38)
(* (/ t z) (/ 0.3333333333333333 y))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.1e-103) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 2.22e-38) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.1d-103)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 2.22d-38) then
tmp = (t / z) * (0.3333333333333333d0 / y)
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.1e-103) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 2.22e-38) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.1e-103: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 2.22e-38: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.1e-103) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 2.22e-38) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.1e-103) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 2.22e-38) tmp = (t / z) * (0.3333333333333333 / y); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.1e-103], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.22e-38], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-103}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.22 \cdot 10^{-38}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.1e-103Initial program 96.6%
sub-neg96.6%
associate-+l+96.6%
+-commutative96.6%
remove-double-neg96.6%
distribute-frac-neg96.6%
distribute-neg-in96.6%
remove-double-neg96.6%
sub-neg96.6%
neg-mul-196.6%
times-frac97.5%
distribute-frac-neg97.5%
neg-mul-197.5%
*-commutative97.5%
associate-/l*97.5%
*-commutative97.5%
Simplified99.7%
Taylor expanded in t around 0 82.2%
metadata-eval82.2%
cancel-sign-sub-inv82.2%
associate-*r/82.3%
Simplified82.3%
if -1.1e-103 < y < 2.21999999999999996e-38Initial program 90.7%
Taylor expanded in z around 0 64.8%
Taylor expanded in t around inf 63.0%
associate-*r/62.9%
Simplified62.9%
associate-/l/64.5%
*-commutative64.5%
times-frac67.6%
Applied egg-rr67.6%
if 2.21999999999999996e-38 < y Initial program 94.9%
Taylor expanded in t around 0 88.8%
Final simplification77.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.32e+36) (not (<= y 7e+76))) (* y (/ -0.3333333333333333 z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.32e+36) || !(y <= 7e+76)) {
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 ((y <= (-2.32d+36)) .or. (.not. (y <= 7d+76))) 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 ((y <= -2.32e+36) || !(y <= 7e+76)) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.32e+36) or not (y <= 7e+76): tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.32e+36) || !(y <= 7e+76)) 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 ((y <= -2.32e+36) || ~((y <= 7e+76))) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.32e+36], N[Not[LessEqual[y, 7e+76]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.32 \cdot 10^{+36} \lor \neg \left(y \leq 7 \cdot 10^{+76}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.31999999999999996e36 or 7.00000000000000001e76 < y Initial program 95.4%
Taylor expanded in z around 0 79.3%
Taylor expanded in t around 0 74.0%
*-commutative74.0%
Simplified74.0%
clear-num73.9%
inv-pow73.9%
*-un-lft-identity73.9%
*-commutative73.9%
times-frac74.0%
metadata-eval74.0%
Applied egg-rr74.0%
unpow-174.0%
associate-/r*74.0%
metadata-eval74.0%
Simplified74.0%
associate-/r/73.9%
Applied egg-rr73.9%
if -2.31999999999999996e36 < y < 7.00000000000000001e76Initial program 92.8%
sub-neg92.8%
associate-+l+92.8%
+-commutative92.8%
remove-double-neg92.8%
distribute-frac-neg92.8%
distribute-neg-in92.8%
remove-double-neg92.8%
sub-neg92.8%
neg-mul-192.8%
times-frac94.0%
distribute-frac-neg94.0%
neg-mul-194.0%
*-commutative94.0%
associate-/l*94.0%
*-commutative94.0%
Simplified94.7%
Taylor expanded in x around inf 39.3%
Final simplification51.4%
(FPCore (x y z t) :precision binary64 (if (<= y -8.2e+40) (/ (* y -0.3333333333333333) z) (if (<= y 9e+71) x (* y (/ -0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.2e+40) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 9e+71) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-8.2d+40)) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= 9d+71) then
tmp = x
else
tmp = y * ((-0.3333333333333333d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.2e+40) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 9e+71) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.2e+40: tmp = (y * -0.3333333333333333) / z elif y <= 9e+71: tmp = x else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.2e+40) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= 9e+71) tmp = x; else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.2e+40) tmp = (y * -0.3333333333333333) / z; elseif (y <= 9e+71) tmp = x; else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.2e+40], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 9e+71], x, N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+40}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+71}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -8.2000000000000003e40Initial program 96.0%
Taylor expanded in z around 0 79.8%
Taylor expanded in t around 0 72.5%
*-commutative72.5%
Simplified72.5%
if -8.2000000000000003e40 < y < 9.00000000000000087e71Initial program 92.8%
sub-neg92.8%
associate-+l+92.8%
+-commutative92.8%
remove-double-neg92.8%
distribute-frac-neg92.8%
distribute-neg-in92.8%
remove-double-neg92.8%
sub-neg92.8%
neg-mul-192.8%
times-frac94.0%
distribute-frac-neg94.0%
neg-mul-194.0%
*-commutative94.0%
associate-/l*94.0%
*-commutative94.0%
Simplified94.7%
Taylor expanded in x around inf 39.3%
if 9.00000000000000087e71 < y Initial program 94.5%
Taylor expanded in z around 0 78.6%
Taylor expanded in t around 0 76.1%
*-commutative76.1%
Simplified76.1%
clear-num76.1%
inv-pow76.1%
*-un-lft-identity76.1%
*-commutative76.1%
times-frac76.3%
metadata-eval76.3%
Applied egg-rr76.3%
unpow-176.3%
associate-/r*76.2%
metadata-eval76.2%
Simplified76.2%
associate-/r/76.2%
Applied egg-rr76.2%
Final simplification51.5%
(FPCore (x y z t) :precision binary64 (if (<= y -7.1e+31) (/ -0.3333333333333333 (/ z y)) (if (<= y 5.5e+71) x (* y (/ -0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.1e+31) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 5.5e+71) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7.1d+31)) then
tmp = (-0.3333333333333333d0) / (z / y)
else if (y <= 5.5d+71) then
tmp = x
else
tmp = y * ((-0.3333333333333333d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.1e+31) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 5.5e+71) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.1e+31: tmp = -0.3333333333333333 / (z / y) elif y <= 5.5e+71: tmp = x else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.1e+31) tmp = Float64(-0.3333333333333333 / Float64(z / y)); elseif (y <= 5.5e+71) tmp = x; else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.1e+31) tmp = -0.3333333333333333 / (z / y); elseif (y <= 5.5e+71) tmp = x; else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.1e+31], N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+71], x, N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.1 \cdot 10^{+31}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+71}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -7.09999999999999961e31Initial program 96.0%
Taylor expanded in z around 0 79.8%
Taylor expanded in t around 0 72.5%
*-commutative72.5%
Simplified72.5%
clear-num72.3%
inv-pow72.3%
*-un-lft-identity72.3%
*-commutative72.3%
times-frac72.4%
metadata-eval72.4%
Applied egg-rr72.4%
unpow-172.4%
associate-/r*72.4%
metadata-eval72.4%
Simplified72.4%
if -7.09999999999999961e31 < y < 5.5e71Initial program 92.8%
sub-neg92.8%
associate-+l+92.8%
+-commutative92.8%
remove-double-neg92.8%
distribute-frac-neg92.8%
distribute-neg-in92.8%
remove-double-neg92.8%
sub-neg92.8%
neg-mul-192.8%
times-frac94.0%
distribute-frac-neg94.0%
neg-mul-194.0%
*-commutative94.0%
associate-/l*94.0%
*-commutative94.0%
Simplified94.7%
Taylor expanded in x around inf 39.3%
if 5.5e71 < y Initial program 94.5%
Taylor expanded in z around 0 78.6%
Taylor expanded in t around 0 76.1%
*-commutative76.1%
Simplified76.1%
clear-num76.1%
inv-pow76.1%
*-un-lft-identity76.1%
*-commutative76.1%
times-frac76.3%
metadata-eval76.3%
Applied egg-rr76.3%
unpow-176.3%
associate-/r*76.2%
metadata-eval76.2%
Simplified76.2%
associate-/r/76.2%
Applied egg-rr76.2%
Final simplification51.5%
(FPCore (x y z t) :precision binary64 (+ x (/ 0.3333333333333333 (/ z (- (/ t y) y)))))
double code(double x, double y, double z, double t) {
return x + (0.3333333333333333 / (z / ((t / y) - 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 + (0.3333333333333333d0 / (z / ((t / y) - y)))
end function
public static double code(double x, double y, double z, double t) {
return x + (0.3333333333333333 / (z / ((t / y) - y)));
}
def code(x, y, z, t): return x + (0.3333333333333333 / (z / ((t / y) - y)))
function code(x, y, z, t) return Float64(x + Float64(0.3333333333333333 / Float64(z / Float64(Float64(t / y) - y)))) end
function tmp = code(x, y, z, t) tmp = x + (0.3333333333333333 / (z / ((t / y) - y))); end
code[x_, y_, z_, t_] := N[(x + N[(0.3333333333333333 / N[(z / N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{0.3333333333333333}{\frac{z}{\frac{t}{y} - y}}
\end{array}
Initial program 93.7%
sub-neg93.7%
associate-+l+93.7%
+-commutative93.7%
remove-double-neg93.7%
distribute-frac-neg93.7%
distribute-neg-in93.7%
remove-double-neg93.7%
sub-neg93.7%
neg-mul-193.7%
times-frac94.5%
distribute-frac-neg94.5%
neg-mul-194.5%
*-commutative94.5%
associate-/l*94.5%
*-commutative94.5%
Simplified96.4%
clear-num96.4%
inv-pow96.4%
Applied egg-rr96.4%
unpow-196.4%
Simplified96.4%
associate-*l/96.5%
clear-num96.5%
distribute-lft-out--96.5%
clear-num96.4%
*-un-lft-identity96.4%
distribute-lft-out--96.4%
clear-num96.4%
times-frac96.5%
metadata-eval96.5%
clear-num96.5%
Applied egg-rr96.5%
associate-/r*96.4%
metadata-eval96.4%
Simplified96.4%
(FPCore (x y z t) :precision binary64 (+ x (* (/ 0.3333333333333333 z) (- (/ t y) y))))
double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 / z) * ((t / y) - 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 + ((0.3333333333333333d0 / z) * ((t / y) - y))
end function
public static double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 / z) * ((t / y) - y));
}
def code(x, y, z, t): return x + ((0.3333333333333333 / z) * ((t / y) - y))
function code(x, y, z, t) return Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y))) end
function tmp = code(x, y, z, t) tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)
\end{array}
Initial program 93.7%
sub-neg93.7%
associate-+l+93.7%
+-commutative93.7%
remove-double-neg93.7%
distribute-frac-neg93.7%
distribute-neg-in93.7%
remove-double-neg93.7%
sub-neg93.7%
neg-mul-193.7%
times-frac94.5%
distribute-frac-neg94.5%
neg-mul-194.5%
*-commutative94.5%
associate-/l*94.5%
*-commutative94.5%
Simplified96.4%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 93.7%
sub-neg93.7%
associate-+l+93.7%
+-commutative93.7%
remove-double-neg93.7%
distribute-frac-neg93.7%
distribute-neg-in93.7%
remove-double-neg93.7%
sub-neg93.7%
neg-mul-193.7%
times-frac94.5%
distribute-frac-neg94.5%
neg-mul-194.5%
*-commutative94.5%
associate-/l*94.5%
*-commutative94.5%
Simplified96.4%
Taylor expanded in x around inf 33.5%
(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 2024137
(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))))