
(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 (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / (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))) + (t / (y * (z * 3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}
\end{array}
Initial program 98.7%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.85e+15)
(- x (* y (/ 0.3333333333333333 z)))
(if (<= y -1.12e-13)
(* (/ t (* y z)) 0.3333333333333333)
(if (or (<= y -3e-53) (not (<= y 1e-158)))
(- x (* (/ y z) 0.3333333333333333))
(* (/ t z) (/ 0.3333333333333333 y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+15) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -1.12e-13) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else if ((y <= -3e-53) || !(y <= 1e-158)) {
tmp = x - ((y / z) * 0.3333333333333333);
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.85d+15)) then
tmp = x - (y * (0.3333333333333333d0 / z))
else if (y <= (-1.12d-13)) then
tmp = (t / (y * z)) * 0.3333333333333333d0
else if ((y <= (-3d-53)) .or. (.not. (y <= 1d-158))) then
tmp = x - ((y / z) * 0.3333333333333333d0)
else
tmp = (t / z) * (0.3333333333333333d0 / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+15) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -1.12e-13) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else if ((y <= -3e-53) || !(y <= 1e-158)) {
tmp = x - ((y / z) * 0.3333333333333333);
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.85e+15: tmp = x - (y * (0.3333333333333333 / z)) elif y <= -1.12e-13: tmp = (t / (y * z)) * 0.3333333333333333 elif (y <= -3e-53) or not (y <= 1e-158): tmp = x - ((y / z) * 0.3333333333333333) else: tmp = (t / z) * (0.3333333333333333 / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.85e+15) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= -1.12e-13) tmp = Float64(Float64(t / Float64(y * z)) * 0.3333333333333333); elseif ((y <= -3e-53) || !(y <= 1e-158)) tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); else tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.85e+15) tmp = x - (y * (0.3333333333333333 / z)); elseif (y <= -1.12e-13) tmp = (t / (y * z)) * 0.3333333333333333; elseif ((y <= -3e-53) || ~((y <= 1e-158))) tmp = x - ((y / z) * 0.3333333333333333); else tmp = (t / z) * (0.3333333333333333 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.85e+15], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.12e-13], N[(N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], If[Or[LessEqual[y, -3e-53], N[Not[LessEqual[y, 1e-158]], $MachinePrecision]], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -1.12 \cdot 10^{-13}:\\
\;\;\;\;\frac{t}{y \cdot z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-53} \lor \neg \left(y \leq 10^{-158}\right):\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -1.85e15Initial program 99.7%
Taylor expanded in t around 0 92.4%
associate-*r/92.5%
associate-*l/92.5%
clear-num92.5%
associate-*l/92.5%
*-un-lft-identity92.5%
div-inv92.5%
metadata-eval92.5%
Applied egg-rr92.5%
*-lft-identity92.5%
associate-*l/92.5%
*-commutative92.5%
associate-/r*92.5%
metadata-eval92.5%
*-commutative92.5%
Simplified92.5%
if -1.85e15 < y < -1.12e-13Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*99.8%
*-commutative99.8%
Simplified99.5%
Taylor expanded in t around inf 81.2%
Taylor expanded in x around 0 71.7%
if -1.12e-13 < y < -3.0000000000000002e-53 or 1.00000000000000006e-158 < y Initial program 99.8%
Taylor expanded in t around 0 88.6%
if -3.0000000000000002e-53 < y < 1.00000000000000006e-158Initial program 96.4%
sub-neg96.4%
associate-+l+96.4%
+-commutative96.4%
remove-double-neg96.4%
distribute-frac-neg96.4%
distribute-neg-in96.4%
remove-double-neg96.4%
sub-neg96.4%
neg-mul-196.4%
times-frac90.7%
distribute-frac-neg90.7%
neg-mul-190.7%
*-commutative90.7%
associate-/l*90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in t around inf 94.6%
Taylor expanded in x around 0 72.5%
associate-*r/72.5%
times-frac74.3%
*-commutative74.3%
Simplified74.3%
Final simplification84.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* (/ y z) 0.3333333333333333))))
(if (<= y -1.85e+15)
t_1
(if (<= y -4.2e-14)
(* (/ t (* y z)) 0.3333333333333333)
(if (or (<= y -3.1e-53) (not (<= y 2.2e-156)))
t_1
(* (/ t z) (/ 0.3333333333333333 y)))))))
double code(double x, double y, double z, double t) {
double t_1 = x - ((y / z) * 0.3333333333333333);
double tmp;
if (y <= -1.85e+15) {
tmp = t_1;
} else if (y <= -4.2e-14) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else if ((y <= -3.1e-53) || !(y <= 2.2e-156)) {
tmp = t_1;
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x - ((y / z) * 0.3333333333333333d0)
if (y <= (-1.85d+15)) then
tmp = t_1
else if (y <= (-4.2d-14)) then
tmp = (t / (y * z)) * 0.3333333333333333d0
else if ((y <= (-3.1d-53)) .or. (.not. (y <= 2.2d-156))) then
tmp = t_1
else
tmp = (t / z) * (0.3333333333333333d0 / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x - ((y / z) * 0.3333333333333333);
double tmp;
if (y <= -1.85e+15) {
tmp = t_1;
} else if (y <= -4.2e-14) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else if ((y <= -3.1e-53) || !(y <= 2.2e-156)) {
tmp = t_1;
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
def code(x, y, z, t): t_1 = x - ((y / z) * 0.3333333333333333) tmp = 0 if y <= -1.85e+15: tmp = t_1 elif y <= -4.2e-14: tmp = (t / (y * z)) * 0.3333333333333333 elif (y <= -3.1e-53) or not (y <= 2.2e-156): tmp = t_1 else: tmp = (t / z) * (0.3333333333333333 / y) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)) tmp = 0.0 if (y <= -1.85e+15) tmp = t_1; elseif (y <= -4.2e-14) tmp = Float64(Float64(t / Float64(y * z)) * 0.3333333333333333); elseif ((y <= -3.1e-53) || !(y <= 2.2e-156)) tmp = t_1; else tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - ((y / z) * 0.3333333333333333); tmp = 0.0; if (y <= -1.85e+15) tmp = t_1; elseif (y <= -4.2e-14) tmp = (t / (y * z)) * 0.3333333333333333; elseif ((y <= -3.1e-53) || ~((y <= 2.2e-156))) tmp = t_1; else tmp = (t / z) * (0.3333333333333333 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.85e+15], t$95$1, If[LessEqual[y, -4.2e-14], N[(N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], If[Or[LessEqual[y, -3.1e-53], N[Not[LessEqual[y, 2.2e-156]], $MachinePrecision]], t$95$1, N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-14}:\\
\;\;\;\;\frac{t}{y \cdot z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-53} \lor \neg \left(y \leq 2.2 \cdot 10^{-156}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -1.85e15 or -4.1999999999999998e-14 < y < -3.10000000000000015e-53 or 2.1999999999999999e-156 < y Initial program 99.8%
Taylor expanded in t around 0 90.1%
if -1.85e15 < y < -4.1999999999999998e-14Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*99.8%
*-commutative99.8%
Simplified99.5%
Taylor expanded in t around inf 81.2%
Taylor expanded in x around 0 71.7%
if -3.10000000000000015e-53 < y < 2.1999999999999999e-156Initial program 96.4%
sub-neg96.4%
associate-+l+96.4%
+-commutative96.4%
remove-double-neg96.4%
distribute-frac-neg96.4%
distribute-neg-in96.4%
remove-double-neg96.4%
sub-neg96.4%
neg-mul-196.4%
times-frac90.7%
distribute-frac-neg90.7%
neg-mul-190.7%
*-commutative90.7%
associate-/l*90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in t around inf 94.6%
Taylor expanded in x around 0 72.5%
associate-*r/72.5%
times-frac74.3%
*-commutative74.3%
Simplified74.3%
Final simplification84.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.85e+15)
(- x (* y (/ 0.3333333333333333 z)))
(if (<= y -1.62e-15)
(/ (/ t (* y z)) 3.0)
(if (<= y -4.1e-53)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 9.2e-156)
(/ (* 0.3333333333333333 (/ t z)) y)
(- x (/ (/ y z) 3.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+15) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -1.62e-15) {
tmp = (t / (y * z)) / 3.0;
} else if (y <= -4.1e-53) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 9.2e-156) {
tmp = (0.3333333333333333 * (t / z)) / y;
} else {
tmp = x - ((y / z) / 3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.85d+15)) then
tmp = x - (y * (0.3333333333333333d0 / z))
else if (y <= (-1.62d-15)) then
tmp = (t / (y * z)) / 3.0d0
else if (y <= (-4.1d-53)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 9.2d-156) then
tmp = (0.3333333333333333d0 * (t / z)) / y
else
tmp = x - ((y / z) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+15) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -1.62e-15) {
tmp = (t / (y * z)) / 3.0;
} else if (y <= -4.1e-53) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 9.2e-156) {
tmp = (0.3333333333333333 * (t / z)) / y;
} else {
tmp = x - ((y / z) / 3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.85e+15: tmp = x - (y * (0.3333333333333333 / z)) elif y <= -1.62e-15: tmp = (t / (y * z)) / 3.0 elif y <= -4.1e-53: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 9.2e-156: tmp = (0.3333333333333333 * (t / z)) / y else: tmp = x - ((y / z) / 3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.85e+15) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= -1.62e-15) tmp = Float64(Float64(t / Float64(y * z)) / 3.0); elseif (y <= -4.1e-53) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 9.2e-156) tmp = Float64(Float64(0.3333333333333333 * Float64(t / z)) / y); else tmp = Float64(x - Float64(Float64(y / z) / 3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.85e+15) tmp = x - (y * (0.3333333333333333 / z)); elseif (y <= -1.62e-15) tmp = (t / (y * z)) / 3.0; elseif (y <= -4.1e-53) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 9.2e-156) tmp = (0.3333333333333333 * (t / z)) / y; else tmp = x - ((y / z) / 3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.85e+15], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.62e-15], N[(N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[y, -4.1e-53], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.2e-156], N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -1.62 \cdot 10^{-15}:\\
\;\;\;\;\frac{\frac{t}{y \cdot z}}{3}\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{-53}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{-156}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\frac{y}{z}}{3}\\
\end{array}
\end{array}
if y < -1.85e15Initial program 99.7%
Taylor expanded in t around 0 92.4%
associate-*r/92.5%
associate-*l/92.5%
clear-num92.5%
associate-*l/92.5%
*-un-lft-identity92.5%
div-inv92.5%
metadata-eval92.5%
Applied egg-rr92.5%
*-lft-identity92.5%
associate-*l/92.5%
*-commutative92.5%
associate-/r*92.5%
metadata-eval92.5%
*-commutative92.5%
Simplified92.5%
if -1.85e15 < y < -1.62000000000000009e-15Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*99.8%
*-commutative99.8%
Simplified99.5%
Taylor expanded in t around inf 81.2%
Taylor expanded in x around 0 71.7%
associate-/r*71.5%
Simplified71.5%
associate-/r*71.7%
*-commutative71.7%
metadata-eval71.7%
div-inv71.8%
Applied egg-rr71.8%
if -1.62000000000000009e-15 < y < -4.1000000000000001e-53Initial program 99.8%
Taylor expanded in t around 0 76.5%
*-commutative76.5%
associate-*l/76.7%
Applied egg-rr76.7%
if -4.1000000000000001e-53 < y < 9.1999999999999998e-156Initial program 96.4%
sub-neg96.4%
associate-+l+96.4%
+-commutative96.4%
remove-double-neg96.4%
distribute-frac-neg96.4%
distribute-neg-in96.4%
remove-double-neg96.4%
sub-neg96.4%
neg-mul-196.4%
times-frac90.7%
distribute-frac-neg90.7%
neg-mul-190.7%
*-commutative90.7%
associate-/l*90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in y around 0 95.3%
Taylor expanded in t around inf 74.3%
if 9.1999999999999998e-156 < y Initial program 99.8%
Taylor expanded in t around 0 89.5%
associate-*r/89.4%
associate-*l/89.5%
add-sqr-sqrt89.4%
clear-num89.4%
sqrt-unprod56.9%
sqr-neg56.9%
sqrt-unprod0.0%
add-sqr-sqrt36.4%
associate-*l/36.4%
div-inv36.4%
metadata-eval36.4%
*-un-lft-identity36.4%
associate-/r*36.4%
add-sqr-sqrt0.0%
sqrt-unprod57.0%
sqr-neg57.0%
sqrt-unprod89.5%
add-sqr-sqrt89.6%
Applied egg-rr89.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.85e+15)
(- x (* y (/ 0.3333333333333333 z)))
(if (<= y -9e-14)
(* (/ t (* y z)) 0.3333333333333333)
(if (<= y -4e-52)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 2.05e-156)
(/ (* 0.3333333333333333 (/ t z)) y)
(- x (/ (/ y z) 3.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+15) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -9e-14) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else if (y <= -4e-52) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 2.05e-156) {
tmp = (0.3333333333333333 * (t / z)) / y;
} else {
tmp = x - ((y / z) / 3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.85d+15)) then
tmp = x - (y * (0.3333333333333333d0 / z))
else if (y <= (-9d-14)) then
tmp = (t / (y * z)) * 0.3333333333333333d0
else if (y <= (-4d-52)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 2.05d-156) then
tmp = (0.3333333333333333d0 * (t / z)) / y
else
tmp = x - ((y / z) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+15) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -9e-14) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else if (y <= -4e-52) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 2.05e-156) {
tmp = (0.3333333333333333 * (t / z)) / y;
} else {
tmp = x - ((y / z) / 3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.85e+15: tmp = x - (y * (0.3333333333333333 / z)) elif y <= -9e-14: tmp = (t / (y * z)) * 0.3333333333333333 elif y <= -4e-52: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 2.05e-156: tmp = (0.3333333333333333 * (t / z)) / y else: tmp = x - ((y / z) / 3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.85e+15) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= -9e-14) tmp = Float64(Float64(t / Float64(y * z)) * 0.3333333333333333); elseif (y <= -4e-52) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 2.05e-156) tmp = Float64(Float64(0.3333333333333333 * Float64(t / z)) / y); else tmp = Float64(x - Float64(Float64(y / z) / 3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.85e+15) tmp = x - (y * (0.3333333333333333 / z)); elseif (y <= -9e-14) tmp = (t / (y * z)) * 0.3333333333333333; elseif (y <= -4e-52) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 2.05e-156) tmp = (0.3333333333333333 * (t / z)) / y; else tmp = x - ((y / z) / 3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.85e+15], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9e-14], N[(N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], If[LessEqual[y, -4e-52], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.05e-156], N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-14}:\\
\;\;\;\;\frac{t}{y \cdot z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-52}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-156}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\frac{y}{z}}{3}\\
\end{array}
\end{array}
if y < -1.85e15Initial program 99.7%
Taylor expanded in t around 0 92.4%
associate-*r/92.5%
associate-*l/92.5%
clear-num92.5%
associate-*l/92.5%
*-un-lft-identity92.5%
div-inv92.5%
metadata-eval92.5%
Applied egg-rr92.5%
*-lft-identity92.5%
associate-*l/92.5%
*-commutative92.5%
associate-/r*92.5%
metadata-eval92.5%
*-commutative92.5%
Simplified92.5%
if -1.85e15 < y < -8.9999999999999995e-14Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*99.8%
*-commutative99.8%
Simplified99.5%
Taylor expanded in t around inf 81.2%
Taylor expanded in x around 0 71.7%
if -8.9999999999999995e-14 < y < -4e-52Initial program 99.8%
Taylor expanded in t around 0 76.5%
*-commutative76.5%
associate-*l/76.7%
Applied egg-rr76.7%
if -4e-52 < y < 2.0500000000000001e-156Initial program 96.4%
sub-neg96.4%
associate-+l+96.4%
+-commutative96.4%
remove-double-neg96.4%
distribute-frac-neg96.4%
distribute-neg-in96.4%
remove-double-neg96.4%
sub-neg96.4%
neg-mul-196.4%
times-frac90.7%
distribute-frac-neg90.7%
neg-mul-190.7%
*-commutative90.7%
associate-/l*90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in y around 0 95.3%
Taylor expanded in t around inf 74.3%
if 2.0500000000000001e-156 < y Initial program 99.8%
Taylor expanded in t around 0 89.5%
associate-*r/89.4%
associate-*l/89.5%
add-sqr-sqrt89.4%
clear-num89.4%
sqrt-unprod56.9%
sqr-neg56.9%
sqrt-unprod0.0%
add-sqr-sqrt36.4%
associate-*l/36.4%
div-inv36.4%
metadata-eval36.4%
*-un-lft-identity36.4%
associate-/r*36.4%
add-sqr-sqrt0.0%
sqrt-unprod57.0%
sqr-neg57.0%
sqrt-unprod89.5%
add-sqr-sqrt89.6%
Applied egg-rr89.6%
Final simplification84.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.85e+15)
(- x (* y (/ 0.3333333333333333 z)))
(if (<= y -1.06e-13)
(* (/ t (* y z)) 0.3333333333333333)
(if (<= y -3e-53)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 1.2e-155)
(* (/ t z) (/ 0.3333333333333333 y))
(- x (/ (/ y z) 3.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+15) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -1.06e-13) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else if (y <= -3e-53) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1.2e-155) {
tmp = (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) :: tmp
if (y <= (-1.85d+15)) then
tmp = x - (y * (0.3333333333333333d0 / z))
else if (y <= (-1.06d-13)) then
tmp = (t / (y * z)) * 0.3333333333333333d0
else if (y <= (-3d-53)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 1.2d-155) then
tmp = (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 tmp;
if (y <= -1.85e+15) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -1.06e-13) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else if (y <= -3e-53) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1.2e-155) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x - ((y / z) / 3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.85e+15: tmp = x - (y * (0.3333333333333333 / z)) elif y <= -1.06e-13: tmp = (t / (y * z)) * 0.3333333333333333 elif y <= -3e-53: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 1.2e-155: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = x - ((y / z) / 3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.85e+15) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= -1.06e-13) tmp = Float64(Float64(t / Float64(y * z)) * 0.3333333333333333); elseif (y <= -3e-53) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 1.2e-155) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); else tmp = Float64(x - Float64(Float64(y / z) / 3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.85e+15) tmp = x - (y * (0.3333333333333333 / z)); elseif (y <= -1.06e-13) tmp = (t / (y * z)) * 0.3333333333333333; elseif (y <= -3e-53) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 1.2e-155) tmp = (t / z) * (0.3333333333333333 / y); else tmp = x - ((y / z) / 3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.85e+15], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.06e-13], N[(N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], If[LessEqual[y, -3e-53], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e-155], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -1.06 \cdot 10^{-13}:\\
\;\;\;\;\frac{t}{y \cdot z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-53}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-155}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\frac{y}{z}}{3}\\
\end{array}
\end{array}
if y < -1.85e15Initial program 99.7%
Taylor expanded in t around 0 92.4%
associate-*r/92.5%
associate-*l/92.5%
clear-num92.5%
associate-*l/92.5%
*-un-lft-identity92.5%
div-inv92.5%
metadata-eval92.5%
Applied egg-rr92.5%
*-lft-identity92.5%
associate-*l/92.5%
*-commutative92.5%
associate-/r*92.5%
metadata-eval92.5%
*-commutative92.5%
Simplified92.5%
if -1.85e15 < y < -1.06e-13Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*99.8%
*-commutative99.8%
Simplified99.5%
Taylor expanded in t around inf 81.2%
Taylor expanded in x around 0 71.7%
if -1.06e-13 < y < -3.0000000000000002e-53Initial program 99.8%
Taylor expanded in t around 0 76.5%
*-commutative76.5%
associate-*l/76.7%
Applied egg-rr76.7%
if -3.0000000000000002e-53 < y < 1.2e-155Initial program 96.4%
sub-neg96.4%
associate-+l+96.4%
+-commutative96.4%
remove-double-neg96.4%
distribute-frac-neg96.4%
distribute-neg-in96.4%
remove-double-neg96.4%
sub-neg96.4%
neg-mul-196.4%
times-frac90.7%
distribute-frac-neg90.7%
neg-mul-190.7%
*-commutative90.7%
associate-/l*90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in t around inf 94.6%
Taylor expanded in x around 0 72.5%
associate-*r/72.5%
times-frac74.3%
*-commutative74.3%
Simplified74.3%
if 1.2e-155 < y Initial program 99.8%
Taylor expanded in t around 0 89.5%
associate-*r/89.4%
associate-*l/89.5%
add-sqr-sqrt89.4%
clear-num89.4%
sqrt-unprod56.9%
sqr-neg56.9%
sqrt-unprod0.0%
add-sqr-sqrt36.4%
associate-*l/36.4%
div-inv36.4%
metadata-eval36.4%
*-un-lft-identity36.4%
associate-/r*36.4%
add-sqr-sqrt0.0%
sqrt-unprod57.0%
sqr-neg57.0%
sqrt-unprod89.5%
add-sqr-sqrt89.6%
Applied egg-rr89.6%
Final simplification84.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.85e+15)
(- x (* y (/ 0.3333333333333333 z)))
(if (<= y -1.4e-14)
(* (/ t (* y z)) 0.3333333333333333)
(if (<= y -3.25e-53)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 4.4e-157)
(* (/ t z) (/ 0.3333333333333333 y))
(- x (/ y (* z 3.0))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+15) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -1.4e-14) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else if (y <= -3.25e-53) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 4.4e-157) {
tmp = (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) :: tmp
if (y <= (-1.85d+15)) then
tmp = x - (y * (0.3333333333333333d0 / z))
else if (y <= (-1.4d-14)) then
tmp = (t / (y * z)) * 0.3333333333333333d0
else if (y <= (-3.25d-53)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 4.4d-157) then
tmp = (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 tmp;
if (y <= -1.85e+15) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -1.4e-14) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else if (y <= -3.25e-53) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 4.4e-157) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.85e+15: tmp = x - (y * (0.3333333333333333 / z)) elif y <= -1.4e-14: tmp = (t / (y * z)) * 0.3333333333333333 elif y <= -3.25e-53: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 4.4e-157: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.85e+15) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= -1.4e-14) tmp = Float64(Float64(t / Float64(y * z)) * 0.3333333333333333); elseif (y <= -3.25e-53) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 4.4e-157) tmp = Float64(Float64(t / z) * Float64(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) tmp = 0.0; if (y <= -1.85e+15) tmp = x - (y * (0.3333333333333333 / z)); elseif (y <= -1.4e-14) tmp = (t / (y * z)) * 0.3333333333333333; elseif (y <= -3.25e-53) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 4.4e-157) tmp = (t / z) * (0.3333333333333333 / y); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.85e+15], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.4e-14], N[(N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], If[LessEqual[y, -3.25e-53], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e-157], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-14}:\\
\;\;\;\;\frac{t}{y \cdot z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq -3.25 \cdot 10^{-53}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-157}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -1.85e15Initial program 99.7%
Taylor expanded in t around 0 92.4%
associate-*r/92.5%
associate-*l/92.5%
clear-num92.5%
associate-*l/92.5%
*-un-lft-identity92.5%
div-inv92.5%
metadata-eval92.5%
Applied egg-rr92.5%
*-lft-identity92.5%
associate-*l/92.5%
*-commutative92.5%
associate-/r*92.5%
metadata-eval92.5%
*-commutative92.5%
Simplified92.5%
if -1.85e15 < y < -1.4e-14Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*99.8%
*-commutative99.8%
Simplified99.5%
Taylor expanded in t around inf 81.2%
Taylor expanded in x around 0 71.7%
if -1.4e-14 < y < -3.2499999999999998e-53Initial program 99.8%
Taylor expanded in t around 0 76.5%
*-commutative76.5%
associate-*l/76.7%
Applied egg-rr76.7%
if -3.2499999999999998e-53 < y < 4.4000000000000002e-157Initial program 96.4%
sub-neg96.4%
associate-+l+96.4%
+-commutative96.4%
remove-double-neg96.4%
distribute-frac-neg96.4%
distribute-neg-in96.4%
remove-double-neg96.4%
sub-neg96.4%
neg-mul-196.4%
times-frac90.7%
distribute-frac-neg90.7%
neg-mul-190.7%
*-commutative90.7%
associate-/l*90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in t around inf 94.6%
Taylor expanded in x around 0 72.5%
associate-*r/72.5%
times-frac74.3%
*-commutative74.3%
Simplified74.3%
if 4.4000000000000002e-157 < y Initial program 99.8%
Taylor expanded in t around 0 89.5%
associate-*r/89.4%
associate-*l/89.5%
clear-num89.5%
associate-*l/89.5%
*-un-lft-identity89.5%
div-inv89.6%
metadata-eval89.6%
Applied egg-rr89.6%
Final simplification84.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.85e+15)
(- x (* y (/ 0.3333333333333333 z)))
(if (<= y -9e-14)
(* (/ t (* y z)) 0.3333333333333333)
(if (<= y -6.7e-53)
(- x (* (/ y z) 0.3333333333333333))
(if (<= y 2.2e-156)
(* (/ t z) (/ 0.3333333333333333 y))
(- x (/ y (* z 3.0))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+15) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -9e-14) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else if (y <= -6.7e-53) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 2.2e-156) {
tmp = (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) :: tmp
if (y <= (-1.85d+15)) then
tmp = x - (y * (0.3333333333333333d0 / z))
else if (y <= (-9d-14)) then
tmp = (t / (y * z)) * 0.3333333333333333d0
else if (y <= (-6.7d-53)) then
tmp = x - ((y / z) * 0.3333333333333333d0)
else if (y <= 2.2d-156) then
tmp = (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 tmp;
if (y <= -1.85e+15) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -9e-14) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else if (y <= -6.7e-53) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 2.2e-156) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.85e+15: tmp = x - (y * (0.3333333333333333 / z)) elif y <= -9e-14: tmp = (t / (y * z)) * 0.3333333333333333 elif y <= -6.7e-53: tmp = x - ((y / z) * 0.3333333333333333) elif y <= 2.2e-156: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.85e+15) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= -9e-14) tmp = Float64(Float64(t / Float64(y * z)) * 0.3333333333333333); elseif (y <= -6.7e-53) tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); elseif (y <= 2.2e-156) tmp = Float64(Float64(t / z) * Float64(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) tmp = 0.0; if (y <= -1.85e+15) tmp = x - (y * (0.3333333333333333 / z)); elseif (y <= -9e-14) tmp = (t / (y * z)) * 0.3333333333333333; elseif (y <= -6.7e-53) tmp = x - ((y / z) * 0.3333333333333333); elseif (y <= 2.2e-156) tmp = (t / z) * (0.3333333333333333 / y); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.85e+15], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9e-14], N[(N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], If[LessEqual[y, -6.7e-53], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e-156], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-14}:\\
\;\;\;\;\frac{t}{y \cdot z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq -6.7 \cdot 10^{-53}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-156}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -1.85e15Initial program 99.7%
Taylor expanded in t around 0 92.4%
associate-*r/92.5%
associate-*l/92.5%
clear-num92.5%
associate-*l/92.5%
*-un-lft-identity92.5%
div-inv92.5%
metadata-eval92.5%
Applied egg-rr92.5%
*-lft-identity92.5%
associate-*l/92.5%
*-commutative92.5%
associate-/r*92.5%
metadata-eval92.5%
*-commutative92.5%
Simplified92.5%
if -1.85e15 < y < -8.9999999999999995e-14Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*99.8%
*-commutative99.8%
Simplified99.5%
Taylor expanded in t around inf 81.2%
Taylor expanded in x around 0 71.7%
if -8.9999999999999995e-14 < y < -6.69999999999999957e-53Initial program 99.8%
Taylor expanded in t around 0 76.5%
if -6.69999999999999957e-53 < y < 2.1999999999999999e-156Initial program 96.4%
sub-neg96.4%
associate-+l+96.4%
+-commutative96.4%
remove-double-neg96.4%
distribute-frac-neg96.4%
distribute-neg-in96.4%
remove-double-neg96.4%
sub-neg96.4%
neg-mul-196.4%
times-frac90.7%
distribute-frac-neg90.7%
neg-mul-190.7%
*-commutative90.7%
associate-/l*90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in t around inf 94.6%
Taylor expanded in x around 0 72.5%
associate-*r/72.5%
times-frac74.3%
*-commutative74.3%
Simplified74.3%
if 2.1999999999999999e-156 < y Initial program 99.8%
Taylor expanded in t around 0 89.5%
associate-*r/89.4%
associate-*l/89.5%
clear-num89.5%
associate-*l/89.5%
*-un-lft-identity89.5%
div-inv89.6%
metadata-eval89.6%
Applied egg-rr89.6%
Final simplification84.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.2e+33)
(- x (* y (/ 0.3333333333333333 z)))
(if (<= y 0.072)
(+ x (/ (* t (/ 0.3333333333333333 z)) y))
(- x (/ (/ y z) 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.2e+33) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= 0.072) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x - ((y / z) / 3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.2d+33)) then
tmp = x - (y * (0.3333333333333333d0 / z))
else if (y <= 0.072d0) then
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
else
tmp = x - ((y / z) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.2e+33) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= 0.072) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x - ((y / z) / 3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.2e+33: tmp = x - (y * (0.3333333333333333 / z)) elif y <= 0.072: tmp = x + ((t * (0.3333333333333333 / z)) / y) else: tmp = x - ((y / z) / 3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.2e+33) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= 0.072) tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); else tmp = Float64(x - Float64(Float64(y / z) / 3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.2e+33) tmp = x - (y * (0.3333333333333333 / z)); elseif (y <= 0.072) tmp = x + ((t * (0.3333333333333333 / z)) / y); else tmp = x - ((y / z) / 3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.2e+33], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.072], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+33}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 0.072:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\frac{y}{z}}{3}\\
\end{array}
\end{array}
if y < -1.2e33Initial program 99.7%
Taylor expanded in t around 0 93.6%
associate-*r/93.7%
associate-*l/93.7%
clear-num93.7%
associate-*l/93.6%
*-un-lft-identity93.6%
div-inv93.6%
metadata-eval93.6%
Applied egg-rr93.6%
*-lft-identity93.6%
associate-*l/93.6%
*-commutative93.6%
associate-/r*93.7%
metadata-eval93.7%
*-commutative93.7%
Simplified93.7%
if -1.2e33 < y < 0.0719999999999999946Initial program 97.6%
sub-neg97.6%
associate-+l+97.6%
+-commutative97.6%
remove-double-neg97.6%
distribute-frac-neg97.6%
distribute-neg-in97.6%
remove-double-neg97.6%
sub-neg97.6%
neg-mul-197.6%
times-frac93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in t around inf 90.0%
associate-*r/90.0%
*-commutative90.0%
associate-/r*91.2%
associate-*r/91.2%
*-commutative91.2%
div-inv91.2%
associate-*l*91.2%
associate-/r/91.3%
clear-num91.3%
Applied egg-rr91.3%
if 0.0719999999999999946 < y Initial program 99.8%
Taylor expanded in t around 0 98.3%
associate-*r/98.2%
associate-*l/98.2%
add-sqr-sqrt98.1%
clear-num98.1%
sqrt-unprod54.5%
sqr-neg54.5%
sqrt-unprod0.0%
add-sqr-sqrt31.4%
associate-*l/31.4%
div-inv31.4%
metadata-eval31.4%
*-un-lft-identity31.4%
associate-/r*31.4%
add-sqr-sqrt0.0%
sqrt-unprod54.7%
sqr-neg54.7%
sqrt-unprod98.3%
add-sqr-sqrt98.4%
Applied egg-rr98.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.2e+33)
(- x (* y (/ 0.3333333333333333 z)))
(if (<= y 7800.0)
(+ x (* 0.3333333333333333 (/ (/ t z) y)))
(- x (/ (/ y z) 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+33) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= 7800.0) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x - ((y / z) / 3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.2d+33)) then
tmp = x - (y * (0.3333333333333333d0 / z))
else if (y <= 7800.0d0) then
tmp = x + (0.3333333333333333d0 * ((t / z) / y))
else
tmp = x - ((y / z) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+33) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= 7800.0) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x - ((y / z) / 3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.2e+33: tmp = x - (y * (0.3333333333333333 / z)) elif y <= 7800.0: tmp = x + (0.3333333333333333 * ((t / z) / y)) else: tmp = x - ((y / z) / 3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.2e+33) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= 7800.0) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y))); else tmp = Float64(x - Float64(Float64(y / z) / 3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.2e+33) tmp = x - (y * (0.3333333333333333 / z)); elseif (y <= 7800.0) tmp = x + (0.3333333333333333 * ((t / z) / y)); else tmp = x - ((y / z) / 3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.2e+33], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7800.0], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+33}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 7800:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\frac{y}{z}}{3}\\
\end{array}
\end{array}
if y < -2.19999999999999994e33Initial program 99.7%
Taylor expanded in t around 0 93.6%
associate-*r/93.7%
associate-*l/93.7%
clear-num93.7%
associate-*l/93.6%
*-un-lft-identity93.6%
div-inv93.6%
metadata-eval93.6%
Applied egg-rr93.6%
*-lft-identity93.6%
associate-*l/93.6%
*-commutative93.6%
associate-/r*93.7%
metadata-eval93.7%
*-commutative93.7%
Simplified93.7%
if -2.19999999999999994e33 < y < 7800Initial program 97.6%
sub-neg97.6%
associate-+l+97.6%
+-commutative97.6%
remove-double-neg97.6%
distribute-frac-neg97.6%
distribute-neg-in97.6%
remove-double-neg97.6%
sub-neg97.6%
neg-mul-197.6%
times-frac93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in t around inf 90.0%
*-commutative90.0%
metadata-eval90.0%
times-frac90.0%
*-commutative90.0%
associate-*r*90.1%
times-frac91.3%
*-commutative91.3%
associate-*l/91.3%
*-commutative91.3%
times-frac91.2%
metadata-eval91.2%
Simplified91.2%
if 7800 < y Initial program 99.8%
Taylor expanded in t around 0 98.3%
associate-*r/98.2%
associate-*l/98.2%
add-sqr-sqrt98.1%
clear-num98.1%
sqrt-unprod54.5%
sqr-neg54.5%
sqrt-unprod0.0%
add-sqr-sqrt31.4%
associate-*l/31.4%
div-inv31.4%
metadata-eval31.4%
*-un-lft-identity31.4%
associate-/r*31.4%
add-sqr-sqrt0.0%
sqrt-unprod54.7%
sqr-neg54.7%
sqrt-unprod98.3%
add-sqr-sqrt98.4%
Applied egg-rr98.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -6.5e+32)
(- x (* y (/ 0.3333333333333333 z)))
(if (<= y 1.5e-6)
(+ x (* (/ t (* y z)) 0.3333333333333333))
(- x (/ (/ y z) 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.5e+32) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= 1.5e-6) {
tmp = x + ((t / (y * z)) * 0.3333333333333333);
} else {
tmp = x - ((y / z) / 3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-6.5d+32)) then
tmp = x - (y * (0.3333333333333333d0 / z))
else if (y <= 1.5d-6) then
tmp = x + ((t / (y * z)) * 0.3333333333333333d0)
else
tmp = x - ((y / z) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.5e+32) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= 1.5e-6) {
tmp = x + ((t / (y * z)) * 0.3333333333333333);
} else {
tmp = x - ((y / z) / 3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6.5e+32: tmp = x - (y * (0.3333333333333333 / z)) elif y <= 1.5e-6: tmp = x + ((t / (y * z)) * 0.3333333333333333) else: tmp = x - ((y / z) / 3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6.5e+32) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= 1.5e-6) tmp = Float64(x + Float64(Float64(t / Float64(y * z)) * 0.3333333333333333)); else tmp = Float64(x - Float64(Float64(y / z) / 3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -6.5e+32) tmp = x - (y * (0.3333333333333333 / z)); elseif (y <= 1.5e-6) tmp = x + ((t / (y * z)) * 0.3333333333333333); else tmp = x - ((y / z) / 3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6.5e+32], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-6], N[(x + N[(N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+32}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-6}:\\
\;\;\;\;x + \frac{t}{y \cdot z} \cdot 0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\frac{y}{z}}{3}\\
\end{array}
\end{array}
if y < -6.4999999999999994e32Initial program 99.7%
Taylor expanded in t around 0 93.6%
associate-*r/93.7%
associate-*l/93.7%
clear-num93.7%
associate-*l/93.6%
*-un-lft-identity93.6%
div-inv93.6%
metadata-eval93.6%
Applied egg-rr93.6%
*-lft-identity93.6%
associate-*l/93.6%
*-commutative93.6%
associate-/r*93.7%
metadata-eval93.7%
*-commutative93.7%
Simplified93.7%
if -6.4999999999999994e32 < y < 1.5e-6Initial program 97.6%
sub-neg97.6%
associate-+l+97.6%
+-commutative97.6%
remove-double-neg97.6%
distribute-frac-neg97.6%
distribute-neg-in97.6%
remove-double-neg97.6%
sub-neg97.6%
neg-mul-197.6%
times-frac93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in t around inf 90.0%
if 1.5e-6 < y Initial program 99.8%
Taylor expanded in t around 0 98.3%
associate-*r/98.2%
associate-*l/98.2%
add-sqr-sqrt98.1%
clear-num98.1%
sqrt-unprod54.5%
sqr-neg54.5%
sqrt-unprod0.0%
add-sqr-sqrt31.4%
associate-*l/31.4%
div-inv31.4%
metadata-eval31.4%
*-un-lft-identity31.4%
associate-/r*31.4%
add-sqr-sqrt0.0%
sqrt-unprod54.7%
sqr-neg54.7%
sqrt-unprod98.3%
add-sqr-sqrt98.4%
Applied egg-rr98.4%
Final simplification93.1%
(FPCore (x y z t) :precision binary64 (if (<= y -2.5e+65) x (if (<= y 1.2e-155) (* (/ t z) (/ 0.3333333333333333 y)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.5e+65) {
tmp = x;
} else if (y <= 1.2e-155) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.5d+65)) then
tmp = x
else if (y <= 1.2d-155) then
tmp = (t / z) * (0.3333333333333333d0 / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.5e+65) {
tmp = x;
} else if (y <= 1.2e-155) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.5e+65: tmp = x elif y <= 1.2e-155: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.5e+65) tmp = x; elseif (y <= 1.2e-155) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.5e+65) tmp = x; elseif (y <= 1.2e-155) tmp = (t / z) * (0.3333333333333333 / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.5e+65], x, If[LessEqual[y, 1.2e-155], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+65}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-155}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.49999999999999986e65 or 1.2e-155 < y Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 34.0%
if -2.49999999999999986e65 < y < 1.2e-155Initial program 97.2%
sub-neg97.2%
associate-+l+97.2%
+-commutative97.2%
remove-double-neg97.2%
distribute-frac-neg97.2%
distribute-neg-in97.2%
remove-double-neg97.2%
sub-neg97.2%
neg-mul-197.2%
times-frac93.0%
distribute-frac-neg93.0%
neg-mul-193.0%
*-commutative93.0%
associate-/l*93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in t around inf 87.3%
Taylor expanded in x around 0 64.7%
associate-*r/64.7%
times-frac66.0%
*-commutative66.0%
Simplified66.0%
(FPCore (x y z t) :precision binary64 (if (<= x -6.8e+35) x (if (<= x 3.5e+45) (* (/ t (* y z)) 0.3333333333333333) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -6.8e+35) {
tmp = x;
} else if (x <= 3.5e+45) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-6.8d+35)) then
tmp = x
else if (x <= 3.5d+45) then
tmp = (t / (y * z)) * 0.3333333333333333d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -6.8e+35) {
tmp = x;
} else if (x <= 3.5e+45) {
tmp = (t / (y * z)) * 0.3333333333333333;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -6.8e+35: tmp = x elif x <= 3.5e+45: tmp = (t / (y * z)) * 0.3333333333333333 else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -6.8e+35) tmp = x; elseif (x <= 3.5e+45) tmp = Float64(Float64(t / Float64(y * z)) * 0.3333333333333333); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -6.8e+35) tmp = x; elseif (x <= 3.5e+45) tmp = (t / (y * z)) * 0.3333333333333333; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -6.8e+35], x, If[LessEqual[x, 3.5e+45], N[(N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{+35}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+45}:\\
\;\;\;\;\frac{t}{y \cdot z} \cdot 0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -6.8000000000000002e35 or 3.50000000000000023e45 < x Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
+-commutative99.1%
remove-double-neg99.1%
distribute-frac-neg99.1%
distribute-neg-in99.1%
remove-double-neg99.1%
sub-neg99.1%
neg-mul-199.1%
times-frac99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
*-commutative99.1%
associate-/l*99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in x around inf 54.2%
if -6.8000000000000002e35 < x < 3.50000000000000023e45Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
+-commutative98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
distribute-neg-in98.4%
remove-double-neg98.4%
sub-neg98.4%
neg-mul-198.4%
times-frac95.1%
distribute-frac-neg95.1%
neg-mul-195.1%
*-commutative95.1%
associate-/l*95.0%
*-commutative95.0%
Simplified95.0%
Taylor expanded in t around inf 50.0%
Taylor expanded in x around 0 42.0%
Final simplification47.4%
(FPCore (x y z t) :precision binary64 (+ x (/ (- (/ t (* y z)) (/ y z)) 3.0)))
double code(double x, double y, double z, double t) {
return x + (((t / (y * z)) - (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 * z)) - (y / z)) / 3.0d0)
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / (y * z)) - (y / z)) / 3.0);
}
def code(x, y, z, t): return x + (((t / (y * z)) - (y / z)) / 3.0)
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / Float64(y * z)) - Float64(y / z)) / 3.0)) end
function tmp = code(x, y, z, t) tmp = x + (((t / (y * z)) - (y / z)) / 3.0); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(y / z), $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{t}{y \cdot z} - \frac{y}{z}}{3}
\end{array}
Initial program 98.7%
sub-neg98.7%
associate-+l+98.7%
+-commutative98.7%
remove-double-neg98.7%
distribute-frac-neg98.7%
distribute-neg-in98.7%
remove-double-neg98.7%
sub-neg98.7%
neg-mul-198.7%
times-frac96.9%
distribute-frac-neg96.9%
neg-mul-196.9%
*-commutative96.9%
associate-/l*96.8%
*-commutative96.8%
Simplified96.8%
clear-num96.8%
inv-pow96.8%
Applied egg-rr96.8%
unpow-196.8%
Simplified96.8%
associate-*l/96.8%
*-un-lft-identity96.8%
div-inv96.9%
metadata-eval96.9%
associate-/r*96.9%
Applied egg-rr96.9%
div-sub96.9%
associate-/l/98.7%
*-commutative98.7%
Applied egg-rr98.7%
(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(Float64(t / y) - y) / 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[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{\frac{t}{y} - y}{z}}{3}
\end{array}
Initial program 98.7%
sub-neg98.7%
associate-+l+98.7%
+-commutative98.7%
remove-double-neg98.7%
distribute-frac-neg98.7%
distribute-neg-in98.7%
remove-double-neg98.7%
sub-neg98.7%
neg-mul-198.7%
times-frac96.9%
distribute-frac-neg96.9%
neg-mul-196.9%
*-commutative96.9%
associate-/l*96.8%
*-commutative96.8%
Simplified96.8%
clear-num96.8%
inv-pow96.8%
Applied egg-rr96.8%
unpow-196.8%
Simplified96.8%
associate-*l/96.8%
*-un-lft-identity96.8%
div-inv96.9%
metadata-eval96.9%
associate-/r*96.9%
Applied egg-rr96.9%
(FPCore (x y z t) :precision binary64 (+ x (* (- (/ t y) y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - y) * (0.3333333333333333 / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((t / y) - y) * (0.3333333333333333d0 / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) * (0.3333333333333333 / z));
}
def code(x, y, z, t): return x + (((t / y) - y) * (0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) * (0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}
\end{array}
Initial program 98.7%
sub-neg98.7%
associate-+l+98.7%
+-commutative98.7%
remove-double-neg98.7%
distribute-frac-neg98.7%
distribute-neg-in98.7%
remove-double-neg98.7%
sub-neg98.7%
neg-mul-198.7%
times-frac96.9%
distribute-frac-neg96.9%
neg-mul-196.9%
*-commutative96.9%
associate-/l*96.8%
*-commutative96.8%
Simplified96.8%
Final simplification96.8%
(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 98.7%
sub-neg98.7%
associate-+l+98.7%
+-commutative98.7%
remove-double-neg98.7%
distribute-frac-neg98.7%
distribute-neg-in98.7%
remove-double-neg98.7%
sub-neg98.7%
neg-mul-198.7%
times-frac96.9%
distribute-frac-neg96.9%
neg-mul-196.9%
*-commutative96.9%
associate-/l*96.8%
*-commutative96.8%
Simplified96.8%
Taylor expanded in x around inf 30.0%
(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 2024089
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))