
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ 2.0 (* t 3.0))) (t_2 (sqrt (+ t a))))
(if (<=
(+ (/ (* z t_2) t) (* (- b c) (- t_1 (+ a 0.8333333333333334))))
INFINITY)
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(+ (* z (/ t_2 t)) (* (- b c) (- (- t_1 0.8333333333333334) a)))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 2.0 / (t * 3.0);
double t_2 = sqrt((t + a));
double tmp;
if ((((z * t_2) / t) + ((b - c) * (t_1 - (a + 0.8333333333333334)))) <= ((double) INFINITY)) {
tmp = x / (x + (y * pow(exp(2.0), ((z * (t_2 / t)) + ((b - c) * ((t_1 - 0.8333333333333334) - a))))));
} else {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 2.0 / (t * 3.0);
double t_2 = Math.sqrt((t + a));
double tmp;
if ((((z * t_2) / t) + ((b - c) * (t_1 - (a + 0.8333333333333334)))) <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.pow(Math.exp(2.0), ((z * (t_2 / t)) + ((b - c) * ((t_1 - 0.8333333333333334) - a))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 2.0 / (t * 3.0) t_2 = math.sqrt((t + a)) tmp = 0 if (((z * t_2) / t) + ((b - c) * (t_1 - (a + 0.8333333333333334)))) <= math.inf: tmp = x / (x + (y * math.pow(math.exp(2.0), ((z * (t_2 / t)) + ((b - c) * ((t_1 - 0.8333333333333334) - a)))))) else: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(2.0 / Float64(t * 3.0)) t_2 = sqrt(Float64(t + a)) tmp = 0.0 if (Float64(Float64(Float64(z * t_2) / t) + Float64(Float64(b - c) * Float64(t_1 - Float64(a + 0.8333333333333334)))) <= Inf) tmp = Float64(x / Float64(x + Float64(y * (exp(2.0) ^ Float64(Float64(z * Float64(t_2 / t)) + Float64(Float64(b - c) * Float64(Float64(t_1 - 0.8333333333333334) - a))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 2.0 / (t * 3.0); t_2 = sqrt((t + a)); tmp = 0.0; if ((((z * t_2) / t) + ((b - c) * (t_1 - (a + 0.8333333333333334)))) <= Inf) tmp = x / (x + (y * (exp(2.0) ^ ((z * (t_2 / t)) + ((b - c) * ((t_1 - 0.8333333333333334) - a)))))); else tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(z * t$95$2), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(t$95$1 - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x / N[(x + N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(z * N[(t$95$2 / t), $MachinePrecision]), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(t$95$1 - 0.8333333333333334), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2}{t \cdot 3}\\
t_2 := \sqrt{t + a}\\
\mathbf{if}\;\frac{z \cdot t\_2}{t} + \left(b - c\right) \cdot \left(t\_1 - \left(a + 0.8333333333333334\right)\right) \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{t\_2}{t} + \left(b - c\right) \cdot \left(\left(t\_1 - 0.8333333333333334\right) - a\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < +inf.0Initial program 98.8%
exp-prod98.8%
Simplified99.2%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) Initial program 0.0%
Taylor expanded in t around 0 83.9%
Final simplification98.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a 0.8333333333333334))))))
(if (<= t_1 INFINITY)
(/ x (+ x (* y (exp (* 2.0 t_1)))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * Math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((z * math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))) tmp = 0 if t_1 <= math.inf: tmp = x / (x + (y * math.exp((2.0 * t_1)))) else: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + 0.8333333333333334)))) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * t_1))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))); tmp = 0.0; if (t_1 <= Inf) tmp = x / (x + (y * exp((2.0 * t_1)))); else tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + 0.8333333333333334\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot t\_1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < +inf.0Initial program 98.8%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) Initial program 0.0%
Taylor expanded in t around 0 83.9%
Final simplification98.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 1.8e-189)
(/
x
(+
x
(*
y
(exp (* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 4.45e-14)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/
x
(+
x
(*
y
(exp
(* 2.0 (+ (/ z (sqrt t)) (* (+ a 0.8333333333333334) (- c b)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.8e-189) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 4.45e-14) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((z / sqrt(t)) + ((a + 0.8333333333333334) * (c - b)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (t <= 1.8d-189) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 4.45d-14) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((z / sqrt(t)) + ((a + 0.8333333333333334d0) * (c - b)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.8e-189) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 4.45e-14) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((z / Math.sqrt(t)) + ((a + 0.8333333333333334) * (c - b)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 1.8e-189: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 4.45e-14: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) else: tmp = x / (x + (y * math.exp((2.0 * ((z / math.sqrt(t)) + ((a + 0.8333333333333334) * (c - b))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 1.8e-189) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); elseif (t <= 4.45e-14) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(z / sqrt(t)) + Float64(Float64(a + 0.8333333333333334) * Float64(c - b)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 1.8e-189) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 4.45e-14) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); else tmp = x / (x + (y * exp((2.0 * ((z / sqrt(t)) + ((a + 0.8333333333333334) * (c - b))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 1.8e-189], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.45e-14], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(z / N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.8 \cdot 10^{-189}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\mathbf{elif}\;t \leq 4.45 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z}{\sqrt{t}} + \left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < 1.80000000000000008e-189Initial program 87.7%
Taylor expanded in t around 0 90.4%
if 1.80000000000000008e-189 < t < 4.45e-14Initial program 95.7%
Taylor expanded in b around inf 80.3%
associate-*r/80.3%
metadata-eval80.3%
+-commutative80.3%
Simplified80.3%
if 4.45e-14 < t Initial program 97.7%
Taylor expanded in t around inf 98.5%
*-commutative98.5%
sqrt-div98.5%
metadata-eval98.5%
un-div-inv98.5%
Applied egg-rr98.5%
Final simplification92.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 6.4e-192)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 1.76e-13)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/
x
(+
x
(*
y
(exp
(* 2.0 (+ (/ z (sqrt t)) (* (+ a 0.8333333333333334) (- c b)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 6.4e-192) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 1.76e-13) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((z / sqrt(t)) + ((a + 0.8333333333333334) * (c - b)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (t <= 6.4d-192) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 1.76d-13) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((z / sqrt(t)) + ((a + 0.8333333333333334d0) * (c - b)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 6.4e-192) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 1.76e-13) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((z / Math.sqrt(t)) + ((a + 0.8333333333333334) * (c - b)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 6.4e-192: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 1.76e-13: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) else: tmp = x / (x + (y * math.exp((2.0 * ((z / math.sqrt(t)) + ((a + 0.8333333333333334) * (c - b))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 6.4e-192) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 1.76e-13) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(z / sqrt(t)) + Float64(Float64(a + 0.8333333333333334) * Float64(c - b)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 6.4e-192) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 1.76e-13) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); else tmp = x / (x + (y * exp((2.0 * ((z / sqrt(t)) + ((a + 0.8333333333333334) * (c - b))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 6.4e-192], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.76e-13], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(z / N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.4 \cdot 10^{-192}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 1.76 \cdot 10^{-13}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z}{\sqrt{t}} + \left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < 6.4000000000000003e-192Initial program 87.7%
Taylor expanded in t around 0 90.4%
Taylor expanded in z around 0 76.1%
if 6.4000000000000003e-192 < t < 1.7600000000000001e-13Initial program 95.7%
Taylor expanded in b around inf 80.3%
associate-*r/80.3%
metadata-eval80.3%
+-commutative80.3%
Simplified80.3%
if 1.7600000000000001e-13 < t Initial program 97.7%
Taylor expanded in t around inf 98.5%
*-commutative98.5%
sqrt-div98.5%
metadata-eval98.5%
un-div-inv98.5%
Applied egg-rr98.5%
Final simplification88.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 6.5e-189)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 2.55e-14)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/
x
(+
x
(*
y
(exp (* 2.0 (+ (/ z (sqrt t)) (* c (- a -0.8333333333333334)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 6.5e-189) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 2.55e-14) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((z / sqrt(t)) + (c * (a - -0.8333333333333334)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (t <= 6.5d-189) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 2.55d-14) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((z / sqrt(t)) + (c * (a - (-0.8333333333333334d0))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 6.5e-189) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 2.55e-14) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((z / Math.sqrt(t)) + (c * (a - -0.8333333333333334)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 6.5e-189: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 2.55e-14: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) else: tmp = x / (x + (y * math.exp((2.0 * ((z / math.sqrt(t)) + (c * (a - -0.8333333333333334))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 6.5e-189) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 2.55e-14) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(z / sqrt(t)) + Float64(c * Float64(a - -0.8333333333333334)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 6.5e-189) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 2.55e-14) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); else tmp = x / (x + (y * exp((2.0 * ((z / sqrt(t)) + (c * (a - -0.8333333333333334))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 6.5e-189], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.55e-14], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(z / N[Sqrt[t], $MachinePrecision]), $MachinePrecision] + N[(c * N[(a - -0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.5 \cdot 10^{-189}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z}{\sqrt{t}} + c \cdot \left(a - -0.8333333333333334\right)\right)}}\\
\end{array}
\end{array}
if t < 6.5000000000000001e-189Initial program 87.7%
Taylor expanded in t around 0 90.4%
Taylor expanded in z around 0 76.1%
if 6.5000000000000001e-189 < t < 2.5499999999999999e-14Initial program 95.7%
Taylor expanded in b around inf 80.3%
associate-*r/80.3%
metadata-eval80.3%
+-commutative80.3%
Simplified80.3%
if 2.5499999999999999e-14 < t Initial program 97.7%
Taylor expanded in t around inf 98.5%
*-commutative98.5%
sqrt-div98.5%
metadata-eval98.5%
un-div-inv98.5%
Applied egg-rr98.5%
Taylor expanded in b around 0 79.1%
mul-1-neg79.1%
+-commutative79.1%
distribute-rgt-neg-in79.1%
+-commutative79.1%
mul-1-neg79.1%
distribute-lft-in79.1%
metadata-eval79.1%
mul-1-neg79.1%
unsub-neg79.1%
Simplified79.1%
Final simplification78.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
b
(- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))))
(if (<= b -6.8e+133)
t_1
(if (<= b -0.0039)
(/
x
(+
x
(*
y
(exp
(*
2.0
(/
(*
c
(+
-0.6666666666666666
(* a (+ t (* 0.8333333333333334 (/ t a))))))
t))))))
(if (or (<= b -2.1e-71) (not (<= b 3.5e-5)))
t_1
(/
x
(+
x
(*
y
(exp
(*
2.0
(/
(* c (+ -0.6666666666666666 (* t (+ a 0.8333333333333334))))
t)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
double tmp;
if (b <= -6.8e+133) {
tmp = t_1;
} else if (b <= -0.0039) {
tmp = x / (x + (y * exp((2.0 * ((c * (-0.6666666666666666 + (a * (t + (0.8333333333333334 * (t / a)))))) / t)))));
} else if ((b <= -2.1e-71) || !(b <= 3.5e-5)) {
tmp = t_1;
} else {
tmp = x / (x + (y * exp((2.0 * ((c * (-0.6666666666666666 + (t * (a + 0.8333333333333334)))) / t)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
if (b <= (-6.8d+133)) then
tmp = t_1
else if (b <= (-0.0039d0)) then
tmp = x / (x + (y * exp((2.0d0 * ((c * ((-0.6666666666666666d0) + (a * (t + (0.8333333333333334d0 * (t / a)))))) / t)))))
else if ((b <= (-2.1d-71)) .or. (.not. (b <= 3.5d-5))) then
tmp = t_1
else
tmp = x / (x + (y * exp((2.0d0 * ((c * ((-0.6666666666666666d0) + (t * (a + 0.8333333333333334d0)))) / t)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
double tmp;
if (b <= -6.8e+133) {
tmp = t_1;
} else if (b <= -0.0039) {
tmp = x / (x + (y * Math.exp((2.0 * ((c * (-0.6666666666666666 + (a * (t + (0.8333333333333334 * (t / a)))))) / t)))));
} else if ((b <= -2.1e-71) || !(b <= 3.5e-5)) {
tmp = t_1;
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((c * (-0.6666666666666666 + (t * (a + 0.8333333333333334)))) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) tmp = 0 if b <= -6.8e+133: tmp = t_1 elif b <= -0.0039: tmp = x / (x + (y * math.exp((2.0 * ((c * (-0.6666666666666666 + (a * (t + (0.8333333333333334 * (t / a)))))) / t))))) elif (b <= -2.1e-71) or not (b <= 3.5e-5): tmp = t_1 else: tmp = x / (x + (y * math.exp((2.0 * ((c * (-0.6666666666666666 + (t * (a + 0.8333333333333334)))) / t))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))) tmp = 0.0 if (b <= -6.8e+133) tmp = t_1; elseif (b <= -0.0039) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c * Float64(-0.6666666666666666 + Float64(a * Float64(t + Float64(0.8333333333333334 * Float64(t / a)))))) / t)))))); elseif ((b <= -2.1e-71) || !(b <= 3.5e-5)) tmp = t_1; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c * Float64(-0.6666666666666666 + Float64(t * Float64(a + 0.8333333333333334)))) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); tmp = 0.0; if (b <= -6.8e+133) tmp = t_1; elseif (b <= -0.0039) tmp = x / (x + (y * exp((2.0 * ((c * (-0.6666666666666666 + (a * (t + (0.8333333333333334 * (t / a)))))) / t))))); elseif ((b <= -2.1e-71) || ~((b <= 3.5e-5))) tmp = t_1; else tmp = x / (x + (y * exp((2.0 * ((c * (-0.6666666666666666 + (t * (a + 0.8333333333333334)))) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.8e+133], t$95$1, If[LessEqual[b, -0.0039], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c * N[(-0.6666666666666666 + N[(a * N[(t + N[(0.8333333333333334 * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, -2.1e-71], N[Not[LessEqual[b, 3.5e-5]], $MachinePrecision]], t$95$1, N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c * N[(-0.6666666666666666 + N[(t * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{if}\;b \leq -6.8 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -0.0039:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{c \cdot \left(-0.6666666666666666 + a \cdot \left(t + 0.8333333333333334 \cdot \frac{t}{a}\right)\right)}{t}}}\\
\mathbf{elif}\;b \leq -2.1 \cdot 10^{-71} \lor \neg \left(b \leq 3.5 \cdot 10^{-5}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{c \cdot \left(-0.6666666666666666 + t \cdot \left(a + 0.8333333333333334\right)\right)}{t}}}\\
\end{array}
\end{array}
if b < -6.79999999999999975e133 or -0.0038999999999999998 < b < -2.1000000000000001e-71 or 3.4999999999999997e-5 < b Initial program 93.8%
Taylor expanded in b around inf 87.1%
associate-*r/87.1%
metadata-eval87.1%
+-commutative87.1%
Simplified87.1%
if -6.79999999999999975e133 < b < -0.0038999999999999998Initial program 92.0%
Taylor expanded in c around inf 60.6%
+-commutative60.6%
associate-*r/60.6%
metadata-eval60.6%
Simplified60.6%
Taylor expanded in t around 0 60.6%
*-commutative60.6%
distribute-lft-out60.6%
Simplified60.6%
Taylor expanded in a around inf 69.2%
if -2.1000000000000001e-71 < b < 3.4999999999999997e-5Initial program 95.0%
Taylor expanded in c around inf 72.7%
+-commutative72.7%
associate-*r/72.7%
metadata-eval72.7%
Simplified72.7%
Taylor expanded in t around 0 75.1%
*-commutative75.1%
distribute-lft-out75.1%
Simplified75.1%
Final simplification79.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -3.8e+148)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= c -80000000.0)
1.0
(if (<= c -1.4e-216)
(/ x (+ x (* y (exp (* (* a b) -2.0)))))
(if (<= c 6e+43)
1.0
(/ x (+ x (* y (exp (* c 1.6666666666666667))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -3.8e+148) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (c <= -80000000.0) {
tmp = 1.0;
} else if (c <= -1.4e-216) {
tmp = x / (x + (y * exp(((a * b) * -2.0))));
} else if (c <= 6e+43) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp((c * 1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (c <= (-3.8d+148)) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (c <= (-80000000.0d0)) then
tmp = 1.0d0
else if (c <= (-1.4d-216)) then
tmp = x / (x + (y * exp(((a * b) * (-2.0d0)))))
else if (c <= 6d+43) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp((c * 1.6666666666666667d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -3.8e+148) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (c <= -80000000.0) {
tmp = 1.0;
} else if (c <= -1.4e-216) {
tmp = x / (x + (y * Math.exp(((a * b) * -2.0))));
} else if (c <= 6e+43) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -3.8e+148: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif c <= -80000000.0: tmp = 1.0 elif c <= -1.4e-216: tmp = x / (x + (y * math.exp(((a * b) * -2.0)))) elif c <= 6e+43: tmp = 1.0 else: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -3.8e+148) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (c <= -80000000.0) tmp = 1.0; elseif (c <= -1.4e-216) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(a * b) * -2.0))))); elseif (c <= 6e+43) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -3.8e+148) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (c <= -80000000.0) tmp = 1.0; elseif (c <= -1.4e-216) tmp = x / (x + (y * exp(((a * b) * -2.0)))); elseif (c <= 6e+43) tmp = 1.0; else tmp = x / (x + (y * exp((c * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -3.8e+148], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -80000000.0], 1.0, If[LessEqual[c, -1.4e-216], N[(x / N[(x + N[(y * N[Exp[N[(N[(a * b), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6e+43], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.8 \cdot 10^{+148}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;c \leq -80000000:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq -1.4 \cdot 10^{-216}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(a \cdot b\right) \cdot -2}}\\
\mathbf{elif}\;c \leq 6 \cdot 10^{+43}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if c < -3.7999999999999998e148Initial program 90.7%
Taylor expanded in t around 0 53.5%
Taylor expanded in z around 0 72.8%
if -3.7999999999999998e148 < c < -8e7 or -1.4e-216 < c < 6.00000000000000033e43Initial program 96.9%
Taylor expanded in b around inf 65.5%
associate-*r/65.5%
metadata-eval65.5%
+-commutative65.5%
Simplified65.5%
Taylor expanded in a around inf 45.4%
associate-*r*45.4%
mul-1-neg45.4%
Simplified45.4%
Taylor expanded in a around 0 31.8%
*-commutative31.8%
*-commutative31.8%
Simplified31.8%
Taylor expanded in x around inf 59.7%
if -8e7 < c < -1.4e-216Initial program 93.8%
Taylor expanded in b around inf 69.0%
associate-*r/69.0%
metadata-eval69.0%
+-commutative69.0%
Simplified69.0%
Taylor expanded in a around inf 68.5%
associate-*r*68.5%
mul-1-neg68.5%
Simplified68.5%
Taylor expanded in a around 0 68.5%
*-commutative68.5%
*-commutative68.5%
Simplified68.5%
if 6.00000000000000033e43 < c Initial program 89.2%
Taylor expanded in c around inf 76.8%
+-commutative76.8%
associate-*r/76.8%
metadata-eval76.8%
Simplified76.8%
Taylor expanded in t around inf 70.5%
Taylor expanded in a around 0 68.4%
Final simplification64.6%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= b -1.55e-71) (not (<= b 2.9e-5)))
(/
x
(+
x
(*
y
(exp
(* 2.0 (* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(/
(* c (+ -0.6666666666666666 (* t (+ a 0.8333333333333334))))
t))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1.55e-71) || !(b <= 2.9e-5)) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((c * (-0.6666666666666666 + (t * (a + 0.8333333333333334)))) / t)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if ((b <= (-1.55d-71)) .or. (.not. (b <= 2.9d-5))) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((c * ((-0.6666666666666666d0) + (t * (a + 0.8333333333333334d0)))) / t)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1.55e-71) || !(b <= 2.9e-5)) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((c * (-0.6666666666666666 + (t * (a + 0.8333333333333334)))) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -1.55e-71) or not (b <= 2.9e-5): tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) else: tmp = x / (x + (y * math.exp((2.0 * ((c * (-0.6666666666666666 + (t * (a + 0.8333333333333334)))) / t))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -1.55e-71) || !(b <= 2.9e-5)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c * Float64(-0.6666666666666666 + Float64(t * Float64(a + 0.8333333333333334)))) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b <= -1.55e-71) || ~((b <= 2.9e-5))) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); else tmp = x / (x + (y * exp((2.0 * ((c * (-0.6666666666666666 + (t * (a + 0.8333333333333334)))) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -1.55e-71], N[Not[LessEqual[b, 2.9e-5]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c * N[(-0.6666666666666666 + N[(t * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{-71} \lor \neg \left(b \leq 2.9 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{c \cdot \left(-0.6666666666666666 + t \cdot \left(a + 0.8333333333333334\right)\right)}{t}}}\\
\end{array}
\end{array}
if b < -1.55000000000000001e-71 or 2.9e-5 < b Initial program 93.5%
Taylor expanded in b around inf 80.3%
associate-*r/80.3%
metadata-eval80.3%
+-commutative80.3%
Simplified80.3%
if -1.55000000000000001e-71 < b < 2.9e-5Initial program 95.0%
Taylor expanded in c around inf 72.7%
+-commutative72.7%
associate-*r/72.7%
metadata-eval72.7%
Simplified72.7%
Taylor expanded in t around 0 75.1%
*-commutative75.1%
distribute-lft-out75.1%
Simplified75.1%
Final simplification77.9%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= b -8.2e-73) (not (<= b 0.002)))
(/
x
(+
x
(*
y
(exp
(* 2.0 (* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* c (- (+ a 0.8333333333333334) (/ 0.6666666666666666 t))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -8.2e-73) || !(b <= 0.002)) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * exp((2.0 * (c * ((a + 0.8333333333333334) - (0.6666666666666666 / t)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if ((b <= (-8.2d-73)) .or. (.not. (b <= 0.002d0))) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else
tmp = x / (x + (y * exp((2.0d0 * (c * ((a + 0.8333333333333334d0) - (0.6666666666666666d0 / t)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -8.2e-73) || !(b <= 0.002)) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (c * ((a + 0.8333333333333334) - (0.6666666666666666 / t)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -8.2e-73) or not (b <= 0.002): tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) else: tmp = x / (x + (y * math.exp((2.0 * (c * ((a + 0.8333333333333334) - (0.6666666666666666 / t))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -8.2e-73) || !(b <= 0.002)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(Float64(a + 0.8333333333333334) - Float64(0.6666666666666666 / t)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b <= -8.2e-73) || ~((b <= 0.002))) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); else tmp = x / (x + (y * exp((2.0 * (c * ((a + 0.8333333333333334) - (0.6666666666666666 / t))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -8.2e-73], N[Not[LessEqual[b, 0.002]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(N[(a + 0.8333333333333334), $MachinePrecision] - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.2 \cdot 10^{-73} \lor \neg \left(b \leq 0.002\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(\left(a + 0.8333333333333334\right) - \frac{0.6666666666666666}{t}\right)\right)}}\\
\end{array}
\end{array}
if b < -8.20000000000000032e-73 or 2e-3 < b Initial program 93.5%
Taylor expanded in b around inf 80.4%
associate-*r/80.4%
metadata-eval80.4%
+-commutative80.4%
Simplified80.4%
if -8.20000000000000032e-73 < b < 2e-3Initial program 94.9%
Taylor expanded in c around inf 73.3%
+-commutative73.3%
associate-*r/73.3%
metadata-eval73.3%
Simplified73.3%
Final simplification77.1%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= b -1.06e-72) (not (<= b 3.8e-8)))
(/
x
(+
x
(*
y
(exp
(* 2.0 (* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/ x (+ x (* y (exp (* 2.0 (* c (+ a 0.8333333333333334)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1.06e-72) || !(b <= 3.8e-8)) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * exp((2.0 * (c * (a + 0.8333333333333334))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if ((b <= (-1.06d-72)) .or. (.not. (b <= 3.8d-8))) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else
tmp = x / (x + (y * exp((2.0d0 * (c * (a + 0.8333333333333334d0))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1.06e-72) || !(b <= 3.8e-8)) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (c * (a + 0.8333333333333334))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -1.06e-72) or not (b <= 3.8e-8): tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) else: tmp = x / (x + (y * math.exp((2.0 * (c * (a + 0.8333333333333334)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -1.06e-72) || !(b <= 3.8e-8)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + 0.8333333333333334))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b <= -1.06e-72) || ~((b <= 3.8e-8))) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); else tmp = x / (x + (y * exp((2.0 * (c * (a + 0.8333333333333334)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -1.06e-72], N[Not[LessEqual[b, 3.8e-8]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.06 \cdot 10^{-72} \lor \neg \left(b \leq 3.8 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + 0.8333333333333334\right)\right)}}\\
\end{array}
\end{array}
if b < -1.05999999999999994e-72 or 3.80000000000000028e-8 < b Initial program 93.5%
Taylor expanded in b around inf 80.4%
associate-*r/80.4%
metadata-eval80.4%
+-commutative80.4%
Simplified80.4%
if -1.05999999999999994e-72 < b < 3.80000000000000028e-8Initial program 94.9%
Taylor expanded in c around inf 73.3%
+-commutative73.3%
associate-*r/73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in t around inf 62.4%
Final simplification72.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -850000000.0)
(/ x (+ x (* y (exp (* 2.0 (* a c))))))
(if (<= c -1.15e-216)
(/ x (+ x (* y (exp (* (* a b) -2.0)))))
(if (<= c 1.9e+43)
1.0
(/ x (+ x (* y (exp (* c 1.6666666666666667)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -850000000.0) {
tmp = x / (x + (y * exp((2.0 * (a * c)))));
} else if (c <= -1.15e-216) {
tmp = x / (x + (y * exp(((a * b) * -2.0))));
} else if (c <= 1.9e+43) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp((c * 1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (c <= (-850000000.0d0)) then
tmp = x / (x + (y * exp((2.0d0 * (a * c)))))
else if (c <= (-1.15d-216)) then
tmp = x / (x + (y * exp(((a * b) * (-2.0d0)))))
else if (c <= 1.9d+43) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp((c * 1.6666666666666667d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -850000000.0) {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
} else if (c <= -1.15e-216) {
tmp = x / (x + (y * Math.exp(((a * b) * -2.0))));
} else if (c <= 1.9e+43) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -850000000.0: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) elif c <= -1.15e-216: tmp = x / (x + (y * math.exp(((a * b) * -2.0)))) elif c <= 1.9e+43: tmp = 1.0 else: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -850000000.0) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); elseif (c <= -1.15e-216) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(a * b) * -2.0))))); elseif (c <= 1.9e+43) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -850000000.0) tmp = x / (x + (y * exp((2.0 * (a * c))))); elseif (c <= -1.15e-216) tmp = x / (x + (y * exp(((a * b) * -2.0)))); elseif (c <= 1.9e+43) tmp = 1.0; else tmp = x / (x + (y * exp((c * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -850000000.0], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.15e-216], N[(x / N[(x + N[(y * N[Exp[N[(N[(a * b), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.9e+43], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -850000000:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\mathbf{elif}\;c \leq -1.15 \cdot 10^{-216}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(a \cdot b\right) \cdot -2}}\\
\mathbf{elif}\;c \leq 1.9 \cdot 10^{+43}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if c < -8.5e8Initial program 94.1%
Taylor expanded in c around inf 79.8%
+-commutative79.8%
associate-*r/79.8%
metadata-eval79.8%
Simplified79.8%
Taylor expanded in a around inf 58.8%
if -8.5e8 < c < -1.14999999999999998e-216Initial program 93.8%
Taylor expanded in b around inf 69.0%
associate-*r/69.0%
metadata-eval69.0%
+-commutative69.0%
Simplified69.0%
Taylor expanded in a around inf 68.5%
associate-*r*68.5%
mul-1-neg68.5%
Simplified68.5%
Taylor expanded in a around 0 68.5%
*-commutative68.5%
*-commutative68.5%
Simplified68.5%
if -1.14999999999999998e-216 < c < 1.90000000000000004e43Initial program 96.9%
Taylor expanded in b around inf 70.1%
associate-*r/70.1%
metadata-eval70.1%
+-commutative70.1%
Simplified70.1%
Taylor expanded in a around inf 47.7%
associate-*r*47.7%
mul-1-neg47.7%
Simplified47.7%
Taylor expanded in a around 0 32.5%
*-commutative32.5%
*-commutative32.5%
Simplified32.5%
Taylor expanded in x around inf 58.2%
if 1.90000000000000004e43 < c Initial program 89.2%
Taylor expanded in c around inf 76.8%
+-commutative76.8%
associate-*r/76.8%
metadata-eval76.8%
Simplified76.8%
Taylor expanded in t around inf 70.5%
Taylor expanded in a around 0 68.4%
Final simplification62.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 5.1e-5)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 7.8e+85)
(/ x (+ x (* y (exp (* 2.0 (* c (+ a 0.8333333333333334)))))))
(/ x (+ x (* y (exp (* 2.0 (* b (- -0.8333333333333334 a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 5.1e-5) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 7.8e+85) {
tmp = x / (x + (y * exp((2.0 * (c * (a + 0.8333333333333334))))));
} else {
tmp = x / (x + (y * exp((2.0 * (b * (-0.8333333333333334 - a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (t <= 5.1d-5) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 7.8d+85) then
tmp = x / (x + (y * exp((2.0d0 * (c * (a + 0.8333333333333334d0))))))
else
tmp = x / (x + (y * exp((2.0d0 * (b * ((-0.8333333333333334d0) - a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 5.1e-5) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 7.8e+85) {
tmp = x / (x + (y * Math.exp((2.0 * (c * (a + 0.8333333333333334))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (b * (-0.8333333333333334 - a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 5.1e-5: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 7.8e+85: tmp = x / (x + (y * math.exp((2.0 * (c * (a + 0.8333333333333334)))))) else: tmp = x / (x + (y * math.exp((2.0 * (b * (-0.8333333333333334 - a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 5.1e-5) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 7.8e+85) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + 0.8333333333333334))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(-0.8333333333333334 - a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 5.1e-5) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 7.8e+85) tmp = x / (x + (y * exp((2.0 * (c * (a + 0.8333333333333334)))))); else tmp = x / (x + (y * exp((2.0 * (b * (-0.8333333333333334 - a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 5.1e-5], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e+85], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+85}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + 0.8333333333333334\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(-0.8333333333333334 - a\right)\right)}}\\
\end{array}
\end{array}
if t < 5.09999999999999996e-5Initial program 90.8%
Taylor expanded in t around 0 82.0%
Taylor expanded in z around 0 71.9%
if 5.09999999999999996e-5 < t < 7.80000000000000067e85Initial program 100.0%
Taylor expanded in c around inf 69.2%
+-commutative69.2%
associate-*r/69.2%
metadata-eval69.2%
Simplified69.2%
Taylor expanded in t around inf 69.2%
if 7.80000000000000067e85 < t Initial program 96.9%
Taylor expanded in b around inf 68.7%
associate-*r/68.7%
metadata-eval68.7%
+-commutative68.7%
Simplified68.7%
Taylor expanded in t around inf 68.7%
mul-1-neg68.7%
+-commutative68.7%
distribute-rgt-neg-in68.7%
+-commutative68.7%
mul-1-neg68.7%
distribute-lft-in68.7%
metadata-eval68.7%
mul-1-neg68.7%
unsub-neg68.7%
Simplified68.7%
Final simplification70.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 2.9e-6)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 5e+43)
(/ x (+ x (* y (exp (* c 1.6666666666666667)))))
(/ x (+ x (* y (exp (* 2.0 (* b (- -0.8333333333333334 a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 2.9e-6) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 5e+43) {
tmp = x / (x + (y * exp((c * 1.6666666666666667))));
} else {
tmp = x / (x + (y * exp((2.0 * (b * (-0.8333333333333334 - a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (t <= 2.9d-6) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 5d+43) then
tmp = x / (x + (y * exp((c * 1.6666666666666667d0))))
else
tmp = x / (x + (y * exp((2.0d0 * (b * ((-0.8333333333333334d0) - a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 2.9e-6) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 5e+43) {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (b * (-0.8333333333333334 - a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 2.9e-6: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 5e+43: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) else: tmp = x / (x + (y * math.exp((2.0 * (b * (-0.8333333333333334 - a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 2.9e-6) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 5e+43) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(-0.8333333333333334 - a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 2.9e-6) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 5e+43) tmp = x / (x + (y * exp((c * 1.6666666666666667)))); else tmp = x / (x + (y * exp((2.0 * (b * (-0.8333333333333334 - a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 2.9e-6], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+43], N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.9 \cdot 10^{-6}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+43}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(-0.8333333333333334 - a\right)\right)}}\\
\end{array}
\end{array}
if t < 2.9000000000000002e-6Initial program 90.8%
Taylor expanded in t around 0 82.0%
Taylor expanded in z around 0 71.9%
if 2.9000000000000002e-6 < t < 5.0000000000000004e43Initial program 100.0%
Taylor expanded in c around inf 86.7%
+-commutative86.7%
associate-*r/86.7%
metadata-eval86.7%
Simplified86.7%
Taylor expanded in t around inf 86.7%
Taylor expanded in a around 0 81.6%
if 5.0000000000000004e43 < t Initial program 97.2%
Taylor expanded in b around inf 65.6%
associate-*r/65.6%
metadata-eval65.6%
+-commutative65.6%
Simplified65.6%
Taylor expanded in t around inf 65.6%
mul-1-neg65.6%
+-commutative65.6%
distribute-rgt-neg-in65.6%
+-commutative65.6%
mul-1-neg65.6%
distribute-lft-in65.6%
metadata-eval65.6%
mul-1-neg65.6%
unsub-neg65.6%
Simplified65.6%
Final simplification70.0%
(FPCore (x y z t a b c) :precision binary64 (if (<= c 5e+42) 1.0 (/ x (+ x (* y (exp (* c 1.6666666666666667)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 5e+42) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp((c * 1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (c <= 5d+42) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp((c * 1.6666666666666667d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 5e+42) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 5e+42: tmp = 1.0 else: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 5e+42) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 5e+42) tmp = 1.0; else tmp = x / (x + (y * exp((c * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 5e+42], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 5 \cdot 10^{+42}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if c < 5.00000000000000007e42Initial program 95.3%
Taylor expanded in b around inf 67.9%
associate-*r/67.9%
metadata-eval67.9%
+-commutative67.9%
Simplified67.9%
Taylor expanded in a around inf 53.1%
associate-*r*53.1%
mul-1-neg53.1%
Simplified53.1%
Taylor expanded in a around 0 37.9%
*-commutative37.9%
*-commutative37.9%
Simplified37.9%
Taylor expanded in x around inf 57.5%
if 5.00000000000000007e42 < c Initial program 89.2%
Taylor expanded in c around inf 76.8%
+-commutative76.8%
associate-*r/76.8%
metadata-eval76.8%
Simplified76.8%
Taylor expanded in t around inf 70.5%
Taylor expanded in a around 0 68.4%
Final simplification59.5%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c 4e+44)
1.0
(/
x
(+
x
(-
y
(*
2.0
(/
(* c (* y (- 0.6666666666666666 (* t (+ a 0.8333333333333334)))))
t)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 4e+44) {
tmp = 1.0;
} else {
tmp = x / (x + (y - (2.0 * ((c * (y * (0.6666666666666666 - (t * (a + 0.8333333333333334))))) / t))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (c <= 4d+44) then
tmp = 1.0d0
else
tmp = x / (x + (y - (2.0d0 * ((c * (y * (0.6666666666666666d0 - (t * (a + 0.8333333333333334d0))))) / t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 4e+44) {
tmp = 1.0;
} else {
tmp = x / (x + (y - (2.0 * ((c * (y * (0.6666666666666666 - (t * (a + 0.8333333333333334))))) / t))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 4e+44: tmp = 1.0 else: tmp = x / (x + (y - (2.0 * ((c * (y * (0.6666666666666666 - (t * (a + 0.8333333333333334))))) / t)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 4e+44) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y - Float64(2.0 * Float64(Float64(c * Float64(y * Float64(0.6666666666666666 - Float64(t * Float64(a + 0.8333333333333334))))) / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 4e+44) tmp = 1.0; else tmp = x / (x + (y - (2.0 * ((c * (y * (0.6666666666666666 - (t * (a + 0.8333333333333334))))) / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 4e+44], 1.0, N[(x / N[(x + N[(y - N[(2.0 * N[(N[(c * N[(y * N[(0.6666666666666666 - N[(t * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 4 \cdot 10^{+44}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + \left(y - 2 \cdot \frac{c \cdot \left(y \cdot \left(0.6666666666666666 - t \cdot \left(a + 0.8333333333333334\right)\right)\right)}{t}\right)}\\
\end{array}
\end{array}
if c < 4.0000000000000004e44Initial program 95.3%
Taylor expanded in b around inf 67.9%
associate-*r/67.9%
metadata-eval67.9%
+-commutative67.9%
Simplified67.9%
Taylor expanded in a around inf 53.1%
associate-*r*53.1%
mul-1-neg53.1%
Simplified53.1%
Taylor expanded in a around 0 37.9%
*-commutative37.9%
*-commutative37.9%
Simplified37.9%
Taylor expanded in x around inf 57.5%
if 4.0000000000000004e44 < c Initial program 89.2%
Taylor expanded in c around inf 76.8%
+-commutative76.8%
associate-*r/76.8%
metadata-eval76.8%
Simplified76.8%
Taylor expanded in t around 0 76.8%
*-commutative76.8%
distribute-lft-out76.8%
Simplified76.8%
Taylor expanded in c around 0 55.5%
Final simplification57.2%
(FPCore (x y z t a b c) :precision binary64 (if (<= c 5e+44) 1.0 (/ x (- x (* y (- -1.0 (* c (* a 2.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 5e+44) {
tmp = 1.0;
} else {
tmp = x / (x - (y * (-1.0 - (c * (a * 2.0)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (c <= 5d+44) then
tmp = 1.0d0
else
tmp = x / (x - (y * ((-1.0d0) - (c * (a * 2.0d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 5e+44) {
tmp = 1.0;
} else {
tmp = x / (x - (y * (-1.0 - (c * (a * 2.0)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 5e+44: tmp = 1.0 else: tmp = x / (x - (y * (-1.0 - (c * (a * 2.0))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 5e+44) tmp = 1.0; else tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(c * Float64(a * 2.0)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 5e+44) tmp = 1.0; else tmp = x / (x - (y * (-1.0 - (c * (a * 2.0))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 5e+44], 1.0, N[(x / N[(x - N[(y * N[(-1.0 - N[(c * N[(a * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 5 \cdot 10^{+44}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - c \cdot \left(a \cdot 2\right)\right)}\\
\end{array}
\end{array}
if c < 4.9999999999999996e44Initial program 95.3%
Taylor expanded in b around inf 67.9%
associate-*r/67.9%
metadata-eval67.9%
+-commutative67.9%
Simplified67.9%
Taylor expanded in a around inf 53.1%
associate-*r*53.1%
mul-1-neg53.1%
Simplified53.1%
Taylor expanded in a around 0 37.9%
*-commutative37.9%
*-commutative37.9%
Simplified37.9%
Taylor expanded in x around inf 57.5%
if 4.9999999999999996e44 < c Initial program 89.2%
Taylor expanded in c around inf 76.8%
+-commutative76.8%
associate-*r/76.8%
metadata-eval76.8%
Simplified76.8%
Taylor expanded in a around inf 55.3%
Taylor expanded in a around 0 55.5%
associate-*r*55.5%
*-commutative55.5%
Simplified55.5%
Final simplification57.2%
(FPCore (x y z t a b c) :precision binary64 (if (<= a -2.1e-174) (/ x (+ x (* -1.3333333333333333 (* c (/ y t))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -2.1e-174) {
tmp = x / (x + (-1.3333333333333333 * (c * (y / t))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (a <= (-2.1d-174)) then
tmp = x / (x + ((-1.3333333333333333d0) * (c * (y / t))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -2.1e-174) {
tmp = x / (x + (-1.3333333333333333 * (c * (y / t))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if a <= -2.1e-174: tmp = x / (x + (-1.3333333333333333 * (c * (y / t)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= -2.1e-174) tmp = Float64(x / Float64(x + Float64(-1.3333333333333333 * Float64(c * Float64(y / t))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (a <= -2.1e-174) tmp = x / (x + (-1.3333333333333333 * (c * (y / t)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, -2.1e-174], N[(x / N[(x + N[(-1.3333333333333333 * N[(c * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{-174}:\\
\;\;\;\;\frac{x}{x + -1.3333333333333333 \cdot \left(c \cdot \frac{y}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if a < -2.1000000000000001e-174Initial program 100.0%
Taylor expanded in t around 0 0.0%
Taylor expanded in t around inf 0.0%
Taylor expanded in c around inf 52.8%
associate-/l*57.3%
Simplified57.3%
if -2.1000000000000001e-174 < a Initial program 93.0%
Taylor expanded in b around inf 66.4%
associate-*r/66.4%
metadata-eval66.4%
+-commutative66.4%
Simplified66.4%
Taylor expanded in a around inf 52.3%
associate-*r*52.3%
mul-1-neg52.3%
Simplified52.3%
Taylor expanded in a around 0 38.3%
*-commutative38.3%
*-commutative38.3%
Simplified38.3%
Taylor expanded in x around inf 55.4%
(FPCore (x y z t a b c) :precision binary64 1.0)
double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = 1.0d0
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
def code(x, y, z, t, a, b, c): return 1.0
function code(x, y, z, t, a, b, c) return 1.0 end
function tmp = code(x, y, z, t, a, b, c) tmp = 1.0; end
code[x_, y_, z_, t_, a_, b_, c_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 94.2%
Taylor expanded in b around inf 65.6%
associate-*r/65.6%
metadata-eval65.6%
+-commutative65.6%
Simplified65.6%
Taylor expanded in a around inf 50.5%
associate-*r*50.5%
mul-1-neg50.5%
Simplified50.5%
Taylor expanded in a around 0 38.2%
*-commutative38.2%
*-commutative38.2%
Simplified38.2%
Taylor expanded in x around inf 53.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* z (sqrt (+ t a)))) (t_2 (- a (/ 5.0 6.0))))
(if (< t -2.118326644891581e-50)
(/
x
(+
x
(* y (exp (* 2.0 (- (+ (* a c) (* 0.8333333333333334 c)) (* a b)))))))
(if (< t 5.196588770651547e-123)
(/
x
(+
x
(*
y
(exp
(*
2.0
(/
(-
(* t_1 (* (* 3.0 t) t_2))
(*
(- (* (+ (/ 5.0 6.0) a) (* 3.0 t)) 2.0)
(* t_2 (* (- b c) t))))
(* (* (* t t) 3.0) t_2)))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ t_1 t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = z * sqrt((t + a));
double t_2 = a - (5.0 / 6.0);
double tmp;
if (t < -2.118326644891581e-50) {
tmp = x / (x + (y * exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b))))));
} else if (t < 5.196588770651547e-123) {
tmp = x / (x + (y * exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * sqrt((t + a))
t_2 = a - (5.0d0 / 6.0d0)
if (t < (-2.118326644891581d-50)) then
tmp = x / (x + (y * exp((2.0d0 * (((a * c) + (0.8333333333333334d0 * c)) - (a * b))))))
else if (t < 5.196588770651547d-123) then
tmp = x / (x + (y * exp((2.0d0 * (((t_1 * ((3.0d0 * t) * t_2)) - (((((5.0d0 / 6.0d0) + a) * (3.0d0 * t)) - 2.0d0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0d0) * t_2))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((t_1 / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = z * Math.sqrt((t + a));
double t_2 = a - (5.0 / 6.0);
double tmp;
if (t < -2.118326644891581e-50) {
tmp = x / (x + (y * Math.exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b))))));
} else if (t < 5.196588770651547e-123) {
tmp = x / (x + (y * Math.exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = z * math.sqrt((t + a)) t_2 = a - (5.0 / 6.0) tmp = 0 if t < -2.118326644891581e-50: tmp = x / (x + (y * math.exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b)))))) elif t < 5.196588770651547e-123: tmp = x / (x + (y * math.exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2)))))) else: tmp = x / (x + (y * math.exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(z * sqrt(Float64(t + a))) t_2 = Float64(a - Float64(5.0 / 6.0)) tmp = 0.0 if (t < -2.118326644891581e-50) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(a * c) + Float64(0.8333333333333334 * c)) - Float64(a * b))))))); elseif (t < 5.196588770651547e-123) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(t_1 * Float64(Float64(3.0 * t) * t_2)) - Float64(Float64(Float64(Float64(Float64(5.0 / 6.0) + a) * Float64(3.0 * t)) - 2.0) * Float64(t_2 * Float64(Float64(b - c) * t)))) / Float64(Float64(Float64(t * t) * 3.0) * t_2))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(t_1 / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = z * sqrt((t + a)); t_2 = a - (5.0 / 6.0); tmp = 0.0; if (t < -2.118326644891581e-50) tmp = x / (x + (y * exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b)))))); elseif (t < 5.196588770651547e-123) tmp = x / (x + (y * exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2)))))); else tmp = x / (x + (y * exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a - N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -2.118326644891581e-50], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(a * c), $MachinePrecision] + N[(0.8333333333333334 * c), $MachinePrecision]), $MachinePrecision] - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[t, 5.196588770651547e-123], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(t$95$1 * N[(N[(3.0 * t), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(N[(5.0 / 6.0), $MachinePrecision] + a), $MachinePrecision] * N[(3.0 * t), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision] * N[(t$95$2 * N[(N[(b - c), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(t * t), $MachinePrecision] * 3.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(t$95$1 / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \sqrt{t + a}\\
t_2 := a - \frac{5}{6}\\
\mathbf{if}\;t < -2.118326644891581 \cdot 10^{-50}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a \cdot c + 0.8333333333333334 \cdot c\right) - a \cdot b\right)}}\\
\mathbf{elif}\;t < 5.196588770651547 \cdot 10^{-123}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{t\_1 \cdot \left(\left(3 \cdot t\right) \cdot t\_2\right) - \left(\left(\frac{5}{6} + a\right) \cdot \left(3 \cdot t\right) - 2\right) \cdot \left(t\_2 \cdot \left(\left(b - c\right) \cdot t\right)\right)}{\left(\left(t \cdot t\right) \cdot 3\right) \cdot t\_2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{t\_1}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\\
\end{array}
\end{array}
herbie shell --seed 2024100
(FPCore (x y z t a b c)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, I"
:precision binary64
:alt
(if (< t -2.118326644891581e-50) (/ x (+ x (* y (exp (* 2.0 (- (+ (* a c) (* 0.8333333333333334 c)) (* a b))))))) (if (< t 5.196588770651547e-123) (/ x (+ x (* y (exp (* 2.0 (/ (- (* (* z (sqrt (+ t a))) (* (* 3.0 t) (- a (/ 5.0 6.0)))) (* (- (* (+ (/ 5.0 6.0) a) (* 3.0 t)) 2.0) (* (- a (/ 5.0 6.0)) (* (- b c) t)))) (* (* (* t t) 3.0) (- a (/ 5.0 6.0))))))))) (/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))))
(/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))