
(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 17 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 (* z (- t a)))
(t_2 (* (/ y z) (/ (- t a) (pow (- b y) 2.0))))
(t_3 (/ (- t a) (- b y)))
(t_4 (+ y (* z (- b y)))))
(if (<= z -0.086)
(- (+ (* y (/ (/ x z) (- b y))) t_3) t_2)
(if (<= z 2.4e-11)
(/ (+ (* x y) t_1) t_4)
(if (<= z 3.9e+139)
(+ (* (/ x z) (/ y (- b y))) (/ t_1 t_4))
(- (+ t_3 (/ (* (/ x z) y) (- b y))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (y / z) * ((t - a) / pow((b - y), 2.0));
double t_3 = (t - a) / (b - y);
double t_4 = y + (z * (b - y));
double tmp;
if (z <= -0.086) {
tmp = ((y * ((x / z) / (b - y))) + t_3) - t_2;
} else if (z <= 2.4e-11) {
tmp = ((x * y) + t_1) / t_4;
} else if (z <= 3.9e+139) {
tmp = ((x / z) * (y / (b - y))) + (t_1 / t_4);
} else {
tmp = (t_3 + (((x / z) * y) / (b - y))) - t_2;
}
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 = (y / z) * ((t - a) / ((b - y) ** 2.0d0))
t_3 = (t - a) / (b - y)
t_4 = y + (z * (b - y))
if (z <= (-0.086d0)) then
tmp = ((y * ((x / z) / (b - y))) + t_3) - t_2
else if (z <= 2.4d-11) then
tmp = ((x * y) + t_1) / t_4
else if (z <= 3.9d+139) then
tmp = ((x / z) * (y / (b - y))) + (t_1 / t_4)
else
tmp = (t_3 + (((x / z) * y) / (b - y))) - t_2
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 = (y / z) * ((t - a) / Math.pow((b - y), 2.0));
double t_3 = (t - a) / (b - y);
double t_4 = y + (z * (b - y));
double tmp;
if (z <= -0.086) {
tmp = ((y * ((x / z) / (b - y))) + t_3) - t_2;
} else if (z <= 2.4e-11) {
tmp = ((x * y) + t_1) / t_4;
} else if (z <= 3.9e+139) {
tmp = ((x / z) * (y / (b - y))) + (t_1 / t_4);
} else {
tmp = (t_3 + (((x / z) * y) / (b - y))) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (y / z) * ((t - a) / math.pow((b - y), 2.0)) t_3 = (t - a) / (b - y) t_4 = y + (z * (b - y)) tmp = 0 if z <= -0.086: tmp = ((y * ((x / z) / (b - y))) + t_3) - t_2 elif z <= 2.4e-11: tmp = ((x * y) + t_1) / t_4 elif z <= 3.9e+139: tmp = ((x / z) * (y / (b - y))) + (t_1 / t_4) else: tmp = (t_3 + (((x / z) * y) / (b - y))) - t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(y / z) * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0))) t_3 = Float64(Float64(t - a) / Float64(b - y)) t_4 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if (z <= -0.086) tmp = Float64(Float64(Float64(y * Float64(Float64(x / z) / Float64(b - y))) + t_3) - t_2); elseif (z <= 2.4e-11) tmp = Float64(Float64(Float64(x * y) + t_1) / t_4); elseif (z <= 3.9e+139) tmp = Float64(Float64(Float64(x / z) * Float64(y / Float64(b - y))) + Float64(t_1 / t_4)); else tmp = Float64(Float64(t_3 + Float64(Float64(Float64(x / z) * y) / Float64(b - y))) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (y / z) * ((t - a) / ((b - y) ^ 2.0)); t_3 = (t - a) / (b - y); t_4 = y + (z * (b - y)); tmp = 0.0; if (z <= -0.086) tmp = ((y * ((x / z) / (b - y))) + t_3) - t_2; elseif (z <= 2.4e-11) tmp = ((x * y) + t_1) / t_4; elseif (z <= 3.9e+139) tmp = ((x / z) * (y / (b - y))) + (t_1 / t_4); else tmp = (t_3 + (((x / z) * y) / (b - y))) - t_2; 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[(N[(y / z), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.086], N[(N[(N[(y * N[(N[(x / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[z, 2.4e-11], N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$4), $MachinePrecision], If[LessEqual[z, 3.9e+139], N[(N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / t$95$4), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$3 + N[(N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{y}{z} \cdot \frac{t - a}{{\left(b - y\right)}^{2}}\\
t_3 := \frac{t - a}{b - y}\\
t_4 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -0.086:\\
\;\;\;\;\left(y \cdot \frac{\frac{x}{z}}{b - y} + t_3\right) - t_2\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-11}:\\
\;\;\;\;\frac{x \cdot y + t_1}{t_4}\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+139}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{y}{b - y} + \frac{t_1}{t_4}\\
\mathbf{else}:\\
\;\;\;\;\left(t_3 + \frac{\frac{x}{z} \cdot y}{b - y}\right) - t_2\\
\end{array}
\end{array}
if z < -0.085999999999999993Initial program 30.5%
Taylor expanded in z around inf 62.6%
associate--r+62.6%
+-commutative62.6%
associate--l+62.6%
times-frac71.4%
associate-*r/66.9%
div-sub66.9%
times-frac80.3%
Simplified80.3%
expm1-log1p-u77.5%
expm1-udef73.5%
associate-/l*77.4%
Applied egg-rr77.4%
expm1-def81.4%
expm1-log1p86.9%
associate-/r/86.9%
Simplified86.9%
if -0.085999999999999993 < z < 2.4000000000000001e-11Initial program 91.6%
if 2.4000000000000001e-11 < z < 3.90000000000000006e139Initial program 75.0%
Taylor expanded in x around 0 75.0%
Taylor expanded in z around inf 75.0%
times-frac92.5%
Simplified92.5%
if 3.90000000000000006e139 < z Initial program 17.2%
Taylor expanded in z around inf 71.0%
associate--r+71.0%
+-commutative71.0%
associate--l+71.0%
times-frac77.6%
associate-*r/77.6%
div-sub77.7%
times-frac93.3%
Simplified93.3%
Final simplification91.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3
(-
(+ (* y (/ (/ x z) (- b y))) (/ (- t a) (- b y)))
(* (/ y z) (/ (- t a) (pow (- b y) 2.0))))))
(if (<= z -0.086)
t_3
(if (<= z 2.4e-11)
(/ (+ (* x y) t_1) t_2)
(if (<= z 6e+143) (+ (* (/ x z) (/ y (- b y))) (/ t_1 t_2)) t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = ((y * ((x / z) / (b - y))) + ((t - a) / (b - y))) - ((y / z) * ((t - a) / pow((b - y), 2.0)));
double tmp;
if (z <= -0.086) {
tmp = t_3;
} else if (z <= 2.4e-11) {
tmp = ((x * y) + t_1) / t_2;
} else if (z <= 6e+143) {
tmp = ((x / z) * (y / (b - y))) + (t_1 / t_2);
} else {
tmp = t_3;
}
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 = z * (t - a)
t_2 = y + (z * (b - y))
t_3 = ((y * ((x / z) / (b - y))) + ((t - a) / (b - y))) - ((y / z) * ((t - a) / ((b - y) ** 2.0d0)))
if (z <= (-0.086d0)) then
tmp = t_3
else if (z <= 2.4d-11) then
tmp = ((x * y) + t_1) / t_2
else if (z <= 6d+143) then
tmp = ((x / z) * (y / (b - y))) + (t_1 / t_2)
else
tmp = t_3
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 = y + (z * (b - y));
double t_3 = ((y * ((x / z) / (b - y))) + ((t - a) / (b - y))) - ((y / z) * ((t - a) / Math.pow((b - y), 2.0)));
double tmp;
if (z <= -0.086) {
tmp = t_3;
} else if (z <= 2.4e-11) {
tmp = ((x * y) + t_1) / t_2;
} else if (z <= 6e+143) {
tmp = ((x / z) * (y / (b - y))) + (t_1 / t_2);
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = y + (z * (b - y)) t_3 = ((y * ((x / z) / (b - y))) + ((t - a) / (b - y))) - ((y / z) * ((t - a) / math.pow((b - y), 2.0))) tmp = 0 if z <= -0.086: tmp = t_3 elif z <= 2.4e-11: tmp = ((x * y) + t_1) / t_2 elif z <= 6e+143: tmp = ((x / z) * (y / (b - y))) + (t_1 / t_2) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(Float64(y * Float64(Float64(x / z) / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) - Float64(Float64(y / z) * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0)))) tmp = 0.0 if (z <= -0.086) tmp = t_3; elseif (z <= 2.4e-11) tmp = Float64(Float64(Float64(x * y) + t_1) / t_2); elseif (z <= 6e+143) tmp = Float64(Float64(Float64(x / z) * Float64(y / Float64(b - y))) + Float64(t_1 / t_2)); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = y + (z * (b - y)); t_3 = ((y * ((x / z) / (b - y))) + ((t - a) / (b - y))) - ((y / z) * ((t - a) / ((b - y) ^ 2.0))); tmp = 0.0; if (z <= -0.086) tmp = t_3; elseif (z <= 2.4e-11) tmp = ((x * y) + t_1) / t_2; elseif (z <= 6e+143) tmp = ((x / z) * (y / (b - y))) + (t_1 / t_2); else tmp = t_3; 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[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(y * N[(N[(x / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y / z), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.086], t$95$3, If[LessEqual[z, 2.4e-11], N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 6e+143], N[(N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \left(y \cdot \frac{\frac{x}{z}}{b - y} + \frac{t - a}{b - y}\right) - \frac{y}{z} \cdot \frac{t - a}{{\left(b - y\right)}^{2}}\\
\mathbf{if}\;z \leq -0.086:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-11}:\\
\;\;\;\;\frac{x \cdot y + t_1}{t_2}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+143}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{y}{b - y} + \frac{t_1}{t_2}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -0.085999999999999993 or 6.0000000000000001e143 < z Initial program 24.1%
Taylor expanded in z around inf 67.6%
associate--r+67.6%
+-commutative67.6%
associate--l+67.6%
times-frac75.3%
associate-*r/73.1%
div-sub73.1%
times-frac86.6%
Simplified86.6%
expm1-log1p-u84.1%
expm1-udef78.0%
associate-/l*80.0%
Applied egg-rr80.0%
expm1-def86.1%
expm1-log1p90.0%
associate-/r/88.7%
Simplified88.7%
if -0.085999999999999993 < z < 2.4000000000000001e-11Initial program 91.6%
if 2.4000000000000001e-11 < z < 6.0000000000000001e143Initial program 73.2%
Taylor expanded in x around 0 73.2%
Taylor expanded in z around inf 73.2%
times-frac92.7%
Simplified92.7%
Final simplification90.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))) (t_2 (pow (- b y) 2.0)))
(if (<= z -0.086)
(- (+ (* y (/ (/ x z) (- b y))) t_1) (* (/ y z) (/ (- t a) t_2)))
(if (<= z 5.6e+58)
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y))))
(+
(+ t_1 (/ 1.0 (/ (+ (/ b y) -1.0) (/ x z))))
(* (/ y z) (/ (- a t) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = pow((b - y), 2.0);
double tmp;
if (z <= -0.086) {
tmp = ((y * ((x / z) / (b - y))) + t_1) - ((y / z) * ((t - a) / t_2));
} else if (z <= 5.6e+58) {
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
} else {
tmp = (t_1 + (1.0 / (((b / y) + -1.0) / (x / z)))) + ((y / z) * ((a - t) / t_2));
}
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) :: tmp
t_1 = (t - a) / (b - y)
t_2 = (b - y) ** 2.0d0
if (z <= (-0.086d0)) then
tmp = ((y * ((x / z) / (b - y))) + t_1) - ((y / z) * ((t - a) / t_2))
else if (z <= 5.6d+58) then
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
else
tmp = (t_1 + (1.0d0 / (((b / y) + (-1.0d0)) / (x / z)))) + ((y / z) * ((a - t) / t_2))
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 - a) / (b - y);
double t_2 = Math.pow((b - y), 2.0);
double tmp;
if (z <= -0.086) {
tmp = ((y * ((x / z) / (b - y))) + t_1) - ((y / z) * ((t - a) / t_2));
} else if (z <= 5.6e+58) {
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
} else {
tmp = (t_1 + (1.0 / (((b / y) + -1.0) / (x / z)))) + ((y / z) * ((a - t) / t_2));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = math.pow((b - y), 2.0) tmp = 0 if z <= -0.086: tmp = ((y * ((x / z) / (b - y))) + t_1) - ((y / z) * ((t - a) / t_2)) elif z <= 5.6e+58: tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) else: tmp = (t_1 + (1.0 / (((b / y) + -1.0) / (x / z)))) + ((y / z) * ((a - t) / t_2)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(b - y) ^ 2.0 tmp = 0.0 if (z <= -0.086) tmp = Float64(Float64(Float64(y * Float64(Float64(x / z) / Float64(b - y))) + t_1) - Float64(Float64(y / z) * Float64(Float64(t - a) / t_2))); elseif (z <= 5.6e+58) tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))); else tmp = Float64(Float64(t_1 + Float64(1.0 / Float64(Float64(Float64(b / y) + -1.0) / Float64(x / z)))) + Float64(Float64(y / z) * Float64(Float64(a - t) / t_2))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = (b - y) ^ 2.0; tmp = 0.0; if (z <= -0.086) tmp = ((y * ((x / z) / (b - y))) + t_1) - ((y / z) * ((t - a) / t_2)); elseif (z <= 5.6e+58) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); else tmp = (t_1 + (1.0 / (((b / y) + -1.0) / (x / z)))) + ((y / z) * ((a - t) / t_2)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[z, -0.086], N[(N[(N[(y * N[(N[(x / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(N[(y / z), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e+58], 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], N[(N[(t$95$1 + N[(1.0 / N[(N[(N[(b / y), $MachinePrecision] + -1.0), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := {\left(b - y\right)}^{2}\\
\mathbf{if}\;z \leq -0.086:\\
\;\;\;\;\left(y \cdot \frac{\frac{x}{z}}{b - y} + t_1\right) - \frac{y}{z} \cdot \frac{t - a}{t_2}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+58}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(t_1 + \frac{1}{\frac{\frac{b}{y} + -1}{\frac{x}{z}}}\right) + \frac{y}{z} \cdot \frac{a - t}{t_2}\\
\end{array}
\end{array}
if z < -0.085999999999999993Initial program 30.5%
Taylor expanded in z around inf 62.6%
associate--r+62.6%
+-commutative62.6%
associate--l+62.6%
times-frac71.4%
associate-*r/66.9%
div-sub66.9%
times-frac80.3%
Simplified80.3%
expm1-log1p-u77.5%
expm1-udef73.5%
associate-/l*77.4%
Applied egg-rr77.4%
expm1-def81.4%
expm1-log1p86.9%
associate-/r/86.9%
Simplified86.9%
if -0.085999999999999993 < z < 5.5999999999999996e58Initial program 91.0%
if 5.5999999999999996e58 < z Initial program 31.8%
Taylor expanded in z around inf 65.5%
associate--r+65.5%
+-commutative65.5%
associate--l+65.5%
times-frac77.2%
associate-*r/75.7%
div-sub75.8%
times-frac88.0%
Simplified88.0%
clear-num87.9%
inv-pow87.9%
*-commutative87.9%
Applied egg-rr87.9%
unpow-187.9%
associate-/r*90.9%
div-sub90.9%
sub-neg90.9%
*-inverses90.9%
metadata-eval90.9%
Simplified90.9%
Final simplification90.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (- t a) (- b y))))
(if (<= z -1.8e+16)
t_3
(if (<= z 2.4e-11)
(/ (+ (* x y) t_1) t_2)
(if (<= z 6e+143) (+ (* (/ x z) (/ y (- b y))) (/ t_1 t_2)) t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -1.8e+16) {
tmp = t_3;
} else if (z <= 2.4e-11) {
tmp = ((x * y) + t_1) / t_2;
} else if (z <= 6e+143) {
tmp = ((x / z) * (y / (b - y))) + (t_1 / t_2);
} else {
tmp = t_3;
}
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 = z * (t - a)
t_2 = y + (z * (b - y))
t_3 = (t - a) / (b - y)
if (z <= (-1.8d+16)) then
tmp = t_3
else if (z <= 2.4d-11) then
tmp = ((x * y) + t_1) / t_2
else if (z <= 6d+143) then
tmp = ((x / z) * (y / (b - y))) + (t_1 / t_2)
else
tmp = t_3
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 = y + (z * (b - y));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -1.8e+16) {
tmp = t_3;
} else if (z <= 2.4e-11) {
tmp = ((x * y) + t_1) / t_2;
} else if (z <= 6e+143) {
tmp = ((x / z) * (y / (b - y))) + (t_1 / t_2);
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = y + (z * (b - y)) t_3 = (t - a) / (b - y) tmp = 0 if z <= -1.8e+16: tmp = t_3 elif z <= 2.4e-11: tmp = ((x * y) + t_1) / t_2 elif z <= 6e+143: tmp = ((x / z) * (y / (b - y))) + (t_1 / t_2) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.8e+16) tmp = t_3; elseif (z <= 2.4e-11) tmp = Float64(Float64(Float64(x * y) + t_1) / t_2); elseif (z <= 6e+143) tmp = Float64(Float64(Float64(x / z) * Float64(y / Float64(b - y))) + Float64(t_1 / t_2)); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = y + (z * (b - y)); t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.8e+16) tmp = t_3; elseif (z <= 2.4e-11) tmp = ((x * y) + t_1) / t_2; elseif (z <= 6e+143) tmp = ((x / z) * (y / (b - y))) + (t_1 / t_2); else tmp = t_3; 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[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+16], t$95$3, If[LessEqual[z, 2.4e-11], N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 6e+143], N[(N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+16}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-11}:\\
\;\;\;\;\frac{x \cdot y + t_1}{t_2}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+143}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{y}{b - y} + \frac{t_1}{t_2}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -1.8e16 or 6.0000000000000001e143 < z Initial program 23.5%
Taylor expanded in z around inf 87.0%
if -1.8e16 < z < 2.4000000000000001e-11Initial program 91.0%
if 2.4000000000000001e-11 < z < 6.0000000000000001e143Initial program 73.2%
Taylor expanded in x around 0 73.2%
Taylor expanded in z around inf 73.2%
times-frac92.7%
Simplified92.7%
Final simplification89.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.8e+17) (not (<= z 2.5e+95))) (/ (- t a) (- b y)) (/ (+ (* x y) (* 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 <= -1.8e+17) || !(z <= 2.5e+95)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (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 <= (-1.8d+17)) .or. (.not. (z <= 2.5d+95))) then
tmp = (t - a) / (b - y)
else
tmp = ((x * y) + (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 <= -1.8e+17) || !(z <= 2.5e+95)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.8e+17) or not (z <= 2.5e+95): tmp = (t - a) / (b - y) else: tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.8e+17) || !(z <= 2.5e+95)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) + 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 <= -1.8e+17) || ~((z <= 2.5e+95))) tmp = (t - a) / (b - y); else tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.8e+17], N[Not[LessEqual[z, 2.5e+95]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+17} \lor \neg \left(z \leq 2.5 \cdot 10^{+95}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1.8e17 or 2.50000000000000012e95 < z Initial program 25.3%
Taylor expanded in z around inf 84.4%
if -1.8e17 < z < 2.50000000000000012e95Initial program 89.4%
Final simplification87.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.2) (not (<= z 2.4e-11))) (/ (- t 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 <= -9.2) || !(z <= 2.4e-11)) {
tmp = (t - 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 <= (-9.2d0)) .or. (.not. (z <= 2.4d-11))) then
tmp = (t - 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 <= -9.2) || !(z <= 2.4e-11)) {
tmp = (t - 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 <= -9.2) or not (z <= 2.4e-11): tmp = (t - 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 <= -9.2) || !(z <= 2.4e-11)) tmp = Float64(Float64(t - 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 <= -9.2) || ~((z <= 2.4e-11))) tmp = (t - 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, -9.2], N[Not[LessEqual[z, 2.4e-11]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $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 -9.2 \lor \neg \left(z \leq 2.4 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{t - 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 < -9.1999999999999993 or 2.4000000000000001e-11 < z Initial program 40.1%
Taylor expanded in z around inf 79.8%
if -9.1999999999999993 < z < 2.4000000000000001e-11Initial program 90.9%
Taylor expanded in x around 0 90.9%
Taylor expanded in z around 0 83.3%
Final simplification81.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1300000000.0) (not (<= z 1.85))) (/ (- t a) (- b y)) (/ (+ (* x y) (* z (- t a))) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1300000000.0) || !(z <= 1.85)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * 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 ((z <= (-1300000000.0d0)) .or. (.not. (z <= 1.85d0))) then
tmp = (t - a) / (b - y)
else
tmp = ((x * y) + (z * (t - a))) / (y + (z * 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 ((z <= -1300000000.0) || !(z <= 1.85)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1300000000.0) or not (z <= 1.85): tmp = (t - a) / (b - y) else: tmp = ((x * y) + (z * (t - a))) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1300000000.0) || !(z <= 1.85)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1300000000.0) || ~((z <= 1.85))) tmp = (t - a) / (b - y); else tmp = ((x * y) + (z * (t - a))) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1300000000.0], N[Not[LessEqual[z, 1.85]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1300000000 \lor \neg \left(z \leq 1.85\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -1.3e9 or 1.8500000000000001 < z Initial program 38.7%
Taylor expanded in z around inf 80.9%
if -1.3e9 < z < 1.8500000000000001Initial program 91.1%
Taylor expanded in b around inf 90.0%
*-commutative90.0%
Simplified90.0%
Final simplification85.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) y)) (t_2 (/ x (- 1.0 z))))
(if (<= y -3.8e+172)
t_2
(if (<= y -1.38e+119)
t_1
(if (<= y -2.8)
t_2
(if (<= y 145000.0)
(/ (- t a) b)
(if (or (<= y 5.2e+117) (not (<= y 5e+148))) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / y;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -3.8e+172) {
tmp = t_2;
} else if (y <= -1.38e+119) {
tmp = t_1;
} else if (y <= -2.8) {
tmp = t_2;
} else if (y <= 145000.0) {
tmp = (t - a) / b;
} else if ((y <= 5.2e+117) || !(y <= 5e+148)) {
tmp = 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) :: tmp
t_1 = (a - t) / y
t_2 = x / (1.0d0 - z)
if (y <= (-3.8d+172)) then
tmp = t_2
else if (y <= (-1.38d+119)) then
tmp = t_1
else if (y <= (-2.8d0)) then
tmp = t_2
else if (y <= 145000.0d0) then
tmp = (t - a) / b
else if ((y <= 5.2d+117) .or. (.not. (y <= 5d+148))) 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 a, double b) {
double t_1 = (a - t) / y;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -3.8e+172) {
tmp = t_2;
} else if (y <= -1.38e+119) {
tmp = t_1;
} else if (y <= -2.8) {
tmp = t_2;
} else if (y <= 145000.0) {
tmp = (t - a) / b;
} else if ((y <= 5.2e+117) || !(y <= 5e+148)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / y t_2 = x / (1.0 - z) tmp = 0 if y <= -3.8e+172: tmp = t_2 elif y <= -1.38e+119: tmp = t_1 elif y <= -2.8: tmp = t_2 elif y <= 145000.0: tmp = (t - a) / b elif (y <= 5.2e+117) or not (y <= 5e+148): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / y) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.8e+172) tmp = t_2; elseif (y <= -1.38e+119) tmp = t_1; elseif (y <= -2.8) tmp = t_2; elseif (y <= 145000.0) tmp = Float64(Float64(t - a) / b); elseif ((y <= 5.2e+117) || !(y <= 5e+148)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / y; t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -3.8e+172) tmp = t_2; elseif (y <= -1.38e+119) tmp = t_1; elseif (y <= -2.8) tmp = t_2; elseif (y <= 145000.0) tmp = (t - a) / b; elseif ((y <= 5.2e+117) || ~((y <= 5e+148))) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+172], t$95$2, If[LessEqual[y, -1.38e+119], t$95$1, If[LessEqual[y, -2.8], t$95$2, If[LessEqual[y, 145000.0], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[Or[LessEqual[y, 5.2e+117], N[Not[LessEqual[y, 5e+148]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+172}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.38 \cdot 10^{+119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.8:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 145000:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+117} \lor \neg \left(y \leq 5 \cdot 10^{+148}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.7999999999999997e172 or -1.38000000000000001e119 < y < -2.7999999999999998 or 145000 < y < 5.1999999999999999e117 or 5.00000000000000024e148 < y Initial program 57.8%
Taylor expanded in y around inf 56.6%
mul-1-neg56.6%
unsub-neg56.6%
Simplified56.6%
if -3.7999999999999997e172 < y < -1.38000000000000001e119 or 5.1999999999999999e117 < y < 5.00000000000000024e148Initial program 49.3%
Taylor expanded in z around inf 73.5%
Taylor expanded in b around 0 69.6%
associate-*r/69.6%
neg-mul-169.6%
Simplified69.6%
if -2.7999999999999998 < y < 145000Initial program 74.3%
Taylor expanded in y around 0 59.0%
Final simplification59.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.95e-94) (not (<= z 2.2e-48))) (/ (- t a) (- b y)) (+ x (/ (* z (- (- t a) (* x b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.95e-94) || !(z <= 2.2e-48)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * ((t - a) - (x * 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 <= (-1.95d-94)) .or. (.not. (z <= 2.2d-48))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * ((t - a) - (x * 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 <= -1.95e-94) || !(z <= 2.2e-48)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * ((t - a) - (x * b))) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.95e-94) or not (z <= 2.2e-48): tmp = (t - a) / (b - y) else: tmp = x + ((z * ((t - a) - (x * b))) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.95e-94) || !(z <= 2.2e-48)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * Float64(Float64(t - a) - Float64(x * b))) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.95e-94) || ~((z <= 2.2e-48))) tmp = (t - a) / (b - y); else tmp = x + ((z * ((t - a) - (x * b))) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.95e-94], N[Not[LessEqual[z, 2.2e-48]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(N[(t - a), $MachinePrecision] - N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-94} \lor \neg \left(z \leq 2.2 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(\left(t - a\right) - x \cdot b\right)}{y}\\
\end{array}
\end{array}
if z < -1.9500000000000001e-94 or 2.20000000000000013e-48 < z Initial program 50.0%
Taylor expanded in z around inf 76.4%
if -1.9500000000000001e-94 < z < 2.20000000000000013e-48Initial program 89.4%
Taylor expanded in b around inf 89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in y around -inf 78.0%
mul-1-neg78.0%
unsub-neg78.0%
distribute-lft-out--78.0%
mul-1-neg78.0%
*-commutative78.0%
associate-*r*74.3%
distribute-rgt-out--74.3%
Simplified74.3%
Final simplification75.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.1e-94) (not (<= z 2.2e-48))) (/ (- t 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.1e-94) || !(z <= 2.2e-48)) {
tmp = (t - 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.1d-94)) .or. (.not. (z <= 2.2d-48))) then
tmp = (t - 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.1e-94) || !(z <= 2.2e-48)) {
tmp = (t - 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.1e-94) or not (z <= 2.2e-48): tmp = (t - 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.1e-94) || !(z <= 2.2e-48)) tmp = Float64(Float64(t - 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.1e-94) || ~((z <= 2.2e-48))) tmp = (t - 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.1e-94], N[Not[LessEqual[z, 2.2e-48]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $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.1 \cdot 10^{-94} \lor \neg \left(z \leq 2.2 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -2.1000000000000001e-94 or 2.20000000000000013e-48 < z Initial program 50.0%
Taylor expanded in z around inf 76.4%
if -2.1000000000000001e-94 < z < 2.20000000000000013e-48Initial program 89.4%
Taylor expanded in b around inf 89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in b around 0 69.0%
Final simplification73.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -4.2e-48)
t_1
(if (<= y 1.75e-159)
(- (/ a b))
(if (<= y 2900000000.0) (/ t (- b y)) 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 <= -4.2e-48) {
tmp = t_1;
} else if (y <= 1.75e-159) {
tmp = -(a / b);
} else if (y <= 2900000000.0) {
tmp = t / (b - y);
} 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 <= (-4.2d-48)) then
tmp = t_1
else if (y <= 1.75d-159) then
tmp = -(a / b)
else if (y <= 2900000000.0d0) then
tmp = t / (b - y)
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 <= -4.2e-48) {
tmp = t_1;
} else if (y <= 1.75e-159) {
tmp = -(a / b);
} else if (y <= 2900000000.0) {
tmp = t / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -4.2e-48: tmp = t_1 elif y <= 1.75e-159: tmp = -(a / b) elif y <= 2900000000.0: tmp = t / (b - y) 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 <= -4.2e-48) tmp = t_1; elseif (y <= 1.75e-159) tmp = Float64(-Float64(a / b)); elseif (y <= 2900000000.0) tmp = Float64(t / Float64(b - y)); 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 <= -4.2e-48) tmp = t_1; elseif (y <= 1.75e-159) tmp = -(a / b); elseif (y <= 2900000000.0) tmp = t / (b - y); 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, -4.2e-48], t$95$1, If[LessEqual[y, 1.75e-159], (-N[(a / b), $MachinePrecision]), If[LessEqual[y, 2900000000.0], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-159}:\\
\;\;\;\;-\frac{a}{b}\\
\mathbf{elif}\;y \leq 2900000000:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.19999999999999977e-48 or 2.9e9 < y Initial program 55.9%
Taylor expanded in y around inf 49.7%
mul-1-neg49.7%
unsub-neg49.7%
Simplified49.7%
if -4.19999999999999977e-48 < y < 1.75000000000000001e-159Initial program 81.9%
Taylor expanded in a around inf 44.4%
mul-1-neg44.4%
distribute-lft-neg-out44.4%
*-commutative44.4%
Simplified44.4%
Taylor expanded in y around 0 41.1%
associate-*r/41.1%
neg-mul-141.1%
Simplified41.1%
if 1.75000000000000001e-159 < y < 2.9e9Initial program 59.5%
Taylor expanded in z around inf 67.0%
Taylor expanded in t around inf 43.7%
Final simplification46.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.4e-100) (not (<= z 2.2e-48))) (/ (- t a) (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.4e-100) || !(z <= 2.2e-48)) {
tmp = (t - a) / (b - 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 <= (-1.4d-100)) .or. (.not. (z <= 2.2d-48))) then
tmp = (t - a) / (b - 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 <= -1.4e-100) || !(z <= 2.2e-48)) {
tmp = (t - a) / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.4e-100) or not (z <= 2.2e-48): tmp = (t - a) / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.4e-100) || !(z <= 2.2e-48)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.4e-100) || ~((z <= 2.2e-48))) tmp = (t - a) / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.4e-100], N[Not[LessEqual[z, 2.2e-48]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{-100} \lor \neg \left(z \leq 2.2 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.39999999999999998e-100 or 2.20000000000000013e-48 < z Initial program 50.0%
Taylor expanded in z around inf 76.4%
if -1.39999999999999998e-100 < z < 2.20000000000000013e-48Initial program 89.4%
Taylor expanded in z around 0 52.1%
Final simplification67.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ a b))))
(if (<= z -7.5e-95)
t_1
(if (<= z 2.2e-48) x (if (<= z 4.5e+198) t_1 (/ t b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -(a / b);
double tmp;
if (z <= -7.5e-95) {
tmp = t_1;
} else if (z <= 2.2e-48) {
tmp = x;
} else if (z <= 4.5e+198) {
tmp = t_1;
} else {
tmp = t / 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) :: t_1
real(8) :: tmp
t_1 = -(a / b)
if (z <= (-7.5d-95)) then
tmp = t_1
else if (z <= 2.2d-48) then
tmp = x
else if (z <= 4.5d+198) then
tmp = t_1
else
tmp = t / b
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 = -(a / b);
double tmp;
if (z <= -7.5e-95) {
tmp = t_1;
} else if (z <= 2.2e-48) {
tmp = x;
} else if (z <= 4.5e+198) {
tmp = t_1;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -(a / b) tmp = 0 if z <= -7.5e-95: tmp = t_1 elif z <= 2.2e-48: tmp = x elif z <= 4.5e+198: tmp = t_1 else: tmp = t / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(-Float64(a / b)) tmp = 0.0 if (z <= -7.5e-95) tmp = t_1; elseif (z <= 2.2e-48) tmp = x; elseif (z <= 4.5e+198) tmp = t_1; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -(a / b); tmp = 0.0; if (z <= -7.5e-95) tmp = t_1; elseif (z <= 2.2e-48) tmp = x; elseif (z <= 4.5e+198) tmp = t_1; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = (-N[(a / b), $MachinePrecision])}, If[LessEqual[z, -7.5e-95], t$95$1, If[LessEqual[z, 2.2e-48], x, If[LessEqual[z, 4.5e+198], t$95$1, N[(t / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\frac{a}{b}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{-95}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-48}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+198}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -7.5000000000000003e-95 or 2.20000000000000013e-48 < z < 4.50000000000000001e198Initial program 59.5%
Taylor expanded in a around inf 32.1%
mul-1-neg32.1%
distribute-lft-neg-out32.1%
*-commutative32.1%
Simplified32.1%
Taylor expanded in y around 0 30.1%
associate-*r/30.1%
neg-mul-130.1%
Simplified30.1%
if -7.5000000000000003e-95 < z < 2.20000000000000013e-48Initial program 89.4%
Taylor expanded in z around 0 52.1%
if 4.50000000000000001e198 < z Initial program 8.2%
Taylor expanded in t around 0 8.2%
Taylor expanded in y around 0 53.4%
Taylor expanded in a around 0 40.3%
Final simplification39.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.15e-55) (not (<= z 1.7e-5))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.15e-55) || !(z <= 1.7e-5)) {
tmp = t / (b - 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 <= (-1.15d-55)) .or. (.not. (z <= 1.7d-5))) then
tmp = t / (b - 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 <= -1.15e-55) || !(z <= 1.7e-5)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.15e-55) or not (z <= 1.7e-5): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.15e-55) || !(z <= 1.7e-5)) tmp = Float64(t / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.15e-55) || ~((z <= 1.7e-5))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.15e-55], N[Not[LessEqual[z, 1.7e-5]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-55} \lor \neg \left(z \leq 1.7 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.15000000000000006e-55 or 1.7e-5 < z Initial program 43.7%
Taylor expanded in z around inf 78.5%
Taylor expanded in t around inf 41.4%
if -1.15000000000000006e-55 < z < 1.7e-5Initial program 91.0%
Taylor expanded in z around 0 47.2%
Final simplification44.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -11500.0) (not (<= y 156000.0))) (/ 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 <= -11500.0) || !(y <= 156000.0)) {
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 <= (-11500.0d0)) .or. (.not. (y <= 156000.0d0))) 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 <= -11500.0) || !(y <= 156000.0)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -11500.0) or not (y <= 156000.0): 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 <= -11500.0) || !(y <= 156000.0)) 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 <= -11500.0) || ~((y <= 156000.0))) 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, -11500.0], N[Not[LessEqual[y, 156000.0]], $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 -11500 \lor \neg \left(y \leq 156000\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -11500 or 156000 < y Initial program 56.2%
Taylor expanded in y around inf 50.9%
mul-1-neg50.9%
unsub-neg50.9%
Simplified50.9%
if -11500 < y < 156000Initial program 74.3%
Taylor expanded in y around 0 59.0%
Final simplification54.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8.2e-56) (not (<= z 3.7e-6))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8.2e-56) || !(z <= 3.7e-6)) {
tmp = t / b;
} 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 <= (-8.2d-56)) .or. (.not. (z <= 3.7d-6))) then
tmp = t / b
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 <= -8.2e-56) || !(z <= 3.7e-6)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -8.2e-56) or not (z <= 3.7e-6): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8.2e-56) || !(z <= 3.7e-6)) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -8.2e-56) || ~((z <= 3.7e-6))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8.2e-56], N[Not[LessEqual[z, 3.7e-6]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{-56} \lor \neg \left(z \leq 3.7 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.2000000000000003e-56 or 3.7000000000000002e-6 < z Initial program 43.7%
Taylor expanded in t around 0 43.6%
Taylor expanded in y around 0 46.7%
Taylor expanded in a around 0 27.2%
if -8.2000000000000003e-56 < z < 3.7000000000000002e-6Initial program 91.0%
Taylor expanded in z around 0 47.2%
Final simplification36.3%
(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 65.1%
Taylor expanded in z around 0 23.4%
Final simplification23.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 2024011
(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)))))