
(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 19 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 4e-14) (+ (+ x (* -0.3333333333333333 (/ y z))) (/ (/ (/ t y) 3.0) z)) (+ x (fma y (/ -0.3333333333333333 z) (/ t (* 3.0 (* y z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 4e-14) {
tmp = (x + (-0.3333333333333333 * (y / z))) + (((t / y) / 3.0) / z);
} else {
tmp = x + fma(y, (-0.3333333333333333 / z), (t / (3.0 * (y * z))));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (t <= 4e-14) tmp = Float64(Float64(x + Float64(-0.3333333333333333 * Float64(y / z))) + Float64(Float64(Float64(t / y) / 3.0) / z)); else tmp = Float64(x + fma(y, Float64(-0.3333333333333333 / z), Float64(t / Float64(3.0 * Float64(y * z))))); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[t, 4e-14], N[(N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t / y), $MachinePrecision] / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision] + N[(t / N[(3.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4 \cdot 10^{-14}:\\
\;\;\;\;\left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{\frac{\frac{t}{y}}{3}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{z}, \frac{t}{3 \cdot \left(y \cdot z\right)}\right)\\
\end{array}
\end{array}
if t < 4e-14Initial program 92.8%
sub-neg92.8%
distribute-frac-neg92.8%
neg-mul-192.8%
*-commutative92.8%
times-frac92.8%
metadata-eval92.8%
associate-/l/99.2%
associate-/l/99.2%
Simplified99.2%
if 4e-14 < t Initial program 97.2%
sub-neg97.2%
distribute-frac-neg97.2%
neg-mul-197.2%
*-commutative97.2%
times-frac97.2%
metadata-eval97.2%
associate-/l/91.0%
associate-/l/91.0%
Simplified91.0%
associate-/l/91.0%
div-inv90.9%
*-commutative90.9%
times-frac97.2%
Applied egg-rr97.2%
expm1-log1p-u47.5%
expm1-udef42.2%
+-commutative42.2%
frac-times41.0%
div-inv41.0%
+-commutative41.0%
associate-*r/41.0%
associate-*l/41.0%
*-commutative41.0%
fma-def41.0%
Applied egg-rr41.0%
expm1-def47.6%
expm1-log1p90.9%
fma-udef90.9%
associate-+r+90.9%
associate-*r/90.9%
*-commutative90.9%
associate-*r/91.0%
+-commutative91.0%
associate-*r/90.9%
*-commutative90.9%
associate-*r/90.9%
fma-udef92.2%
+-commutative92.2%
associate-/l/98.5%
associate-*l*98.5%
*-commutative98.5%
Simplified98.5%
Final simplification99.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* -0.3333333333333333 (/ y z)))
(t_2 (* (/ t z) (/ 0.3333333333333333 y))))
(if (<= y -5.8e+47)
(* y (/ -0.3333333333333333 z))
(if (<= y -0.0008)
x
(if (<= y -1.82e-6)
t_1
(if (<= y 6.2e-201)
t_2
(if (<= y 7.8e-191)
x
(if (<= y 8.5e-17) t_2 (if (<= y 3.2e+81) x t_1)))))))))
double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 * (y / z);
double t_2 = (t / z) * (0.3333333333333333 / y);
double tmp;
if (y <= -5.8e+47) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -0.0008) {
tmp = x;
} else if (y <= -1.82e-6) {
tmp = t_1;
} else if (y <= 6.2e-201) {
tmp = t_2;
} else if (y <= 7.8e-191) {
tmp = x;
} else if (y <= 8.5e-17) {
tmp = t_2;
} else if (y <= 3.2e+81) {
tmp = x;
} else {
tmp = t_1;
}
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 = (-0.3333333333333333d0) * (y / z)
t_2 = (t / z) * (0.3333333333333333d0 / y)
if (y <= (-5.8d+47)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= (-0.0008d0)) then
tmp = x
else if (y <= (-1.82d-6)) then
tmp = t_1
else if (y <= 6.2d-201) then
tmp = t_2
else if (y <= 7.8d-191) then
tmp = x
else if (y <= 8.5d-17) then
tmp = t_2
else if (y <= 3.2d+81) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 * (y / z);
double t_2 = (t / z) * (0.3333333333333333 / y);
double tmp;
if (y <= -5.8e+47) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -0.0008) {
tmp = x;
} else if (y <= -1.82e-6) {
tmp = t_1;
} else if (y <= 6.2e-201) {
tmp = t_2;
} else if (y <= 7.8e-191) {
tmp = x;
} else if (y <= 8.5e-17) {
tmp = t_2;
} else if (y <= 3.2e+81) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -0.3333333333333333 * (y / z) t_2 = (t / z) * (0.3333333333333333 / y) tmp = 0 if y <= -5.8e+47: tmp = y * (-0.3333333333333333 / z) elif y <= -0.0008: tmp = x elif y <= -1.82e-6: tmp = t_1 elif y <= 6.2e-201: tmp = t_2 elif y <= 7.8e-191: tmp = x elif y <= 8.5e-17: tmp = t_2 elif y <= 3.2e+81: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-0.3333333333333333 * Float64(y / z)) t_2 = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)) tmp = 0.0 if (y <= -5.8e+47) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= -0.0008) tmp = x; elseif (y <= -1.82e-6) tmp = t_1; elseif (y <= 6.2e-201) tmp = t_2; elseif (y <= 7.8e-191) tmp = x; elseif (y <= 8.5e-17) tmp = t_2; elseif (y <= 3.2e+81) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -0.3333333333333333 * (y / z); t_2 = (t / z) * (0.3333333333333333 / y); tmp = 0.0; if (y <= -5.8e+47) tmp = y * (-0.3333333333333333 / z); elseif (y <= -0.0008) tmp = x; elseif (y <= -1.82e-6) tmp = t_1; elseif (y <= 6.2e-201) tmp = t_2; elseif (y <= 7.8e-191) tmp = x; elseif (y <= 8.5e-17) tmp = t_2; elseif (y <= 3.2e+81) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.8e+47], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.0008], x, If[LessEqual[y, -1.82e-6], t$95$1, If[LessEqual[y, 6.2e-201], t$95$2, If[LessEqual[y, 7.8e-191], x, If[LessEqual[y, 8.5e-17], t$95$2, If[LessEqual[y, 3.2e+81], x, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -0.3333333333333333 \cdot \frac{y}{z}\\
t_2 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -0.0008:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.82 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-17}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -5.79999999999999961e47Initial program 98.2%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 71.5%
Taylor expanded in y around inf 65.5%
associate-*r/65.5%
*-commutative65.5%
associate-*r/65.6%
Simplified65.6%
if -5.79999999999999961e47 < y < -8.00000000000000038e-4 or 6.1999999999999998e-201 < y < 7.7999999999999999e-191 or 8.5e-17 < y < 3.2e81Initial program 99.8%
Simplified99.7%
Taylor expanded in x around inf 63.5%
if -8.00000000000000038e-4 < y < -1.8199999999999999e-6 or 3.2e81 < y Initial program 96.8%
Simplified99.5%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 77.3%
Taylor expanded in y around inf 71.6%
*-commutative71.6%
Simplified71.6%
if -1.8199999999999999e-6 < y < 6.1999999999999998e-201 or 7.7999999999999999e-191 < y < 8.5e-17Initial program 89.8%
Simplified94.5%
Taylor expanded in z around 0 94.5%
Taylor expanded in x around 0 66.3%
Taylor expanded in y around 0 60.7%
associate-*r/60.7%
*-commutative60.7%
*-commutative60.7%
times-frac66.1%
Simplified66.1%
Final simplification66.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ t z) (/ 0.3333333333333333 y))))
(if (<= y -9.2e+49)
(* y (/ -0.3333333333333333 z))
(if (<= y -3.4e+24)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y -245.0)
x
(if (<= y 6.2e-201)
t_1
(if (<= y 9.2e-191)
x
(if (<= y 8.5e-17)
t_1
(if (<= y 3.5e+81) x (* -0.3333333333333333 (/ y z)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / z) * (0.3333333333333333 / y);
double tmp;
if (y <= -9.2e+49) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -3.4e+24) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= -245.0) {
tmp = x;
} else if (y <= 6.2e-201) {
tmp = t_1;
} else if (y <= 9.2e-191) {
tmp = x;
} else if (y <= 8.5e-17) {
tmp = t_1;
} else if (y <= 3.5e+81) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (t / z) * (0.3333333333333333d0 / y)
if (y <= (-9.2d+49)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= (-3.4d+24)) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= (-245.0d0)) then
tmp = x
else if (y <= 6.2d-201) then
tmp = t_1
else if (y <= 9.2d-191) then
tmp = x
else if (y <= 8.5d-17) then
tmp = t_1
else if (y <= 3.5d+81) then
tmp = x
else
tmp = (-0.3333333333333333d0) * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / z) * (0.3333333333333333 / y);
double tmp;
if (y <= -9.2e+49) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -3.4e+24) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= -245.0) {
tmp = x;
} else if (y <= 6.2e-201) {
tmp = t_1;
} else if (y <= 9.2e-191) {
tmp = x;
} else if (y <= 8.5e-17) {
tmp = t_1;
} else if (y <= 3.5e+81) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / z) * (0.3333333333333333 / y) tmp = 0 if y <= -9.2e+49: tmp = y * (-0.3333333333333333 / z) elif y <= -3.4e+24: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= -245.0: tmp = x elif y <= 6.2e-201: tmp = t_1 elif y <= 9.2e-191: tmp = x elif y <= 8.5e-17: tmp = t_1 elif y <= 3.5e+81: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)) tmp = 0.0 if (y <= -9.2e+49) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= -3.4e+24) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= -245.0) tmp = x; elseif (y <= 6.2e-201) tmp = t_1; elseif (y <= 9.2e-191) tmp = x; elseif (y <= 8.5e-17) tmp = t_1; elseif (y <= 3.5e+81) tmp = x; else tmp = Float64(-0.3333333333333333 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / z) * (0.3333333333333333 / y); tmp = 0.0; if (y <= -9.2e+49) tmp = y * (-0.3333333333333333 / z); elseif (y <= -3.4e+24) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= -245.0) tmp = x; elseif (y <= 6.2e-201) tmp = t_1; elseif (y <= 9.2e-191) tmp = x; elseif (y <= 8.5e-17) tmp = t_1; elseif (y <= 3.5e+81) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.2e+49], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.4e+24], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -245.0], x, If[LessEqual[y, 6.2e-201], t$95$1, If[LessEqual[y, 9.2e-191], x, If[LessEqual[y, 8.5e-17], t$95$1, If[LessEqual[y, 3.5e+81], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{+49}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{+24}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq -245:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{-191}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -9.20000000000000008e49Initial program 98.2%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 70.6%
Taylor expanded in y around inf 67.5%
associate-*r/67.4%
*-commutative67.4%
associate-*r/67.5%
Simplified67.5%
if -9.20000000000000008e49 < y < -3.4000000000000001e24Initial program 99.5%
Simplified99.2%
Taylor expanded in z around 0 99.5%
Taylor expanded in x around 0 83.1%
Taylor expanded in y around 0 82.9%
*-commutative82.9%
Simplified82.9%
if -3.4000000000000001e24 < y < -245 or 6.1999999999999998e-201 < y < 9.20000000000000042e-191 or 8.5e-17 < y < 3.5e81Initial program 99.9%
Simplified99.8%
Taylor expanded in x around inf 71.2%
if -245 < y < 6.1999999999999998e-201 or 9.20000000000000042e-191 < y < 8.5e-17Initial program 89.9%
Simplified94.6%
Taylor expanded in z around 0 94.6%
Taylor expanded in x around 0 66.8%
Taylor expanded in y around 0 59.9%
associate-*r/59.8%
*-commutative59.8%
*-commutative59.8%
times-frac65.1%
Simplified65.1%
if 3.5e81 < y Initial program 96.6%
Simplified99.6%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 75.8%
Taylor expanded in y around inf 69.8%
*-commutative69.8%
Simplified69.8%
Final simplification67.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* y (/ -0.3333333333333333 z))))
(t_2 (* (/ t z) (/ 0.3333333333333333 y))))
(if (<= y -2.1e+49)
t_1
(if (<= y -1.85e+27)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y -1.4e-15)
t_1
(if (<= y 6.2e-201)
t_2
(if (<= y 7.8e-191) x (if (<= y 5.1e-113) t_2 t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y * (-0.3333333333333333 / z));
double t_2 = (t / z) * (0.3333333333333333 / y);
double tmp;
if (y <= -2.1e+49) {
tmp = t_1;
} else if (y <= -1.85e+27) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= -1.4e-15) {
tmp = t_1;
} else if (y <= 6.2e-201) {
tmp = t_2;
} else if (y <= 7.8e-191) {
tmp = x;
} else if (y <= 5.1e-113) {
tmp = t_2;
} else {
tmp = t_1;
}
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 + (y * ((-0.3333333333333333d0) / z))
t_2 = (t / z) * (0.3333333333333333d0 / y)
if (y <= (-2.1d+49)) then
tmp = t_1
else if (y <= (-1.85d+27)) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= (-1.4d-15)) then
tmp = t_1
else if (y <= 6.2d-201) then
tmp = t_2
else if (y <= 7.8d-191) then
tmp = x
else if (y <= 5.1d-113) then
tmp = t_2
else
tmp = t_1
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 t_2 = (t / z) * (0.3333333333333333 / y);
double tmp;
if (y <= -2.1e+49) {
tmp = t_1;
} else if (y <= -1.85e+27) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= -1.4e-15) {
tmp = t_1;
} else if (y <= 6.2e-201) {
tmp = t_2;
} else if (y <= 7.8e-191) {
tmp = x;
} else if (y <= 5.1e-113) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y * (-0.3333333333333333 / z)) t_2 = (t / z) * (0.3333333333333333 / y) tmp = 0 if y <= -2.1e+49: tmp = t_1 elif y <= -1.85e+27: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= -1.4e-15: tmp = t_1 elif y <= 6.2e-201: tmp = t_2 elif y <= 7.8e-191: tmp = x elif y <= 5.1e-113: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))) t_2 = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)) tmp = 0.0 if (y <= -2.1e+49) tmp = t_1; elseif (y <= -1.85e+27) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= -1.4e-15) tmp = t_1; elseif (y <= 6.2e-201) tmp = t_2; elseif (y <= 7.8e-191) tmp = x; elseif (y <= 5.1e-113) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y * (-0.3333333333333333 / z)); t_2 = (t / z) * (0.3333333333333333 / y); tmp = 0.0; if (y <= -2.1e+49) tmp = t_1; elseif (y <= -1.85e+27) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= -1.4e-15) tmp = t_1; elseif (y <= 6.2e-201) tmp = t_2; elseif (y <= 7.8e-191) tmp = x; elseif (y <= 5.1e-113) tmp = t_2; else tmp = t_1; 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]}, Block[{t$95$2 = N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+49], t$95$1, If[LessEqual[y, -1.85e+27], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.4e-15], t$95$1, If[LessEqual[y, 6.2e-201], t$95$2, If[LessEqual[y, 7.8e-191], x, If[LessEqual[y, 5.1e-113], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{-0.3333333333333333}{z}\\
t_2 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+49}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{+27}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5.1 \cdot 10^{-113}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.10000000000000011e49 or -1.85000000000000001e27 < y < -1.40000000000000007e-15 or 5.09999999999999979e-113 < y Initial program 97.5%
Simplified99.7%
Taylor expanded in y around inf 89.9%
if -2.10000000000000011e49 < y < -1.85000000000000001e27Initial program 99.5%
Simplified99.2%
Taylor expanded in z around 0 99.5%
Taylor expanded in x around 0 83.1%
Taylor expanded in y around 0 82.9%
*-commutative82.9%
Simplified82.9%
if -1.40000000000000007e-15 < y < 6.1999999999999998e-201 or 7.7999999999999999e-191 < y < 5.09999999999999979e-113Initial program 89.7%
Simplified94.0%
Taylor expanded in z around 0 94.0%
Taylor expanded in x around 0 67.8%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
*-commutative62.6%
*-commutative62.6%
times-frac68.5%
Simplified68.5%
if 6.1999999999999998e-201 < y < 7.7999999999999999e-191Initial program 100.0%
Simplified99.7%
Taylor expanded in x around inf 83.3%
Final simplification80.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ t z) (/ 0.3333333333333333 y)))
(t_2 (+ x (/ y (* z -3.0)))))
(if (<= y -2.1e+49)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y -1.85e+27)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y -5.8e-20)
t_2
(if (<= y 5.8e-201)
t_1
(if (<= y 1.05e-190) x (if (<= y 1.45e-112) t_1 t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / z) * (0.3333333333333333 / y);
double t_2 = x + (y / (z * -3.0));
double tmp;
if (y <= -2.1e+49) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -1.85e+27) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= -5.8e-20) {
tmp = t_2;
} else if (y <= 5.8e-201) {
tmp = t_1;
} else if (y <= 1.05e-190) {
tmp = x;
} else if (y <= 1.45e-112) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = (t / z) * (0.3333333333333333d0 / y)
t_2 = x + (y / (z * (-3.0d0)))
if (y <= (-2.1d+49)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= (-1.85d+27)) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= (-5.8d-20)) then
tmp = t_2
else if (y <= 5.8d-201) then
tmp = t_1
else if (y <= 1.05d-190) then
tmp = x
else if (y <= 1.45d-112) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / z) * (0.3333333333333333 / y);
double t_2 = x + (y / (z * -3.0));
double tmp;
if (y <= -2.1e+49) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -1.85e+27) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= -5.8e-20) {
tmp = t_2;
} else if (y <= 5.8e-201) {
tmp = t_1;
} else if (y <= 1.05e-190) {
tmp = x;
} else if (y <= 1.45e-112) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / z) * (0.3333333333333333 / y) t_2 = x + (y / (z * -3.0)) tmp = 0 if y <= -2.1e+49: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= -1.85e+27: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= -5.8e-20: tmp = t_2 elif y <= 5.8e-201: tmp = t_1 elif y <= 1.05e-190: tmp = x elif y <= 1.45e-112: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)) t_2 = Float64(x + Float64(y / Float64(z * -3.0))) tmp = 0.0 if (y <= -2.1e+49) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= -1.85e+27) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= -5.8e-20) tmp = t_2; elseif (y <= 5.8e-201) tmp = t_1; elseif (y <= 1.05e-190) tmp = x; elseif (y <= 1.45e-112) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / z) * (0.3333333333333333 / y); t_2 = x + (y / (z * -3.0)); tmp = 0.0; if (y <= -2.1e+49) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= -1.85e+27) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= -5.8e-20) tmp = t_2; elseif (y <= 5.8e-201) tmp = t_1; elseif (y <= 1.05e-190) tmp = x; elseif (y <= 1.45e-112) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+49], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.85e+27], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.8e-20], t$95$2, If[LessEqual[y, 5.8e-201], t$95$1, If[LessEqual[y, 1.05e-190], x, If[LessEqual[y, 1.45e-112], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
t_2 := x + \frac{y}{z \cdot -3}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+49}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{+27}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{-20}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-201}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-190}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.10000000000000011e49Initial program 98.2%
Simplified99.7%
Taylor expanded in y around inf 96.6%
if -2.10000000000000011e49 < y < -1.85000000000000001e27Initial program 99.5%
Simplified99.2%
Taylor expanded in z around 0 99.5%
Taylor expanded in x around 0 83.1%
Taylor expanded in y around 0 82.9%
*-commutative82.9%
Simplified82.9%
if -1.85000000000000001e27 < y < -5.8e-20 or 1.44999999999999996e-112 < y Initial program 96.9%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
associate-*l/99.8%
*-un-lft-identity99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 84.1%
if -5.8e-20 < y < 5.8000000000000003e-201 or 1.04999999999999996e-190 < y < 1.44999999999999996e-112Initial program 89.7%
Simplified94.0%
Taylor expanded in z around 0 94.0%
Taylor expanded in x around 0 67.8%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
*-commutative62.6%
*-commutative62.6%
times-frac68.5%
Simplified68.5%
if 5.8000000000000003e-201 < y < 1.04999999999999996e-190Initial program 100.0%
Simplified99.7%
Taylor expanded in x around inf 83.3%
Final simplification80.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ t z) (/ 0.3333333333333333 y))))
(if (<= y -2.4e+49)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y -1.85e+27)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y -7e-19)
(+ x (/ y (* z -3.0)))
(if (<= y 3.5e-201)
t_1
(if (<= y 7.8e-191)
x
(if (<= y 1.25e-113)
t_1
(+ x (/ (* -0.3333333333333333 y) z))))))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / z) * (0.3333333333333333 / y);
double tmp;
if (y <= -2.4e+49) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -1.85e+27) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= -7e-19) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.5e-201) {
tmp = t_1;
} else if (y <= 7.8e-191) {
tmp = x;
} else if (y <= 1.25e-113) {
tmp = t_1;
} else {
tmp = x + ((-0.3333333333333333 * y) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (t / z) * (0.3333333333333333d0 / y)
if (y <= (-2.4d+49)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= (-1.85d+27)) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= (-7d-19)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 3.5d-201) then
tmp = t_1
else if (y <= 7.8d-191) then
tmp = x
else if (y <= 1.25d-113) then
tmp = t_1
else
tmp = x + (((-0.3333333333333333d0) * y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / z) * (0.3333333333333333 / y);
double tmp;
if (y <= -2.4e+49) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -1.85e+27) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= -7e-19) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.5e-201) {
tmp = t_1;
} else if (y <= 7.8e-191) {
tmp = x;
} else if (y <= 1.25e-113) {
tmp = t_1;
} else {
tmp = x + ((-0.3333333333333333 * y) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / z) * (0.3333333333333333 / y) tmp = 0 if y <= -2.4e+49: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= -1.85e+27: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= -7e-19: tmp = x + (y / (z * -3.0)) elif y <= 3.5e-201: tmp = t_1 elif y <= 7.8e-191: tmp = x elif y <= 1.25e-113: tmp = t_1 else: tmp = x + ((-0.3333333333333333 * y) / z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)) tmp = 0.0 if (y <= -2.4e+49) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= -1.85e+27) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= -7e-19) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 3.5e-201) tmp = t_1; elseif (y <= 7.8e-191) tmp = x; elseif (y <= 1.25e-113) tmp = t_1; else tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / z) * (0.3333333333333333 / y); tmp = 0.0; if (y <= -2.4e+49) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= -1.85e+27) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= -7e-19) tmp = x + (y / (z * -3.0)); elseif (y <= 3.5e-201) tmp = t_1; elseif (y <= 7.8e-191) tmp = x; elseif (y <= 1.25e-113) tmp = t_1; else tmp = x + ((-0.3333333333333333 * y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+49], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.85e+27], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7e-19], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-201], t$95$1, If[LessEqual[y, 7.8e-191], x, If[LessEqual[y, 1.25e-113], t$95$1, N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+49}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{+27}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-201}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\
\end{array}
\end{array}
if y < -2.4e49Initial program 98.2%
Simplified99.7%
Taylor expanded in y around inf 96.6%
if -2.4e49 < y < -1.85000000000000001e27Initial program 99.5%
Simplified99.2%
Taylor expanded in z around 0 99.5%
Taylor expanded in x around 0 83.1%
Taylor expanded in y around 0 82.9%
*-commutative82.9%
Simplified82.9%
if -1.85000000000000001e27 < y < -7.00000000000000031e-19Initial program 100.0%
Simplified99.7%
clear-num100.0%
inv-pow100.0%
Applied egg-rr100.0%
unpow-1100.0%
Simplified100.0%
associate-*l/100.0%
*-un-lft-identity100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 100.0%
if -7.00000000000000031e-19 < y < 3.50000000000000008e-201 or 7.7999999999999999e-191 < y < 1.2499999999999999e-113Initial program 89.7%
Simplified94.0%
Taylor expanded in z around 0 94.0%
Taylor expanded in x around 0 67.8%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
*-commutative62.6%
*-commutative62.6%
times-frac68.5%
Simplified68.5%
if 3.50000000000000008e-201 < y < 7.7999999999999999e-191Initial program 100.0%
Simplified99.7%
Taylor expanded in x around inf 83.3%
if 1.2499999999999999e-113 < y Initial program 96.4%
Simplified99.7%
Taylor expanded in y around inf 81.7%
associate-*l/81.8%
Applied egg-rr81.8%
Final simplification80.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ t z) (/ 0.3333333333333333 y))))
(if (<= y -2.1e+49)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y -1.85e+27)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y -6.8e-20)
(+ x (/ y (* z -3.0)))
(if (<= y 6e-201)
t_1
(if (<= y 7.8e-191)
x
(if (<= y 1.95e-112)
t_1
(- x (* (/ y z) 0.3333333333333333))))))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / z) * (0.3333333333333333 / y);
double tmp;
if (y <= -2.1e+49) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -1.85e+27) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= -6.8e-20) {
tmp = x + (y / (z * -3.0));
} else if (y <= 6e-201) {
tmp = t_1;
} else if (y <= 7.8e-191) {
tmp = x;
} else if (y <= 1.95e-112) {
tmp = t_1;
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
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 = (t / z) * (0.3333333333333333d0 / y)
if (y <= (-2.1d+49)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= (-1.85d+27)) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= (-6.8d-20)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 6d-201) then
tmp = t_1
else if (y <= 7.8d-191) then
tmp = x
else if (y <= 1.95d-112) then
tmp = t_1
else
tmp = x - ((y / z) * 0.3333333333333333d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / z) * (0.3333333333333333 / y);
double tmp;
if (y <= -2.1e+49) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -1.85e+27) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= -6.8e-20) {
tmp = x + (y / (z * -3.0));
} else if (y <= 6e-201) {
tmp = t_1;
} else if (y <= 7.8e-191) {
tmp = x;
} else if (y <= 1.95e-112) {
tmp = t_1;
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / z) * (0.3333333333333333 / y) tmp = 0 if y <= -2.1e+49: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= -1.85e+27: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= -6.8e-20: tmp = x + (y / (z * -3.0)) elif y <= 6e-201: tmp = t_1 elif y <= 7.8e-191: tmp = x elif y <= 1.95e-112: tmp = t_1 else: tmp = x - ((y / z) * 0.3333333333333333) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)) tmp = 0.0 if (y <= -2.1e+49) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= -1.85e+27) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= -6.8e-20) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 6e-201) tmp = t_1; elseif (y <= 7.8e-191) tmp = x; elseif (y <= 1.95e-112) tmp = t_1; else tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / z) * (0.3333333333333333 / y); tmp = 0.0; if (y <= -2.1e+49) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= -1.85e+27) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= -6.8e-20) tmp = x + (y / (z * -3.0)); elseif (y <= 6e-201) tmp = t_1; elseif (y <= 7.8e-191) tmp = x; elseif (y <= 1.95e-112) tmp = t_1; else tmp = x - ((y / z) * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+49], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.85e+27], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.8e-20], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-201], t$95$1, If[LessEqual[y, 7.8e-191], x, If[LessEqual[y, 1.95e-112], t$95$1, N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+49}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{+27}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq -6.8 \cdot 10^{-20}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-201}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\end{array}
\end{array}
if y < -2.10000000000000011e49Initial program 98.2%
Simplified99.7%
Taylor expanded in y around inf 96.6%
if -2.10000000000000011e49 < y < -1.85000000000000001e27Initial program 99.5%
Simplified99.2%
Taylor expanded in z around 0 99.5%
Taylor expanded in x around 0 83.1%
Taylor expanded in y around 0 82.9%
*-commutative82.9%
Simplified82.9%
if -1.85000000000000001e27 < y < -6.7999999999999994e-20Initial program 100.0%
Simplified99.7%
clear-num100.0%
inv-pow100.0%
Applied egg-rr100.0%
unpow-1100.0%
Simplified100.0%
associate-*l/100.0%
*-un-lft-identity100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 100.0%
if -6.7999999999999994e-20 < y < 6.00000000000000004e-201 or 7.7999999999999999e-191 < y < 1.9500000000000001e-112Initial program 89.7%
Simplified94.0%
Taylor expanded in z around 0 94.0%
Taylor expanded in x around 0 67.8%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
*-commutative62.6%
*-commutative62.6%
times-frac68.5%
Simplified68.5%
if 6.00000000000000004e-201 < y < 7.7999999999999999e-191Initial program 100.0%
Simplified99.7%
Taylor expanded in x around inf 83.3%
if 1.9500000000000001e-112 < y Initial program 96.4%
Taylor expanded in t around 0 81.8%
Final simplification80.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ t z) (/ 0.3333333333333333 y))))
(if (<= y -2.1e+49)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y -1.85e+27)
(* -0.3333333333333333 (/ (/ (- t) y) z))
(if (<= y -9.6e-20)
(+ x (/ y (* z -3.0)))
(if (<= y 6.2e-201)
t_1
(if (<= y 7.8e-191)
x
(if (<= y 8e-113) t_1 (- x (* (/ y z) 0.3333333333333333))))))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / z) * (0.3333333333333333 / y);
double tmp;
if (y <= -2.1e+49) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -1.85e+27) {
tmp = -0.3333333333333333 * ((-t / y) / z);
} else if (y <= -9.6e-20) {
tmp = x + (y / (z * -3.0));
} else if (y <= 6.2e-201) {
tmp = t_1;
} else if (y <= 7.8e-191) {
tmp = x;
} else if (y <= 8e-113) {
tmp = t_1;
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
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 = (t / z) * (0.3333333333333333d0 / y)
if (y <= (-2.1d+49)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= (-1.85d+27)) then
tmp = (-0.3333333333333333d0) * ((-t / y) / z)
else if (y <= (-9.6d-20)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 6.2d-201) then
tmp = t_1
else if (y <= 7.8d-191) then
tmp = x
else if (y <= 8d-113) then
tmp = t_1
else
tmp = x - ((y / z) * 0.3333333333333333d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / z) * (0.3333333333333333 / y);
double tmp;
if (y <= -2.1e+49) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -1.85e+27) {
tmp = -0.3333333333333333 * ((-t / y) / z);
} else if (y <= -9.6e-20) {
tmp = x + (y / (z * -3.0));
} else if (y <= 6.2e-201) {
tmp = t_1;
} else if (y <= 7.8e-191) {
tmp = x;
} else if (y <= 8e-113) {
tmp = t_1;
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / z) * (0.3333333333333333 / y) tmp = 0 if y <= -2.1e+49: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= -1.85e+27: tmp = -0.3333333333333333 * ((-t / y) / z) elif y <= -9.6e-20: tmp = x + (y / (z * -3.0)) elif y <= 6.2e-201: tmp = t_1 elif y <= 7.8e-191: tmp = x elif y <= 8e-113: tmp = t_1 else: tmp = x - ((y / z) * 0.3333333333333333) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)) tmp = 0.0 if (y <= -2.1e+49) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= -1.85e+27) tmp = Float64(-0.3333333333333333 * Float64(Float64(Float64(-t) / y) / z)); elseif (y <= -9.6e-20) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 6.2e-201) tmp = t_1; elseif (y <= 7.8e-191) tmp = x; elseif (y <= 8e-113) tmp = t_1; else tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / z) * (0.3333333333333333 / y); tmp = 0.0; if (y <= -2.1e+49) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= -1.85e+27) tmp = -0.3333333333333333 * ((-t / y) / z); elseif (y <= -9.6e-20) tmp = x + (y / (z * -3.0)); elseif (y <= 6.2e-201) tmp = t_1; elseif (y <= 7.8e-191) tmp = x; elseif (y <= 8e-113) tmp = t_1; else tmp = x - ((y / z) * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+49], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.85e+27], N[(-0.3333333333333333 * N[(N[((-t) / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.6e-20], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-201], t$95$1, If[LessEqual[y, 7.8e-191], x, If[LessEqual[y, 8e-113], t$95$1, N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+49}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{+27}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{\frac{-t}{y}}{z}\\
\mathbf{elif}\;y \leq -9.6 \cdot 10^{-20}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-191}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\end{array}
\end{array}
if y < -2.10000000000000011e49Initial program 98.2%
Simplified99.7%
Taylor expanded in y around inf 96.6%
if -2.10000000000000011e49 < y < -1.85000000000000001e27Initial program 99.5%
Simplified99.2%
Taylor expanded in z around 0 99.5%
Taylor expanded in x around 0 83.1%
Taylor expanded in y around 0 83.1%
neg-mul-183.1%
distribute-neg-frac83.1%
Simplified83.1%
if -1.85000000000000001e27 < y < -9.59999999999999971e-20Initial program 100.0%
Simplified99.7%
clear-num100.0%
inv-pow100.0%
Applied egg-rr100.0%
unpow-1100.0%
Simplified100.0%
associate-*l/100.0%
*-un-lft-identity100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 100.0%
if -9.59999999999999971e-20 < y < 6.1999999999999998e-201 or 7.7999999999999999e-191 < y < 7.99999999999999983e-113Initial program 89.7%
Simplified94.0%
Taylor expanded in z around 0 94.0%
Taylor expanded in x around 0 67.8%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
*-commutative62.6%
*-commutative62.6%
times-frac68.5%
Simplified68.5%
if 6.1999999999999998e-201 < y < 7.7999999999999999e-191Initial program 100.0%
Simplified99.7%
Taylor expanded in x around inf 83.3%
if 7.99999999999999983e-113 < y Initial program 96.4%
Taylor expanded in t around 0 81.8%
Final simplification80.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -6e+49)
(+ x (* y (* -0.3333333333333333 (/ 1.0 z))))
(if (<= y -0.000225)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(if (<= y -1.2e-70)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(if (<= y 1.4e+76)
(+ x (* (/ t y) (/ 0.3333333333333333 z)))
(- x (* (/ y z) 0.3333333333333333)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6e+49) {
tmp = x + (y * (-0.3333333333333333 * (1.0 / z)));
} else if (y <= -0.000225) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else if (y <= -1.2e-70) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 1.4e+76) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
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+49)) then
tmp = x + (y * ((-0.3333333333333333d0) * (1.0d0 / z)))
else if (y <= (-0.000225d0)) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
else if (y <= (-1.2d-70)) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
else if (y <= 1.4d+76) then
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
else
tmp = x - ((y / z) * 0.3333333333333333d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6e+49) {
tmp = x + (y * (-0.3333333333333333 * (1.0 / z)));
} else if (y <= -0.000225) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else if (y <= -1.2e-70) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 1.4e+76) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6e+49: tmp = x + (y * (-0.3333333333333333 * (1.0 / z))) elif y <= -0.000225: tmp = x + (0.3333333333333333 * (t / (y * z))) elif y <= -1.2e-70: tmp = -0.3333333333333333 * ((y - (t / y)) / z) elif y <= 1.4e+76: tmp = x + ((t / y) * (0.3333333333333333 / z)) else: tmp = x - ((y / z) * 0.3333333333333333) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6e+49) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 * Float64(1.0 / z)))); elseif (y <= -0.000225) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); elseif (y <= -1.2e-70) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); elseif (y <= 1.4e+76) tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); else tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -6e+49) tmp = x + (y * (-0.3333333333333333 * (1.0 / z))); elseif (y <= -0.000225) tmp = x + (0.3333333333333333 * (t / (y * z))); elseif (y <= -1.2e-70) tmp = -0.3333333333333333 * ((y - (t / y)) / z); elseif (y <= 1.4e+76) tmp = x + ((t / y) * (0.3333333333333333 / z)); else tmp = x - ((y / z) * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6e+49], N[(x + N[(y * N[(-0.3333333333333333 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.000225], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.2e-70], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+76], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+49}:\\
\;\;\;\;x + y \cdot \left(-0.3333333333333333 \cdot \frac{1}{z}\right)\\
\mathbf{elif}\;y \leq -0.000225:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-70}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+76}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\end{array}
\end{array}
if y < -6.0000000000000005e49Initial program 98.2%
Simplified99.7%
Taylor expanded in y around inf 96.6%
div-inv96.7%
Applied egg-rr96.7%
if -6.0000000000000005e49 < y < -2.2499999999999999e-4Initial program 99.8%
Simplified99.5%
Taylor expanded in y around 0 92.0%
if -2.2499999999999999e-4 < y < -1.2000000000000001e-70Initial program 92.5%
Simplified99.4%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 99.9%
if -1.2000000000000001e-70 < y < 1.3999999999999999e76Initial program 91.2%
Simplified94.9%
Taylor expanded in y around 0 87.5%
associate-/r*91.2%
associate-*r/91.2%
*-commutative91.2%
associate-*r/91.2%
Simplified91.2%
if 1.3999999999999999e76 < y Initial program 96.7%
Taylor expanded in t around 0 94.1%
Final simplification93.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -6e+49)
(+ x (* y (* -0.3333333333333333 (/ 1.0 z))))
(if (<= y -0.72)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(if (<= y -2.2e-53)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(if (<= y 1.3e+76)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(- x (* (/ y z) 0.3333333333333333)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6e+49) {
tmp = x + (y * (-0.3333333333333333 * (1.0 / z)));
} else if (y <= -0.72) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else if (y <= -2.2e-53) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 1.3e+76) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
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+49)) then
tmp = x + (y * ((-0.3333333333333333d0) * (1.0d0 / z)))
else if (y <= (-0.72d0)) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
else if (y <= (-2.2d-53)) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
else if (y <= 1.3d+76) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x - ((y / z) * 0.3333333333333333d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6e+49) {
tmp = x + (y * (-0.3333333333333333 * (1.0 / z)));
} else if (y <= -0.72) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else if (y <= -2.2e-53) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 1.3e+76) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6e+49: tmp = x + (y * (-0.3333333333333333 * (1.0 / z))) elif y <= -0.72: tmp = x + (0.3333333333333333 * (t / (y * z))) elif y <= -2.2e-53: tmp = -0.3333333333333333 * ((y - (t / y)) / z) elif y <= 1.3e+76: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x - ((y / z) * 0.3333333333333333) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6e+49) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 * Float64(1.0 / z)))); elseif (y <= -0.72) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); elseif (y <= -2.2e-53) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); elseif (y <= 1.3e+76) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -6e+49) tmp = x + (y * (-0.3333333333333333 * (1.0 / z))); elseif (y <= -0.72) tmp = x + (0.3333333333333333 * (t / (y * z))); elseif (y <= -2.2e-53) tmp = -0.3333333333333333 * ((y - (t / y)) / z); elseif (y <= 1.3e+76) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x - ((y / z) * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6e+49], N[(x + N[(y * N[(-0.3333333333333333 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.72], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.2e-53], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+76], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+49}:\\
\;\;\;\;x + y \cdot \left(-0.3333333333333333 \cdot \frac{1}{z}\right)\\
\mathbf{elif}\;y \leq -0.72:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{-53}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+76}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\end{array}
\end{array}
if y < -6.0000000000000005e49Initial program 98.2%
Simplified99.7%
Taylor expanded in y around inf 96.6%
div-inv96.7%
Applied egg-rr96.7%
if -6.0000000000000005e49 < y < -0.71999999999999997Initial program 99.8%
Simplified99.5%
Taylor expanded in y around 0 92.0%
if -0.71999999999999997 < y < -2.20000000000000018e-53Initial program 91.3%
Simplified99.5%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 99.9%
if -2.20000000000000018e-53 < y < 1.3e76Initial program 91.3%
Simplified94.9%
Taylor expanded in z around 0 94.9%
Taylor expanded in y around 0 87.7%
associate-*r/53.3%
*-commutative53.3%
*-commutative53.3%
times-frac58.1%
Simplified94.0%
if 1.3e76 < y Initial program 96.7%
Taylor expanded in t around 0 94.1%
Final simplification94.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -9e+49)
(+ x (* y (* -0.3333333333333333 (/ 1.0 z))))
(if (<= y -2.3e-5)
(+ x (/ (* t 0.3333333333333333) (* y z)))
(if (<= y -2.2e-53)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(if (<= y 9e+75)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(- x (* (/ y z) 0.3333333333333333)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9e+49) {
tmp = x + (y * (-0.3333333333333333 * (1.0 / z)));
} else if (y <= -2.3e-5) {
tmp = x + ((t * 0.3333333333333333) / (y * z));
} else if (y <= -2.2e-53) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 9e+75) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
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 <= (-9d+49)) then
tmp = x + (y * ((-0.3333333333333333d0) * (1.0d0 / z)))
else if (y <= (-2.3d-5)) then
tmp = x + ((t * 0.3333333333333333d0) / (y * z))
else if (y <= (-2.2d-53)) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
else if (y <= 9d+75) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x - ((y / z) * 0.3333333333333333d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9e+49) {
tmp = x + (y * (-0.3333333333333333 * (1.0 / z)));
} else if (y <= -2.3e-5) {
tmp = x + ((t * 0.3333333333333333) / (y * z));
} else if (y <= -2.2e-53) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 9e+75) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9e+49: tmp = x + (y * (-0.3333333333333333 * (1.0 / z))) elif y <= -2.3e-5: tmp = x + ((t * 0.3333333333333333) / (y * z)) elif y <= -2.2e-53: tmp = -0.3333333333333333 * ((y - (t / y)) / z) elif y <= 9e+75: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x - ((y / z) * 0.3333333333333333) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9e+49) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 * Float64(1.0 / z)))); elseif (y <= -2.3e-5) tmp = Float64(x + Float64(Float64(t * 0.3333333333333333) / Float64(y * z))); elseif (y <= -2.2e-53) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); elseif (y <= 9e+75) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9e+49) tmp = x + (y * (-0.3333333333333333 * (1.0 / z))); elseif (y <= -2.3e-5) tmp = x + ((t * 0.3333333333333333) / (y * z)); elseif (y <= -2.2e-53) tmp = -0.3333333333333333 * ((y - (t / y)) / z); elseif (y <= 9e+75) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x - ((y / z) * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9e+49], N[(x + N[(y * N[(-0.3333333333333333 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.3e-5], N[(x + N[(N[(t * 0.3333333333333333), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.2e-53], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+75], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+49}:\\
\;\;\;\;x + y \cdot \left(-0.3333333333333333 \cdot \frac{1}{z}\right)\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-5}:\\
\;\;\;\;x + \frac{t \cdot 0.3333333333333333}{y \cdot z}\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{-53}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+75}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\end{array}
\end{array}
if y < -8.99999999999999965e49Initial program 98.2%
Simplified99.7%
Taylor expanded in y around inf 96.6%
div-inv96.7%
Applied egg-rr96.7%
if -8.99999999999999965e49 < y < -2.3e-5Initial program 99.8%
Simplified99.5%
Taylor expanded in y around 0 92.0%
associate-/r*92.1%
associate-*r/92.0%
*-commutative92.0%
associate-*r/92.0%
Simplified92.0%
frac-times92.3%
Applied egg-rr92.3%
if -2.3e-5 < y < -2.20000000000000018e-53Initial program 91.3%
Simplified99.5%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 99.9%
if -2.20000000000000018e-53 < y < 9.0000000000000007e75Initial program 91.3%
Simplified94.9%
Taylor expanded in z around 0 94.9%
Taylor expanded in y around 0 87.7%
associate-*r/53.3%
*-commutative53.3%
*-commutative53.3%
times-frac58.1%
Simplified94.0%
if 9.0000000000000007e75 < y Initial program 96.7%
Taylor expanded in t around 0 94.1%
Final simplification94.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.2e+49)
(+ x (* y (* -0.3333333333333333 (/ 1.0 z))))
(if (<= y -1.9e-5)
(+ x (/ (* t 0.3333333333333333) (* y z)))
(if (<= y -1.2e-70)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(if (<= y 9e+75)
(+ x (/ (* t (/ 0.3333333333333333 z)) y))
(- x (* (/ y z) 0.3333333333333333)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e+49) {
tmp = x + (y * (-0.3333333333333333 * (1.0 / z)));
} else if (y <= -1.9e-5) {
tmp = x + ((t * 0.3333333333333333) / (y * z));
} else if (y <= -1.2e-70) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 9e+75) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.2d+49)) then
tmp = x + (y * ((-0.3333333333333333d0) * (1.0d0 / z)))
else if (y <= (-1.9d-5)) then
tmp = x + ((t * 0.3333333333333333d0) / (y * z))
else if (y <= (-1.2d-70)) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
else if (y <= 9d+75) then
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
else
tmp = x - ((y / z) * 0.3333333333333333d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e+49) {
tmp = x + (y * (-0.3333333333333333 * (1.0 / z)));
} else if (y <= -1.9e-5) {
tmp = x + ((t * 0.3333333333333333) / (y * z));
} else if (y <= -1.2e-70) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else if (y <= 9e+75) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.2e+49: tmp = x + (y * (-0.3333333333333333 * (1.0 / z))) elif y <= -1.9e-5: tmp = x + ((t * 0.3333333333333333) / (y * z)) elif y <= -1.2e-70: tmp = -0.3333333333333333 * ((y - (t / y)) / z) elif y <= 9e+75: tmp = x + ((t * (0.3333333333333333 / z)) / y) else: tmp = x - ((y / z) * 0.3333333333333333) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.2e+49) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 * Float64(1.0 / z)))); elseif (y <= -1.9e-5) tmp = Float64(x + Float64(Float64(t * 0.3333333333333333) / Float64(y * z))); elseif (y <= -1.2e-70) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); elseif (y <= 9e+75) tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); else tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.2e+49) tmp = x + (y * (-0.3333333333333333 * (1.0 / z))); elseif (y <= -1.9e-5) tmp = x + ((t * 0.3333333333333333) / (y * z)); elseif (y <= -1.2e-70) tmp = -0.3333333333333333 * ((y - (t / y)) / z); elseif (y <= 9e+75) tmp = x + ((t * (0.3333333333333333 / z)) / y); else tmp = x - ((y / z) * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.2e+49], N[(x + N[(y * N[(-0.3333333333333333 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.9e-5], N[(x + N[(N[(t * 0.3333333333333333), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.2e-70], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+75], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+49}:\\
\;\;\;\;x + y \cdot \left(-0.3333333333333333 \cdot \frac{1}{z}\right)\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-5}:\\
\;\;\;\;x + \frac{t \cdot 0.3333333333333333}{y \cdot z}\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-70}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+75}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\end{array}
\end{array}
if y < -4.20000000000000022e49Initial program 98.2%
Simplified99.7%
Taylor expanded in y around inf 96.6%
div-inv96.7%
Applied egg-rr96.7%
if -4.20000000000000022e49 < y < -1.9000000000000001e-5Initial program 99.8%
Simplified99.5%
Taylor expanded in y around 0 92.0%
associate-/r*92.1%
associate-*r/92.0%
*-commutative92.0%
associate-*r/92.0%
Simplified92.0%
frac-times92.3%
Applied egg-rr92.3%
if -1.9000000000000001e-5 < y < -1.2000000000000001e-70Initial program 92.5%
Simplified99.4%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 99.9%
if -1.2000000000000001e-70 < y < 9.0000000000000007e75Initial program 91.2%
Simplified94.9%
Taylor expanded in y around 0 87.5%
associate-/r*91.2%
associate-*r/91.2%
*-commutative91.2%
associate-*r/91.2%
Simplified91.2%
associate-*l/93.9%
Applied egg-rr93.9%
if 9.0000000000000007e75 < y Initial program 96.7%
Taylor expanded in t around 0 94.1%
Final simplification94.9%
(FPCore (x y z t)
:precision binary64
(if (<= z -13000000000000.0)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= z 2.1e+69)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -13000000000000.0) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (z <= 2.1e+69) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} 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 (z <= (-13000000000000.0d0)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (z <= 2.1d+69) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
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 (z <= -13000000000000.0) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (z <= 2.1e+69) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -13000000000000.0: tmp = x + (y * (-0.3333333333333333 / z)) elif z <= 2.1e+69: tmp = -0.3333333333333333 * ((y - (t / y)) / z) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -13000000000000.0) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (z <= 2.1e+69) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); 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 (z <= -13000000000000.0) tmp = x + (y * (-0.3333333333333333 / z)); elseif (z <= 2.1e+69) tmp = -0.3333333333333333 * ((y - (t / y)) / z); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -13000000000000.0], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+69], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -13000000000000:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+69}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if z < -1.3e13Initial program 98.3%
Simplified93.9%
Taylor expanded in y around inf 66.7%
if -1.3e13 < z < 2.10000000000000015e69Initial program 90.2%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 87.7%
if 2.10000000000000015e69 < z Initial program 99.7%
Simplified93.9%
clear-num93.8%
inv-pow93.8%
Applied egg-rr93.8%
unpow-193.8%
Simplified93.8%
associate-*l/93.9%
*-un-lft-identity93.9%
div-inv93.9%
metadata-eval93.9%
Applied egg-rr93.9%
Taylor expanded in y around inf 88.0%
Final simplification82.5%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.8e-61)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(if (<= z 6.6e+67)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.8e-61) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else if (z <= 6.6e+67) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} 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 (z <= (-1.8d-61)) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
else if (z <= 6.6d+67) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
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 (z <= -1.8e-61) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else if (z <= 6.6e+67) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.8e-61: tmp = x + (0.3333333333333333 * (t / (y * z))) elif z <= 6.6e+67: tmp = -0.3333333333333333 * ((y - (t / y)) / z) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.8e-61) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); elseif (z <= 6.6e+67) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); 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 (z <= -1.8e-61) tmp = x + (0.3333333333333333 * (t / (y * z))); elseif (z <= 6.6e+67) tmp = -0.3333333333333333 * ((y - (t / y)) / z); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.8e-61], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e+67], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{-61}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+67}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if z < -1.80000000000000007e-61Initial program 97.5%
Simplified95.4%
Taylor expanded in y around 0 84.3%
if -1.80000000000000007e-61 < z < 6.6000000000000006e67Initial program 89.2%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 91.9%
if 6.6000000000000006e67 < z Initial program 99.7%
Simplified93.9%
clear-num93.8%
inv-pow93.8%
Applied egg-rr93.8%
unpow-193.8%
Simplified93.8%
associate-*l/93.9%
*-un-lft-identity93.9%
div-inv93.9%
metadata-eval93.9%
Applied egg-rr93.9%
Taylor expanded in y around inf 88.0%
Final simplification88.5%
(FPCore (x y z t) :precision binary64 (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))))
double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * ((y - (t / y)) / 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 + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
def code(x, y, z, t): return x + (-0.3333333333333333 * ((y - (t / y)) / z))
function code(x, y, z, t) return Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))) end
function tmp = code(x, y, z, t) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); end
code[x_, y_, z_, t_] := N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}
\end{array}
Initial program 94.1%
Simplified97.1%
Taylor expanded in z around 0 97.2%
Final simplification97.2%
(FPCore (x y z t) :precision binary64 (+ x (/ (- y (/ t y)) (* z -3.0))))
double code(double x, double y, double z, double t) {
return x + ((y - (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 - (t / y)) / (z * (-3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) / (z * -3.0));
}
def code(x, y, z, t): return x + ((y - (t / y)) / (z * -3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))) end
function tmp = code(x, y, z, t) tmp = x + ((y - (t / y)) / (z * -3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - \frac{t}{y}}{z \cdot -3}
\end{array}
Initial program 94.1%
Simplified97.1%
clear-num97.1%
inv-pow97.1%
Applied egg-rr97.1%
unpow-197.1%
Simplified97.1%
associate-*l/97.1%
*-un-lft-identity97.1%
div-inv97.2%
metadata-eval97.2%
Applied egg-rr97.2%
Final simplification97.2%
(FPCore (x y z t) :precision binary64 (if (<= z -4.6e-102) x (if (<= z 1.8e+114) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.6e-102) {
tmp = x;
} else if (z <= 1.8e+114) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-4.6d-102)) then
tmp = x
else if (z <= 1.8d+114) then
tmp = y * ((-0.3333333333333333d0) / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.6e-102) {
tmp = x;
} else if (z <= 1.8e+114) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.6e-102: tmp = x elif z <= 1.8e+114: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.6e-102) tmp = x; elseif (z <= 1.8e+114) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -4.6e-102) tmp = x; elseif (z <= 1.8e+114) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.6e-102], x, If[LessEqual[z, 1.8e+114], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{-102}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+114}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.59999999999999973e-102 or 1.8e114 < z Initial program 96.4%
Simplified94.8%
Taylor expanded in x around inf 54.4%
if -4.59999999999999973e-102 < z < 1.8e114Initial program 91.5%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 91.2%
Taylor expanded in y around inf 42.9%
associate-*r/42.9%
*-commutative42.9%
associate-*r/42.9%
Simplified42.9%
Final simplification48.9%
(FPCore (x y z t) :precision binary64 (if (<= z -4.3e-102) x (if (<= z 2.7e+114) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.3e-102) {
tmp = x;
} else if (z <= 2.7e+114) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-4.3d-102)) then
tmp = x
else if (z <= 2.7d+114) then
tmp = (-0.3333333333333333d0) * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.3e-102) {
tmp = x;
} else if (z <= 2.7e+114) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.3e-102: tmp = x elif z <= 2.7e+114: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.3e-102) tmp = x; elseif (z <= 2.7e+114) 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 (z <= -4.3e-102) tmp = x; elseif (z <= 2.7e+114) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.3e-102], x, If[LessEqual[z, 2.7e+114], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{-102}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+114}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.2999999999999997e-102 or 2.7e114 < z Initial program 96.4%
Simplified94.8%
Taylor expanded in x around inf 54.4%
if -4.2999999999999997e-102 < z < 2.7e114Initial program 91.5%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 91.2%
Taylor expanded in y around inf 42.9%
*-commutative42.9%
Simplified42.9%
Final simplification49.0%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 94.1%
Simplified97.1%
Taylor expanded in x around inf 33.2%
Final simplification33.2%
(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 2023287
(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))))