
(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 14 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-195) (+ x (* (* -0.3333333333333333 (/ 1.0 z)) (- y (/ t y)))) (+ (/ t (* z (* 3.0 y))) (- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 2e-195) {
tmp = x + ((-0.3333333333333333 * (1.0 / z)) * (y - (t / y)));
} else {
tmp = (t / (z * (3.0 * y))) + (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 ((z * 3.0d0) <= 2d-195) then
tmp = x + (((-0.3333333333333333d0) * (1.0d0 / z)) * (y - (t / y)))
else
tmp = (t / (z * (3.0d0 * y))) + (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 ((z * 3.0) <= 2e-195) {
tmp = x + ((-0.3333333333333333 * (1.0 / z)) * (y - (t / y)));
} else {
tmp = (t / (z * (3.0 * y))) + (x - (y / (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 2e-195: tmp = x + ((-0.3333333333333333 * (1.0 / z)) * (y - (t / y))) else: tmp = (t / (z * (3.0 * y))) + (x - (y / (z * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 2e-195) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * Float64(1.0 / z)) * Float64(y - Float64(t / y)))); else tmp = Float64(Float64(t / Float64(z * Float64(3.0 * y))) + Float64(x - Float64(y / Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 2e-195) tmp = x + ((-0.3333333333333333 * (1.0 / z)) * (y - (t / y))); else tmp = (t / (z * (3.0 * y))) + (x - (y / (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-195], N[(x + N[(N[(-0.3333333333333333 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 2 \cdot 10^{-195}:\\
\;\;\;\;x + \left(-0.3333333333333333 \cdot \frac{1}{z}\right) \cdot \left(y - \frac{t}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z \cdot \left(3 \cdot y\right)} + \left(x - \frac{y}{z \cdot 3}\right)\\
\end{array}
\end{array}
if (*.f64 z 3) < 2.0000000000000002e-195Initial program 91.8%
Simplified98.6%
div-inv98.6%
Applied egg-rr98.6%
if 2.0000000000000002e-195 < (*.f64 z 3) Initial program 99.8%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Final simplification99.1%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z 3.0) -46000.0) (not (<= (* z 3.0) 2e+158))) (+ x (/ (* -0.3333333333333333 y) z)) (* (/ 0.3333333333333333 z) (- (/ t y) y))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -46000.0) || !((z * 3.0) <= 2e+158)) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else {
tmp = (0.3333333333333333 / z) * ((t / y) - y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((z * 3.0d0) <= (-46000.0d0)) .or. (.not. ((z * 3.0d0) <= 2d+158))) then
tmp = x + (((-0.3333333333333333d0) * y) / z)
else
tmp = (0.3333333333333333d0 / z) * ((t / y) - 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) <= -46000.0) || !((z * 3.0) <= 2e+158)) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else {
tmp = (0.3333333333333333 / z) * ((t / y) - y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * 3.0) <= -46000.0) or not ((z * 3.0) <= 2e+158): tmp = x + ((-0.3333333333333333 * y) / z) else: tmp = (0.3333333333333333 / z) * ((t / y) - y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * 3.0) <= -46000.0) || !(Float64(z * 3.0) <= 2e+158)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z)); else tmp = Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * 3.0) <= -46000.0) || ~(((z * 3.0) <= 2e+158))) tmp = x + ((-0.3333333333333333 * y) / z); else tmp = (0.3333333333333333 / z) * ((t / y) - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * 3.0), $MachinePrecision], -46000.0], N[Not[LessEqual[N[(z * 3.0), $MachinePrecision], 2e+158]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -46000 \lor \neg \left(z \cdot 3 \leq 2 \cdot 10^{+158}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\
\end{array}
\end{array}
if (*.f64 z 3) < -46000 or 1.99999999999999991e158 < (*.f64 z 3) Initial program 99.8%
Simplified94.8%
Taylor expanded in y around inf 80.7%
*-commutative80.7%
associate-*r/80.8%
Applied egg-rr80.8%
if -46000 < (*.f64 z 3) < 1.99999999999999991e158Initial program 92.1%
Taylor expanded in z around 0 92.1%
*-commutative92.1%
*-commutative92.1%
associate-*l*92.1%
Simplified92.1%
Taylor expanded in x around 0 80.5%
*-commutative80.5%
*-commutative80.5%
*-commutative80.5%
*-commutative80.5%
associate-/r*84.7%
associate-*r/84.7%
associate-*r/84.7%
div-sub85.3%
distribute-lft-out--85.3%
Simplified85.3%
Taylor expanded in z around 0 85.3%
associate-*r/85.3%
*-commutative85.3%
associate-*r/85.3%
Simplified85.3%
Final simplification83.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.8e+145)
(* y (/ -0.3333333333333333 z))
(if (<= y -7.2e-18)
x
(if (<= y 8.5e-17)
(* 0.3333333333333333 (/ t (* z y)))
(/ (* -0.3333333333333333 y) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e+145) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -7.2e-18) {
tmp = x;
} else if (y <= 8.5e-17) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = (-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 <= (-2.8d+145)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= (-7.2d-18)) then
tmp = x
else if (y <= 8.5d-17) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else
tmp = ((-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 <= -2.8e+145) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -7.2e-18) {
tmp = x;
} else if (y <= 8.5e-17) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = (-0.3333333333333333 * y) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.8e+145: tmp = y * (-0.3333333333333333 / z) elif y <= -7.2e-18: tmp = x elif y <= 8.5e-17: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = (-0.3333333333333333 * y) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.8e+145) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= -7.2e-18) tmp = x; elseif (y <= 8.5e-17) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); else tmp = Float64(Float64(-0.3333333333333333 * y) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.8e+145) tmp = y * (-0.3333333333333333 / z); elseif (y <= -7.2e-18) tmp = x; elseif (y <= 8.5e-17) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = (-0.3333333333333333 * y) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.8e+145], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.2e-18], x, If[LessEqual[y, 8.5e-17], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+145}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-17}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\
\end{array}
\end{array}
if y < -2.7999999999999999e145Initial program 99.7%
Taylor expanded in z around 0 99.7%
*-commutative99.7%
*-commutative99.7%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in y around inf 90.4%
associate-*r/90.4%
*-commutative90.4%
associate-*r/90.4%
Simplified90.4%
if -2.7999999999999999e145 < y < -7.20000000000000021e-18Initial program 97.2%
Simplified99.7%
Taylor expanded in x around inf 51.7%
if -7.20000000000000021e-18 < y < 8.5e-17Initial program 89.5%
Taylor expanded in z around 0 89.6%
*-commutative89.6%
*-commutative89.6%
associate-*l*89.6%
Simplified89.6%
Taylor expanded in x around 0 62.2%
*-commutative62.2%
*-commutative62.2%
*-commutative62.2%
*-commutative62.2%
associate-/r*64.0%
associate-*r/64.1%
associate-*r/64.0%
div-sub64.0%
distribute-lft-out--64.0%
Simplified64.0%
Taylor expanded in t around inf 60.5%
if 8.5e-17 < y Initial program 99.8%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around 0 72.0%
*-commutative72.0%
*-commutative72.0%
*-commutative72.0%
*-commutative72.0%
associate-/r*72.0%
associate-*r/72.0%
associate-*r/72.1%
div-sub72.1%
distribute-lft-out--72.1%
Simplified72.1%
Taylor expanded in t around 0 60.6%
Final simplification62.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.8e+145)
(* y (/ -0.3333333333333333 z))
(if (<= y -1.15e-18)
x
(if (<= y 1.2e-16)
(* (/ t z) (/ 0.3333333333333333 y))
(/ (* -0.3333333333333333 y) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e+145) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -1.15e-18) {
tmp = x;
} else if (y <= 1.2e-16) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = (-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 <= (-2.8d+145)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= (-1.15d-18)) then
tmp = x
else if (y <= 1.2d-16) then
tmp = (t / z) * (0.3333333333333333d0 / y)
else
tmp = ((-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 <= -2.8e+145) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -1.15e-18) {
tmp = x;
} else if (y <= 1.2e-16) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = (-0.3333333333333333 * y) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.8e+145: tmp = y * (-0.3333333333333333 / z) elif y <= -1.15e-18: tmp = x elif y <= 1.2e-16: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = (-0.3333333333333333 * y) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.8e+145) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= -1.15e-18) tmp = x; elseif (y <= 1.2e-16) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); else tmp = Float64(Float64(-0.3333333333333333 * y) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.8e+145) tmp = y * (-0.3333333333333333 / z); elseif (y <= -1.15e-18) tmp = x; elseif (y <= 1.2e-16) tmp = (t / z) * (0.3333333333333333 / y); else tmp = (-0.3333333333333333 * y) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.8e+145], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.15e-18], x, If[LessEqual[y, 1.2e-16], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+145}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-16}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\
\end{array}
\end{array}
if y < -2.7999999999999999e145Initial program 99.7%
Taylor expanded in z around 0 99.7%
*-commutative99.7%
*-commutative99.7%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in y around inf 90.4%
associate-*r/90.4%
*-commutative90.4%
associate-*r/90.4%
Simplified90.4%
if -2.7999999999999999e145 < y < -1.15e-18Initial program 97.2%
Simplified99.7%
Taylor expanded in x around inf 51.7%
if -1.15e-18 < y < 1.20000000000000002e-16Initial program 89.5%
Taylor expanded in z around 0 89.6%
*-commutative89.6%
*-commutative89.6%
associate-*l*89.6%
Simplified89.6%
Taylor expanded in x around 0 62.2%
*-commutative62.2%
*-commutative62.2%
*-commutative62.2%
*-commutative62.2%
associate-/r*64.0%
associate-*r/64.1%
associate-*r/64.0%
div-sub64.0%
distribute-lft-out--64.0%
Simplified64.0%
Taylor expanded in t around inf 60.5%
associate-*r/60.5%
times-frac65.1%
*-commutative65.1%
Simplified65.1%
if 1.20000000000000002e-16 < y Initial program 99.8%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around 0 72.0%
*-commutative72.0%
*-commutative72.0%
*-commutative72.0%
*-commutative72.0%
associate-/r*72.0%
associate-*r/72.0%
associate-*r/72.1%
div-sub72.1%
distribute-lft-out--72.1%
Simplified72.1%
Taylor expanded in t around 0 60.6%
Final simplification64.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6.2e+22) (not (<= y 9e-28))) (+ x (/ (* -0.3333333333333333 y) z)) (+ x (* (/ t y) (/ 0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e+22) || !(y <= 9e-28)) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else {
tmp = x + ((t / y) * (0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-6.2d+22)) .or. (.not. (y <= 9d-28))) then
tmp = x + (((-0.3333333333333333d0) * y) / z)
else
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e+22) || !(y <= 9e-28)) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else {
tmp = x + ((t / y) * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6.2e+22) or not (y <= 9e-28): tmp = x + ((-0.3333333333333333 * y) / z) else: tmp = x + ((t / y) * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6.2e+22) || !(y <= 9e-28)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z)); else tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6.2e+22) || ~((y <= 9e-28))) tmp = x + ((-0.3333333333333333 * y) / z); else tmp = x + ((t / y) * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6.2e+22], N[Not[LessEqual[y, 9e-28]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+22} \lor \neg \left(y \leq 9 \cdot 10^{-28}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -6.2000000000000004e22 or 8.9999999999999996e-28 < y Initial program 99.1%
Simplified99.7%
Taylor expanded in y around inf 89.1%
*-commutative89.1%
associate-*r/89.1%
Applied egg-rr89.1%
if -6.2000000000000004e22 < y < 8.9999999999999996e-28Initial program 90.1%
Simplified94.3%
Taylor expanded in y around 0 87.0%
associate-/r*89.5%
associate-*r/89.5%
*-commutative89.5%
associate-*r/89.5%
Simplified89.5%
Final simplification89.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.8e+22) (not (<= y 9e-28))) (+ x (/ (* -0.3333333333333333 y) z)) (+ x (/ 0.3333333333333333 (* z (/ y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.8e+22) || !(y <= 9e-28)) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else {
tmp = x + (0.3333333333333333 / (z * (y / t)));
}
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.8d+22)) .or. (.not. (y <= 9d-28))) then
tmp = x + (((-0.3333333333333333d0) * y) / z)
else
tmp = x + (0.3333333333333333d0 / (z * (y / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.8e+22) || !(y <= 9e-28)) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else {
tmp = x + (0.3333333333333333 / (z * (y / t)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.8e+22) or not (y <= 9e-28): tmp = x + ((-0.3333333333333333 * y) / z) else: tmp = x + (0.3333333333333333 / (z * (y / t))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.8e+22) || !(y <= 9e-28)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z)); else tmp = Float64(x + Float64(0.3333333333333333 / Float64(z * Float64(y / t)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.8e+22) || ~((y <= 9e-28))) tmp = x + ((-0.3333333333333333 * y) / z); else tmp = x + (0.3333333333333333 / (z * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.8e+22], N[Not[LessEqual[y, 9e-28]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 / N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+22} \lor \neg \left(y \leq 9 \cdot 10^{-28}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if y < -2.8e22 or 8.9999999999999996e-28 < y Initial program 99.1%
Simplified99.7%
Taylor expanded in y around inf 89.1%
*-commutative89.1%
associate-*r/89.1%
Applied egg-rr89.1%
if -2.8e22 < y < 8.9999999999999996e-28Initial program 90.1%
Simplified94.3%
Taylor expanded in y around 0 87.0%
associate-/r*89.5%
associate-*r/89.5%
*-commutative89.5%
associate-*r/89.5%
Simplified89.5%
clear-num89.5%
frac-times90.0%
metadata-eval90.0%
Applied egg-rr90.0%
Final simplification89.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6.2e+22) (not (<= y 7.2e-28))) (- x (/ y (* z 3.0))) (+ x (/ 0.3333333333333333 (* z (/ y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e+22) || !(y <= 7.2e-28)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 / (z * (y / t)));
}
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.2d+22)) .or. (.not. (y <= 7.2d-28))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + (0.3333333333333333d0 / (z * (y / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e+22) || !(y <= 7.2e-28)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 / (z * (y / t)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6.2e+22) or not (y <= 7.2e-28): tmp = x - (y / (z * 3.0)) else: tmp = x + (0.3333333333333333 / (z * (y / t))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6.2e+22) || !(y <= 7.2e-28)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(0.3333333333333333 / Float64(z * Float64(y / t)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6.2e+22) || ~((y <= 7.2e-28))) tmp = x - (y / (z * 3.0)); else tmp = x + (0.3333333333333333 / (z * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6.2e+22], N[Not[LessEqual[y, 7.2e-28]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 / N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+22} \lor \neg \left(y \leq 7.2 \cdot 10^{-28}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if y < -6.2000000000000004e22 or 7.1999999999999997e-28 < y Initial program 99.1%
Simplified99.7%
Taylor expanded in y around inf 89.1%
*-commutative89.1%
clear-num89.0%
frac-2neg89.0%
metadata-eval89.0%
distribute-neg-frac89.0%
metadata-eval89.0%
frac-2neg89.0%
associate-*r/89.1%
div-inv89.2%
metadata-eval89.2%
Applied egg-rr89.2%
if -6.2000000000000004e22 < y < 7.1999999999999997e-28Initial program 90.1%
Simplified94.3%
Taylor expanded in y around 0 87.0%
associate-/r*89.5%
associate-*r/89.5%
*-commutative89.5%
associate-*r/89.5%
Simplified89.5%
clear-num89.5%
frac-times90.0%
metadata-eval90.0%
Applied egg-rr90.0%
Final simplification89.6%
(FPCore (x y z t) :precision binary64 (+ x (* (* -0.3333333333333333 (/ 1.0 z)) (- y (/ t y)))))
double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 * (1.0 / z)) * (y - (t / 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) * (1.0d0 / z)) * (y - (t / y)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 * (1.0 / z)) * (y - (t / y)));
}
def code(x, y, z, t): return x + ((-0.3333333333333333 * (1.0 / z)) * (y - (t / y)))
function code(x, y, z, t) return Float64(x + Float64(Float64(-0.3333333333333333 * Float64(1.0 / z)) * Float64(y - Float64(t / y)))) end
function tmp = code(x, y, z, t) tmp = x + ((-0.3333333333333333 * (1.0 / z)) * (y - (t / y))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(-0.3333333333333333 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(-0.3333333333333333 \cdot \frac{1}{z}\right) \cdot \left(y - \frac{t}{y}\right)
\end{array}
Initial program 94.9%
Simplified97.2%
div-inv97.2%
Applied egg-rr97.2%
Final simplification97.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.8e-36) (not (<= y 2.05e-67))) (+ 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.8e-36) || !(y <= 2.05e-67)) {
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.8d-36)) .or. (.not. (y <= 2.05d-67))) 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.8e-36) || !(y <= 2.05e-67)) {
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.8e-36) or not (y <= 2.05e-67): 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.8e-36) || !(y <= 2.05e-67)) 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.8e-36) || ~((y <= 2.05e-67))) 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.8e-36], N[Not[LessEqual[y, 2.05e-67]], $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.8 \cdot 10^{-36} \lor \neg \left(y \leq 2.05 \cdot 10^{-67}\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.80000000000000026e-36 or 2.0499999999999999e-67 < y Initial program 97.9%
Simplified99.7%
Taylor expanded in y around inf 86.3%
if -5.80000000000000026e-36 < y < 2.0499999999999999e-67Initial program 90.1%
Taylor expanded in z around 0 90.1%
*-commutative90.1%
*-commutative90.1%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in x around 0 65.5%
*-commutative65.5%
*-commutative65.5%
*-commutative65.5%
*-commutative65.5%
associate-/r*65.5%
associate-*r/65.6%
associate-*r/65.6%
div-sub65.6%
distribute-lft-out--65.6%
Simplified65.6%
Taylor expanded in t around inf 64.5%
associate-*r/64.5%
times-frac69.7%
*-commutative69.7%
Simplified69.7%
Final simplification80.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.6e-35) (not (<= y 1.16e-68))) (+ x (/ (* -0.3333333333333333 y) z)) (* (/ t z) (/ 0.3333333333333333 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.6e-35) || !(y <= 1.16e-68)) {
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 <= (-4.6d-35)) .or. (.not. (y <= 1.16d-68))) 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 <= -4.6e-35) || !(y <= 1.16e-68)) {
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 <= -4.6e-35) or not (y <= 1.16e-68): 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 <= -4.6e-35) || !(y <= 1.16e-68)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * 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 <= -4.6e-35) || ~((y <= 1.16e-68))) 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, -4.6e-35], N[Not[LessEqual[y, 1.16e-68]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{-35} \lor \neg \left(y \leq 1.16 \cdot 10^{-68}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -4.5999999999999998e-35 or 1.1599999999999999e-68 < y Initial program 97.9%
Simplified99.7%
Taylor expanded in y around inf 86.3%
*-commutative86.3%
associate-*r/86.4%
Applied egg-rr86.4%
if -4.5999999999999998e-35 < y < 1.1599999999999999e-68Initial program 90.1%
Taylor expanded in z around 0 90.1%
*-commutative90.1%
*-commutative90.1%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in x around 0 65.5%
*-commutative65.5%
*-commutative65.5%
*-commutative65.5%
*-commutative65.5%
associate-/r*65.5%
associate-*r/65.6%
associate-*r/65.6%
div-sub65.6%
distribute-lft-out--65.6%
Simplified65.6%
Taylor expanded in t around inf 64.5%
associate-*r/64.5%
times-frac69.7%
*-commutative69.7%
Simplified69.7%
Final simplification80.0%
(FPCore (x y z t) :precision binary64 (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + ((y - (t / 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 + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) * (-0.3333333333333333 / z));
}
def code(x, y, z, t): return x + ((y - (t / y)) * (-0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}
\end{array}
Initial program 94.9%
Simplified97.2%
Final simplification97.2%
(FPCore (x y z t) :precision binary64 (if (<= z -7.4e+111) x (if (<= z 5.8e+146) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.4e+111) {
tmp = x;
} else if (z <= 5.8e+146) {
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 (z <= (-7.4d+111)) then
tmp = x
else if (z <= 5.8d+146) 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 (z <= -7.4e+111) {
tmp = x;
} else if (z <= 5.8e+146) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7.4e+111: tmp = x elif z <= 5.8e+146: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7.4e+111) tmp = x; elseif (z <= 5.8e+146) 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 (z <= -7.4e+111) tmp = x; elseif (z <= 5.8e+146) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.4e+111], x, If[LessEqual[z, 5.8e+146], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{+111}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+146}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -7.4000000000000005e111 or 5.7999999999999997e146 < z Initial program 99.8%
Simplified94.0%
Taylor expanded in x around inf 64.0%
if -7.4000000000000005e111 < z < 5.7999999999999997e146Initial program 92.7%
Taylor expanded in z around 0 92.7%
*-commutative92.7%
*-commutative92.7%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in y around inf 45.3%
associate-*r/45.4%
*-commutative45.4%
associate-*r/45.3%
Simplified45.3%
Final simplification51.3%
(FPCore (x y z t) :precision binary64 (if (<= z -2.25e+111) x (if (<= z 3.9e+146) (/ (* -0.3333333333333333 y) z) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.25e+111) {
tmp = x;
} else if (z <= 3.9e+146) {
tmp = (-0.3333333333333333 * y) / z;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-2.25d+111)) then
tmp = x
else if (z <= 3.9d+146) then
tmp = ((-0.3333333333333333d0) * y) / z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.25e+111) {
tmp = x;
} else if (z <= 3.9e+146) {
tmp = (-0.3333333333333333 * y) / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.25e+111: tmp = x elif z <= 3.9e+146: tmp = (-0.3333333333333333 * y) / z else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.25e+111) tmp = x; elseif (z <= 3.9e+146) tmp = Float64(Float64(-0.3333333333333333 * y) / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.25e+111) tmp = x; elseif (z <= 3.9e+146) tmp = (-0.3333333333333333 * y) / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.25e+111], x, If[LessEqual[z, 3.9e+146], N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+111}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+146}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.25e111 or 3.9e146 < z Initial program 99.8%
Simplified94.0%
Taylor expanded in x around inf 64.0%
if -2.25e111 < z < 3.9e146Initial program 92.7%
Taylor expanded in z around 0 92.7%
*-commutative92.7%
*-commutative92.7%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in x around 0 79.6%
*-commutative79.6%
*-commutative79.6%
*-commutative79.6%
*-commutative79.6%
associate-/r*83.4%
associate-*r/83.4%
associate-*r/83.5%
div-sub84.0%
distribute-lft-out--84.0%
Simplified84.0%
Taylor expanded in t around 0 45.4%
Final simplification51.3%
(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.9%
Simplified97.2%
Taylor expanded in x around inf 30.7%
Final simplification30.7%
(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 2023279
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))