
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* (/ x z) (/ y (- b y))) (/ (- t a) (- b y))))
(t_2 (+ y (* z (- b y))))
(t_3 (* z (- t a)))
(t_4 (/ t_3 t_2)))
(if (<= z -600000000000.0)
t_1
(if (<= z -2.3e-228)
(+ (/ (* x y) t_2) t_4)
(if (<= z 5e-226)
(+ x t_4)
(if (<= z 1650000.0) (/ (+ (* x y) t_3) t_2) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y));
double t_2 = y + (z * (b - y));
double t_3 = z * (t - a);
double t_4 = t_3 / t_2;
double tmp;
if (z <= -600000000000.0) {
tmp = t_1;
} else if (z <= -2.3e-228) {
tmp = ((x * y) / t_2) + t_4;
} else if (z <= 5e-226) {
tmp = x + t_4;
} else if (z <= 1650000.0) {
tmp = ((x * y) + t_3) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y))
t_2 = y + (z * (b - y))
t_3 = z * (t - a)
t_4 = t_3 / t_2
if (z <= (-600000000000.0d0)) then
tmp = t_1
else if (z <= (-2.3d-228)) then
tmp = ((x * y) / t_2) + t_4
else if (z <= 5d-226) then
tmp = x + t_4
else if (z <= 1650000.0d0) then
tmp = ((x * y) + t_3) / 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 a, double b) {
double t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y));
double t_2 = y + (z * (b - y));
double t_3 = z * (t - a);
double t_4 = t_3 / t_2;
double tmp;
if (z <= -600000000000.0) {
tmp = t_1;
} else if (z <= -2.3e-228) {
tmp = ((x * y) / t_2) + t_4;
} else if (z <= 5e-226) {
tmp = x + t_4;
} else if (z <= 1650000.0) {
tmp = ((x * y) + t_3) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y)) t_2 = y + (z * (b - y)) t_3 = z * (t - a) t_4 = t_3 / t_2 tmp = 0 if z <= -600000000000.0: tmp = t_1 elif z <= -2.3e-228: tmp = ((x * y) / t_2) + t_4 elif z <= 5e-226: tmp = x + t_4 elif z <= 1650000.0: tmp = ((x * y) + t_3) / t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x / z) * Float64(y / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(t_3 / t_2) tmp = 0.0 if (z <= -600000000000.0) tmp = t_1; elseif (z <= -2.3e-228) tmp = Float64(Float64(Float64(x * y) / t_2) + t_4); elseif (z <= 5e-226) tmp = Float64(x + t_4); elseif (z <= 1650000.0) tmp = Float64(Float64(Float64(x * y) + t_3) / t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y)); t_2 = y + (z * (b - y)); t_3 = z * (t - a); t_4 = t_3 / t_2; tmp = 0.0; if (z <= -600000000000.0) tmp = t_1; elseif (z <= -2.3e-228) tmp = ((x * y) / t_2) + t_4; elseif (z <= 5e-226) tmp = x + t_4; elseif (z <= 1650000.0) tmp = ((x * y) + t_3) / t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / t$95$2), $MachinePrecision]}, If[LessEqual[z, -600000000000.0], t$95$1, If[LessEqual[z, -2.3e-228], N[(N[(N[(x * y), $MachinePrecision] / t$95$2), $MachinePrecision] + t$95$4), $MachinePrecision], If[LessEqual[z, 5e-226], N[(x + t$95$4), $MachinePrecision], If[LessEqual[z, 1650000.0], N[(N[(N[(x * y), $MachinePrecision] + t$95$3), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \frac{y}{b - y} + \frac{t - a}{b - y}\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{t_3}{t_2}\\
\mathbf{if}\;z \leq -600000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-228}:\\
\;\;\;\;\frac{x \cdot y}{t_2} + t_4\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-226}:\\
\;\;\;\;x + t_4\\
\mathbf{elif}\;z \leq 1650000:\\
\;\;\;\;\frac{x \cdot y + t_3}{t_2}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6e11 or 1.65e6 < z Initial program 37.8%
Taylor expanded in x around 0 37.8%
Taylor expanded in z around inf 37.8%
times-frac46.3%
Simplified46.3%
Taylor expanded in z around inf 99.5%
if -6e11 < z < -2.2999999999999999e-228Initial program 88.6%
Taylor expanded in x around 0 88.7%
if -2.2999999999999999e-228 < z < 4.9999999999999998e-226Initial program 72.2%
Taylor expanded in x around 0 72.2%
Taylor expanded in z around 0 99.9%
if 4.9999999999999998e-226 < z < 1.65e6Initial program 95.9%
Final simplification96.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* (/ x z) (/ y (- b y))) (/ (- t a) (- b y))))
(t_2 (* z (- t a)))
(t_3 (+ x (/ t_2 (+ y (* z (- b y))))))
(t_4 (/ (+ (* x y) t_2) (+ y (* z b)))))
(if (<= z -400000.0)
t_1
(if (<= z -2.2e-227)
t_4
(if (<= z 3.2e-227)
t_3
(if (<= z 1.5e-14) t_4 (if (<= z 0.75) t_3 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y));
double t_2 = z * (t - a);
double t_3 = x + (t_2 / (y + (z * (b - y))));
double t_4 = ((x * y) + t_2) / (y + (z * b));
double tmp;
if (z <= -400000.0) {
tmp = t_1;
} else if (z <= -2.2e-227) {
tmp = t_4;
} else if (z <= 3.2e-227) {
tmp = t_3;
} else if (z <= 1.5e-14) {
tmp = t_4;
} else if (z <= 0.75) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y))
t_2 = z * (t - a)
t_3 = x + (t_2 / (y + (z * (b - y))))
t_4 = ((x * y) + t_2) / (y + (z * b))
if (z <= (-400000.0d0)) then
tmp = t_1
else if (z <= (-2.2d-227)) then
tmp = t_4
else if (z <= 3.2d-227) then
tmp = t_3
else if (z <= 1.5d-14) then
tmp = t_4
else if (z <= 0.75d0) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y));
double t_2 = z * (t - a);
double t_3 = x + (t_2 / (y + (z * (b - y))));
double t_4 = ((x * y) + t_2) / (y + (z * b));
double tmp;
if (z <= -400000.0) {
tmp = t_1;
} else if (z <= -2.2e-227) {
tmp = t_4;
} else if (z <= 3.2e-227) {
tmp = t_3;
} else if (z <= 1.5e-14) {
tmp = t_4;
} else if (z <= 0.75) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y)) t_2 = z * (t - a) t_3 = x + (t_2 / (y + (z * (b - y)))) t_4 = ((x * y) + t_2) / (y + (z * b)) tmp = 0 if z <= -400000.0: tmp = t_1 elif z <= -2.2e-227: tmp = t_4 elif z <= 3.2e-227: tmp = t_3 elif z <= 1.5e-14: tmp = t_4 elif z <= 0.75: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x / z) * Float64(y / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(x + Float64(t_2 / Float64(y + Float64(z * Float64(b - y))))) t_4 = Float64(Float64(Float64(x * y) + t_2) / Float64(y + Float64(z * b))) tmp = 0.0 if (z <= -400000.0) tmp = t_1; elseif (z <= -2.2e-227) tmp = t_4; elseif (z <= 3.2e-227) tmp = t_3; elseif (z <= 1.5e-14) tmp = t_4; elseif (z <= 0.75) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y)); t_2 = z * (t - a); t_3 = x + (t_2 / (y + (z * (b - y)))); t_4 = ((x * y) + t_2) / (y + (z * b)); tmp = 0.0; if (z <= -400000.0) tmp = t_1; elseif (z <= -2.2e-227) tmp = t_4; elseif (z <= 3.2e-227) tmp = t_3; elseif (z <= 1.5e-14) tmp = t_4; elseif (z <= 0.75) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(t$95$2 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -400000.0], t$95$1, If[LessEqual[z, -2.2e-227], t$95$4, If[LessEqual[z, 3.2e-227], t$95$3, If[LessEqual[z, 1.5e-14], t$95$4, If[LessEqual[z, 0.75], t$95$3, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \frac{y}{b - y} + \frac{t - a}{b - y}\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := x + \frac{t_2}{y + z \cdot \left(b - y\right)}\\
t_4 := \frac{x \cdot y + t_2}{y + z \cdot b}\\
\mathbf{if}\;z \leq -400000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-227}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-227}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-14}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;z \leq 0.75:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4e5 or 0.75 < z Initial program 38.3%
Taylor expanded in x around 0 38.3%
Taylor expanded in z around inf 38.3%
times-frac46.7%
Simplified46.7%
Taylor expanded in z around inf 99.3%
if -4e5 < z < -2.19999999999999981e-227 or 3.2000000000000001e-227 < z < 1.4999999999999999e-14Initial program 91.8%
Taylor expanded in b around inf 90.8%
*-commutative90.8%
Simplified90.8%
if -2.19999999999999981e-227 < z < 3.2000000000000001e-227 or 1.4999999999999999e-14 < z < 0.75Initial program 77.8%
Taylor expanded in x around 0 77.8%
Taylor expanded in z around 0 96.2%
Final simplification95.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* (/ x z) (/ y (- b y))) (/ (- t a) (- b y))))
(t_2 (* z (- t a)))
(t_3 (/ (+ (* x y) t_2) (+ y (* z b)))))
(if (<= z -400000.0)
t_1
(if (<= z -2.2e-227)
t_3
(if (<= z 9.5e-225)
(+ x (/ t_2 (+ y (* z (- b y)))))
(if (<= z 6.6e-5)
t_3
(if (<= z 2050000.0)
(- (* (/ a y) (/ z (+ z -1.0))) (/ x (+ z -1.0)))
t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y));
double t_2 = z * (t - a);
double t_3 = ((x * y) + t_2) / (y + (z * b));
double tmp;
if (z <= -400000.0) {
tmp = t_1;
} else if (z <= -2.2e-227) {
tmp = t_3;
} else if (z <= 9.5e-225) {
tmp = x + (t_2 / (y + (z * (b - y))));
} else if (z <= 6.6e-5) {
tmp = t_3;
} else if (z <= 2050000.0) {
tmp = ((a / y) * (z / (z + -1.0))) - (x / (z + -1.0));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y))
t_2 = z * (t - a)
t_3 = ((x * y) + t_2) / (y + (z * b))
if (z <= (-400000.0d0)) then
tmp = t_1
else if (z <= (-2.2d-227)) then
tmp = t_3
else if (z <= 9.5d-225) then
tmp = x + (t_2 / (y + (z * (b - y))))
else if (z <= 6.6d-5) then
tmp = t_3
else if (z <= 2050000.0d0) then
tmp = ((a / y) * (z / (z + (-1.0d0)))) - (x / (z + (-1.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y));
double t_2 = z * (t - a);
double t_3 = ((x * y) + t_2) / (y + (z * b));
double tmp;
if (z <= -400000.0) {
tmp = t_1;
} else if (z <= -2.2e-227) {
tmp = t_3;
} else if (z <= 9.5e-225) {
tmp = x + (t_2 / (y + (z * (b - y))));
} else if (z <= 6.6e-5) {
tmp = t_3;
} else if (z <= 2050000.0) {
tmp = ((a / y) * (z / (z + -1.0))) - (x / (z + -1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y)) t_2 = z * (t - a) t_3 = ((x * y) + t_2) / (y + (z * b)) tmp = 0 if z <= -400000.0: tmp = t_1 elif z <= -2.2e-227: tmp = t_3 elif z <= 9.5e-225: tmp = x + (t_2 / (y + (z * (b - y)))) elif z <= 6.6e-5: tmp = t_3 elif z <= 2050000.0: tmp = ((a / y) * (z / (z + -1.0))) - (x / (z + -1.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x / z) * Float64(y / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(Float64(x * y) + t_2) / Float64(y + Float64(z * b))) tmp = 0.0 if (z <= -400000.0) tmp = t_1; elseif (z <= -2.2e-227) tmp = t_3; elseif (z <= 9.5e-225) tmp = Float64(x + Float64(t_2 / Float64(y + Float64(z * Float64(b - y))))); elseif (z <= 6.6e-5) tmp = t_3; elseif (z <= 2050000.0) tmp = Float64(Float64(Float64(a / y) * Float64(z / Float64(z + -1.0))) - Float64(x / Float64(z + -1.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y)); t_2 = z * (t - a); t_3 = ((x * y) + t_2) / (y + (z * b)); tmp = 0.0; if (z <= -400000.0) tmp = t_1; elseif (z <= -2.2e-227) tmp = t_3; elseif (z <= 9.5e-225) tmp = x + (t_2 / (y + (z * (b - y)))); elseif (z <= 6.6e-5) tmp = t_3; elseif (z <= 2050000.0) tmp = ((a / y) * (z / (z + -1.0))) - (x / (z + -1.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -400000.0], t$95$1, If[LessEqual[z, -2.2e-227], t$95$3, If[LessEqual[z, 9.5e-225], N[(x + N[(t$95$2 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e-5], t$95$3, If[LessEqual[z, 2050000.0], N[(N[(N[(a / y), $MachinePrecision] * N[(z / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \frac{y}{b - y} + \frac{t - a}{b - y}\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{x \cdot y + t_2}{y + z \cdot b}\\
\mathbf{if}\;z \leq -400000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-227}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-225}:\\
\;\;\;\;x + \frac{t_2}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-5}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 2050000:\\
\;\;\;\;\frac{a}{y} \cdot \frac{z}{z + -1} - \frac{x}{z + -1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4e5 or 2.05e6 < z Initial program 38.5%
Taylor expanded in x around 0 38.5%
Taylor expanded in z around inf 38.5%
times-frac46.7%
Simplified46.7%
Taylor expanded in z around inf 99.7%
if -4e5 < z < -2.19999999999999981e-227 or 9.50000000000000006e-225 < z < 6.6000000000000005e-5Initial program 92.1%
Taylor expanded in b around inf 89.9%
*-commutative89.9%
Simplified89.9%
if -2.19999999999999981e-227 < z < 9.50000000000000006e-225Initial program 72.2%
Taylor expanded in x around 0 72.2%
Taylor expanded in z around 0 99.9%
if 6.6000000000000005e-5 < z < 2.05e6Initial program 68.4%
Taylor expanded in y around -inf 99.0%
mul-1-neg99.0%
unsub-neg99.0%
associate-*r/99.0%
neg-mul-199.0%
sub-neg99.0%
metadata-eval99.0%
Simplified99.5%
Taylor expanded in a around inf 99.0%
mul-1-neg99.0%
times-frac99.5%
distribute-lft-neg-in99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification96.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ x (/ t_1 (+ y (* z (- b y))))))
(t_3 (/ (+ (* x y) t_1) (+ y (* z b))))
(t_4 (- (/ t (- b y)) (/ a (- b y)))))
(if (<= z -0.24)
t_4
(if (<= z -1.05e-228)
t_3
(if (<= z 2.6e-226)
t_2
(if (<= z 6e-14) t_3 (if (<= z 280.0) t_2 t_4)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = x + (t_1 / (y + (z * (b - y))));
double t_3 = ((x * y) + t_1) / (y + (z * b));
double t_4 = (t / (b - y)) - (a / (b - y));
double tmp;
if (z <= -0.24) {
tmp = t_4;
} else if (z <= -1.05e-228) {
tmp = t_3;
} else if (z <= 2.6e-226) {
tmp = t_2;
} else if (z <= 6e-14) {
tmp = t_3;
} else if (z <= 280.0) {
tmp = t_2;
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = z * (t - a)
t_2 = x + (t_1 / (y + (z * (b - y))))
t_3 = ((x * y) + t_1) / (y + (z * b))
t_4 = (t / (b - y)) - (a / (b - y))
if (z <= (-0.24d0)) then
tmp = t_4
else if (z <= (-1.05d-228)) then
tmp = t_3
else if (z <= 2.6d-226) then
tmp = t_2
else if (z <= 6d-14) then
tmp = t_3
else if (z <= 280.0d0) then
tmp = t_2
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = x + (t_1 / (y + (z * (b - y))));
double t_3 = ((x * y) + t_1) / (y + (z * b));
double t_4 = (t / (b - y)) - (a / (b - y));
double tmp;
if (z <= -0.24) {
tmp = t_4;
} else if (z <= -1.05e-228) {
tmp = t_3;
} else if (z <= 2.6e-226) {
tmp = t_2;
} else if (z <= 6e-14) {
tmp = t_3;
} else if (z <= 280.0) {
tmp = t_2;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = x + (t_1 / (y + (z * (b - y)))) t_3 = ((x * y) + t_1) / (y + (z * b)) t_4 = (t / (b - y)) - (a / (b - y)) tmp = 0 if z <= -0.24: tmp = t_4 elif z <= -1.05e-228: tmp = t_3 elif z <= 2.6e-226: tmp = t_2 elif z <= 6e-14: tmp = t_3 elif z <= 280.0: tmp = t_2 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(x + Float64(t_1 / Float64(y + Float64(z * Float64(b - y))))) t_3 = Float64(Float64(Float64(x * y) + t_1) / Float64(y + Float64(z * b))) t_4 = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))) tmp = 0.0 if (z <= -0.24) tmp = t_4; elseif (z <= -1.05e-228) tmp = t_3; elseif (z <= 2.6e-226) tmp = t_2; elseif (z <= 6e-14) tmp = t_3; elseif (z <= 280.0) tmp = t_2; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = x + (t_1 / (y + (z * (b - y)))); t_3 = ((x * y) + t_1) / (y + (z * b)); t_4 = (t / (b - y)) - (a / (b - y)); tmp = 0.0; if (z <= -0.24) tmp = t_4; elseif (z <= -1.05e-228) tmp = t_3; elseif (z <= 2.6e-226) tmp = t_2; elseif (z <= 6e-14) tmp = t_3; elseif (z <= 280.0) tmp = t_2; else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.24], t$95$4, If[LessEqual[z, -1.05e-228], t$95$3, If[LessEqual[z, 2.6e-226], t$95$2, If[LessEqual[z, 6e-14], t$95$3, If[LessEqual[z, 280.0], t$95$2, t$95$4]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := x + \frac{t_1}{y + z \cdot \left(b - y\right)}\\
t_3 := \frac{x \cdot y + t_1}{y + z \cdot b}\\
t_4 := \frac{t}{b - y} - \frac{a}{b - y}\\
\mathbf{if}\;z \leq -0.24:\\
\;\;\;\;t_4\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-228}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-226}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-14}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 280:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if z < -0.23999999999999999 or 280 < z Initial program 39.2%
Taylor expanded in x around 0 39.2%
Taylor expanded in z around inf 84.1%
if -0.23999999999999999 < z < -1.04999999999999995e-228 or 2.5999999999999998e-226 < z < 5.9999999999999997e-14Initial program 91.6%
Taylor expanded in b around inf 91.5%
*-commutative91.5%
Simplified91.5%
if -1.04999999999999995e-228 < z < 2.5999999999999998e-226 or 5.9999999999999997e-14 < z < 280Initial program 77.8%
Taylor expanded in x around 0 77.8%
Taylor expanded in z around 0 96.2%
Final simplification88.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* (/ x z) (/ y (- b y))) (/ (- t a) (- b y))))
(t_2 (* z (- t a)))
(t_3 (+ y (* z (- b y))))
(t_4 (/ (+ (* x y) t_2) t_3)))
(if (<= z -54000000000.0)
t_1
(if (<= z -2.5e-229)
t_4
(if (<= z 1.05e-226)
(+ x (/ t_2 t_3))
(if (<= z 1550000.0) t_4 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y));
double t_2 = z * (t - a);
double t_3 = y + (z * (b - y));
double t_4 = ((x * y) + t_2) / t_3;
double tmp;
if (z <= -54000000000.0) {
tmp = t_1;
} else if (z <= -2.5e-229) {
tmp = t_4;
} else if (z <= 1.05e-226) {
tmp = x + (t_2 / t_3);
} else if (z <= 1550000.0) {
tmp = t_4;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y))
t_2 = z * (t - a)
t_3 = y + (z * (b - y))
t_4 = ((x * y) + t_2) / t_3
if (z <= (-54000000000.0d0)) then
tmp = t_1
else if (z <= (-2.5d-229)) then
tmp = t_4
else if (z <= 1.05d-226) then
tmp = x + (t_2 / t_3)
else if (z <= 1550000.0d0) then
tmp = t_4
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y));
double t_2 = z * (t - a);
double t_3 = y + (z * (b - y));
double t_4 = ((x * y) + t_2) / t_3;
double tmp;
if (z <= -54000000000.0) {
tmp = t_1;
} else if (z <= -2.5e-229) {
tmp = t_4;
} else if (z <= 1.05e-226) {
tmp = x + (t_2 / t_3);
} else if (z <= 1550000.0) {
tmp = t_4;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y)) t_2 = z * (t - a) t_3 = y + (z * (b - y)) t_4 = ((x * y) + t_2) / t_3 tmp = 0 if z <= -54000000000.0: tmp = t_1 elif z <= -2.5e-229: tmp = t_4 elif z <= 1.05e-226: tmp = x + (t_2 / t_3) elif z <= 1550000.0: tmp = t_4 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x / z) * Float64(y / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(y + Float64(z * Float64(b - y))) t_4 = Float64(Float64(Float64(x * y) + t_2) / t_3) tmp = 0.0 if (z <= -54000000000.0) tmp = t_1; elseif (z <= -2.5e-229) tmp = t_4; elseif (z <= 1.05e-226) tmp = Float64(x + Float64(t_2 / t_3)); elseif (z <= 1550000.0) tmp = t_4; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x / z) * (y / (b - y))) + ((t - a) / (b - y)); t_2 = z * (t - a); t_3 = y + (z * (b - y)); t_4 = ((x * y) + t_2) / t_3; tmp = 0.0; if (z <= -54000000000.0) tmp = t_1; elseif (z <= -2.5e-229) tmp = t_4; elseif (z <= 1.05e-226) tmp = x + (t_2 / t_3); elseif (z <= 1550000.0) tmp = t_4; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$3), $MachinePrecision]}, If[LessEqual[z, -54000000000.0], t$95$1, If[LessEqual[z, -2.5e-229], t$95$4, If[LessEqual[z, 1.05e-226], N[(x + N[(t$95$2 / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1550000.0], t$95$4, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \frac{y}{b - y} + \frac{t - a}{b - y}\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := y + z \cdot \left(b - y\right)\\
t_4 := \frac{x \cdot y + t_2}{t_3}\\
\mathbf{if}\;z \leq -54000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-229}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-226}:\\
\;\;\;\;x + \frac{t_2}{t_3}\\
\mathbf{elif}\;z \leq 1550000:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.4e10 or 1.55e6 < z Initial program 37.8%
Taylor expanded in x around 0 37.8%
Taylor expanded in z around inf 37.8%
times-frac46.3%
Simplified46.3%
Taylor expanded in z around inf 99.5%
if -5.4e10 < z < -2.50000000000000008e-229 or 1.0500000000000001e-226 < z < 1.55e6Initial program 92.4%
if -2.50000000000000008e-229 < z < 1.0500000000000001e-226Initial program 72.2%
Taylor expanded in x around 0 72.2%
Taylor expanded in z around 0 99.9%
Final simplification96.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -5.2e+115)
t_1
(if (<= y -10600000000.0)
(/ (- a) (- b y))
(if (<= y -8e-79)
x
(if (<= y 1.66e+66)
(/ (- t a) b)
(if (or (<= y 2.3e+178) (not (<= y 9.8e+244)))
t_1
(/ (- a t) y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -5.2e+115) {
tmp = t_1;
} else if (y <= -10600000000.0) {
tmp = -a / (b - y);
} else if (y <= -8e-79) {
tmp = x;
} else if (y <= 1.66e+66) {
tmp = (t - a) / b;
} else if ((y <= 2.3e+178) || !(y <= 9.8e+244)) {
tmp = t_1;
} else {
tmp = (a - t) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-5.2d+115)) then
tmp = t_1
else if (y <= (-10600000000.0d0)) then
tmp = -a / (b - y)
else if (y <= (-8d-79)) then
tmp = x
else if (y <= 1.66d+66) then
tmp = (t - a) / b
else if ((y <= 2.3d+178) .or. (.not. (y <= 9.8d+244))) then
tmp = t_1
else
tmp = (a - t) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -5.2e+115) {
tmp = t_1;
} else if (y <= -10600000000.0) {
tmp = -a / (b - y);
} else if (y <= -8e-79) {
tmp = x;
} else if (y <= 1.66e+66) {
tmp = (t - a) / b;
} else if ((y <= 2.3e+178) || !(y <= 9.8e+244)) {
tmp = t_1;
} else {
tmp = (a - t) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -5.2e+115: tmp = t_1 elif y <= -10600000000.0: tmp = -a / (b - y) elif y <= -8e-79: tmp = x elif y <= 1.66e+66: tmp = (t - a) / b elif (y <= 2.3e+178) or not (y <= 9.8e+244): tmp = t_1 else: tmp = (a - t) / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -5.2e+115) tmp = t_1; elseif (y <= -10600000000.0) tmp = Float64(Float64(-a) / Float64(b - y)); elseif (y <= -8e-79) tmp = x; elseif (y <= 1.66e+66) tmp = Float64(Float64(t - a) / b); elseif ((y <= 2.3e+178) || !(y <= 9.8e+244)) tmp = t_1; else tmp = Float64(Float64(a - t) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -5.2e+115) tmp = t_1; elseif (y <= -10600000000.0) tmp = -a / (b - y); elseif (y <= -8e-79) tmp = x; elseif (y <= 1.66e+66) tmp = (t - a) / b; elseif ((y <= 2.3e+178) || ~((y <= 9.8e+244))) tmp = t_1; else tmp = (a - t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.2e+115], t$95$1, If[LessEqual[y, -10600000000.0], N[((-a) / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8e-79], x, If[LessEqual[y, 1.66e+66], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[Or[LessEqual[y, 2.3e+178], N[Not[LessEqual[y, 9.8e+244]], $MachinePrecision]], t$95$1, N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{+115}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -10600000000:\\
\;\;\;\;\frac{-a}{b - y}\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-79}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.66 \cdot 10^{+66}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+178} \lor \neg \left(y \leq 9.8 \cdot 10^{+244}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a - t}{y}\\
\end{array}
\end{array}
if y < -5.2000000000000001e115 or 1.6600000000000001e66 < y < 2.3000000000000001e178 or 9.8e244 < y Initial program 50.9%
Taylor expanded in y around inf 54.2%
mul-1-neg54.2%
unsub-neg54.2%
Simplified54.2%
if -5.2000000000000001e115 < y < -1.06e10Initial program 47.3%
Taylor expanded in a around inf 15.4%
mul-1-neg15.4%
distribute-lft-neg-out15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in z around inf 57.1%
associate-*r/57.1%
neg-mul-157.1%
Simplified57.1%
if -1.06e10 < y < -8e-79Initial program 83.2%
Taylor expanded in z around 0 54.4%
if -8e-79 < y < 1.6600000000000001e66Initial program 76.7%
Taylor expanded in y around 0 60.5%
if 2.3000000000000001e178 < y < 9.8e244Initial program 27.6%
Taylor expanded in x around 0 27.6%
Taylor expanded in z around inf 62.7%
Taylor expanded in b around 0 59.6%
distribute-lft-out--59.6%
div-sub59.6%
mul-1-neg59.6%
distribute-frac-neg59.6%
Simplified59.6%
Final simplification57.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -6e+113)
t_1
(if (<= y -12000000000.0)
(/ (- a) (- b y))
(if (<= y -2.2e-78)
x
(if (<= y 4.9e+66)
(- (/ t b) (/ a b))
(if (or (<= y 1.15e+178) (not (<= y 4e+244)))
t_1
(/ (- a t) y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -6e+113) {
tmp = t_1;
} else if (y <= -12000000000.0) {
tmp = -a / (b - y);
} else if (y <= -2.2e-78) {
tmp = x;
} else if (y <= 4.9e+66) {
tmp = (t / b) - (a / b);
} else if ((y <= 1.15e+178) || !(y <= 4e+244)) {
tmp = t_1;
} else {
tmp = (a - t) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-6d+113)) then
tmp = t_1
else if (y <= (-12000000000.0d0)) then
tmp = -a / (b - y)
else if (y <= (-2.2d-78)) then
tmp = x
else if (y <= 4.9d+66) then
tmp = (t / b) - (a / b)
else if ((y <= 1.15d+178) .or. (.not. (y <= 4d+244))) then
tmp = t_1
else
tmp = (a - t) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -6e+113) {
tmp = t_1;
} else if (y <= -12000000000.0) {
tmp = -a / (b - y);
} else if (y <= -2.2e-78) {
tmp = x;
} else if (y <= 4.9e+66) {
tmp = (t / b) - (a / b);
} else if ((y <= 1.15e+178) || !(y <= 4e+244)) {
tmp = t_1;
} else {
tmp = (a - t) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -6e+113: tmp = t_1 elif y <= -12000000000.0: tmp = -a / (b - y) elif y <= -2.2e-78: tmp = x elif y <= 4.9e+66: tmp = (t / b) - (a / b) elif (y <= 1.15e+178) or not (y <= 4e+244): tmp = t_1 else: tmp = (a - t) / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -6e+113) tmp = t_1; elseif (y <= -12000000000.0) tmp = Float64(Float64(-a) / Float64(b - y)); elseif (y <= -2.2e-78) tmp = x; elseif (y <= 4.9e+66) tmp = Float64(Float64(t / b) - Float64(a / b)); elseif ((y <= 1.15e+178) || !(y <= 4e+244)) tmp = t_1; else tmp = Float64(Float64(a - t) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -6e+113) tmp = t_1; elseif (y <= -12000000000.0) tmp = -a / (b - y); elseif (y <= -2.2e-78) tmp = x; elseif (y <= 4.9e+66) tmp = (t / b) - (a / b); elseif ((y <= 1.15e+178) || ~((y <= 4e+244))) tmp = t_1; else tmp = (a - t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6e+113], t$95$1, If[LessEqual[y, -12000000000.0], N[((-a) / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.2e-78], x, If[LessEqual[y, 4.9e+66], N[(N[(t / b), $MachinePrecision] - N[(a / b), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 1.15e+178], N[Not[LessEqual[y, 4e+244]], $MachinePrecision]], t$95$1, N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -6 \cdot 10^{+113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -12000000000:\\
\;\;\;\;\frac{-a}{b - y}\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{-78}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{+66}:\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+178} \lor \neg \left(y \leq 4 \cdot 10^{+244}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a - t}{y}\\
\end{array}
\end{array}
if y < -6e113 or 4.89999999999999975e66 < y < 1.15e178 or 4.0000000000000003e244 < y Initial program 50.9%
Taylor expanded in y around inf 54.2%
mul-1-neg54.2%
unsub-neg54.2%
Simplified54.2%
if -6e113 < y < -1.2e10Initial program 47.3%
Taylor expanded in a around inf 15.4%
mul-1-neg15.4%
distribute-lft-neg-out15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in z around inf 57.1%
associate-*r/57.1%
neg-mul-157.1%
Simplified57.1%
if -1.2e10 < y < -2.1999999999999999e-78Initial program 83.2%
Taylor expanded in z around 0 54.4%
if -2.1999999999999999e-78 < y < 4.89999999999999975e66Initial program 76.7%
Taylor expanded in x around 0 76.7%
Taylor expanded in y around 0 60.5%
if 1.15e178 < y < 4.0000000000000003e244Initial program 27.6%
Taylor expanded in x around 0 27.6%
Taylor expanded in z around inf 62.7%
Taylor expanded in b around 0 59.6%
distribute-lft-out--59.6%
div-sub59.6%
mul-1-neg59.6%
distribute-frac-neg59.6%
Simplified59.6%
Final simplification57.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -2.85e-18)
t_1
(if (<= z 0.00094)
(+ x (* z x))
(if (or (<= z 1.05e+255) (not (<= z 3.6e+282))) t_1 (/ a y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -2.85e-18) {
tmp = t_1;
} else if (z <= 0.00094) {
tmp = x + (z * x);
} else if ((z <= 1.05e+255) || !(z <= 3.6e+282)) {
tmp = t_1;
} else {
tmp = a / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-2.85d-18)) then
tmp = t_1
else if (z <= 0.00094d0) then
tmp = x + (z * x)
else if ((z <= 1.05d+255) .or. (.not. (z <= 3.6d+282))) then
tmp = t_1
else
tmp = a / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -2.85e-18) {
tmp = t_1;
} else if (z <= 0.00094) {
tmp = x + (z * x);
} else if ((z <= 1.05e+255) || !(z <= 3.6e+282)) {
tmp = t_1;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -2.85e-18: tmp = t_1 elif z <= 0.00094: tmp = x + (z * x) elif (z <= 1.05e+255) or not (z <= 3.6e+282): tmp = t_1 else: tmp = a / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -2.85e-18) tmp = t_1; elseif (z <= 0.00094) tmp = Float64(x + Float64(z * x)); elseif ((z <= 1.05e+255) || !(z <= 3.6e+282)) tmp = t_1; else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -2.85e-18) tmp = t_1; elseif (z <= 0.00094) tmp = x + (z * x); elseif ((z <= 1.05e+255) || ~((z <= 3.6e+282))) tmp = t_1; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.85e-18], t$95$1, If[LessEqual[z, 0.00094], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.05e+255], N[Not[LessEqual[z, 3.6e+282]], $MachinePrecision]], t$95$1, N[(a / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -2.85 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 0.00094:\\
\;\;\;\;x + z \cdot x\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+255} \lor \neg \left(z \leq 3.6 \cdot 10^{+282}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -2.84999999999999986e-18 or 9.39999999999999972e-4 < z < 1.05e255 or 3.59999999999999986e282 < z Initial program 43.9%
Taylor expanded in t around inf 18.8%
associate-/l*26.1%
+-commutative26.1%
fma-udef26.1%
associate-/r/25.6%
Simplified25.6%
Taylor expanded in z around inf 44.1%
if -2.84999999999999986e-18 < z < 9.39999999999999972e-4Initial program 87.3%
Taylor expanded in y around inf 51.3%
mul-1-neg51.3%
unsub-neg51.3%
Simplified51.3%
Taylor expanded in z around 0 51.3%
*-commutative51.3%
Simplified51.3%
if 1.05e255 < z < 3.59999999999999986e282Initial program 0.0%
Taylor expanded in a around inf 0.3%
mul-1-neg0.3%
distribute-lft-neg-out0.3%
*-commutative0.3%
Simplified0.3%
Taylor expanded in z around inf 87.9%
associate-*r/87.9%
neg-mul-187.9%
Simplified87.9%
Taylor expanded in b around 0 64.7%
Final simplification48.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -2.55e-18)
t_1
(if (<= z 3.6e+50)
(/ x (- 1.0 z))
(if (or (<= z 3.5e+252) (not (<= z 3.8e+282))) t_1 (/ a y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -2.55e-18) {
tmp = t_1;
} else if (z <= 3.6e+50) {
tmp = x / (1.0 - z);
} else if ((z <= 3.5e+252) || !(z <= 3.8e+282)) {
tmp = t_1;
} else {
tmp = a / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-2.55d-18)) then
tmp = t_1
else if (z <= 3.6d+50) then
tmp = x / (1.0d0 - z)
else if ((z <= 3.5d+252) .or. (.not. (z <= 3.8d+282))) then
tmp = t_1
else
tmp = a / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -2.55e-18) {
tmp = t_1;
} else if (z <= 3.6e+50) {
tmp = x / (1.0 - z);
} else if ((z <= 3.5e+252) || !(z <= 3.8e+282)) {
tmp = t_1;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -2.55e-18: tmp = t_1 elif z <= 3.6e+50: tmp = x / (1.0 - z) elif (z <= 3.5e+252) or not (z <= 3.8e+282): tmp = t_1 else: tmp = a / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -2.55e-18) tmp = t_1; elseif (z <= 3.6e+50) tmp = Float64(x / Float64(1.0 - z)); elseif ((z <= 3.5e+252) || !(z <= 3.8e+282)) tmp = t_1; else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -2.55e-18) tmp = t_1; elseif (z <= 3.6e+50) tmp = x / (1.0 - z); elseif ((z <= 3.5e+252) || ~((z <= 3.8e+282))) tmp = t_1; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.55e-18], t$95$1, If[LessEqual[z, 3.6e+50], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 3.5e+252], N[Not[LessEqual[z, 3.8e+282]], $MachinePrecision]], t$95$1, N[(a / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -2.55 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+50}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+252} \lor \neg \left(z \leq 3.8 \cdot 10^{+282}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -2.54999999999999991e-18 or 3.59999999999999986e50 < z < 3.4999999999999999e252 or 3.8e282 < z Initial program 44.5%
Taylor expanded in t around inf 19.1%
associate-/l*26.1%
+-commutative26.1%
fma-udef26.1%
associate-/r/25.6%
Simplified25.6%
Taylor expanded in z around inf 45.5%
if -2.54999999999999991e-18 < z < 3.59999999999999986e50Initial program 83.7%
Taylor expanded in y around inf 51.1%
mul-1-neg51.1%
unsub-neg51.1%
Simplified51.1%
if 3.4999999999999999e252 < z < 3.8e282Initial program 0.0%
Taylor expanded in a around inf 0.3%
mul-1-neg0.3%
distribute-lft-neg-out0.3%
*-commutative0.3%
Simplified0.3%
Taylor expanded in z around inf 87.9%
associate-*r/87.9%
neg-mul-187.9%
Simplified87.9%
Taylor expanded in b around 0 64.7%
Final simplification48.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -1.25e+120)
t_1
(if (<= y -16000000000.0)
(/ (- a) (- b y))
(if (<= y -2.4e-78) x (if (<= y 2.75e+66) (/ (- t a) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -1.25e+120) {
tmp = t_1;
} else if (y <= -16000000000.0) {
tmp = -a / (b - y);
} else if (y <= -2.4e-78) {
tmp = x;
} else if (y <= 2.75e+66) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-1.25d+120)) then
tmp = t_1
else if (y <= (-16000000000.0d0)) then
tmp = -a / (b - y)
else if (y <= (-2.4d-78)) then
tmp = x
else if (y <= 2.75d+66) then
tmp = (t - a) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -1.25e+120) {
tmp = t_1;
} else if (y <= -16000000000.0) {
tmp = -a / (b - y);
} else if (y <= -2.4e-78) {
tmp = x;
} else if (y <= 2.75e+66) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -1.25e+120: tmp = t_1 elif y <= -16000000000.0: tmp = -a / (b - y) elif y <= -2.4e-78: tmp = x elif y <= 2.75e+66: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -1.25e+120) tmp = t_1; elseif (y <= -16000000000.0) tmp = Float64(Float64(-a) / Float64(b - y)); elseif (y <= -2.4e-78) tmp = x; elseif (y <= 2.75e+66) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -1.25e+120) tmp = t_1; elseif (y <= -16000000000.0) tmp = -a / (b - y); elseif (y <= -2.4e-78) tmp = x; elseif (y <= 2.75e+66) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.25e+120], t$95$1, If[LessEqual[y, -16000000000.0], N[((-a) / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.4e-78], x, If[LessEqual[y, 2.75e+66], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+120}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -16000000000:\\
\;\;\;\;\frac{-a}{b - y}\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-78}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{+66}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.25000000000000005e120 or 2.75e66 < y Initial program 47.5%
Taylor expanded in y around inf 50.5%
mul-1-neg50.5%
unsub-neg50.5%
Simplified50.5%
if -1.25000000000000005e120 < y < -1.6e10Initial program 47.3%
Taylor expanded in a around inf 15.4%
mul-1-neg15.4%
distribute-lft-neg-out15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in z around inf 57.1%
associate-*r/57.1%
neg-mul-157.1%
Simplified57.1%
if -1.6e10 < y < -2.4e-78Initial program 83.2%
Taylor expanded in z around 0 54.4%
if -2.4e-78 < y < 2.75e66Initial program 76.7%
Taylor expanded in y around 0 60.5%
Final simplification55.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.8e-9) (not (<= z 3400.0))) (- (/ t (- b y)) (/ a (- b y))) (+ x (/ (* z (- t a)) (+ y (* z (- b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.8e-9) || !(z <= 3400.0)) {
tmp = (t / (b - y)) - (a / (b - y));
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.8d-9)) .or. (.not. (z <= 3400.0d0))) then
tmp = (t / (b - y)) - (a / (b - y))
else
tmp = x + ((z * (t - a)) / (y + (z * (b - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.8e-9) || !(z <= 3400.0)) {
tmp = (t / (b - y)) - (a / (b - y));
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.8e-9) or not (z <= 3400.0): tmp = (t / (b - y)) - (a / (b - y)) else: tmp = x + ((z * (t - a)) / (y + (z * (b - y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.8e-9) || !(z <= 3400.0)) tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.8e-9) || ~((z <= 3400.0))) tmp = (t / (b - y)) - (a / (b - y)); else tmp = x + ((z * (t - a)) / (y + (z * (b - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.8e-9], N[Not[LessEqual[z, 3400.0]], $MachinePrecision]], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-9} \lor \neg \left(z \leq 3400\right):\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -2.79999999999999984e-9 or 3400 < z Initial program 39.6%
Taylor expanded in x around 0 39.6%
Taylor expanded in z around inf 84.2%
if -2.79999999999999984e-9 < z < 3400Initial program 87.7%
Taylor expanded in x around 0 87.7%
Taylor expanded in z around 0 85.8%
Final simplification85.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -4.8e+106)
(/ a y)
(if (<= z -2.5e-18)
(/ (- a) b)
(if (<= z 0.000235) x (if (<= z 5.6e+238) (/ t b) (/ a y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.8e+106) {
tmp = a / y;
} else if (z <= -2.5e-18) {
tmp = -a / b;
} else if (z <= 0.000235) {
tmp = x;
} else if (z <= 5.6e+238) {
tmp = t / b;
} else {
tmp = a / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-4.8d+106)) then
tmp = a / y
else if (z <= (-2.5d-18)) then
tmp = -a / b
else if (z <= 0.000235d0) then
tmp = x
else if (z <= 5.6d+238) then
tmp = t / b
else
tmp = a / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.8e+106) {
tmp = a / y;
} else if (z <= -2.5e-18) {
tmp = -a / b;
} else if (z <= 0.000235) {
tmp = x;
} else if (z <= 5.6e+238) {
tmp = t / b;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4.8e+106: tmp = a / y elif z <= -2.5e-18: tmp = -a / b elif z <= 0.000235: tmp = x elif z <= 5.6e+238: tmp = t / b else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.8e+106) tmp = Float64(a / y); elseif (z <= -2.5e-18) tmp = Float64(Float64(-a) / b); elseif (z <= 0.000235) tmp = x; elseif (z <= 5.6e+238) tmp = Float64(t / b); else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4.8e+106) tmp = a / y; elseif (z <= -2.5e-18) tmp = -a / b; elseif (z <= 0.000235) tmp = x; elseif (z <= 5.6e+238) tmp = t / b; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.8e+106], N[(a / y), $MachinePrecision], If[LessEqual[z, -2.5e-18], N[((-a) / b), $MachinePrecision], If[LessEqual[z, 0.000235], x, If[LessEqual[z, 5.6e+238], N[(t / b), $MachinePrecision], N[(a / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+106}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-18}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq 0.000235:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+238}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -4.8000000000000001e106 or 5.59999999999999981e238 < z Initial program 20.6%
Taylor expanded in a around inf 13.2%
mul-1-neg13.2%
distribute-lft-neg-out13.2%
*-commutative13.2%
Simplified13.2%
Taylor expanded in z around inf 55.8%
associate-*r/55.8%
neg-mul-155.8%
Simplified55.8%
Taylor expanded in b around 0 37.5%
if -4.8000000000000001e106 < z < -2.50000000000000018e-18Initial program 82.0%
Taylor expanded in a around inf 40.2%
mul-1-neg40.2%
distribute-lft-neg-out40.2%
*-commutative40.2%
Simplified40.2%
Taylor expanded in y around 0 36.0%
associate-*r/36.0%
neg-mul-136.0%
Simplified36.0%
if -2.50000000000000018e-18 < z < 2.34999999999999993e-4Initial program 87.3%
Taylor expanded in z around 0 50.7%
if 2.34999999999999993e-4 < z < 5.59999999999999981e238Initial program 45.9%
Taylor expanded in t around inf 21.6%
associate-/l*28.4%
+-commutative28.4%
fma-udef28.4%
associate-/r/27.1%
Simplified27.1%
Taylor expanded in b around inf 32.7%
Final simplification42.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -9e+110)
(/ a y)
(if (<= z -3.1e-18)
(/ (- a) b)
(if (<= z 0.00017) (+ x (* z x)) (if (<= z 6.8e+238) (/ t b) (/ a y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -9e+110) {
tmp = a / y;
} else if (z <= -3.1e-18) {
tmp = -a / b;
} else if (z <= 0.00017) {
tmp = x + (z * x);
} else if (z <= 6.8e+238) {
tmp = t / b;
} else {
tmp = a / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-9d+110)) then
tmp = a / y
else if (z <= (-3.1d-18)) then
tmp = -a / b
else if (z <= 0.00017d0) then
tmp = x + (z * x)
else if (z <= 6.8d+238) then
tmp = t / b
else
tmp = a / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -9e+110) {
tmp = a / y;
} else if (z <= -3.1e-18) {
tmp = -a / b;
} else if (z <= 0.00017) {
tmp = x + (z * x);
} else if (z <= 6.8e+238) {
tmp = t / b;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -9e+110: tmp = a / y elif z <= -3.1e-18: tmp = -a / b elif z <= 0.00017: tmp = x + (z * x) elif z <= 6.8e+238: tmp = t / b else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -9e+110) tmp = Float64(a / y); elseif (z <= -3.1e-18) tmp = Float64(Float64(-a) / b); elseif (z <= 0.00017) tmp = Float64(x + Float64(z * x)); elseif (z <= 6.8e+238) tmp = Float64(t / b); else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -9e+110) tmp = a / y; elseif (z <= -3.1e-18) tmp = -a / b; elseif (z <= 0.00017) tmp = x + (z * x); elseif (z <= 6.8e+238) tmp = t / b; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -9e+110], N[(a / y), $MachinePrecision], If[LessEqual[z, -3.1e-18], N[((-a) / b), $MachinePrecision], If[LessEqual[z, 0.00017], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+238], N[(t / b), $MachinePrecision], N[(a / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+110}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-18}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq 0.00017:\\
\;\;\;\;x + z \cdot x\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+238}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -9.0000000000000005e110 or 6.7999999999999995e238 < z Initial program 20.6%
Taylor expanded in a around inf 13.2%
mul-1-neg13.2%
distribute-lft-neg-out13.2%
*-commutative13.2%
Simplified13.2%
Taylor expanded in z around inf 55.8%
associate-*r/55.8%
neg-mul-155.8%
Simplified55.8%
Taylor expanded in b around 0 37.5%
if -9.0000000000000005e110 < z < -3.10000000000000007e-18Initial program 82.0%
Taylor expanded in a around inf 40.2%
mul-1-neg40.2%
distribute-lft-neg-out40.2%
*-commutative40.2%
Simplified40.2%
Taylor expanded in y around 0 36.0%
associate-*r/36.0%
neg-mul-136.0%
Simplified36.0%
if -3.10000000000000007e-18 < z < 1.7e-4Initial program 87.3%
Taylor expanded in y around inf 51.3%
mul-1-neg51.3%
unsub-neg51.3%
Simplified51.3%
Taylor expanded in z around 0 51.3%
*-commutative51.3%
Simplified51.3%
if 1.7e-4 < z < 6.7999999999999995e238Initial program 45.9%
Taylor expanded in t around inf 21.6%
associate-/l*28.4%
+-commutative28.4%
fma-udef28.4%
associate-/r/27.1%
Simplified27.1%
Taylor expanded in b around inf 32.7%
Final simplification42.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.15e-14) (not (<= z 0.13))) (- (/ t (- b y)) (/ a (- b y))) (- x (/ (* z (+ (* x b) (- a t))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.15e-14) || !(z <= 0.13)) {
tmp = (t / (b - y)) - (a / (b - y));
} else {
tmp = x - ((z * ((x * b) + (a - t))) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.15d-14)) .or. (.not. (z <= 0.13d0))) then
tmp = (t / (b - y)) - (a / (b - y))
else
tmp = x - ((z * ((x * b) + (a - t))) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.15e-14) || !(z <= 0.13)) {
tmp = (t / (b - y)) - (a / (b - y));
} else {
tmp = x - ((z * ((x * b) + (a - t))) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.15e-14) or not (z <= 0.13): tmp = (t / (b - y)) - (a / (b - y)) else: tmp = x - ((z * ((x * b) + (a - t))) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.15e-14) || !(z <= 0.13)) tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); else tmp = Float64(x - Float64(Float64(z * Float64(Float64(x * b) + Float64(a - t))) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.15e-14) || ~((z <= 0.13))) tmp = (t / (b - y)) - (a / (b - y)); else tmp = x - ((z * ((x * b) + (a - t))) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.15e-14], N[Not[LessEqual[z, 0.13]], $MachinePrecision]], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z * N[(N[(x * b), $MachinePrecision] + N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{-14} \lor \neg \left(z \leq 0.13\right):\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot \left(x \cdot b + \left(a - t\right)\right)}{y}\\
\end{array}
\end{array}
if z < -2.14999999999999999e-14 or 0.13 < z Initial program 40.1%
Taylor expanded in x around 0 40.1%
Taylor expanded in z around inf 84.3%
if -2.14999999999999999e-14 < z < 0.13Initial program 87.6%
Taylor expanded in b around inf 85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in y around -inf 75.5%
mul-1-neg75.5%
unsub-neg75.5%
distribute-lft-out--75.5%
mul-1-neg75.5%
*-commutative75.5%
associate-*r*71.5%
distribute-rgt-out--71.5%
Simplified71.5%
Final simplification78.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.8e-14) (not (<= z 0.13))) (- (/ t (- b y)) (/ a (- b y))) (/ (+ (* x y) (* z (- t a))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.8e-14) || !(z <= 0.13)) {
tmp = (t / (b - y)) - (a / (b - y));
} else {
tmp = ((x * y) + (z * (t - a))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.8d-14)) .or. (.not. (z <= 0.13d0))) then
tmp = (t / (b - y)) - (a / (b - y))
else
tmp = ((x * y) + (z * (t - a))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.8e-14) || !(z <= 0.13)) {
tmp = (t / (b - y)) - (a / (b - y));
} else {
tmp = ((x * y) + (z * (t - a))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.8e-14) or not (z <= 0.13): tmp = (t / (b - y)) - (a / (b - y)) else: tmp = ((x * y) + (z * (t - a))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.8e-14) || !(z <= 0.13)) tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); else tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.8e-14) || ~((z <= 0.13))) tmp = (t / (b - y)) - (a / (b - y)); else tmp = ((x * y) + (z * (t - a))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.8e-14], N[Not[LessEqual[z, 0.13]], $MachinePrecision]], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-14} \lor \neg \left(z \leq 0.13\right):\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -2.8000000000000001e-14 or 0.13 < z Initial program 40.1%
Taylor expanded in x around 0 40.1%
Taylor expanded in z around inf 84.3%
if -2.8000000000000001e-14 < z < 0.13Initial program 87.6%
Taylor expanded in b around inf 85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in b around 0 64.8%
Final simplification75.0%
(FPCore (x y z t a b) :precision binary64 (if (<= z -6800000.0) (/ a y) (if (<= z 0.00345) x (if (<= z 6.5e+238) (/ t b) (/ a y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6800000.0) {
tmp = a / y;
} else if (z <= 0.00345) {
tmp = x;
} else if (z <= 6.5e+238) {
tmp = t / b;
} else {
tmp = a / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-6800000.0d0)) then
tmp = a / y
else if (z <= 0.00345d0) then
tmp = x
else if (z <= 6.5d+238) then
tmp = t / b
else
tmp = a / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6800000.0) {
tmp = a / y;
} else if (z <= 0.00345) {
tmp = x;
} else if (z <= 6.5e+238) {
tmp = t / b;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -6800000.0: tmp = a / y elif z <= 0.00345: tmp = x elif z <= 6.5e+238: tmp = t / b else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -6800000.0) tmp = Float64(a / y); elseif (z <= 0.00345) tmp = x; elseif (z <= 6.5e+238) tmp = Float64(t / b); else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -6800000.0) tmp = a / y; elseif (z <= 0.00345) tmp = x; elseif (z <= 6.5e+238) tmp = t / b; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6800000.0], N[(a / y), $MachinePrecision], If[LessEqual[z, 0.00345], x, If[LessEqual[z, 6.5e+238], N[(t / b), $MachinePrecision], N[(a / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6800000:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq 0.00345:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+238}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -6.8e6 or 6.5000000000000005e238 < z Initial program 34.7%
Taylor expanded in a around inf 21.2%
mul-1-neg21.2%
distribute-lft-neg-out21.2%
*-commutative21.2%
Simplified21.2%
Taylor expanded in z around inf 55.1%
associate-*r/55.1%
neg-mul-155.1%
Simplified55.1%
Taylor expanded in b around 0 32.2%
if -6.8e6 < z < 0.0034499999999999999Initial program 87.9%
Taylor expanded in z around 0 48.7%
if 0.0034499999999999999 < z < 6.5000000000000005e238Initial program 45.9%
Taylor expanded in t around inf 21.6%
associate-/l*28.4%
+-commutative28.4%
fma-udef28.4%
associate-/r/27.1%
Simplified27.1%
Taylor expanded in b around inf 32.7%
Final simplification40.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.95e-18) (not (<= z 3.5e+50))) (/ (- t a) (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.95e-18) || !(z <= 3.5e+50)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.95d-18)) .or. (.not. (z <= 3.5d+50))) then
tmp = (t - a) / (b - y)
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.95e-18) || !(z <= 3.5e+50)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.95e-18) or not (z <= 3.5e+50): tmp = (t - a) / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.95e-18) || !(z <= 3.5e+50)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.95e-18) || ~((z <= 3.5e+50))) tmp = (t - a) / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.95e-18], N[Not[LessEqual[z, 3.5e+50]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-18} \lor \neg \left(z \leq 3.5 \cdot 10^{+50}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -1.95000000000000002e-18 or 3.50000000000000006e50 < z Initial program 41.8%
Taylor expanded in z around inf 86.0%
if -1.95000000000000002e-18 < z < 3.50000000000000006e50Initial program 83.7%
Taylor expanded in y around inf 51.1%
mul-1-neg51.1%
unsub-neg51.1%
Simplified51.1%
Final simplification68.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.55e-18) (- (/ t (- b y)) (/ a (- b y))) (if (<= z 3.5e+50) (/ x (- 1.0 z)) (/ (- t a) (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.55e-18) {
tmp = (t / (b - y)) - (a / (b - y));
} else if (z <= 3.5e+50) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.55d-18)) then
tmp = (t / (b - y)) - (a / (b - y))
else if (z <= 3.5d+50) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.55e-18) {
tmp = (t / (b - y)) - (a / (b - y));
} else if (z <= 3.5e+50) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.55e-18: tmp = (t / (b - y)) - (a / (b - y)) elif z <= 3.5e+50: tmp = x / (1.0 - z) else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.55e-18) tmp = Float64(Float64(t / Float64(b - y)) - Float64(a / Float64(b - y))); elseif (z <= 3.5e+50) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.55e-18) tmp = (t / (b - y)) - (a / (b - y)); elseif (z <= 3.5e+50) tmp = x / (1.0 - z); else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.55e-18], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+50], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.55 \cdot 10^{-18}:\\
\;\;\;\;\frac{t}{b - y} - \frac{a}{b - y}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+50}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if z < -2.54999999999999991e-18Initial program 44.3%
Taylor expanded in x around 0 44.3%
Taylor expanded in z around inf 83.6%
if -2.54999999999999991e-18 < z < 3.50000000000000006e50Initial program 83.7%
Taylor expanded in y around inf 51.1%
mul-1-neg51.1%
unsub-neg51.1%
Simplified51.1%
if 3.50000000000000006e50 < z Initial program 38.6%
Taylor expanded in z around inf 88.9%
Final simplification68.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.4e-78) (not (<= y 1.8e+66))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.4e-78) || !(y <= 1.8e+66)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.4d-78)) .or. (.not. (y <= 1.8d+66))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.4e-78) || !(y <= 1.8e+66)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.4e-78) or not (y <= 1.8e+66): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.4e-78) || !(y <= 1.8e+66)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.4e-78) || ~((y <= 1.8e+66))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.4e-78], N[Not[LessEqual[y, 1.8e+66]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-78} \lor \neg \left(y \leq 1.8 \cdot 10^{+66}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -2.4e-78 or 1.8e66 < y Initial program 51.7%
Taylor expanded in y around inf 46.9%
mul-1-neg46.9%
unsub-neg46.9%
Simplified46.9%
if -2.4e-78 < y < 1.8e66Initial program 76.7%
Taylor expanded in y around 0 60.5%
Final simplification52.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -400000.0) (not (<= z 1.0))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -400000.0) || !(z <= 1.0)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-400000.0d0)) .or. (.not. (z <= 1.0d0))) then
tmp = a / y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -400000.0) || !(z <= 1.0)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -400000.0) or not (z <= 1.0): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -400000.0) || !(z <= 1.0)) tmp = Float64(a / y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -400000.0) || ~((z <= 1.0))) tmp = a / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -400000.0], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -400000 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4e5 or 1 < z Initial program 38.3%
Taylor expanded in a around inf 22.7%
mul-1-neg22.7%
distribute-lft-neg-out22.7%
*-commutative22.7%
Simplified22.7%
Taylor expanded in z around inf 47.5%
associate-*r/47.5%
neg-mul-147.5%
Simplified47.5%
Taylor expanded in b around 0 27.5%
if -4e5 < z < 1Initial program 88.0%
Taylor expanded in z around 0 48.3%
Final simplification37.7%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 62.7%
Taylor expanded in z around 0 25.4%
Final simplification25.4%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2024019
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))