
(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 17 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 (or (<= y -7.2e-67) (not (<= y 1.3e-16))) (+ x (/ (- y (/ t y)) (* z -3.0))) (+ x (/ (/ (* t 0.3333333333333333) z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7.2e-67) || !(y <= 1.3e-16)) {
tmp = x + ((y - (t / y)) / (z * -3.0));
} else {
tmp = x + (((t * 0.3333333333333333) / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-7.2d-67)) .or. (.not. (y <= 1.3d-16))) then
tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
else
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7.2e-67) || !(y <= 1.3e-16)) {
tmp = x + ((y - (t / y)) / (z * -3.0));
} else {
tmp = x + (((t * 0.3333333333333333) / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -7.2e-67) or not (y <= 1.3e-16): tmp = x + ((y - (t / y)) / (z * -3.0)) else: tmp = x + (((t * 0.3333333333333333) / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -7.2e-67) || !(y <= 1.3e-16)) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))); else tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -7.2e-67) || ~((y <= 1.3e-16))) tmp = x + ((y - (t / y)) / (z * -3.0)); else tmp = x + (((t * 0.3333333333333333) / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -7.2e-67], N[Not[LessEqual[y, 1.3e-16]], $MachinePrecision]], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{-67} \lor \neg \left(y \leq 1.3 \cdot 10^{-16}\right):\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -7.19999999999999998e-67 or 1.2999999999999999e-16 < y Initial program 98.5%
Simplified99.0%
clear-num98.9%
inv-pow98.9%
Applied egg-rr98.9%
unpow-198.9%
Simplified98.9%
associate-*l/99.0%
*-un-lft-identity99.0%
div-inv99.2%
metadata-eval99.2%
Applied egg-rr99.2%
if -7.19999999999999998e-67 < y < 1.2999999999999999e-16Initial program 88.5%
Simplified88.2%
Taylor expanded in y around 0 88.5%
associate-*r/88.5%
*-commutative88.5%
times-frac88.2%
div-inv88.1%
associate-*l*98.2%
*-commutative98.2%
div-inv98.3%
associate-*r/98.3%
Applied egg-rr98.3%
Final simplification98.8%
(FPCore (x y z t) :precision binary64 (if (<= t 1e-76) (+ x (/ (- y (/ t y)) (* z -3.0))) (+ (- x (/ y (* z 3.0))) (/ t (* 3.0 (* y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1e-76) {
tmp = x + ((y - (t / y)) / (z * -3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / (3.0 * (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 (t <= 1d-76) then
tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
else
tmp = (x - (y / (z * 3.0d0))) + (t / (3.0d0 * (y * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1e-76) {
tmp = x + ((y - (t / y)) / (z * -3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / (3.0 * (y * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 1e-76: tmp = x + ((y - (t / y)) / (z * -3.0)) else: tmp = (x - (y / (z * 3.0))) + (t / (3.0 * (y * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 1e-76) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))); else tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(3.0 * Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 1e-76) tmp = x + ((y - (t / y)) / (z * -3.0)); else tmp = (x - (y / (z * 3.0))) + (t / (3.0 * (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 1e-76], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(3.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 10^{-76}:\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{3 \cdot \left(y \cdot z\right)}\\
\end{array}
\end{array}
if t < 9.99999999999999927e-77Initial program 91.6%
Simplified97.5%
clear-num97.4%
inv-pow97.4%
Applied egg-rr97.4%
unpow-197.4%
Simplified97.4%
associate-*l/97.5%
*-un-lft-identity97.5%
div-inv97.6%
metadata-eval97.6%
Applied egg-rr97.6%
if 9.99999999999999927e-77 < t Initial program 98.6%
Taylor expanded in z around 0 98.7%
Final simplification98.0%
(FPCore (x y z t)
:precision binary64
(if (<= y 5e-17)
(+
(+ x (* -0.3333333333333333 (/ y z)))
(/ (* 0.3333333333333333 (/ t z)) y))
(+ x (/ (- y (/ t y)) (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 5e-17) {
tmp = (x + (-0.3333333333333333 * (y / z))) + ((0.3333333333333333 * (t / z)) / y);
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= 5d-17) then
tmp = (x + ((-0.3333333333333333d0) * (y / z))) + ((0.3333333333333333d0 * (t / z)) / y)
else
tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 5e-17) {
tmp = (x + (-0.3333333333333333 * (y / z))) + ((0.3333333333333333 * (t / z)) / y);
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 5e-17: tmp = (x + (-0.3333333333333333 * (y / z))) + ((0.3333333333333333 * (t / z)) / y) else: tmp = x + ((y - (t / y)) / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 5e-17) tmp = Float64(Float64(x + Float64(-0.3333333333333333 * Float64(y / z))) + Float64(Float64(0.3333333333333333 * Float64(t / z)) / y)); else tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 5e-17) tmp = (x + (-0.3333333333333333 * (y / z))) + ((0.3333333333333333 * (t / z)) / y); else tmp = x + ((y - (t / y)) / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 5e-17], N[(N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5 \cdot 10^{-17}:\\
\;\;\;\;\left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\end{array}
\end{array}
if y < 4.9999999999999999e-17Initial program 93.2%
sub-neg93.2%
distribute-frac-neg93.2%
neg-mul-193.2%
*-commutative93.2%
times-frac93.1%
metadata-eval93.1%
associate-/l/92.4%
associate-/l/92.5%
Simplified92.5%
associate-/l/92.4%
*-un-lft-identity92.4%
times-frac92.4%
associate-/l/92.9%
times-frac93.1%
associate-*l*93.1%
*-commutative93.1%
times-frac96.8%
*-un-lft-identity96.8%
*-commutative96.8%
times-frac96.8%
metadata-eval96.8%
Applied egg-rr96.8%
associate-*l/96.9%
*-lft-identity96.9%
Simplified96.9%
if 4.9999999999999999e-17 < y Initial program 96.8%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
associate-*l/99.7%
*-un-lft-identity99.7%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Final simplification97.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -7e-67) (not (<= y 3.2e-17))) (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))) (+ x (/ (/ (* t 0.3333333333333333) z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7e-67) || !(y <= 3.2e-17)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x + (((t * 0.3333333333333333) / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-7d-67)) .or. (.not. (y <= 3.2d-17))) then
tmp = x + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
else
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7e-67) || !(y <= 3.2e-17)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x + (((t * 0.3333333333333333) / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -7e-67) or not (y <= 3.2e-17): tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)) else: tmp = x + (((t * 0.3333333333333333) / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -7e-67) || !(y <= 3.2e-17)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); else tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -7e-67) || ~((y <= 3.2e-17))) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); else tmp = x + (((t * 0.3333333333333333) / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -7e-67], N[Not[LessEqual[y, 3.2e-17]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-67} \lor \neg \left(y \leq 3.2 \cdot 10^{-17}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -7.0000000000000001e-67 or 3.2000000000000002e-17 < y Initial program 98.5%
Simplified99.0%
Taylor expanded in z around 0 99.1%
if -7.0000000000000001e-67 < y < 3.2000000000000002e-17Initial program 88.5%
Simplified88.2%
Taylor expanded in y around 0 88.5%
associate-*r/88.5%
*-commutative88.5%
times-frac88.2%
div-inv88.1%
associate-*l*98.2%
*-commutative98.2%
div-inv98.3%
associate-*r/98.3%
Applied egg-rr98.3%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- y (/ t y))))
(if (<= y -6e-68)
(+ x (/ (* t_1 -0.3333333333333333) z))
(if (<= y 3.2e-17)
(+ x (/ (/ (* t 0.3333333333333333) z) y))
(+ x (* -0.3333333333333333 (/ t_1 z)))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -6e-68) {
tmp = x + ((t_1 * -0.3333333333333333) / z);
} else if (y <= 3.2e-17) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (-0.3333333333333333 * (t_1 / 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) :: t_1
real(8) :: tmp
t_1 = y - (t / y)
if (y <= (-6d-68)) then
tmp = x + ((t_1 * (-0.3333333333333333d0)) / z)
else if (y <= 3.2d-17) then
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
else
tmp = x + ((-0.3333333333333333d0) * (t_1 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -6e-68) {
tmp = x + ((t_1 * -0.3333333333333333) / z);
} else if (y <= 3.2e-17) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (-0.3333333333333333 * (t_1 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -6e-68: tmp = x + ((t_1 * -0.3333333333333333) / z) elif y <= 3.2e-17: tmp = x + (((t * 0.3333333333333333) / z) / y) else: tmp = x + (-0.3333333333333333 * (t_1 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -6e-68) tmp = Float64(x + Float64(Float64(t_1 * -0.3333333333333333) / z)); elseif (y <= 3.2e-17) tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); else tmp = Float64(x + Float64(-0.3333333333333333 * Float64(t_1 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -6e-68) tmp = x + ((t_1 * -0.3333333333333333) / z); elseif (y <= 3.2e-17) tmp = x + (((t * 0.3333333333333333) / z) / y); else tmp = x + (-0.3333333333333333 * (t_1 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6e-68], N[(x + N[(N[(t$95$1 * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e-17], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -6 \cdot 10^{-68}:\\
\;\;\;\;x + \frac{t_1 \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-17}:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{t_1}{z}\\
\end{array}
\end{array}
if y < -6e-68Initial program 99.8%
Simplified98.4%
associate-*l/98.5%
Applied egg-rr98.5%
if -6e-68 < y < 3.2000000000000002e-17Initial program 88.5%
Simplified88.2%
Taylor expanded in y around 0 88.5%
associate-*r/88.5%
*-commutative88.5%
times-frac88.2%
div-inv88.1%
associate-*l*98.2%
*-commutative98.2%
div-inv98.3%
associate-*r/98.3%
Applied egg-rr98.3%
if 3.2000000000000002e-17 < y Initial program 96.8%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.9e+28) (not (<= y 4.2e+54))) (- x (/ y (* z 3.0))) (+ x (* 0.3333333333333333 (/ t (* y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.9e+28) || !(y <= 4.2e+54)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (y * z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.9d+28)) .or. (.not. (y <= 4.2d+54))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.9e+28) || !(y <= 4.2e+54)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (y * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.9e+28) or not (y <= 4.2e+54): tmp = x - (y / (z * 3.0)) else: tmp = x + (0.3333333333333333 * (t / (y * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.9e+28) || !(y <= 4.2e+54)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.9e+28) || ~((y <= 4.2e+54))) tmp = x - (y / (z * 3.0)); else tmp = x + (0.3333333333333333 * (t / (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.9e+28], N[Not[LessEqual[y, 4.2e+54]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+28} \lor \neg \left(y \leq 4.2 \cdot 10^{+54}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -1.8999999999999999e28 or 4.19999999999999972e54 < y Initial program 98.1%
Taylor expanded in t around 0 94.6%
expm1-log1p-u56.5%
expm1-udef49.2%
associate-*r/49.2%
Applied egg-rr49.2%
expm1-def56.4%
expm1-log1p94.6%
associate-/l*94.4%
associate-/r/94.5%
Simplified94.5%
Taylor expanded in z around 0 94.6%
*-commutative94.6%
metadata-eval94.6%
times-frac94.7%
*-rgt-identity94.7%
Simplified94.7%
if -1.8999999999999999e28 < y < 4.19999999999999972e54Initial program 91.1%
Simplified90.1%
Taylor expanded in y around 0 86.4%
Final simplification90.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.8e+28) (not (<= y 4.5e+53))) (- x (/ y (* z 3.0))) (+ x (/ (* t 0.3333333333333333) (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.8e+28) || !(y <= 4.5e+53)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t * 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+28)) .or. (.not. (y <= 4.5d+53))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + ((t * 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+28) || !(y <= 4.5e+53)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t * 0.3333333333333333) / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.8e+28) or not (y <= 4.5e+53): tmp = x - (y / (z * 3.0)) else: tmp = x + ((t * 0.3333333333333333) / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.8e+28) || !(y <= 4.5e+53)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(t * 0.3333333333333333) / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.8e+28) || ~((y <= 4.5e+53))) tmp = x - (y / (z * 3.0)); else tmp = x + ((t * 0.3333333333333333) / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.8e+28], N[Not[LessEqual[y, 4.5e+53]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * 0.3333333333333333), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+28} \lor \neg \left(y \leq 4.5 \cdot 10^{+53}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot 0.3333333333333333}{y \cdot z}\\
\end{array}
\end{array}
if y < -2.8000000000000001e28 or 4.5000000000000002e53 < y Initial program 98.1%
Taylor expanded in t around 0 94.6%
expm1-log1p-u56.5%
expm1-udef49.2%
associate-*r/49.2%
Applied egg-rr49.2%
expm1-def56.4%
expm1-log1p94.6%
associate-/l*94.4%
associate-/r/94.5%
Simplified94.5%
Taylor expanded in z around 0 94.6%
*-commutative94.6%
metadata-eval94.6%
times-frac94.7%
*-rgt-identity94.7%
Simplified94.7%
if -2.8000000000000001e28 < y < 4.5000000000000002e53Initial program 91.1%
Simplified90.1%
Taylor expanded in y around 0 86.4%
associate-/r*85.6%
associate-*r/85.6%
*-commutative85.6%
associate-*r/85.6%
Simplified85.6%
frac-times86.4%
Applied egg-rr86.4%
Final simplification90.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.5e+26) (not (<= y 6.5e+55))) (- x (/ y (* z 3.0))) (+ x (/ (* t (/ 0.3333333333333333 z)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.5e+26) || !(y <= 6.5e+55)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.5d+26)) .or. (.not. (y <= 6.5d+55))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.5e+26) || !(y <= 6.5e+55)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.5e+26) or not (y <= 6.5e+55): tmp = x - (y / (z * 3.0)) else: tmp = x + ((t * (0.3333333333333333 / z)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.5e+26) || !(y <= 6.5e+55)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.5e+26) || ~((y <= 6.5e+55))) tmp = x - (y / (z * 3.0)); else tmp = x + ((t * (0.3333333333333333 / z)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.5e+26], N[Not[LessEqual[y, 6.5e+55]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+26} \lor \neg \left(y \leq 6.5 \cdot 10^{+55}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -2.5e26 or 6.50000000000000027e55 < y Initial program 98.9%
Taylor expanded in t around 0 95.4%
expm1-log1p-u57.0%
expm1-udef49.7%
associate-*r/49.7%
Applied egg-rr49.7%
expm1-def56.9%
expm1-log1p95.4%
associate-/l*95.3%
associate-/r/95.4%
Simplified95.4%
Taylor expanded in z around 0 95.4%
*-commutative95.4%
metadata-eval95.4%
times-frac95.6%
*-rgt-identity95.6%
Simplified95.6%
if -2.5e26 < y < 6.50000000000000027e55Initial program 90.5%
Simplified90.2%
Taylor expanded in y around 0 85.8%
associate-/r*85.7%
associate-*r/85.7%
*-commutative85.7%
associate-*r/85.7%
Simplified85.7%
associate-*l/94.1%
Applied egg-rr94.1%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.5e+28) (not (<= y 3.8e+56))) (- x (/ y (* z 3.0))) (+ x (/ (/ t (* z 3.0)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.5e+28) || !(y <= 3.8e+56)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((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 ((y <= (-3.5d+28)) .or. (.not. (y <= 3.8d+56))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + ((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 ((y <= -3.5e+28) || !(y <= 3.8e+56)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t / (z * 3.0)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.5e+28) or not (y <= 3.8e+56): tmp = x - (y / (z * 3.0)) else: tmp = x + ((t / (z * 3.0)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.5e+28) || !(y <= 3.8e+56)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(t / Float64(z * 3.0)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.5e+28) || ~((y <= 3.8e+56))) tmp = x - (y / (z * 3.0)); else tmp = x + ((t / (z * 3.0)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.5e+28], N[Not[LessEqual[y, 3.8e+56]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+28} \lor \neg \left(y \leq 3.8 \cdot 10^{+56}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\
\end{array}
\end{array}
if y < -3.5e28 or 3.79999999999999996e56 < y Initial program 98.9%
Taylor expanded in t around 0 95.4%
expm1-log1p-u57.0%
expm1-udef49.7%
associate-*r/49.7%
Applied egg-rr49.7%
expm1-def56.9%
expm1-log1p95.4%
associate-/l*95.3%
associate-/r/95.4%
Simplified95.4%
Taylor expanded in z around 0 95.4%
*-commutative95.4%
metadata-eval95.4%
times-frac95.6%
*-rgt-identity95.6%
Simplified95.6%
if -3.5e28 < y < 3.79999999999999996e56Initial program 90.5%
Simplified90.2%
Taylor expanded in y around 0 85.8%
associate-/r*85.7%
associate-*r/85.7%
*-commutative85.7%
associate-*r/85.7%
Simplified85.7%
associate-*l/94.1%
Applied egg-rr94.1%
clear-num94.0%
un-div-inv94.1%
div-inv94.1%
metadata-eval94.1%
Applied egg-rr94.1%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.4e+30) (not (<= y 6.5e+55))) (- x (/ y (* z 3.0))) (+ x (/ (/ (* t 0.3333333333333333) z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.4e+30) || !(y <= 6.5e+55)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (((t * 0.3333333333333333) / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.4d+30)) .or. (.not. (y <= 6.5d+55))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.4e+30) || !(y <= 6.5e+55)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (((t * 0.3333333333333333) / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.4e+30) or not (y <= 6.5e+55): tmp = x - (y / (z * 3.0)) else: tmp = x + (((t * 0.3333333333333333) / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.4e+30) || !(y <= 6.5e+55)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.4e+30) || ~((y <= 6.5e+55))) tmp = x - (y / (z * 3.0)); else tmp = x + (((t * 0.3333333333333333) / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.4e+30], N[Not[LessEqual[y, 6.5e+55]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+30} \lor \neg \left(y \leq 6.5 \cdot 10^{+55}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -1.39999999999999992e30 or 6.50000000000000027e55 < y Initial program 98.9%
Taylor expanded in t around 0 95.4%
expm1-log1p-u57.0%
expm1-udef49.7%
associate-*r/49.7%
Applied egg-rr49.7%
expm1-def56.9%
expm1-log1p95.4%
associate-/l*95.3%
associate-/r/95.4%
Simplified95.4%
Taylor expanded in z around 0 95.4%
*-commutative95.4%
metadata-eval95.4%
times-frac95.6%
*-rgt-identity95.6%
Simplified95.6%
if -1.39999999999999992e30 < y < 6.50000000000000027e55Initial program 90.5%
Simplified90.2%
Taylor expanded in y around 0 85.8%
associate-*r/85.9%
*-commutative85.9%
times-frac85.7%
div-inv85.6%
associate-*l*94.0%
*-commutative94.0%
div-inv94.1%
associate-*r/94.1%
Applied egg-rr94.1%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1e+70) (not (<= y 7.2e+145))) (/ (- y) (* z 3.0)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1e+70) || !(y <= 7.2e+145)) {
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 ((y <= (-1d+70)) .or. (.not. (y <= 7.2d+145))) 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 ((y <= -1e+70) || !(y <= 7.2e+145)) {
tmp = -y / (z * 3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1e+70) or not (y <= 7.2e+145): tmp = -y / (z * 3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1e+70) || !(y <= 7.2e+145)) tmp = Float64(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 ((y <= -1e+70) || ~((y <= 7.2e+145))) tmp = -y / (z * 3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1e+70], N[Not[LessEqual[y, 7.2e+145]], $MachinePrecision]], N[((-y) / N[(z * 3.0), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+70} \lor \neg \left(y \leq 7.2 \cdot 10^{+145}\right):\\
\;\;\;\;\frac{-y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.00000000000000007e70 or 7.19999999999999948e145 < y Initial program 98.6%
sub-neg98.6%
distribute-frac-neg98.6%
neg-mul-198.6%
*-commutative98.6%
times-frac98.4%
metadata-eval98.4%
associate-/l/98.4%
associate-/l/98.4%
Simplified98.4%
associate-/l/98.4%
*-un-lft-identity98.4%
times-frac98.4%
associate-/l/98.4%
times-frac98.4%
*-un-lft-identity98.4%
associate-*l*98.4%
clear-num98.4%
inv-pow98.4%
*-commutative98.4%
Applied egg-rr98.4%
unpow-198.4%
associate-/l*89.8%
Simplified89.8%
Taylor expanded in y around inf 76.7%
associate-*r/76.7%
*-commutative76.7%
Simplified76.7%
frac-2neg76.7%
div-inv76.7%
distribute-rgt-neg-in76.7%
metadata-eval76.7%
Applied egg-rr76.7%
associate-*r/76.7%
*-rgt-identity76.7%
metadata-eval76.7%
distribute-rgt-neg-in76.7%
distribute-frac-neg76.7%
associate-/l*76.7%
distribute-neg-frac76.7%
metadata-eval76.7%
associate-/l*76.9%
distribute-lft-neg-in76.9%
distribute-rgt-neg-in76.9%
metadata-eval76.9%
/-rgt-identity76.9%
Simplified76.9%
if -1.00000000000000007e70 < y < 7.19999999999999948e145Initial program 92.0%
Simplified91.8%
Taylor expanded in x around inf 39.9%
Final simplification51.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6e+69) (not (<= y 8.6e+145))) (* -0.3333333333333333 (/ y z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6e+69) || !(y <= 8.6e+145)) {
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 ((y <= (-6d+69)) .or. (.not. (y <= 8.6d+145))) 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 ((y <= -6e+69) || !(y <= 8.6e+145)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6e+69) or not (y <= 8.6e+145): tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6e+69) || !(y <= 8.6e+145)) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6e+69) || ~((y <= 8.6e+145))) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6e+69], N[Not[LessEqual[y, 8.6e+145]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+69} \lor \neg \left(y \leq 8.6 \cdot 10^{+145}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.99999999999999967e69 or 8.59999999999999996e145 < y Initial program 98.6%
sub-neg98.6%
distribute-frac-neg98.6%
neg-mul-198.6%
*-commutative98.6%
times-frac98.4%
metadata-eval98.4%
associate-/l/98.4%
associate-/l/98.4%
Simplified98.4%
associate-/l/98.4%
*-un-lft-identity98.4%
times-frac98.4%
associate-/l/98.4%
times-frac98.4%
*-un-lft-identity98.4%
associate-*l*98.4%
clear-num98.4%
inv-pow98.4%
*-commutative98.4%
Applied egg-rr98.4%
unpow-198.4%
associate-/l*89.8%
Simplified89.8%
Taylor expanded in y around inf 76.7%
if -5.99999999999999967e69 < y < 8.59999999999999996e145Initial program 92.0%
Simplified91.8%
Taylor expanded in x around inf 39.9%
Final simplification51.3%
(FPCore (x y z t) :precision binary64 (if (<= y -4.2e+69) (/ (* y -0.3333333333333333) z) (if (<= y 1.05e+146) x (* -0.3333333333333333 (/ y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e+69) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 1.05e+146) {
tmp = x;
} 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 <= (-4.2d+69)) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= 1.05d+146) then
tmp = x
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 <= -4.2e+69) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 1.05e+146) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.2e+69: tmp = (y * -0.3333333333333333) / z elif y <= 1.05e+146: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.2e+69) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= 1.05e+146) tmp = x; else tmp = Float64(-0.3333333333333333 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.2e+69) tmp = (y * -0.3333333333333333) / z; elseif (y <= 1.05e+146) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.2e+69], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.05e+146], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+69}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+146}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -4.2000000000000003e69Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.6%
metadata-eval99.6%
associate-/l/99.6%
associate-/l/99.6%
Simplified99.6%
associate-/l/99.6%
*-un-lft-identity99.6%
times-frac99.6%
associate-/l/99.6%
times-frac99.6%
*-un-lft-identity99.6%
associate-*l*99.6%
clear-num99.6%
inv-pow99.6%
*-commutative99.6%
Applied egg-rr99.6%
unpow-199.6%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in y around inf 68.7%
associate-*r/68.8%
*-commutative68.8%
Simplified68.8%
if -4.2000000000000003e69 < y < 1.05e146Initial program 92.0%
Simplified91.8%
Taylor expanded in x around inf 39.9%
if 1.05e146 < y Initial program 96.9%
sub-neg96.9%
distribute-frac-neg96.9%
neg-mul-196.9%
*-commutative96.9%
times-frac96.7%
metadata-eval96.7%
associate-/l/96.7%
associate-/l/96.7%
Simplified96.7%
associate-/l/96.7%
*-un-lft-identity96.7%
times-frac96.7%
associate-/l/96.7%
times-frac96.7%
*-un-lft-identity96.7%
associate-*l*96.7%
clear-num96.7%
inv-pow96.7%
*-commutative96.7%
Applied egg-rr96.7%
unpow-196.7%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in y around inf 87.9%
Final simplification51.3%
(FPCore (x y z t) :precision binary64 (if (<= y -3.25e+69) (/ (* y -0.3333333333333333) z) (if (<= y 7.5e+145) x (/ (/ y -3.0) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.25e+69) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 7.5e+145) {
tmp = x;
} else {
tmp = (y / -3.0) / z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-3.25d+69)) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= 7.5d+145) then
tmp = x
else
tmp = (y / (-3.0d0)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.25e+69) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 7.5e+145) {
tmp = x;
} else {
tmp = (y / -3.0) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.25e+69: tmp = (y * -0.3333333333333333) / z elif y <= 7.5e+145: tmp = x else: tmp = (y / -3.0) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.25e+69) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= 7.5e+145) tmp = x; else tmp = Float64(Float64(y / -3.0) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.25e+69) tmp = (y * -0.3333333333333333) / z; elseif (y <= 7.5e+145) tmp = x; else tmp = (y / -3.0) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.25e+69], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 7.5e+145], x, N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.25 \cdot 10^{+69}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+145}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\
\end{array}
\end{array}
if y < -3.25e69Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.6%
metadata-eval99.6%
associate-/l/99.6%
associate-/l/99.6%
Simplified99.6%
associate-/l/99.6%
*-un-lft-identity99.6%
times-frac99.6%
associate-/l/99.6%
times-frac99.6%
*-un-lft-identity99.6%
associate-*l*99.6%
clear-num99.6%
inv-pow99.6%
*-commutative99.6%
Applied egg-rr99.6%
unpow-199.6%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in y around inf 68.7%
associate-*r/68.8%
*-commutative68.8%
Simplified68.8%
if -3.25e69 < y < 7.50000000000000006e145Initial program 92.0%
Simplified91.8%
Taylor expanded in x around inf 39.9%
if 7.50000000000000006e145 < y Initial program 96.9%
sub-neg96.9%
distribute-frac-neg96.9%
neg-mul-196.9%
*-commutative96.9%
times-frac96.7%
metadata-eval96.7%
associate-/l/96.7%
associate-/l/96.7%
Simplified96.7%
associate-/l/96.7%
*-un-lft-identity96.7%
times-frac96.7%
associate-/l/96.7%
times-frac96.7%
*-un-lft-identity96.7%
associate-*l*96.7%
clear-num96.7%
inv-pow96.7%
*-commutative96.7%
Applied egg-rr96.7%
unpow-196.7%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in y around inf 87.9%
associate-*r/87.9%
*-commutative87.9%
Simplified87.9%
metadata-eval87.9%
div-inv88.0%
Applied egg-rr88.0%
Final simplification51.3%
(FPCore (x y z t) :precision binary64 (- x (* (/ y z) 0.3333333333333333)))
double code(double x, double y, double z, double t) {
return x - ((y / z) * 0.3333333333333333);
}
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) * 0.3333333333333333d0)
end function
public static double code(double x, double y, double z, double t) {
return x - ((y / z) * 0.3333333333333333);
}
def code(x, y, z, t): return x - ((y / z) * 0.3333333333333333)
function code(x, y, z, t) return Float64(x - Float64(Float64(y / z) * 0.3333333333333333)) end
function tmp = code(x, y, z, t) tmp = x - ((y / z) * 0.3333333333333333); end
code[x_, y_, z_, t_] := N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y}{z} \cdot 0.3333333333333333
\end{array}
Initial program 94.0%
Taylor expanded in t around 0 63.7%
Final simplification63.7%
(FPCore (x y z t) :precision binary64 (- x (/ y (* z 3.0))))
double code(double x, double y, double z, double t) {
return x - (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 - (y / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
return x - (y / (z * 3.0));
}
def code(x, y, z, t): return x - (y / (z * 3.0))
function code(x, y, z, t) return Float64(x - Float64(y / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x - (y / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y}{z \cdot 3}
\end{array}
Initial program 94.0%
Taylor expanded in t around 0 63.7%
expm1-log1p-u44.8%
expm1-udef41.4%
associate-*r/41.4%
Applied egg-rr41.4%
expm1-def44.8%
expm1-log1p63.7%
associate-/l*63.6%
associate-/r/63.6%
Simplified63.6%
Taylor expanded in z around 0 63.7%
*-commutative63.7%
metadata-eval63.7%
times-frac63.7%
*-rgt-identity63.7%
Simplified63.7%
Final simplification63.7%
(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.0%
Simplified94.2%
Taylor expanded in x around inf 33.9%
Final simplification33.9%
(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 2023271
(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))))