
(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 16 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 (sqrt (+ t a))))
(if (<=
(+
(/ (* z t_1) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a 0.8333333333333334))))
INFINITY)
(/
x
(fma
y
(pow
(exp 2.0)
(fma
t_1
(/ z t)
(* (- b c) (- (+ (/ 0.6666666666666666 t) -0.8333333333333334) a))))
x))
(/ x (+ x (* y (exp (* 2.0 (* a (- c b))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = sqrt((t + a));
double tmp;
if ((((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))) <= ((double) INFINITY)) {
tmp = x / fma(y, pow(exp(2.0), fma(t_1, (z / t), ((b - c) * (((0.6666666666666666 / t) + -0.8333333333333334) - a)))), x);
} else {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = sqrt(Float64(t + a)) tmp = 0.0 if (Float64(Float64(Float64(z * t_1) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + 0.8333333333333334)))) <= Inf) tmp = Float64(x / fma(y, (exp(2.0) ^ fma(t_1, Float64(z / t), Float64(Float64(b - c) * Float64(Float64(Float64(0.6666666666666666 / t) + -0.8333333333333334) - a)))), x)); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(z * t$95$1), $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], Infinity], N[(x / N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(t$95$1 * N[(z / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(N[(0.6666666666666666 / t), $MachinePrecision] + -0.8333333333333334), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{t + a}\\
\mathbf{if}\;\frac{z \cdot t_1}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + 0.8333333333333334\right)\right) \leq \infty:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, {\left(e^{2}\right)}^{\left(\mathsf{fma}\left(t_1, \frac{z}{t}, \left(b - c\right) \cdot \left(\left(\frac{0.6666666666666666}{t} + -0.8333333333333334\right) - a\right)\right)\right)}, x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 99.2%
+-commutative99.2%
fma-def99.2%
Simplified100.0%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) Initial program 0.0%
Taylor expanded in a around inf 71.5%
Final simplification98.1%
(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 (* a (- c b))))))))))
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 * (a * (c - b))))));
}
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 * (a * (c - b))))));
}
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 * (a * (c - b)))))) 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(a * Float64(c - b))))))); 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 * (a * (c - b)))))); 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[(a * N[(c - b), $MachinePrecision]), $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 \left(a \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 99.2%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) Initial program 0.0%
Taylor expanded in a around inf 71.5%
Final simplification97.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -8.2e+121)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 1.25e-271)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 3.2e+67)
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(* z (sqrt (/ 1.0 t)))
(* (- b c) (- (/ 0.6666666666666666 t) 0.8333333333333334))))))))
(/
x
(+ x (* y (exp (* 2.0 (* (- b c) (- -0.8333333333333334 a)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -8.2e+121) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 1.25e-271) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 3.2e+67) {
tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) + ((b - c) * ((0.6666666666666666 / t) - 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((b - c) * (-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 <= (-8.2d+121)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 1.25d-271) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 3.2d+67) then
tmp = x / (x + (y * exp((2.0d0 * ((z * sqrt((1.0d0 / t))) + ((b - c) * ((0.6666666666666666d0 / t) - 0.8333333333333334d0)))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((b - c) * ((-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 <= -8.2e+121) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 1.25e-271) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 3.2e+67) {
tmp = x / (x + (y * Math.exp((2.0 * ((z * Math.sqrt((1.0 / t))) + ((b - c) * ((0.6666666666666666 / t) - 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -8.2e+121: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 1.25e-271: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 3.2e+67: tmp = x / (x + (y * math.exp((2.0 * ((z * math.sqrt((1.0 / t))) + ((b - c) * ((0.6666666666666666 / t) - 0.8333333333333334))))))) else: tmp = x / (x + (y * math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -8.2e+121) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 1.25e-271) 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 <= 3.2e+67) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(z * sqrt(Float64(1.0 / t))) + Float64(Float64(b - c) * Float64(Float64(0.6666666666666666 / t) - 0.8333333333333334)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(b - c) * Float64(-0.8333333333333334 - a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -8.2e+121) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 1.25e-271) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 3.2e+67) tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) + ((b - c) * ((0.6666666666666666 / t) - 0.8333333333333334))))))); else tmp = x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -8.2e+121], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e-271], 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, 3.2e+67], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(z * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(0.6666666666666666 / t), $MachinePrecision] - 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(b - c), $MachinePrecision] * N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+121}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-271}:\\
\;\;\;\;\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 3.2 \cdot 10^{+67}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(z \cdot \sqrt{\frac{1}{t}} + \left(b - c\right) \cdot \left(\frac{0.6666666666666666}{t} - 0.8333333333333334\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(b - c\right) \cdot \left(-0.8333333333333334 - a\right)\right)}}\\
\end{array}
\end{array}
if t < -8.2e121Initial program 77.8%
Taylor expanded in a around inf 100.0%
if -8.2e121 < t < 1.2500000000000001e-271Initial program 86.1%
Taylor expanded in t around 0 97.3%
if 1.2500000000000001e-271 < t < 3.19999999999999983e67Initial program 95.2%
Taylor expanded in a around 0 89.8%
*-commutative89.8%
associate-*r/89.8%
metadata-eval89.8%
Simplified89.8%
if 3.19999999999999983e67 < t Initial program 97.2%
Taylor expanded in t around inf 95.8%
mul-1-neg95.8%
distribute-rgt-neg-in95.8%
distribute-neg-in95.8%
metadata-eval95.8%
sub-neg95.8%
Simplified95.8%
Final simplification93.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/ x (+ x (* y (exp (* 2.0 (* (- b c) (- -0.8333333333333334 a))))))))
(t_2 (/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))))
(if (<= t -5e-80)
t_1
(if (<= t 8e-244)
t_2
(if (<= t 1.45e-65)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* c (+ a (+ 0.8333333333333334 (/ -0.6666666666666666 t)))))))))
(if (<= t 5.2e-52)
t_2
(if (<= t 1.55e-14)
(/ x (+ x (* y (exp (* 2.0 (* z (sqrt (/ 1.0 t))))))))
(if (<= t 4.5e-11)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ b t))))))
t_1))))))))
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 - c) * (-0.8333333333333334 - a))))));
double t_2 = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
double tmp;
if (t <= -5e-80) {
tmp = t_1;
} else if (t <= 8e-244) {
tmp = t_2;
} else if (t <= 1.45e-65) {
tmp = x / (x + (y * exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t))))))));
} else if (t <= 5.2e-52) {
tmp = t_2;
} else if (t <= 1.55e-14) {
tmp = x / (x + (y * exp((2.0 * (z * sqrt((1.0 / t)))))));
} else if (t <= 4.5e-11) {
tmp = x / (x + (y * exp((1.3333333333333333 * (b / t)))));
} else {
tmp = t_1;
}
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 = x / (x + (y * exp((2.0d0 * ((b - c) * ((-0.8333333333333334d0) - a))))))
t_2 = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
if (t <= (-5d-80)) then
tmp = t_1
else if (t <= 8d-244) then
tmp = t_2
else if (t <= 1.45d-65) then
tmp = x / (x + (y * exp((2.0d0 * (c * (a + (0.8333333333333334d0 + ((-0.6666666666666666d0) / t))))))))
else if (t <= 5.2d-52) then
tmp = t_2
else if (t <= 1.55d-14) then
tmp = x / (x + (y * exp((2.0d0 * (z * sqrt((1.0d0 / t)))))))
else if (t <= 4.5d-11) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * (b / t)))))
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 c) {
double t_1 = x / (x + (y * Math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a))))));
double t_2 = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
double tmp;
if (t <= -5e-80) {
tmp = t_1;
} else if (t <= 8e-244) {
tmp = t_2;
} else if (t <= 1.45e-65) {
tmp = x / (x + (y * Math.exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t))))))));
} else if (t <= 5.2e-52) {
tmp = t_2;
} else if (t <= 1.55e-14) {
tmp = x / (x + (y * Math.exp((2.0 * (z * Math.sqrt((1.0 / t)))))));
} else if (t <= 4.5e-11) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * (b / t)))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))) t_2 = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) tmp = 0 if t <= -5e-80: tmp = t_1 elif t <= 8e-244: tmp = t_2 elif t <= 1.45e-65: tmp = x / (x + (y * math.exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t)))))))) elif t <= 5.2e-52: tmp = t_2 elif t <= 1.55e-14: tmp = x / (x + (y * math.exp((2.0 * (z * math.sqrt((1.0 / t))))))) elif t <= 4.5e-11: tmp = x / (x + (y * math.exp((1.3333333333333333 * (b / t))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(b - c) * Float64(-0.8333333333333334 - a))))))) t_2 = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))) tmp = 0.0 if (t <= -5e-80) tmp = t_1; elseif (t <= 8e-244) tmp = t_2; elseif (t <= 1.45e-65) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(0.8333333333333334 + Float64(-0.6666666666666666 / t))))))))); elseif (t <= 5.2e-52) tmp = t_2; elseif (t <= 1.55e-14) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(z * sqrt(Float64(1.0 / t)))))))); elseif (t <= 4.5e-11) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(b / t)))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))); t_2 = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); tmp = 0.0; if (t <= -5e-80) tmp = t_1; elseif (t <= 8e-244) tmp = t_2; elseif (t <= 1.45e-65) tmp = x / (x + (y * exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t)))))))); elseif (t <= 5.2e-52) tmp = t_2; elseif (t <= 1.55e-14) tmp = x / (x + (y * exp((2.0 * (z * sqrt((1.0 / t))))))); elseif (t <= 4.5e-11) tmp = x / (x + (y * exp((1.3333333333333333 * (b / t))))); else tmp = t_1; 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[(N[(b - c), $MachinePrecision] * N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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-80], t$95$1, If[LessEqual[t, 8e-244], t$95$2, If[LessEqual[t, 1.45e-65], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(0.8333333333333334 + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-52], t$95$2, If[LessEqual[t, 1.55e-14], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(z * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-11], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(b / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(\left(b - c\right) \cdot \left(-0.8333333333333334 - a\right)\right)}}\\
t_2 := \frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-244}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-65}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(0.8333333333333334 + \frac{-0.6666666666666666}{t}\right)\right)\right)}}\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-52}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(z \cdot \sqrt{\frac{1}{t}}\right)}}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-11}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b}{t}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -5e-80 or 4.5e-11 < t Initial program 95.8%
Taylor expanded in t around inf 89.4%
mul-1-neg89.4%
distribute-rgt-neg-in89.4%
distribute-neg-in89.4%
metadata-eval89.4%
sub-neg89.4%
Simplified89.4%
if -5e-80 < t < 7.9999999999999994e-244 or 1.4499999999999999e-65 < t < 5.1999999999999997e-52Initial program 85.3%
Taylor expanded in t around 0 84.1%
Taylor expanded in a around 0 83.2%
if 7.9999999999999994e-244 < t < 1.4499999999999999e-65Initial program 92.9%
Taylor expanded in c around inf 81.6%
+-commutative81.6%
associate-*r/81.6%
metadata-eval81.6%
metadata-eval81.6%
associate-/r*81.6%
*-commutative81.6%
associate--l+81.6%
sub-neg81.6%
sub-neg81.6%
*-commutative81.6%
associate-/r*81.6%
metadata-eval81.6%
sub-neg81.6%
distribute-neg-frac81.6%
metadata-eval81.6%
Simplified81.6%
if 5.1999999999999997e-52 < t < 1.55000000000000002e-14Initial program 100.0%
Taylor expanded in a around 0 87.1%
*-commutative87.1%
associate-*r/87.1%
metadata-eval87.1%
Simplified87.1%
Taylor expanded in z around inf 74.7%
if 1.55000000000000002e-14 < t < 4.5e-11Initial program 100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in a around 0 80.6%
Taylor expanded in c around 0 100.0%
Final simplification85.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -8.2e+121)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 8.2e-267)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 1.45e-51)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 1.55e-14)
(/ x (+ x (* y (exp (* 2.0 (* z (sqrt (/ 1.0 t))))))))
(if (<= t 1.8e-8)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ b t))))))
(/
x
(+
x
(* y (exp (* 2.0 (* (- b c) (- -0.8333333333333334 a)))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -8.2e+121) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 8.2e-267) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1.45e-51) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 1.55e-14) {
tmp = x / (x + (y * exp((2.0 * (z * sqrt((1.0 / t)))))));
} else if (t <= 1.8e-8) {
tmp = x / (x + (y * exp((1.3333333333333333 * (b / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * ((b - c) * (-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 <= (-8.2d+121)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 8.2d-267) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 1.45d-51) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 1.55d-14) then
tmp = x / (x + (y * exp((2.0d0 * (z * sqrt((1.0d0 / t)))))))
else if (t <= 1.8d-8) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * (b / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * ((b - c) * ((-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 <= -8.2e+121) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 8.2e-267) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1.45e-51) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 1.55e-14) {
tmp = x / (x + (y * Math.exp((2.0 * (z * Math.sqrt((1.0 / t)))))));
} else if (t <= 1.8e-8) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * (b / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -8.2e+121: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 8.2e-267: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 1.45e-51: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 1.55e-14: tmp = x / (x + (y * math.exp((2.0 * (z * math.sqrt((1.0 / t))))))) elif t <= 1.8e-8: tmp = x / (x + (y * math.exp((1.3333333333333333 * (b / t))))) else: tmp = x / (x + (y * math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -8.2e+121) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 8.2e-267) 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 <= 1.45e-51) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 1.55e-14) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(z * sqrt(Float64(1.0 / t)))))))); elseif (t <= 1.8e-8) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(b / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(b - c) * Float64(-0.8333333333333334 - a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -8.2e+121) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 8.2e-267) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 1.45e-51) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 1.55e-14) tmp = x / (x + (y * exp((2.0 * (z * sqrt((1.0 / t))))))); elseif (t <= 1.8e-8) tmp = x / (x + (y * exp((1.3333333333333333 * (b / t))))); else tmp = x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -8.2e+121], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e-267], 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, 1.45e-51], 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.55e-14], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(z * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e-8], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(b / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(b - c), $MachinePrecision] * N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+121}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-267}:\\
\;\;\;\;\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 1.45 \cdot 10^{-51}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(z \cdot \sqrt{\frac{1}{t}}\right)}}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(b - c\right) \cdot \left(-0.8333333333333334 - a\right)\right)}}\\
\end{array}
\end{array}
if t < -8.2e121Initial program 77.8%
Taylor expanded in a around inf 100.0%
if -8.2e121 < t < 8.20000000000000022e-267Initial program 86.3%
Taylor expanded in t around 0 97.3%
if 8.20000000000000022e-267 < t < 1.44999999999999986e-51Initial program 91.8%
Taylor expanded in t around 0 56.0%
Taylor expanded in a around 0 76.2%
if 1.44999999999999986e-51 < t < 1.55000000000000002e-14Initial program 100.0%
Taylor expanded in a around 0 87.1%
*-commutative87.1%
associate-*r/87.1%
metadata-eval87.1%
Simplified87.1%
Taylor expanded in z around inf 74.7%
if 1.55000000000000002e-14 < t < 1.79999999999999991e-8Initial program 100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in a around 0 80.6%
Taylor expanded in c around 0 100.0%
if 1.79999999999999991e-8 < t Initial program 97.9%
Taylor expanded in t around inf 90.6%
mul-1-neg90.6%
distribute-rgt-neg-in90.6%
distribute-neg-in90.6%
metadata-eval90.6%
sub-neg90.6%
Simplified90.6%
Final simplification88.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/
x
(+ x (* y (exp (* 2.0 (* (- b c) (- -0.8333333333333334 a)))))))))
(if (<= t -5e-81)
t_1
(if (<= t 7e-244)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 7.6e-64)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* c (+ a (+ 0.8333333333333334 (/ -0.6666666666666666 t)))))))))
(if (<= t 1.15e-11)
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
b
(+ (/ 0.6666666666666666 t) (- -0.8333333333333334 a))))))))
t_1))))))
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 - c) * (-0.8333333333333334 - a))))));
double tmp;
if (t <= -5e-81) {
tmp = t_1;
} else if (t <= 7e-244) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 7.6e-64) {
tmp = x / (x + (y * exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t))))))));
} else if (t <= 1.15e-11) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) + (-0.8333333333333334 - a)))))));
} else {
tmp = t_1;
}
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 - c) * ((-0.8333333333333334d0) - a))))))
if (t <= (-5d-81)) then
tmp = t_1
else if (t <= 7d-244) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 7.6d-64) then
tmp = x / (x + (y * exp((2.0d0 * (c * (a + (0.8333333333333334d0 + ((-0.6666666666666666d0) / t))))))))
else if (t <= 1.15d-11) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) + ((-0.8333333333333334d0) - a)))))))
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 c) {
double t_1 = x / (x + (y * Math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a))))));
double tmp;
if (t <= -5e-81) {
tmp = t_1;
} else if (t <= 7e-244) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 7.6e-64) {
tmp = x / (x + (y * Math.exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t))))))));
} else if (t <= 1.15e-11) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) + (-0.8333333333333334 - a)))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))) tmp = 0 if t <= -5e-81: tmp = t_1 elif t <= 7e-244: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 7.6e-64: tmp = x / (x + (y * math.exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t)))))))) elif t <= 1.15e-11: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) + (-0.8333333333333334 - a))))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(b - c) * Float64(-0.8333333333333334 - a))))))) tmp = 0.0 if (t <= -5e-81) tmp = t_1; elseif (t <= 7e-244) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 7.6e-64) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(0.8333333333333334 + Float64(-0.6666666666666666 / t))))))))); elseif (t <= 1.15e-11) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) + Float64(-0.8333333333333334 - a)))))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))); tmp = 0.0; if (t <= -5e-81) tmp = t_1; elseif (t <= 7e-244) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 7.6e-64) tmp = x / (x + (y * exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t)))))))); elseif (t <= 1.15e-11) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) + (-0.8333333333333334 - a))))))); else tmp = t_1; 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[(N[(b - c), $MachinePrecision] * N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-81], t$95$1, If[LessEqual[t, 7e-244], 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.6e-64], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(0.8333333333333334 + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e-11], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] + N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(\left(b - c\right) \cdot \left(-0.8333333333333334 - a\right)\right)}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-81}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-244}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{-64}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(0.8333333333333334 + \frac{-0.6666666666666666}{t}\right)\right)\right)}}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-11}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} + \left(-0.8333333333333334 - a\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.99999999999999981e-81 or 1.15000000000000007e-11 < t Initial program 95.9%
Taylor expanded in t around inf 88.8%
mul-1-neg88.8%
distribute-rgt-neg-in88.8%
distribute-neg-in88.8%
metadata-eval88.8%
sub-neg88.8%
Simplified88.8%
if -4.99999999999999981e-81 < t < 6.99999999999999984e-244Initial program 82.3%
Taylor expanded in t around 0 93.6%
Taylor expanded in a around 0 82.8%
if 6.99999999999999984e-244 < t < 7.6000000000000003e-64Initial program 92.9%
Taylor expanded in c around inf 81.6%
+-commutative81.6%
associate-*r/81.6%
metadata-eval81.6%
metadata-eval81.6%
associate-/r*81.6%
*-commutative81.6%
associate--l+81.6%
sub-neg81.6%
sub-neg81.6%
*-commutative81.6%
associate-/r*81.6%
metadata-eval81.6%
sub-neg81.6%
distribute-neg-frac81.6%
metadata-eval81.6%
Simplified81.6%
if 7.6000000000000003e-64 < t < 1.15000000000000007e-11Initial program 100.0%
Taylor expanded in b around inf 68.0%
*-commutative68.0%
sub-neg68.0%
associate-*r/68.0%
metadata-eval68.0%
distribute-neg-in68.0%
metadata-eval68.0%
sub-neg68.0%
Simplified68.0%
Final simplification83.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 2.0 (* a (- c b))))))))
(t_2 (/ x (+ x (* y (exp (* 1.3333333333333333 (/ b t))))))))
(if (<= t 6e-304)
t_1
(if (<= t 7.2e-57)
t_2
(if (<= t 3.55e-15)
1.0
(if (<= t 0.16)
t_2
(if (<= t 3e+185)
(/ x (+ x (* y (exp (* (- b c) -1.6666666666666667)))))
t_1)))))))
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 * (a * (c - b))))));
double t_2 = x / (x + (y * exp((1.3333333333333333 * (b / t)))));
double tmp;
if (t <= 6e-304) {
tmp = t_1;
} else if (t <= 7.2e-57) {
tmp = t_2;
} else if (t <= 3.55e-15) {
tmp = 1.0;
} else if (t <= 0.16) {
tmp = t_2;
} else if (t <= 3e+185) {
tmp = x / (x + (y * exp(((b - c) * -1.6666666666666667))));
} else {
tmp = t_1;
}
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 = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
t_2 = x / (x + (y * exp((1.3333333333333333d0 * (b / t)))))
if (t <= 6d-304) then
tmp = t_1
else if (t <= 7.2d-57) then
tmp = t_2
else if (t <= 3.55d-15) then
tmp = 1.0d0
else if (t <= 0.16d0) then
tmp = t_2
else if (t <= 3d+185) then
tmp = x / (x + (y * exp(((b - c) * (-1.6666666666666667d0)))))
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 c) {
double t_1 = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
double t_2 = x / (x + (y * Math.exp((1.3333333333333333 * (b / t)))));
double tmp;
if (t <= 6e-304) {
tmp = t_1;
} else if (t <= 7.2e-57) {
tmp = t_2;
} else if (t <= 3.55e-15) {
tmp = 1.0;
} else if (t <= 0.16) {
tmp = t_2;
} else if (t <= 3e+185) {
tmp = x / (x + (y * Math.exp(((b - c) * -1.6666666666666667))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) t_2 = x / (x + (y * math.exp((1.3333333333333333 * (b / t))))) tmp = 0 if t <= 6e-304: tmp = t_1 elif t <= 7.2e-57: tmp = t_2 elif t <= 3.55e-15: tmp = 1.0 elif t <= 0.16: tmp = t_2 elif t <= 3e+185: tmp = x / (x + (y * math.exp(((b - c) * -1.6666666666666667)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))) t_2 = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(b / t)))))) tmp = 0.0 if (t <= 6e-304) tmp = t_1; elseif (t <= 7.2e-57) tmp = t_2; elseif (t <= 3.55e-15) tmp = 1.0; elseif (t <= 0.16) tmp = t_2; elseif (t <= 3e+185) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b - c) * -1.6666666666666667))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * (a * (c - b)))))); t_2 = x / (x + (y * exp((1.3333333333333333 * (b / t))))); tmp = 0.0; if (t <= 6e-304) tmp = t_1; elseif (t <= 7.2e-57) tmp = t_2; elseif (t <= 3.55e-15) tmp = 1.0; elseif (t <= 0.16) tmp = t_2; elseif (t <= 3e+185) tmp = x / (x + (y * exp(((b - c) * -1.6666666666666667)))); else tmp = t_1; 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[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(b / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 6e-304], t$95$1, If[LessEqual[t, 7.2e-57], t$95$2, If[LessEqual[t, 3.55e-15], 1.0, If[LessEqual[t, 0.16], t$95$2, If[LessEqual[t, 3e+185], N[(x / N[(x + N[(y * N[Exp[N[(N[(b - c), $MachinePrecision] * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
t_2 := \frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b}{t}}}\\
\mathbf{if}\;t \leq 6 \cdot 10^{-304}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-57}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3.55 \cdot 10^{-15}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 0.16:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+185}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(b - c\right) \cdot -1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < 6.0000000000000002e-304 or 2.99999999999999994e185 < t Initial program 88.9%
Taylor expanded in a around inf 77.4%
if 6.0000000000000002e-304 < t < 7.2000000000000005e-57 or 3.5500000000000001e-15 < t < 0.160000000000000003Initial program 91.2%
Taylor expanded in t around 0 66.4%
Taylor expanded in a around 0 78.6%
Taylor expanded in c around 0 62.6%
if 7.2000000000000005e-57 < t < 3.5500000000000001e-15Initial program 100.0%
Taylor expanded in a around inf 40.1%
Taylor expanded in a around 0 20.0%
Taylor expanded in x around inf 58.5%
if 0.160000000000000003 < t < 2.99999999999999994e185Initial program 98.4%
Taylor expanded in t around inf 90.2%
mul-1-neg90.2%
distribute-rgt-neg-in90.2%
distribute-neg-in90.2%
metadata-eval90.2%
sub-neg90.2%
Simplified90.2%
Taylor expanded in a around 0 80.3%
Final simplification72.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 1.3333333333333333 (/ b t)))))))
(t_2 (/ x (+ x (* y (exp (* (- b c) -1.6666666666666667)))))))
(if (<= t 6e-304)
t_2
(if (<= t 8e-57)
t_1
(if (<= t 1.2e-14) 1.0 (if (<= t 0.00115) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((1.3333333333333333 * (b / t)))));
double t_2 = x / (x + (y * exp(((b - c) * -1.6666666666666667))));
double tmp;
if (t <= 6e-304) {
tmp = t_2;
} else if (t <= 8e-57) {
tmp = t_1;
} else if (t <= 1.2e-14) {
tmp = 1.0;
} else if (t <= 0.00115) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = x / (x + (y * exp((1.3333333333333333d0 * (b / t)))))
t_2 = x / (x + (y * exp(((b - c) * (-1.6666666666666667d0)))))
if (t <= 6d-304) then
tmp = t_2
else if (t <= 8d-57) then
tmp = t_1
else if (t <= 1.2d-14) then
tmp = 1.0d0
else if (t <= 0.00115d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((1.3333333333333333 * (b / t)))));
double t_2 = x / (x + (y * Math.exp(((b - c) * -1.6666666666666667))));
double tmp;
if (t <= 6e-304) {
tmp = t_2;
} else if (t <= 8e-57) {
tmp = t_1;
} else if (t <= 1.2e-14) {
tmp = 1.0;
} else if (t <= 0.00115) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((1.3333333333333333 * (b / t))))) t_2 = x / (x + (y * math.exp(((b - c) * -1.6666666666666667)))) tmp = 0 if t <= 6e-304: tmp = t_2 elif t <= 8e-57: tmp = t_1 elif t <= 1.2e-14: tmp = 1.0 elif t <= 0.00115: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(b / t)))))) t_2 = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b - c) * -1.6666666666666667))))) tmp = 0.0 if (t <= 6e-304) tmp = t_2; elseif (t <= 8e-57) tmp = t_1; elseif (t <= 1.2e-14) tmp = 1.0; elseif (t <= 0.00115) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((1.3333333333333333 * (b / t))))); t_2 = x / (x + (y * exp(((b - c) * -1.6666666666666667)))); tmp = 0.0; if (t <= 6e-304) tmp = t_2; elseif (t <= 8e-57) tmp = t_1; elseif (t <= 1.2e-14) tmp = 1.0; elseif (t <= 0.00115) tmp = t_1; else tmp = t_2; 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[(1.3333333333333333 * N[(b / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(x + N[(y * N[Exp[N[(N[(b - c), $MachinePrecision] * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 6e-304], t$95$2, If[LessEqual[t, 8e-57], t$95$1, If[LessEqual[t, 1.2e-14], 1.0, If[LessEqual[t, 0.00115], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b}{t}}}\\
t_2 := \frac{x}{x + y \cdot e^{\left(b - c\right) \cdot -1.6666666666666667}}\\
\mathbf{if}\;t \leq 6 \cdot 10^{-304}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-14}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 0.00115:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < 6.0000000000000002e-304 or 0.00115 < t Initial program 92.2%
Taylor expanded in t around inf 85.5%
mul-1-neg85.5%
distribute-rgt-neg-in85.5%
distribute-neg-in85.5%
metadata-eval85.5%
sub-neg85.5%
Simplified85.5%
Taylor expanded in a around 0 72.2%
if 6.0000000000000002e-304 < t < 7.99999999999999964e-57 or 1.2e-14 < t < 0.00115Initial program 91.2%
Taylor expanded in t around 0 66.4%
Taylor expanded in a around 0 78.6%
Taylor expanded in c around 0 62.6%
if 7.99999999999999964e-57 < t < 1.2e-14Initial program 100.0%
Taylor expanded in a around inf 40.1%
Taylor expanded in a around 0 20.0%
Taylor expanded in x around inf 58.5%
Final simplification68.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))))
(if (<= t -2e-45)
t_1
(if (<= t 7.2e-20)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 2.15e+191)
(/ x (+ x (* y (exp (* (- b c) -1.6666666666666667)))))
t_1)))))
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 * (a * (c - b))))));
double tmp;
if (t <= -2e-45) {
tmp = t_1;
} else if (t <= 7.2e-20) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 2.15e+191) {
tmp = x / (x + (y * exp(((b - c) * -1.6666666666666667))));
} else {
tmp = t_1;
}
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 * (a * (c - b))))))
if (t <= (-2d-45)) then
tmp = t_1
else if (t <= 7.2d-20) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 2.15d+191) then
tmp = x / (x + (y * exp(((b - c) * (-1.6666666666666667d0)))))
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 c) {
double t_1 = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
double tmp;
if (t <= -2e-45) {
tmp = t_1;
} else if (t <= 7.2e-20) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 2.15e+191) {
tmp = x / (x + (y * Math.exp(((b - c) * -1.6666666666666667))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) tmp = 0 if t <= -2e-45: tmp = t_1 elif t <= 7.2e-20: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 2.15e+191: tmp = x / (x + (y * math.exp(((b - c) * -1.6666666666666667)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))) tmp = 0.0 if (t <= -2e-45) tmp = t_1; elseif (t <= 7.2e-20) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 2.15e+191) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b - c) * -1.6666666666666667))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * (a * (c - b)))))); tmp = 0.0; if (t <= -2e-45) tmp = t_1; elseif (t <= 7.2e-20) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 2.15e+191) tmp = x / (x + (y * exp(((b - c) * -1.6666666666666667)))); else tmp = t_1; 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[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-45], t$95$1, If[LessEqual[t, 7.2e-20], 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.15e+191], N[(x / N[(x + N[(y * N[Exp[N[(N[(b - c), $MachinePrecision] * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{if}\;t \leq -2 \cdot 10^{-45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{+191}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(b - c\right) \cdot -1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.99999999999999997e-45 or 2.1499999999999999e191 < t Initial program 94.0%
Taylor expanded in a around inf 84.1%
if -1.99999999999999997e-45 < t < 7.19999999999999948e-20Initial program 89.2%
Taylor expanded in t around 0 75.7%
Taylor expanded in a around 0 74.9%
if 7.19999999999999948e-20 < t < 2.1499999999999999e191Initial program 98.6%
Taylor expanded in t around inf 85.6%
mul-1-neg85.6%
distribute-rgt-neg-in85.6%
distribute-neg-in85.6%
metadata-eval85.6%
sub-neg85.6%
Simplified85.6%
Taylor expanded in a around 0 76.9%
Final simplification77.2%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -1e-78) (not (<= t 3.9e-23))) (/ x (+ x (* y (exp (* 2.0 (* (- b c) (- -0.8333333333333334 a))))))) (/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1e-78) || !(t <= 3.9e-23)) {
tmp = x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - a))))));
} else {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / 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 ((t <= (-1d-78)) .or. (.not. (t <= 3.9d-23))) then
tmp = x / (x + (y * exp((2.0d0 * ((b - c) * ((-0.8333333333333334d0) - a))))))
else
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / 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 ((t <= -1e-78) || !(t <= 3.9e-23)) {
tmp = x / (x + (y * Math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a))))));
} else {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -1e-78) or not (t <= 3.9e-23): tmp = x / (x + (y * math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))) else: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -1e-78) || !(t <= 3.9e-23)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(b - c) * Float64(-0.8333333333333334 - a))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -1e-78) || ~((t <= 3.9e-23))) tmp = x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))); else tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -1e-78], N[Not[LessEqual[t, 3.9e-23]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(b - c), $MachinePrecision] * N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-78} \lor \neg \left(t \leq 3.9 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(b - c\right) \cdot \left(-0.8333333333333334 - a\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\end{array}
\end{array}
if t < -9.99999999999999999e-79 or 3.9e-23 < t Initial program 96.1%
Taylor expanded in t around inf 87.0%
mul-1-neg87.0%
distribute-rgt-neg-in87.0%
distribute-neg-in87.0%
metadata-eval87.0%
sub-neg87.0%
Simplified87.0%
if -9.99999999999999999e-79 < t < 3.9e-23Initial program 89.1%
Taylor expanded in t around 0 73.9%
Taylor expanded in a around 0 76.0%
Final simplification81.5%
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -5.8e-102)
1.0
(if (or (<= z 1.52e-25) (not (<= z 1.1e+96)))
(/ x (+ x (* y (exp (* -2.0 (* a b))))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -5.8e-102) {
tmp = 1.0;
} else if ((z <= 1.52e-25) || !(z <= 1.1e+96)) {
tmp = x / (x + (y * exp((-2.0 * (a * b)))));
} 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 (z <= (-5.8d-102)) then
tmp = 1.0d0
else if ((z <= 1.52d-25) .or. (.not. (z <= 1.1d+96))) then
tmp = x / (x + (y * exp(((-2.0d0) * (a * b)))))
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 (z <= -5.8e-102) {
tmp = 1.0;
} else if ((z <= 1.52e-25) || !(z <= 1.1e+96)) {
tmp = x / (x + (y * Math.exp((-2.0 * (a * b)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= -5.8e-102: tmp = 1.0 elif (z <= 1.52e-25) or not (z <= 1.1e+96): tmp = x / (x + (y * math.exp((-2.0 * (a * b))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -5.8e-102) tmp = 1.0; elseif ((z <= 1.52e-25) || !(z <= 1.1e+96)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(a * b)))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (z <= -5.8e-102) tmp = 1.0; elseif ((z <= 1.52e-25) || ~((z <= 1.1e+96))) tmp = x / (x + (y * exp((-2.0 * (a * b))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -5.8e-102], 1.0, If[Or[LessEqual[z, 1.52e-25], N[Not[LessEqual[z, 1.1e+96]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-102}:\\
\;\;\;\;1\\
\mathbf{elif}\;z \leq 1.52 \cdot 10^{-25} \lor \neg \left(z \leq 1.1 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(a \cdot b\right)}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if z < -5.79999999999999973e-102 or 1.52000000000000006e-25 < z < 1.0999999999999999e96Initial program 91.0%
Taylor expanded in a around inf 51.9%
Taylor expanded in a around 0 34.2%
Taylor expanded in x around inf 64.8%
if -5.79999999999999973e-102 < z < 1.52000000000000006e-25 or 1.0999999999999999e96 < z Initial program 94.1%
Taylor expanded in a around inf 63.2%
Taylor expanded in c around 0 60.4%
Final simplification62.5%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t 4.5e-304) (not (<= t 1.1e-18))) (/ x (+ x (* y (exp (* (- b c) -1.6666666666666667))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= 4.5e-304) || !(t <= 1.1e-18)) {
tmp = x / (x + (y * exp(((b - c) * -1.6666666666666667))));
} 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 ((t <= 4.5d-304) .or. (.not. (t <= 1.1d-18))) then
tmp = x / (x + (y * exp(((b - c) * (-1.6666666666666667d0)))))
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 ((t <= 4.5e-304) || !(t <= 1.1e-18)) {
tmp = x / (x + (y * Math.exp(((b - c) * -1.6666666666666667))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= 4.5e-304) or not (t <= 1.1e-18): tmp = x / (x + (y * math.exp(((b - c) * -1.6666666666666667)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= 4.5e-304) || !(t <= 1.1e-18)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b - c) * -1.6666666666666667))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= 4.5e-304) || ~((t <= 1.1e-18))) tmp = x / (x + (y * exp(((b - c) * -1.6666666666666667)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, 4.5e-304], N[Not[LessEqual[t, 1.1e-18]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(N[(b - c), $MachinePrecision] * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.5 \cdot 10^{-304} \lor \neg \left(t \leq 1.1 \cdot 10^{-18}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(b - c\right) \cdot -1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < 4.4999999999999998e-304 or 1.0999999999999999e-18 < t Initial program 93.1%
Taylor expanded in t around inf 83.8%
mul-1-neg83.8%
distribute-rgt-neg-in83.8%
distribute-neg-in83.8%
metadata-eval83.8%
sub-neg83.8%
Simplified83.8%
Taylor expanded in a around 0 71.1%
if 4.4999999999999998e-304 < t < 1.0999999999999999e-18Initial program 91.5%
Taylor expanded in a around inf 33.5%
Taylor expanded in a around 0 26.7%
Taylor expanded in x around inf 55.1%
Final simplification66.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= z 2.1e+102)
1.0
(/
x
(+
x
(+
y
(*
2.0
(/
c
(/
(+ 0.8333333333333334 (/ 0.6666666666666666 t))
(* y (- 0.6944444444444444 (/ 0.4444444444444444 (* t t))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 2.1e+102) {
tmp = 1.0;
} else {
tmp = x / (x + (y + (2.0 * (c / ((0.8333333333333334 + (0.6666666666666666 / t)) / (y * (0.6944444444444444 - (0.4444444444444444 / (t * 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 (z <= 2.1d+102) then
tmp = 1.0d0
else
tmp = x / (x + (y + (2.0d0 * (c / ((0.8333333333333334d0 + (0.6666666666666666d0 / t)) / (y * (0.6944444444444444d0 - (0.4444444444444444d0 / (t * 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 (z <= 2.1e+102) {
tmp = 1.0;
} else {
tmp = x / (x + (y + (2.0 * (c / ((0.8333333333333334 + (0.6666666666666666 / t)) / (y * (0.6944444444444444 - (0.4444444444444444 / (t * t)))))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= 2.1e+102: tmp = 1.0 else: tmp = x / (x + (y + (2.0 * (c / ((0.8333333333333334 + (0.6666666666666666 / t)) / (y * (0.6944444444444444 - (0.4444444444444444 / (t * t))))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= 2.1e+102) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y + Float64(2.0 * Float64(c / Float64(Float64(0.8333333333333334 + Float64(0.6666666666666666 / t)) / Float64(y * Float64(0.6944444444444444 - Float64(0.4444444444444444 / Float64(t * t)))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (z <= 2.1e+102) tmp = 1.0; else tmp = x / (x + (y + (2.0 * (c / ((0.8333333333333334 + (0.6666666666666666 / t)) / (y * (0.6944444444444444 - (0.4444444444444444 / (t * t))))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, 2.1e+102], 1.0, N[(x / N[(x + N[(y + N[(2.0 * N[(c / N[(N[(0.8333333333333334 + N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision] / N[(y * N[(0.6944444444444444 - N[(0.4444444444444444 / N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.1 \cdot 10^{+102}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + \left(y + 2 \cdot \frac{c}{\frac{0.8333333333333334 + \frac{0.6666666666666666}{t}}{y \cdot \left(0.6944444444444444 - \frac{0.4444444444444444}{t \cdot t}\right)}}\right)}\\
\end{array}
\end{array}
if z < 2.10000000000000001e102Initial program 94.9%
Taylor expanded in a around inf 59.1%
Taylor expanded in a around 0 37.9%
Taylor expanded in x around inf 58.0%
if 2.10000000000000001e102 < z Initial program 81.0%
Taylor expanded in c around inf 44.3%
+-commutative44.3%
associate-*r/44.3%
metadata-eval44.3%
metadata-eval44.3%
associate-/r*44.3%
*-commutative44.3%
associate--l+44.3%
sub-neg44.3%
sub-neg44.3%
*-commutative44.3%
associate-/r*44.3%
metadata-eval44.3%
sub-neg44.3%
distribute-neg-frac44.3%
metadata-eval44.3%
Simplified44.3%
Taylor expanded in c around 0 40.0%
associate-*r*35.5%
cancel-sign-sub-inv35.5%
metadata-eval35.5%
associate-*r/35.5%
metadata-eval35.5%
Simplified35.5%
flip-+39.3%
Applied egg-rr39.3%
associate-*l/39.3%
associate-*r/39.3%
metadata-eval39.3%
associate--l+39.3%
sub-neg39.3%
distribute-neg-frac39.3%
metadata-eval39.3%
Simplified39.3%
Taylor expanded in a around 0 44.5%
associate-/l*44.5%
*-commutative44.5%
associate-*r/44.5%
metadata-eval44.5%
*-commutative44.5%
associate-*r/44.5%
metadata-eval44.5%
unpow244.5%
Simplified44.5%
Final simplification55.8%
(FPCore (x y z t a b c) :precision binary64 (if (<= z 6.2e+102) 1.0 (/ x (+ x (* y (+ 1.0 (* (* a 2.0) (- c b))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 6.2e+102) {
tmp = 1.0;
} else {
tmp = x / (x + (y * (1.0 + ((a * 2.0) * (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 (z <= 6.2d+102) then
tmp = 1.0d0
else
tmp = x / (x + (y * (1.0d0 + ((a * 2.0d0) * (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 (z <= 6.2e+102) {
tmp = 1.0;
} else {
tmp = x / (x + (y * (1.0 + ((a * 2.0) * (c - b)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= 6.2e+102: tmp = 1.0 else: tmp = x / (x + (y * (1.0 + ((a * 2.0) * (c - b))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= 6.2e+102) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 + Float64(Float64(a * 2.0) * Float64(c - b)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (z <= 6.2e+102) tmp = 1.0; else tmp = x / (x + (y * (1.0 + ((a * 2.0) * (c - b))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, 6.2e+102], 1.0, N[(x / N[(x + N[(y * N[(1.0 + N[(N[(a * 2.0), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 6.2 \cdot 10^{+102}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 + \left(a \cdot 2\right) \cdot \left(c - b\right)\right)}\\
\end{array}
\end{array}
if z < 6.19999999999999973e102Initial program 94.9%
Taylor expanded in a around inf 59.1%
Taylor expanded in a around 0 37.9%
Taylor expanded in x around inf 58.0%
if 6.19999999999999973e102 < z Initial program 81.0%
Taylor expanded in a around inf 51.3%
Taylor expanded in a around 0 37.7%
associate-*r*37.7%
Simplified37.7%
Final simplification54.7%
(FPCore (x y z t a b c) :precision binary64 (if (<= z 1.9e+101) 1.0 (/ x (+ x (* y (+ 1.0 (* 1.3333333333333333 (/ (- b c) t))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 1.9e+101) {
tmp = 1.0;
} else {
tmp = x / (x + (y * (1.0 + (1.3333333333333333 * ((b - c) / 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 (z <= 1.9d+101) then
tmp = 1.0d0
else
tmp = x / (x + (y * (1.0d0 + (1.3333333333333333d0 * ((b - c) / 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 (z <= 1.9e+101) {
tmp = 1.0;
} else {
tmp = x / (x + (y * (1.0 + (1.3333333333333333 * ((b - c) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= 1.9e+101: tmp = 1.0 else: tmp = x / (x + (y * (1.0 + (1.3333333333333333 * ((b - c) / t))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= 1.9e+101) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 + Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (z <= 1.9e+101) tmp = 1.0; else tmp = x / (x + (y * (1.0 + (1.3333333333333333 * ((b - c) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, 1.9e+101], 1.0, N[(x / N[(x + N[(y * N[(1.0 + N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.9 \cdot 10^{+101}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 + 1.3333333333333333 \cdot \frac{b - c}{t}\right)}\\
\end{array}
\end{array}
if z < 1.8999999999999999e101Initial program 94.9%
Taylor expanded in a around inf 59.1%
Taylor expanded in a around 0 37.9%
Taylor expanded in x around inf 58.0%
if 1.8999999999999999e101 < z Initial program 81.0%
Taylor expanded in t around 0 64.3%
Taylor expanded in a around 0 46.9%
Taylor expanded in t around inf 42.3%
Final simplification55.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 92.6%
Taylor expanded in a around inf 57.8%
Taylor expanded in a around 0 35.6%
Taylor expanded in x around inf 52.8%
Final simplification52.8%
(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 2023171
(FPCore (x y z t a b c)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, I"
:precision binary64
:herbie-target
(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)))))))))))