
(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 21 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 (<= t 1.6e-66) (- (+ (/ (/ t z) (* y 3.0)) x) (* y (/ 0.3333333333333333 z))) (+ (+ x (/ -1.0 (* 3.0 (/ z y)))) (/ t (* y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.6e-66) {
tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z));
} else {
tmp = (x + (-1.0 / (3.0 * (z / 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 (t <= 1.6d-66) then
tmp = (((t / z) / (y * 3.0d0)) + x) - (y * (0.3333333333333333d0 / z))
else
tmp = (x + ((-1.0d0) / (3.0d0 * (z / 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 (t <= 1.6e-66) {
tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z));
} else {
tmp = (x + (-1.0 / (3.0 * (z / y)))) + (t / (y * (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 1.6e-66: tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z)) else: tmp = (x + (-1.0 / (3.0 * (z / y)))) + (t / (y * (z * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 1.6e-66) tmp = Float64(Float64(Float64(Float64(t / z) / Float64(y * 3.0)) + x) - Float64(y * Float64(0.3333333333333333 / z))); else tmp = Float64(Float64(x + Float64(-1.0 / Float64(3.0 * Float64(z / y)))) + Float64(t / Float64(y * Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 1.6e-66) tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z)); else tmp = (x + (-1.0 / (3.0 * (z / y)))) + (t / (y * (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 1.6e-66], N[(N[(N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(-1.0 / N[(3.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.6 \cdot 10^{-66}:\\
\;\;\;\;\left(\frac{\frac{t}{z}}{y \cdot 3} + x\right) - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{-1}{3 \cdot \frac{z}{y}}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\end{array}
\end{array}
if t < 1.59999999999999991e-66Initial program 94.1%
associate-*l*94.1%
*-commutative94.1%
Simplified94.1%
+-commutative94.1%
*-commutative94.1%
associate-*l*94.1%
associate-+r-94.1%
associate-*l*94.1%
*-commutative94.1%
associate-/r*98.2%
div-inv98.2%
metadata-eval98.2%
div-inv98.2%
clear-num98.2%
Applied egg-rr98.2%
if 1.59999999999999991e-66 < t Initial program 98.5%
clear-num98.6%
inv-pow98.6%
*-commutative98.6%
*-un-lft-identity98.6%
times-frac98.5%
metadata-eval98.5%
Applied egg-rr98.5%
unpow-198.5%
Simplified98.5%
Final simplification98.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* 0.3333333333333333 (/ t (* z y)))))
(t_2 (+ x (* (/ 0.3333333333333333 z) (/ t y)))))
(if (<= y -3.4e+74)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y -9.5e+42)
t_2
(if (<= y -3.2e-12)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 4.6e-204)
t_1
(if (<= y 8.5e-66)
t_2
(if (<= y 1.3e-41) t_1 (- x (/ y (* z 3.0)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (0.3333333333333333 * (t / (z * y)));
double t_2 = x + ((0.3333333333333333 / z) * (t / y));
double tmp;
if (y <= -3.4e+74) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -9.5e+42) {
tmp = t_2;
} else if (y <= -3.2e-12) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 4.6e-204) {
tmp = t_1;
} else if (y <= 8.5e-66) {
tmp = t_2;
} else if (y <= 1.3e-41) {
tmp = t_1;
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (0.3333333333333333d0 * (t / (z * y)))
t_2 = x + ((0.3333333333333333d0 / z) * (t / y))
if (y <= (-3.4d+74)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= (-9.5d+42)) then
tmp = t_2
else if (y <= (-3.2d-12)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 4.6d-204) then
tmp = t_1
else if (y <= 8.5d-66) then
tmp = t_2
else if (y <= 1.3d-41) then
tmp = t_1
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (0.3333333333333333 * (t / (z * y)));
double t_2 = x + ((0.3333333333333333 / z) * (t / y));
double tmp;
if (y <= -3.4e+74) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -9.5e+42) {
tmp = t_2;
} else if (y <= -3.2e-12) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 4.6e-204) {
tmp = t_1;
} else if (y <= 8.5e-66) {
tmp = t_2;
} else if (y <= 1.3e-41) {
tmp = t_1;
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (0.3333333333333333 * (t / (z * y))) t_2 = x + ((0.3333333333333333 / z) * (t / y)) tmp = 0 if y <= -3.4e+74: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= -9.5e+42: tmp = t_2 elif y <= -3.2e-12: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 4.6e-204: tmp = t_1 elif y <= 8.5e-66: tmp = t_2 elif y <= 1.3e-41: tmp = t_1 else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))) t_2 = Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(t / y))) tmp = 0.0 if (y <= -3.4e+74) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= -9.5e+42) tmp = t_2; elseif (y <= -3.2e-12) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 4.6e-204) tmp = t_1; elseif (y <= 8.5e-66) tmp = t_2; elseif (y <= 1.3e-41) tmp = t_1; else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (0.3333333333333333 * (t / (z * y))); t_2 = x + ((0.3333333333333333 / z) * (t / y)); tmp = 0.0; if (y <= -3.4e+74) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= -9.5e+42) tmp = t_2; elseif (y <= -3.2e-12) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 4.6e-204) tmp = t_1; elseif (y <= 8.5e-66) tmp = t_2; elseif (y <= 1.3e-41) tmp = t_1; else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.4e+74], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.5e+42], t$95$2, If[LessEqual[y, -3.2e-12], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e-204], t$95$1, If[LessEqual[y, 8.5e-66], t$95$2, If[LessEqual[y, 1.3e-41], t$95$1, N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
t_2 := x + \frac{0.3333333333333333}{z} \cdot \frac{t}{y}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+74}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{+42}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-12}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-204}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-66}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -3.3999999999999999e74Initial program 97.7%
Simplified99.8%
Taylor expanded in t around 0 97.6%
*-commutative97.6%
associate-*l/97.6%
associate-*r/97.7%
Simplified97.7%
if -3.3999999999999999e74 < y < -9.50000000000000019e42 or 4.5999999999999998e-204 < y < 8.49999999999999966e-66Initial program 84.5%
Simplified99.6%
Taylor expanded in t around inf 92.8%
if -9.50000000000000019e42 < y < -3.2000000000000001e-12Initial program 99.9%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 79.8%
if -3.2000000000000001e-12 < y < 4.5999999999999998e-204 or 8.49999999999999966e-66 < y < 1.3e-41Initial program 94.9%
Simplified87.6%
Taylor expanded in t around inf 93.6%
if 1.3e-41 < y Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 91.7%
Final simplification93.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* y (/ -0.3333333333333333 z)))))
(if (<= y -3.4e+74)
t_1
(if (<= y -4.1e+43)
(+ x (* (/ 0.3333333333333333 z) (/ t y)))
(if (<= y -3.15e+32)
t_1
(if (<= y -5.5e-37)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(if (<= y 1.3e-41)
(+ x (/ 0.3333333333333333 (* y (/ z t))))
(- x (/ y (* z 3.0))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y * (-0.3333333333333333 / z));
double tmp;
if (y <= -3.4e+74) {
tmp = t_1;
} else if (y <= -4.1e+43) {
tmp = x + ((0.3333333333333333 / z) * (t / y));
} else if (y <= -3.15e+32) {
tmp = t_1;
} else if (y <= -5.5e-37) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 1.3e-41) {
tmp = x + (0.3333333333333333 / (y * (z / t)));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * ((-0.3333333333333333d0) / z))
if (y <= (-3.4d+74)) then
tmp = t_1
else if (y <= (-4.1d+43)) then
tmp = x + ((0.3333333333333333d0 / z) * (t / y))
else if (y <= (-3.15d+32)) then
tmp = t_1
else if (y <= (-5.5d-37)) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
else if (y <= 1.3d-41) then
tmp = x + (0.3333333333333333d0 / (y * (z / t)))
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (y * (-0.3333333333333333 / z));
double tmp;
if (y <= -3.4e+74) {
tmp = t_1;
} else if (y <= -4.1e+43) {
tmp = x + ((0.3333333333333333 / z) * (t / y));
} else if (y <= -3.15e+32) {
tmp = t_1;
} else if (y <= -5.5e-37) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 1.3e-41) {
tmp = x + (0.3333333333333333 / (y * (z / t)));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y * (-0.3333333333333333 / z)) tmp = 0 if y <= -3.4e+74: tmp = t_1 elif y <= -4.1e+43: tmp = x + ((0.3333333333333333 / z) * (t / y)) elif y <= -3.15e+32: tmp = t_1 elif y <= -5.5e-37: tmp = -0.3333333333333333 * ((y - (t / y)) / z) elif y <= 1.3e-41: tmp = x + (0.3333333333333333 / (y * (z / t))) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))) tmp = 0.0 if (y <= -3.4e+74) tmp = t_1; elseif (y <= -4.1e+43) tmp = Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(t / y))); elseif (y <= -3.15e+32) tmp = t_1; elseif (y <= -5.5e-37) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); elseif (y <= 1.3e-41) tmp = Float64(x + Float64(0.3333333333333333 / Float64(y * Float64(z / t)))); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y * (-0.3333333333333333 / z)); tmp = 0.0; if (y <= -3.4e+74) tmp = t_1; elseif (y <= -4.1e+43) tmp = x + ((0.3333333333333333 / z) * (t / y)); elseif (y <= -3.15e+32) tmp = t_1; elseif (y <= -5.5e-37) tmp = -0.3333333333333333 * ((y - (t / y)) / z); elseif (y <= 1.3e-41) tmp = x + (0.3333333333333333 / (y * (z / t))); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.4e+74], t$95$1, If[LessEqual[y, -4.1e+43], N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.15e+32], t$95$1, If[LessEqual[y, -5.5e-37], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-41], N[(x + N[(0.3333333333333333 / N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{+43}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \frac{t}{y}\\
\mathbf{elif}\;y \leq -3.15 \cdot 10^{+32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-37}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-41}:\\
\;\;\;\;x + \frac{0.3333333333333333}{y \cdot \frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -3.3999999999999999e74 or -4.1e43 < y < -3.1500000000000001e32Initial program 97.9%
Simplified99.8%
Taylor expanded in t around 0 97.9%
*-commutative97.9%
associate-*l/97.9%
associate-*r/98.0%
Simplified98.0%
if -3.3999999999999999e74 < y < -4.1e43Initial program 90.4%
Simplified99.7%
Taylor expanded in t around inf 85.1%
if -3.1500000000000001e32 < y < -5.4999999999999998e-37Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.4%
sub-div99.4%
Applied egg-rr99.4%
Taylor expanded in x around 0 99.4%
if -5.4999999999999998e-37 < y < 1.3e-41Initial program 91.3%
Simplified90.8%
Taylor expanded in t around inf 89.4%
associate-*r/89.4%
*-commutative89.4%
associate-/r*95.0%
associate-*r/95.1%
Simplified95.1%
associate-/l*95.1%
div-inv95.0%
div-inv95.0%
clear-num95.0%
Applied egg-rr95.0%
associate-*r/95.1%
metadata-eval95.1%
Simplified95.1%
if 1.3e-41 < y Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 91.7%
Final simplification94.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* y (/ -0.3333333333333333 z)))))
(if (<= y -3.4e+74)
t_1
(if (<= y -4.5e+42)
(+ x (* (/ 0.3333333333333333 z) (/ t y)))
(if (<= y -7.9e+27)
t_1
(if (<= y -7.5e-37)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(if (<= y 1.3e-41)
(+ x (/ (* (/ t z) 0.3333333333333333) y))
(- x (/ y (* z 3.0))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y * (-0.3333333333333333 / z));
double tmp;
if (y <= -3.4e+74) {
tmp = t_1;
} else if (y <= -4.5e+42) {
tmp = x + ((0.3333333333333333 / z) * (t / y));
} else if (y <= -7.9e+27) {
tmp = t_1;
} else if (y <= -7.5e-37) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 1.3e-41) {
tmp = x + (((t / z) * 0.3333333333333333) / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * ((-0.3333333333333333d0) / z))
if (y <= (-3.4d+74)) then
tmp = t_1
else if (y <= (-4.5d+42)) then
tmp = x + ((0.3333333333333333d0 / z) * (t / y))
else if (y <= (-7.9d+27)) then
tmp = t_1
else if (y <= (-7.5d-37)) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
else if (y <= 1.3d-41) then
tmp = x + (((t / z) * 0.3333333333333333d0) / y)
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (y * (-0.3333333333333333 / z));
double tmp;
if (y <= -3.4e+74) {
tmp = t_1;
} else if (y <= -4.5e+42) {
tmp = x + ((0.3333333333333333 / z) * (t / y));
} else if (y <= -7.9e+27) {
tmp = t_1;
} else if (y <= -7.5e-37) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 1.3e-41) {
tmp = x + (((t / z) * 0.3333333333333333) / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y * (-0.3333333333333333 / z)) tmp = 0 if y <= -3.4e+74: tmp = t_1 elif y <= -4.5e+42: tmp = x + ((0.3333333333333333 / z) * (t / y)) elif y <= -7.9e+27: tmp = t_1 elif y <= -7.5e-37: tmp = -0.3333333333333333 * ((y - (t / y)) / z) elif y <= 1.3e-41: tmp = x + (((t / z) * 0.3333333333333333) / y) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))) tmp = 0.0 if (y <= -3.4e+74) tmp = t_1; elseif (y <= -4.5e+42) tmp = Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(t / y))); elseif (y <= -7.9e+27) tmp = t_1; elseif (y <= -7.5e-37) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); elseif (y <= 1.3e-41) tmp = Float64(x + Float64(Float64(Float64(t / z) * 0.3333333333333333) / y)); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y * (-0.3333333333333333 / z)); tmp = 0.0; if (y <= -3.4e+74) tmp = t_1; elseif (y <= -4.5e+42) tmp = x + ((0.3333333333333333 / z) * (t / y)); elseif (y <= -7.9e+27) tmp = t_1; elseif (y <= -7.5e-37) tmp = -0.3333333333333333 * ((y - (t / y)) / z); elseif (y <= 1.3e-41) tmp = x + (((t / z) * 0.3333333333333333) / y); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.4e+74], t$95$1, If[LessEqual[y, -4.5e+42], N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.9e+27], t$95$1, If[LessEqual[y, -7.5e-37], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-41], N[(x + N[(N[(N[(t / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{+42}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \frac{t}{y}\\
\mathbf{elif}\;y \leq -7.9 \cdot 10^{+27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{-37}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-41}:\\
\;\;\;\;x + \frac{\frac{t}{z} \cdot 0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -3.3999999999999999e74 or -4.50000000000000012e42 < y < -7.89999999999999991e27Initial program 97.9%
Simplified99.8%
Taylor expanded in t around 0 97.9%
*-commutative97.9%
associate-*l/97.9%
associate-*r/98.0%
Simplified98.0%
if -3.3999999999999999e74 < y < -4.50000000000000012e42Initial program 90.4%
Simplified99.7%
Taylor expanded in t around inf 85.1%
if -7.89999999999999991e27 < y < -7.5000000000000004e-37Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.4%
sub-div99.4%
Applied egg-rr99.4%
Taylor expanded in x around 0 99.4%
if -7.5000000000000004e-37 < y < 1.3e-41Initial program 91.3%
Simplified90.8%
Taylor expanded in t around inf 89.4%
associate-*r/89.4%
*-commutative89.4%
associate-/r*95.0%
associate-*r/95.1%
Simplified95.1%
if 1.3e-41 < y Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 91.7%
Final simplification94.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* y (/ -0.3333333333333333 z)))))
(if (<= y -3.4e+74)
t_1
(if (<= y -1.16e+44)
(+ x (/ (/ (* t 0.3333333333333333) y) z))
(if (<= y -3.35e+31)
t_1
(if (<= y -1.15e-36)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(if (<= y 1.2e-41)
(+ x (/ (* (/ t z) 0.3333333333333333) y))
(- x (/ y (* z 3.0))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y * (-0.3333333333333333 / z));
double tmp;
if (y <= -3.4e+74) {
tmp = t_1;
} else if (y <= -1.16e+44) {
tmp = x + (((t * 0.3333333333333333) / y) / z);
} else if (y <= -3.35e+31) {
tmp = t_1;
} else if (y <= -1.15e-36) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 1.2e-41) {
tmp = x + (((t / z) * 0.3333333333333333) / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * ((-0.3333333333333333d0) / z))
if (y <= (-3.4d+74)) then
tmp = t_1
else if (y <= (-1.16d+44)) then
tmp = x + (((t * 0.3333333333333333d0) / y) / z)
else if (y <= (-3.35d+31)) then
tmp = t_1
else if (y <= (-1.15d-36)) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
else if (y <= 1.2d-41) then
tmp = x + (((t / z) * 0.3333333333333333d0) / y)
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (y * (-0.3333333333333333 / z));
double tmp;
if (y <= -3.4e+74) {
tmp = t_1;
} else if (y <= -1.16e+44) {
tmp = x + (((t * 0.3333333333333333) / y) / z);
} else if (y <= -3.35e+31) {
tmp = t_1;
} else if (y <= -1.15e-36) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 1.2e-41) {
tmp = x + (((t / z) * 0.3333333333333333) / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y * (-0.3333333333333333 / z)) tmp = 0 if y <= -3.4e+74: tmp = t_1 elif y <= -1.16e+44: tmp = x + (((t * 0.3333333333333333) / y) / z) elif y <= -3.35e+31: tmp = t_1 elif y <= -1.15e-36: tmp = -0.3333333333333333 * ((y - (t / y)) / z) elif y <= 1.2e-41: tmp = x + (((t / z) * 0.3333333333333333) / y) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))) tmp = 0.0 if (y <= -3.4e+74) tmp = t_1; elseif (y <= -1.16e+44) tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / y) / z)); elseif (y <= -3.35e+31) tmp = t_1; elseif (y <= -1.15e-36) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); elseif (y <= 1.2e-41) tmp = Float64(x + Float64(Float64(Float64(t / z) * 0.3333333333333333) / y)); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y * (-0.3333333333333333 / z)); tmp = 0.0; if (y <= -3.4e+74) tmp = t_1; elseif (y <= -1.16e+44) tmp = x + (((t * 0.3333333333333333) / y) / z); elseif (y <= -3.35e+31) tmp = t_1; elseif (y <= -1.15e-36) tmp = -0.3333333333333333 * ((y - (t / y)) / z); elseif (y <= 1.2e-41) tmp = x + (((t / z) * 0.3333333333333333) / y); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.4e+74], t$95$1, If[LessEqual[y, -1.16e+44], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.35e+31], t$95$1, If[LessEqual[y, -1.15e-36], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e-41], N[(x + N[(N[(N[(t / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.16 \cdot 10^{+44}:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{y}}{z}\\
\mathbf{elif}\;y \leq -3.35 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-36}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-41}:\\
\;\;\;\;x + \frac{\frac{t}{z} \cdot 0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -3.3999999999999999e74 or -1.1600000000000001e44 < y < -3.35000000000000008e31Initial program 97.9%
Simplified99.8%
Taylor expanded in t around 0 97.9%
*-commutative97.9%
associate-*l/97.9%
associate-*r/98.0%
Simplified98.0%
if -3.3999999999999999e74 < y < -1.1600000000000001e44Initial program 90.4%
Simplified99.7%
Taylor expanded in y around 0 75.5%
+-commutative75.5%
associate-*r/75.5%
associate-/r*85.1%
Simplified85.1%
if -3.35000000000000008e31 < y < -1.14999999999999998e-36Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.4%
sub-div99.4%
Applied egg-rr99.4%
Taylor expanded in x around 0 99.4%
if -1.14999999999999998e-36 < y < 1.20000000000000011e-41Initial program 91.3%
Simplified90.8%
Taylor expanded in t around inf 89.4%
associate-*r/89.4%
*-commutative89.4%
associate-/r*95.0%
associate-*r/95.1%
Simplified95.1%
if 1.20000000000000011e-41 < y Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 91.7%
Final simplification94.4%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z 3.0) -1e+45) (not (<= (* z 3.0) 2e-45))) (+ x (* y (/ -0.3333333333333333 z))) (* -0.3333333333333333 (/ (- y (/ t y)) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -1e+45) || !((z * 3.0) <= 2e-45)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = -0.3333333333333333 * ((y - (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 (((z * 3.0d0) <= (-1d+45)) .or. (.not. ((z * 3.0d0) <= 2d-45))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -1e+45) || !((z * 3.0) <= 2e-45)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * 3.0) <= -1e+45) or not ((z * 3.0) <= 2e-45): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = -0.3333333333333333 * ((y - (t / y)) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * 3.0) <= -1e+45) || !(Float64(z * 3.0) <= 2e-45)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * 3.0) <= -1e+45) || ~(((z * 3.0) <= 2e-45))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = -0.3333333333333333 * ((y - (t / y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * 3.0), $MachinePrecision], -1e+45], N[Not[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-45]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{+45} \lor \neg \left(z \cdot 3 \leq 2 \cdot 10^{-45}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\end{array}
\end{array}
if (*.f64 z 3) < -9.9999999999999993e44 or 1.99999999999999997e-45 < (*.f64 z 3) Initial program 99.0%
Simplified91.9%
Taylor expanded in t around 0 77.4%
*-commutative77.4%
associate-*l/77.5%
associate-*r/77.5%
Simplified77.5%
if -9.9999999999999993e44 < (*.f64 z 3) < 1.99999999999999997e-45Initial program 92.5%
associate-*l*92.5%
*-commutative92.5%
Simplified92.5%
*-commutative92.5%
associate-*l*92.5%
associate-+l-92.5%
*-commutative92.5%
associate-/r*99.1%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 93.0%
Final simplification85.7%
(FPCore (x y z t) :precision binary64 (if (<= t 1e-71) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ (- x (/ y (* z 3.0))) (/ t (* z (* y 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1e-71) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 1d-71) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = (x - (y / (z * 3.0d0))) + (t / (z * (y * 3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1e-71) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 1e-71: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 1e-71) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(z * Float64(y * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 1e-71) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 1e-71], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 10^{-71}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(y \cdot 3\right)}\\
\end{array}
\end{array}
if t < 9.9999999999999992e-72Initial program 94.1%
associate-*l*94.1%
*-commutative94.1%
Simplified94.1%
*-commutative94.1%
associate-*l*94.1%
associate-+l-94.1%
*-commutative94.1%
associate-/r*98.1%
sub-div98.1%
Applied egg-rr98.1%
if 9.9999999999999992e-72 < t Initial program 98.5%
associate-*l*98.5%
*-commutative98.5%
Simplified98.5%
Final simplification98.2%
(FPCore (x y z t) :precision binary64 (if (<= t 4.6e-69) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ (/ t (* y (* z 3.0))) (- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 4.6e-69) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (t / (y * (z * 3.0))) + (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 (t <= 4.6d-69) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = (t / (y * (z * 3.0d0))) + (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 (t <= 4.6e-69) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 4.6e-69: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 4.6e-69) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(Float64(t / Float64(y * Float64(z * 3.0))) + Float64(x - Float64(y / Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 4.6e-69) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 4.6e-69], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.6 \cdot 10^{-69}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{y \cdot \left(z \cdot 3\right)} + \left(x - \frac{y}{z \cdot 3}\right)\\
\end{array}
\end{array}
if t < 4.6000000000000001e-69Initial program 94.1%
associate-*l*94.1%
*-commutative94.1%
Simplified94.1%
*-commutative94.1%
associate-*l*94.1%
associate-+l-94.1%
*-commutative94.1%
associate-/r*98.1%
sub-div98.1%
Applied egg-rr98.1%
if 4.6000000000000001e-69 < t Initial program 98.5%
Final simplification98.3%
(FPCore (x y z t) :precision binary64 (if (<= t 1.02e-66) (- (+ (/ (/ t z) (* y 3.0)) x) (* y (/ 0.3333333333333333 z))) (+ (/ t (* y (* z 3.0))) (- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.02e-66) {
tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z));
} else {
tmp = (t / (y * (z * 3.0))) + (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 (t <= 1.02d-66) then
tmp = (((t / z) / (y * 3.0d0)) + x) - (y * (0.3333333333333333d0 / z))
else
tmp = (t / (y * (z * 3.0d0))) + (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 (t <= 1.02e-66) {
tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z));
} else {
tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 1.02e-66: tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z)) else: tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 1.02e-66) tmp = Float64(Float64(Float64(Float64(t / z) / Float64(y * 3.0)) + x) - Float64(y * Float64(0.3333333333333333 / z))); else tmp = Float64(Float64(t / Float64(y * Float64(z * 3.0))) + Float64(x - Float64(y / Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 1.02e-66) tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z)); else tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 1.02e-66], N[(N[(N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.02 \cdot 10^{-66}:\\
\;\;\;\;\left(\frac{\frac{t}{z}}{y \cdot 3} + x\right) - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{y \cdot \left(z \cdot 3\right)} + \left(x - \frac{y}{z \cdot 3}\right)\\
\end{array}
\end{array}
if t < 1.01999999999999996e-66Initial program 94.1%
associate-*l*94.1%
*-commutative94.1%
Simplified94.1%
+-commutative94.1%
*-commutative94.1%
associate-*l*94.1%
associate-+r-94.1%
associate-*l*94.1%
*-commutative94.1%
associate-/r*98.2%
div-inv98.2%
metadata-eval98.2%
div-inv98.2%
clear-num98.2%
Applied egg-rr98.2%
if 1.01999999999999996e-66 < t Initial program 98.5%
Final simplification98.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ -0.3333333333333333 z))))
(if (<= y -3.3e-12)
t_1
(if (<= y 8e-58)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 1.7e-13)
x
(if (<= y 3.9e+43)
t_1
(if (<= y 4e+101) x (/ (* y -0.3333333333333333) z))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (-0.3333333333333333 / z);
double tmp;
if (y <= -3.3e-12) {
tmp = t_1;
} else if (y <= 8e-58) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.7e-13) {
tmp = x;
} else if (y <= 3.9e+43) {
tmp = t_1;
} else if (y <= 4e+101) {
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) :: t_1
real(8) :: tmp
t_1 = y * ((-0.3333333333333333d0) / z)
if (y <= (-3.3d-12)) then
tmp = t_1
else if (y <= 8d-58) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 1.7d-13) then
tmp = x
else if (y <= 3.9d+43) then
tmp = t_1
else if (y <= 4d+101) 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 t_1 = y * (-0.3333333333333333 / z);
double tmp;
if (y <= -3.3e-12) {
tmp = t_1;
} else if (y <= 8e-58) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.7e-13) {
tmp = x;
} else if (y <= 3.9e+43) {
tmp = t_1;
} else if (y <= 4e+101) {
tmp = x;
} else {
tmp = (y * -0.3333333333333333) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (-0.3333333333333333 / z) tmp = 0 if y <= -3.3e-12: tmp = t_1 elif y <= 8e-58: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 1.7e-13: tmp = x elif y <= 3.9e+43: tmp = t_1 elif y <= 4e+101: tmp = x else: tmp = (y * -0.3333333333333333) / z return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-0.3333333333333333 / z)) tmp = 0.0 if (y <= -3.3e-12) tmp = t_1; elseif (y <= 8e-58) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 1.7e-13) tmp = x; elseif (y <= 3.9e+43) tmp = t_1; elseif (y <= 4e+101) tmp = x; else tmp = Float64(Float64(y * -0.3333333333333333) / z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (-0.3333333333333333 / z); tmp = 0.0; if (y <= -3.3e-12) tmp = t_1; elseif (y <= 8e-58) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 1.7e-13) tmp = x; elseif (y <= 3.9e+43) tmp = t_1; elseif (y <= 4e+101) tmp = x; else tmp = (y * -0.3333333333333333) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.3e-12], t$95$1, If[LessEqual[y, 8e-58], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-13], x, If[LessEqual[y, 3.9e+43], t$95$1, If[LessEqual[y, 4e+101], x, N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -3.3 \cdot 10^{-12}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-58}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-13}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+101}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.3000000000000001e-12 or 1.70000000000000008e-13 < y < 3.9000000000000001e43Initial program 97.5%
associate-*l*97.4%
*-commutative97.4%
Simplified97.4%
*-commutative97.4%
associate-*l*97.5%
associate-+l-97.5%
*-commutative97.5%
associate-/r*98.6%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 79.8%
associate-*r/79.8%
Applied egg-rr79.8%
Taylor expanded in y around inf 65.4%
associate-*r/65.5%
*-commutative65.5%
associate-*r/65.6%
Simplified65.6%
if -3.3000000000000001e-12 < y < 8.0000000000000002e-58Initial program 91.0%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
*-commutative91.0%
associate-*l*91.0%
associate-+l-91.0%
*-commutative91.0%
associate-/r*90.5%
sub-div90.5%
Applied egg-rr90.5%
Taylor expanded in x around 0 69.2%
associate-*r/69.2%
Applied egg-rr69.2%
Taylor expanded in y around 0 70.7%
if 8.0000000000000002e-58 < y < 1.70000000000000008e-13 or 3.9000000000000001e43 < y < 3.9999999999999999e101Initial program 99.9%
Simplified99.8%
Taylor expanded in x around inf 62.8%
if 3.9999999999999999e101 < y Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 74.0%
associate-*r/74.0%
Applied egg-rr74.0%
Taylor expanded in y around inf 74.1%
*-commutative74.1%
Simplified74.1%
Final simplification69.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.5e-12) (not (<= y 3.7e-42))) (- x (/ y (* z 3.0))) (+ x (* 0.3333333333333333 (/ t (* z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.5e-12) || !(y <= 3.7e-42)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.5d-12)) .or. (.not. (y <= 3.7d-42))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.5e-12) || !(y <= 3.7e-42)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.5e-12) or not (y <= 3.7e-42): tmp = x - (y / (z * 3.0)) else: tmp = x + (0.3333333333333333 * (t / (z * y))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.5e-12) || !(y <= 3.7e-42)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.5e-12) || ~((y <= 3.7e-42))) tmp = x - (y / (z * 3.0)); else tmp = x + (0.3333333333333333 * (t / (z * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.5e-12], N[Not[LessEqual[y, 3.7e-42]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-12} \lor \neg \left(y \leq 3.7 \cdot 10^{-42}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -2.49999999999999985e-12 or 3.7000000000000002e-42 < y Initial program 98.5%
associate-*l*98.5%
*-commutative98.5%
Simplified98.5%
*-commutative98.5%
associate-*l*98.5%
associate-+l-98.5%
*-commutative98.5%
associate-/r*99.1%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 89.3%
if -2.49999999999999985e-12 < y < 3.7000000000000002e-42Initial program 91.4%
Simplified90.9%
Taylor expanded in t around inf 89.6%
Final simplification89.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.35e-15) (not (<= y 1.06e-58))) (- x (/ y (* z 3.0))) (* -0.3333333333333333 (/ (/ (- t) z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.35e-15) || !(y <= 1.06e-58)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = -0.3333333333333333 * ((-t / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.35d-15)) .or. (.not. (y <= 1.06d-58))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = (-0.3333333333333333d0) * ((-t / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.35e-15) || !(y <= 1.06e-58)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = -0.3333333333333333 * ((-t / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.35e-15) or not (y <= 1.06e-58): tmp = x - (y / (z * 3.0)) else: tmp = -0.3333333333333333 * ((-t / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.35e-15) || !(y <= 1.06e-58)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(-0.3333333333333333 * Float64(Float64(Float64(-t) / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.35e-15) || ~((y <= 1.06e-58))) tmp = x - (y / (z * 3.0)); else tmp = -0.3333333333333333 * ((-t / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.35e-15], N[Not[LessEqual[y, 1.06e-58]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(N[((-t) / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{-15} \lor \neg \left(y \leq 1.06 \cdot 10^{-58}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{\frac{-t}{z}}{y}\\
\end{array}
\end{array}
if y < -1.35000000000000005e-15 or 1.0600000000000001e-58 < y Initial program 98.5%
associate-*l*98.5%
*-commutative98.5%
Simplified98.5%
*-commutative98.5%
associate-*l*98.5%
associate-+l-98.5%
*-commutative98.5%
associate-/r*99.1%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 88.9%
if -1.35000000000000005e-15 < y < 1.0600000000000001e-58Initial program 91.0%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
*-commutative91.0%
associate-*l*91.0%
associate-+l-91.0%
*-commutative91.0%
associate-/r*90.5%
sub-div90.5%
Applied egg-rr90.5%
Taylor expanded in x around 0 69.2%
Taylor expanded in y around 0 70.7%
mul-1-neg70.7%
distribute-neg-frac70.7%
Simplified70.7%
Taylor expanded in t around 0 70.7%
associate-*r/70.7%
*-commutative70.7%
associate-/r*74.5%
mul-1-neg74.5%
Simplified74.5%
Final simplification83.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -7e-19) (not (<= y 8.2e-58))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7e-19) || !(y <= 8.2e-58)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-7d-19)) .or. (.not. (y <= 8.2d-58))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * (t / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7e-19) || !(y <= 8.2e-58)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -7e-19) or not (y <= 8.2e-58): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * (t / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -7e-19) || !(y <= 8.2e-58)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -7e-19) || ~((y <= 8.2e-58))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * (t / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -7e-19], N[Not[LessEqual[y, 8.2e-58]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-19} \lor \neg \left(y \leq 8.2 \cdot 10^{-58}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -7.00000000000000031e-19 or 8.20000000000000056e-58 < y Initial program 98.5%
Simplified99.7%
Taylor expanded in t around 0 88.8%
*-commutative88.8%
associate-*l/88.9%
associate-*r/88.9%
Simplified88.9%
if -7.00000000000000031e-19 < y < 8.20000000000000056e-58Initial program 91.0%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
*-commutative91.0%
associate-*l*91.0%
associate-+l-91.0%
*-commutative91.0%
associate-/r*90.5%
sub-div90.5%
Applied egg-rr90.5%
Taylor expanded in x around 0 69.2%
associate-*r/69.2%
Applied egg-rr69.2%
Taylor expanded in y around 0 70.7%
Final simplification81.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.2e-17) (not (<= y 8.2e-58))) (- x (/ y (* z 3.0))) (* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.2e-17) || !(y <= 8.2e-58)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.2d-17)) .or. (.not. (y <= 8.2d-58))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = 0.3333333333333333d0 * (t / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.2e-17) || !(y <= 8.2e-58)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.2e-17) or not (y <= 8.2e-58): tmp = x - (y / (z * 3.0)) else: tmp = 0.3333333333333333 * (t / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.2e-17) || !(y <= 8.2e-58)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.2e-17) || ~((y <= 8.2e-58))) tmp = x - (y / (z * 3.0)); else tmp = 0.3333333333333333 * (t / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.2e-17], N[Not[LessEqual[y, 8.2e-58]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{-17} \lor \neg \left(y \leq 8.2 \cdot 10^{-58}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -2.2e-17 or 8.20000000000000056e-58 < y Initial program 98.5%
associate-*l*98.5%
*-commutative98.5%
Simplified98.5%
*-commutative98.5%
associate-*l*98.5%
associate-+l-98.5%
*-commutative98.5%
associate-/r*99.1%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 88.9%
if -2.2e-17 < y < 8.20000000000000056e-58Initial program 91.0%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
*-commutative91.0%
associate-*l*91.0%
associate-+l-91.0%
*-commutative91.0%
associate-/r*90.5%
sub-div90.5%
Applied egg-rr90.5%
Taylor expanded in x around 0 69.2%
associate-*r/69.2%
Applied egg-rr69.2%
Taylor expanded in y around 0 70.7%
Final simplification81.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.05e-17) (not (<= y 7e-58))) (- x (/ y (* z 3.0))) (/ (/ 0.3333333333333333 y) (/ z t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.05e-17) || !(y <= 7e-58)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = (0.3333333333333333 / y) / (z / 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 <= (-1.05d-17)) .or. (.not. (y <= 7d-58))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = (0.3333333333333333d0 / y) / (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.05e-17) || !(y <= 7e-58)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = (0.3333333333333333 / y) / (z / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.05e-17) or not (y <= 7e-58): tmp = x - (y / (z * 3.0)) else: tmp = (0.3333333333333333 / y) / (z / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.05e-17) || !(y <= 7e-58)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(Float64(0.3333333333333333 / y) / Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.05e-17) || ~((y <= 7e-58))) tmp = x - (y / (z * 3.0)); else tmp = (0.3333333333333333 / y) / (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.05e-17], N[Not[LessEqual[y, 7e-58]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 / y), $MachinePrecision] / N[(z / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-17} \lor \neg \left(y \leq 7 \cdot 10^{-58}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{0.3333333333333333}{y}}{\frac{z}{t}}\\
\end{array}
\end{array}
if y < -1.04999999999999996e-17 or 6.9999999999999998e-58 < y Initial program 98.5%
associate-*l*98.5%
*-commutative98.5%
Simplified98.5%
*-commutative98.5%
associate-*l*98.5%
associate-+l-98.5%
*-commutative98.5%
associate-/r*99.1%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 88.9%
if -1.04999999999999996e-17 < y < 6.9999999999999998e-58Initial program 91.0%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
*-commutative91.0%
associate-*l*91.0%
associate-+l-91.0%
*-commutative91.0%
associate-/r*90.5%
sub-div90.5%
Applied egg-rr90.5%
Taylor expanded in x around 0 69.2%
Taylor expanded in y around 0 70.7%
mul-1-neg70.7%
distribute-neg-frac70.7%
Simplified70.7%
associate-*r/70.7%
clear-num70.7%
neg-mul-170.7%
associate-*r*70.7%
metadata-eval70.7%
associate-/l/70.7%
associate-*r/74.4%
clear-num74.5%
associate-/r*74.5%
Applied egg-rr74.5%
Final simplification83.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6e-21) (not (<= y 3.05e-58))) (- x (/ y (* z 3.0))) (/ (/ 0.3333333333333333 (/ z t)) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6e-21) || !(y <= 3.05e-58)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = (0.3333333333333333 / (z / 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 ((y <= (-6d-21)) .or. (.not. (y <= 3.05d-58))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = (0.3333333333333333d0 / (z / t)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6e-21) || !(y <= 3.05e-58)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = (0.3333333333333333 / (z / t)) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6e-21) or not (y <= 3.05e-58): tmp = x - (y / (z * 3.0)) else: tmp = (0.3333333333333333 / (z / t)) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6e-21) || !(y <= 3.05e-58)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(Float64(0.3333333333333333 / Float64(z / t)) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6e-21) || ~((y <= 3.05e-58))) tmp = x - (y / (z * 3.0)); else tmp = (0.3333333333333333 / (z / t)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6e-21], N[Not[LessEqual[y, 3.05e-58]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 / N[(z / t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-21} \lor \neg \left(y \leq 3.05 \cdot 10^{-58}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{0.3333333333333333}{\frac{z}{t}}}{y}\\
\end{array}
\end{array}
if y < -5.99999999999999982e-21 or 3.0500000000000002e-58 < y Initial program 98.5%
associate-*l*98.5%
*-commutative98.5%
Simplified98.5%
*-commutative98.5%
associate-*l*98.5%
associate-+l-98.5%
*-commutative98.5%
associate-/r*99.1%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 88.9%
if -5.99999999999999982e-21 < y < 3.0500000000000002e-58Initial program 91.0%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
*-commutative91.0%
associate-*l*91.0%
associate-+l-91.0%
*-commutative91.0%
associate-/r*90.5%
sub-div90.5%
Applied egg-rr90.5%
Taylor expanded in x around 0 69.2%
Taylor expanded in y around 0 70.7%
mul-1-neg70.7%
distribute-neg-frac70.7%
Simplified70.7%
associate-*r/70.7%
clear-num70.7%
neg-mul-170.7%
associate-*r*70.7%
metadata-eval70.7%
associate-/l/70.7%
associate-*r/74.4%
clear-num74.5%
*-commutative74.5%
associate-/r*74.5%
Applied egg-rr74.5%
Final simplification83.2%
(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 95.5%
Simplified96.1%
Final simplification96.1%
(FPCore (x y z t) :precision binary64 (+ x (/ (- (/ t y) y) (* z 3.0))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((t / y) - y) / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
def code(x, y, z, t): return x + (((t / y) - y) / (z * 3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Initial program 95.5%
associate-*l*95.5%
*-commutative95.5%
Simplified95.5%
*-commutative95.5%
associate-*l*95.5%
associate-+l-95.5%
*-commutative95.5%
associate-/r*95.7%
sub-div96.1%
Applied egg-rr96.1%
Final simplification96.1%
(FPCore (x y z t) :precision binary64 (if (<= x -1.6e+80) x (if (<= x 1.22e+55) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.6e+80) {
tmp = x;
} else if (x <= 1.22e+55) {
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 (x <= (-1.6d+80)) then
tmp = x
else if (x <= 1.22d+55) 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 (x <= -1.6e+80) {
tmp = x;
} else if (x <= 1.22e+55) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.6e+80: tmp = x elif x <= 1.22e+55: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.6e+80) tmp = x; elseif (x <= 1.22e+55) 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 (x <= -1.6e+80) tmp = x; elseif (x <= 1.22e+55) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.6e+80], x, If[LessEqual[x, 1.22e+55], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.6 \cdot 10^{+80}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.22 \cdot 10^{+55}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.59999999999999995e80 or 1.22e55 < x Initial program 94.5%
Simplified96.8%
Taylor expanded in x around inf 54.2%
if -1.59999999999999995e80 < x < 1.22e55Initial program 96.1%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
*-commutative96.1%
associate-*l*96.1%
associate-+l-96.1%
*-commutative96.1%
associate-/r*95.7%
sub-div95.7%
Applied egg-rr95.7%
Taylor expanded in x around 0 84.6%
Taylor expanded in y around inf 50.9%
Final simplification52.1%
(FPCore (x y z t) :precision binary64 (if (<= x -1.7e+80) x (if (<= x 1.25e+58) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.7e+80) {
tmp = x;
} else if (x <= 1.25e+58) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-1.7d+80)) then
tmp = x
else if (x <= 1.25d+58) then
tmp = y * ((-0.3333333333333333d0) / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.7e+80) {
tmp = x;
} else if (x <= 1.25e+58) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.7e+80: tmp = x elif x <= 1.25e+58: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.7e+80) tmp = x; elseif (x <= 1.25e+58) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.7e+80) tmp = x; elseif (x <= 1.25e+58) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.7e+80], x, If[LessEqual[x, 1.25e+58], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+80}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{+58}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.69999999999999996e80 or 1.24999999999999996e58 < x Initial program 94.5%
Simplified96.8%
Taylor expanded in x around inf 54.2%
if -1.69999999999999996e80 < x < 1.24999999999999996e58Initial program 96.1%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
*-commutative96.1%
associate-*l*96.1%
associate-+l-96.1%
*-commutative96.1%
associate-/r*95.7%
sub-div95.7%
Applied egg-rr95.7%
Taylor expanded in x around 0 84.6%
associate-*r/84.7%
Applied egg-rr84.7%
Taylor expanded in y around inf 50.9%
associate-*r/51.0%
*-commutative51.0%
associate-*r/51.0%
Simplified51.0%
Final simplification52.1%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.5%
Simplified96.1%
Taylor expanded in x around inf 27.4%
Final simplification27.4%
(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 2023332
(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))))