
(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
(if (<= t 8e-270)
(/
x
(+
x
(*
y
(exp (* 2.0 (/ (+ (* (sqrt a) z) (* -0.6666666666666666 (- c b))) t))))))
(/
x
(fma
y
(pow
(exp 2.0)
(fma
z
(/ (sqrt (+ t a)) t)
(* (- b c) (- (- (/ 0.6666666666666666 t) 0.8333333333333334) a))))
x))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 8e-270) {
tmp = x / (x + (y * exp((2.0 * (((sqrt(a) * z) + (-0.6666666666666666 * (c - b))) / t)))));
} else {
tmp = x / fma(y, pow(exp(2.0), fma(z, (sqrt((t + a)) / t), ((b - c) * (((0.6666666666666666 / t) - 0.8333333333333334) - a)))), x);
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 8e-270) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(sqrt(a) * z) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); else tmp = Float64(x / fma(y, (exp(2.0) ^ fma(z, Float64(sqrt(Float64(t + a)) / t), Float64(Float64(b - c) * Float64(Float64(Float64(0.6666666666666666 / t) - 0.8333333333333334) - a)))), x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 8e-270], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(N[Sqrt[a], $MachinePrecision] * z), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(z * N[(N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision] / 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8 \cdot 10^{-270}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{\sqrt{a} \cdot z + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, {\left(e^{2}\right)}^{\left(\mathsf{fma}\left(z, \frac{\sqrt{t + a}}{t}, \left(b - c\right) \cdot \left(\left(\frac{0.6666666666666666}{t} - 0.8333333333333334\right) - a\right)\right)\right)}, x\right)}\\
\end{array}
\end{array}
if t < 8.0000000000000003e-270Initial program 86.4%
Taylor expanded in t around 0 98.4%
if 8.0000000000000003e-270 < t Initial program 94.5%
Simplified97.5%
Final simplification97.7%
(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
(/ (+ (* (sqrt a) z) (* -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 * (((sqrt(a) * z) + (-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 * (((Math.sqrt(a) * z) + (-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 * (((math.sqrt(a) * z) + (-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(sqrt(a) * z) + 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 * (((sqrt(a) * z) + (-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[(N[Sqrt[a], $MachinePrecision] * z), $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{\sqrt{a} \cdot z + -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.4%
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 80.6%
Final simplification97.3%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= b -19.0) (not (<= b 2.8e+48)))
(/
x
(+
x
(*
y
(exp
(* 2.0 (* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/
x
(+ x (* y (exp (* 2.0 (+ (/ (* z (sqrt (+ t a))) t) (* a (- c b))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -19.0) || !(b <= 2.8e+48)) {
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))) / t) + (a * (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 ((b <= (-19.0d0)) .or. (.not. (b <= 2.8d+48))) 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))) / t) + (a * (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 ((b <= -19.0) || !(b <= 2.8e+48)) {
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))) / t) + (a * (c - b)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -19.0) or not (b <= 2.8e+48): 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))) / t) + (a * (c - b))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -19.0) || !(b <= 2.8e+48)) 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(Float64(z * sqrt(Float64(t + a))) / t) + Float64(a * Float64(c - b)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b <= -19.0) || ~((b <= 2.8e+48))) 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))) / t) + (a * (c - b))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -19.0], N[Not[LessEqual[b, 2.8e+48]], $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[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -19 \lor \neg \left(b \leq 2.8 \cdot 10^{+48}\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(\frac{z \cdot \sqrt{t + a}}{t} + a \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if b < -19 or 2.80000000000000012e48 < b Initial program 89.8%
Taylor expanded in b around inf 91.5%
associate-*r/91.5%
metadata-eval91.5%
Simplified91.5%
if -19 < b < 2.80000000000000012e48Initial program 95.4%
Taylor expanded in a around inf 80.1%
Final simplification85.7%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= b -3.7e+35) (not (<= b 1.85e+52)))
(/
x
(+
x
(*
y
(exp
(* 2.0 (* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
c
(/ (- (* t (+ 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 <= -3.7e+35) || !(b <= 1.85e+52)) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * exp((2.0 * (c * (((t * (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 <= (-3.7d+35)) .or. (.not. (b <= 1.85d+52))) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else
tmp = x / (x + (y * exp((2.0d0 * (c * (((t * (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 <= -3.7e+35) || !(b <= 1.85e+52)) {
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 * (((t * (a + 0.8333333333333334)) - 0.6666666666666666) / t))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -3.7e+35) or not (b <= 1.85e+52): 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 * (((t * (a + 0.8333333333333334)) - 0.6666666666666666) / t)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -3.7e+35) || !(b <= 1.85e+52)) 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(Float64(t * Float64(a + 0.8333333333333334)) - 0.6666666666666666) / t))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b <= -3.7e+35) || ~((b <= 1.85e+52))) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); else tmp = x / (x + (y * exp((2.0 * (c * (((t * (a + 0.8333333333333334)) - 0.6666666666666666) / t)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -3.7e+35], N[Not[LessEqual[b, 1.85e+52]], $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[(N[(t * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision] - 0.6666666666666666), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.7 \cdot 10^{+35} \lor \neg \left(b \leq 1.85 \cdot 10^{+52}\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 \frac{t \cdot \left(a + 0.8333333333333334\right) - 0.6666666666666666}{t}\right)}}\\
\end{array}
\end{array}
if b < -3.7e35 or 1.85e52 < b Initial program 89.2%
Taylor expanded in b around inf 91.9%
associate-*r/91.9%
metadata-eval91.9%
Simplified91.9%
if -3.7e35 < b < 1.85e52Initial program 95.6%
Taylor expanded in c around inf 73.0%
associate--l+73.0%
associate-*r/73.0%
metadata-eval73.0%
Simplified73.0%
Taylor expanded in t around 0 75.1%
Final simplification83.0%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= b -1.44e+35) (not (<= b 1e+48)))
(/
x
(+
x
(*
y
(exp
(* 2.0 (* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* c (+ 0.8333333333333334 (- a (/ 0.6666666666666666 t)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1.44e+35) || !(b <= 1e+48)) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * exp((2.0 * (c * (0.8333333333333334 + (a - (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 <= (-1.44d+35)) .or. (.not. (b <= 1d+48))) 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.8333333333333334d0 + (a - (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 <= -1.44e+35) || !(b <= 1e+48)) {
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.8333333333333334 + (a - (0.6666666666666666 / t))))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -1.44e+35) or not (b <= 1e+48): 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.8333333333333334 + (a - (0.6666666666666666 / t)))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -1.44e+35) || !(b <= 1e+48)) 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(0.8333333333333334 + Float64(a - Float64(0.6666666666666666 / t))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b <= -1.44e+35) || ~((b <= 1e+48))) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); else tmp = x / (x + (y * exp((2.0 * (c * (0.8333333333333334 + (a - (0.6666666666666666 / t)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -1.44e+35], N[Not[LessEqual[b, 1e+48]], $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[(0.8333333333333334 + N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.44 \cdot 10^{+35} \lor \neg \left(b \leq 10^{+48}\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(0.8333333333333334 + \left(a - \frac{0.6666666666666666}{t}\right)\right)\right)}}\\
\end{array}
\end{array}
if b < -1.44e35 or 1.00000000000000004e48 < b Initial program 89.2%
Taylor expanded in b around inf 91.9%
associate-*r/91.9%
metadata-eval91.9%
Simplified91.9%
if -1.44e35 < b < 1.00000000000000004e48Initial program 95.6%
Taylor expanded in c around inf 73.0%
associate--l+73.0%
associate-*r/73.0%
metadata-eval73.0%
Simplified73.0%
Final simplification81.9%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= b -2e-198) (not (<= b 2.05e-122)))
(/
x
(+
x
(*
y
(exp
(* 2.0 (* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/ x (+ x (* y (exp (* (+ a 0.8333333333333334) (* 2.0 c))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -2e-198) || !(b <= 2.05e-122)) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * exp(((a + 0.8333333333333334) * (2.0 * c)))));
}
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 <= (-2d-198)) .or. (.not. (b <= 2.05d-122))) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else
tmp = x / (x + (y * exp(((a + 0.8333333333333334d0) * (2.0d0 * c)))))
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 <= -2e-198) || !(b <= 2.05e-122)) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * Math.exp(((a + 0.8333333333333334) * (2.0 * c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -2e-198) or not (b <= 2.05e-122): tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) else: tmp = x / (x + (y * math.exp(((a + 0.8333333333333334) * (2.0 * c))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -2e-198) || !(b <= 2.05e-122)) 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(Float64(a + 0.8333333333333334) * Float64(2.0 * c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b <= -2e-198) || ~((b <= 2.05e-122))) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); else tmp = x / (x + (y * exp(((a + 0.8333333333333334) * (2.0 * c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -2e-198], N[Not[LessEqual[b, 2.05e-122]], $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[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(2.0 * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{-198} \lor \neg \left(b \leq 2.05 \cdot 10^{-122}\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^{\left(a + 0.8333333333333334\right) \cdot \left(2 \cdot c\right)}}\\
\end{array}
\end{array}
if b < -1.9999999999999998e-198 or 2.05e-122 < b Initial program 92.4%
Taylor expanded in b around inf 80.2%
associate-*r/80.2%
metadata-eval80.2%
Simplified80.2%
if -1.9999999999999998e-198 < b < 2.05e-122Initial program 93.5%
Taylor expanded in c around inf 74.6%
associate--l+74.6%
associate-*r/74.6%
metadata-eval74.6%
Simplified74.6%
Taylor expanded in t around inf 73.0%
associate-*r*73.0%
Simplified73.0%
Final simplification78.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 8.8e-57)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 3.8e+16)
(/ x (+ x (* y (exp (* 2.0 (* a c))))))
(/ x (+ x (* y (exp (* -2.0 (* b (+ a 0.8333333333333334))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 8.8e-57) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 3.8e+16) {
tmp = x / (x + (y * exp((2.0 * (a * c)))));
} else {
tmp = x / (x + (y * exp((-2.0 * (b * (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 <= 8.8d-57) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 3.8d+16) then
tmp = x / (x + (y * exp((2.0d0 * (a * c)))))
else
tmp = x / (x + (y * exp(((-2.0d0) * (b * (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 <= 8.8e-57) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 3.8e+16) {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
} else {
tmp = x / (x + (y * Math.exp((-2.0 * (b * (a + 0.8333333333333334))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 8.8e-57: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 3.8e+16: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) else: tmp = x / (x + (y * math.exp((-2.0 * (b * (a + 0.8333333333333334)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 8.8e-57) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 3.8e+16) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(b * Float64(a + 0.8333333333333334))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 8.8e-57) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 3.8e+16) tmp = x / (x + (y * exp((2.0 * (a * c))))); else tmp = x / (x + (y * exp((-2.0 * (b * (a + 0.8333333333333334)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 8.8e-57], 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, 3.8e+16], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(b * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.8 \cdot 10^{-57}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(b \cdot \left(a + 0.8333333333333334\right)\right)}}\\
\end{array}
\end{array}
if t < 8.79999999999999994e-57Initial program 90.7%
Taylor expanded in t around 0 85.5%
Taylor expanded in z around 0 77.5%
if 8.79999999999999994e-57 < t < 3.8e16Initial program 92.0%
Taylor expanded in c around inf 80.6%
associate--l+80.6%
associate-*r/80.6%
metadata-eval80.6%
Simplified80.6%
Taylor expanded in a around inf 80.6%
if 3.8e16 < t Initial program 95.2%
Taylor expanded in b around inf 73.9%
associate-*r/73.9%
metadata-eval73.9%
Simplified73.9%
Taylor expanded in t around inf 73.9%
Final simplification76.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 3.3e-57)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ b t))))))
(if (<= t 1.04e+17)
(/ x (+ x (* y (exp (* 2.0 (* a c))))))
(/ x (+ x (* y (exp (* -2.0 (* b (+ a 0.8333333333333334))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 3.3e-57) {
tmp = x / (x + (y * exp((1.3333333333333333 * (b / t)))));
} else if (t <= 1.04e+17) {
tmp = x / (x + (y * exp((2.0 * (a * c)))));
} else {
tmp = x / (x + (y * exp((-2.0 * (b * (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 <= 3.3d-57) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * (b / t)))))
else if (t <= 1.04d+17) then
tmp = x / (x + (y * exp((2.0d0 * (a * c)))))
else
tmp = x / (x + (y * exp(((-2.0d0) * (b * (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 <= 3.3e-57) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * (b / t)))));
} else if (t <= 1.04e+17) {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
} else {
tmp = x / (x + (y * Math.exp((-2.0 * (b * (a + 0.8333333333333334))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 3.3e-57: tmp = x / (x + (y * math.exp((1.3333333333333333 * (b / t))))) elif t <= 1.04e+17: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) else: tmp = x / (x + (y * math.exp((-2.0 * (b * (a + 0.8333333333333334)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 3.3e-57) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(b / t)))))); elseif (t <= 1.04e+17) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(b * Float64(a + 0.8333333333333334))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 3.3e-57) tmp = x / (x + (y * exp((1.3333333333333333 * (b / t))))); elseif (t <= 1.04e+17) tmp = x / (x + (y * exp((2.0 * (a * c))))); else tmp = x / (x + (y * exp((-2.0 * (b * (a + 0.8333333333333334)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 3.3e-57], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(b / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.04e+17], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(b * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.3 \cdot 10^{-57}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b}{t}}}\\
\mathbf{elif}\;t \leq 1.04 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(b \cdot \left(a + 0.8333333333333334\right)\right)}}\\
\end{array}
\end{array}
if t < 3.2999999999999998e-57Initial program 90.7%
Taylor expanded in t around 0 85.5%
Taylor expanded in z around 0 77.5%
Taylor expanded in b around inf 68.5%
if 3.2999999999999998e-57 < t < 1.04e17Initial program 92.0%
Taylor expanded in c around inf 80.6%
associate--l+80.6%
associate-*r/80.6%
metadata-eval80.6%
Simplified80.6%
Taylor expanded in a around inf 80.6%
if 1.04e17 < t Initial program 95.2%
Taylor expanded in b around inf 73.9%
associate-*r/73.9%
metadata-eval73.9%
Simplified73.9%
Taylor expanded in t around inf 73.9%
Final simplification71.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 2.3e-56)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ b t))))))
(if (<= t 2.4e+16)
(/ x (+ x (* y (exp (* 2.0 (* a c))))))
(/ x (+ x (* y (exp (* b -1.6666666666666667))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 2.3e-56) {
tmp = x / (x + (y * exp((1.3333333333333333 * (b / t)))));
} else if (t <= 2.4e+16) {
tmp = x / (x + (y * exp((2.0 * (a * c)))));
} else {
tmp = x / (x + (y * exp((b * -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 (t <= 2.3d-56) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * (b / t)))))
else if (t <= 2.4d+16) then
tmp = x / (x + (y * exp((2.0d0 * (a * c)))))
else
tmp = x / (x + (y * exp((b * (-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 (t <= 2.3e-56) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * (b / t)))));
} else if (t <= 2.4e+16) {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
} else {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 2.3e-56: tmp = x / (x + (y * math.exp((1.3333333333333333 * (b / t))))) elif t <= 2.4e+16: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) else: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 2.3e-56) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(b / t)))))); elseif (t <= 2.4e+16) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 2.3e-56) tmp = x / (x + (y * exp((1.3333333333333333 * (b / t))))); elseif (t <= 2.4e+16) tmp = x / (x + (y * exp((2.0 * (a * c))))); else tmp = x / (x + (y * exp((b * -1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 2.3e-56], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(b / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e+16], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.3 \cdot 10^{-56}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b}{t}}}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+16}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\end{array}
\end{array}
if t < 2.30000000000000002e-56Initial program 90.7%
Taylor expanded in t around 0 85.5%
Taylor expanded in z around 0 77.5%
Taylor expanded in b around inf 68.5%
if 2.30000000000000002e-56 < t < 2.4e16Initial program 92.0%
Taylor expanded in c around inf 80.6%
associate--l+80.6%
associate-*r/80.6%
metadata-eval80.6%
Simplified80.6%
Taylor expanded in a around inf 80.6%
if 2.4e16 < t Initial program 95.2%
Taylor expanded in b around inf 73.9%
associate-*r/73.9%
metadata-eval73.9%
Simplified73.9%
Taylor expanded in t around inf 73.9%
Taylor expanded in a around 0 62.7%
*-commutative62.7%
Simplified62.7%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -1.9e-301) (not (<= t 4.3e+16))) (/ x (+ x (* y (exp (* b -1.6666666666666667))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.9e-301) || !(t <= 4.3e+16)) {
tmp = x / (x + (y * exp((b * -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 <= (-1.9d-301)) .or. (.not. (t <= 4.3d+16))) then
tmp = x / (x + (y * exp((b * (-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 <= -1.9e-301) || !(t <= 4.3e+16)) {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -1.9e-301) or not (t <= 4.3e+16): tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -1.9e-301) || !(t <= 4.3e+16)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -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 <= -1.9e-301) || ~((t <= 4.3e+16))) tmp = x / (x + (y * exp((b * -1.6666666666666667)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -1.9e-301], N[Not[LessEqual[t, 4.3e+16]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-301} \lor \neg \left(t \leq 4.3 \cdot 10^{+16}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.89999999999999998e-301 or 4.3e16 < t Initial program 94.7%
Taylor expanded in b around inf 71.8%
associate-*r/71.8%
metadata-eval71.8%
Simplified71.8%
Taylor expanded in t around inf 71.8%
Taylor expanded in a around 0 63.5%
*-commutative63.5%
Simplified63.5%
if -1.89999999999999998e-301 < t < 4.3e16Initial program 89.7%
Simplified91.7%
Taylor expanded in x around inf 63.8%
Final simplification63.6%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 7.2e-69) (/ x (+ x (* y (exp (* 1.3333333333333333 (/ b t)))))) (if (<= t 2.1e+16) 1.0 (/ x (+ x (* y (exp (* b -1.6666666666666667))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 7.2e-69) {
tmp = x / (x + (y * exp((1.3333333333333333 * (b / t)))));
} else if (t <= 2.1e+16) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp((b * -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 (t <= 7.2d-69) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * (b / t)))))
else if (t <= 2.1d+16) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp((b * (-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 (t <= 7.2e-69) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * (b / t)))));
} else if (t <= 2.1e+16) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 7.2e-69: tmp = x / (x + (y * math.exp((1.3333333333333333 * (b / t))))) elif t <= 2.1e+16: tmp = 1.0 else: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 7.2e-69) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(b / t)))))); elseif (t <= 2.1e+16) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 7.2e-69) tmp = x / (x + (y * exp((1.3333333333333333 * (b / t))))); elseif (t <= 2.1e+16) tmp = 1.0; else tmp = x / (x + (y * exp((b * -1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 7.2e-69], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(b / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e+16], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.2 \cdot 10^{-69}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b}{t}}}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+16}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\end{array}
\end{array}
if t < 7.20000000000000035e-69Initial program 90.6%
Taylor expanded in t around 0 86.8%
Taylor expanded in z around 0 78.0%
Taylor expanded in b around inf 68.8%
if 7.20000000000000035e-69 < t < 2.1e16Initial program 92.6%
Simplified100.0%
Taylor expanded in x around inf 74.9%
if 2.1e16 < t Initial program 95.2%
Taylor expanded in b around inf 73.9%
associate-*r/73.9%
metadata-eval73.9%
Simplified73.9%
Taylor expanded in t around inf 73.9%
Taylor expanded in a around 0 62.7%
*-commutative62.7%
Simplified62.7%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= y -3.3e+114) (not (<= y 2.8e+282))) (/ x (+ x (* c (+ (* 2.0 (* y a)) (/ y c))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -3.3e+114) || !(y <= 2.8e+282)) {
tmp = x / (x + (c * ((2.0 * (y * a)) + (y / c))));
} 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 ((y <= (-3.3d+114)) .or. (.not. (y <= 2.8d+282))) then
tmp = x / (x + (c * ((2.0d0 * (y * a)) + (y / c))))
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 ((y <= -3.3e+114) || !(y <= 2.8e+282)) {
tmp = x / (x + (c * ((2.0 * (y * a)) + (y / c))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (y <= -3.3e+114) or not (y <= 2.8e+282): tmp = x / (x + (c * ((2.0 * (y * a)) + (y / c)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((y <= -3.3e+114) || !(y <= 2.8e+282)) tmp = Float64(x / Float64(x + Float64(c * Float64(Float64(2.0 * Float64(y * a)) + Float64(y / c))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((y <= -3.3e+114) || ~((y <= 2.8e+282))) tmp = x / (x + (c * ((2.0 * (y * a)) + (y / c)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[y, -3.3e+114], N[Not[LessEqual[y, 2.8e+282]], $MachinePrecision]], N[(x / N[(x + N[(c * N[(N[(2.0 * N[(y * a), $MachinePrecision]), $MachinePrecision] + N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+114} \lor \neg \left(y \leq 2.8 \cdot 10^{+282}\right):\\
\;\;\;\;\frac{x}{x + c \cdot \left(2 \cdot \left(y \cdot a\right) + \frac{y}{c}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -3.3000000000000001e114 or 2.7999999999999998e282 < y Initial program 97.6%
Taylor expanded in c around inf 71.1%
associate--l+71.1%
associate-*r/71.1%
metadata-eval71.1%
Simplified71.1%
Taylor expanded in a around inf 70.6%
Taylor expanded in a around 0 63.3%
associate-*r*63.3%
*-commutative63.3%
*-commutative63.3%
Simplified63.3%
Taylor expanded in c around inf 68.3%
if -3.3000000000000001e114 < y < 2.7999999999999998e282Initial program 91.7%
Simplified93.6%
Taylor expanded in x around inf 57.8%
Final simplification59.5%
(FPCore (x y z t a b c) :precision binary64 (if (<= (- b c) -1e+69) (/ x (+ x (* y (+ (* -2.0 (* b (+ a 0.8333333333333334))) 1.0)))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -1e+69) {
tmp = x / (x + (y * ((-2.0 * (b * (a + 0.8333333333333334))) + 1.0)));
} 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 ((b - c) <= (-1d+69)) then
tmp = x / (x + (y * (((-2.0d0) * (b * (a + 0.8333333333333334d0))) + 1.0d0)))
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 ((b - c) <= -1e+69) {
tmp = x / (x + (y * ((-2.0 * (b * (a + 0.8333333333333334))) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b - c) <= -1e+69: tmp = x / (x + (y * ((-2.0 * (b * (a + 0.8333333333333334))) + 1.0))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b - c) <= -1e+69) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(-2.0 * Float64(b * Float64(a + 0.8333333333333334))) + 1.0)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b - c) <= -1e+69) tmp = x / (x + (y * ((-2.0 * (b * (a + 0.8333333333333334))) + 1.0))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b - c), $MachinePrecision], -1e+69], N[(x / N[(x + N[(y * N[(N[(-2.0 * N[(b * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - c \leq -1 \cdot 10^{+69}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(-2 \cdot \left(b \cdot \left(a + 0.8333333333333334\right)\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 b c) < -1.0000000000000001e69Initial program 91.1%
Taylor expanded in b around inf 78.3%
associate-*r/78.3%
metadata-eval78.3%
Simplified78.3%
Taylor expanded in t around inf 59.8%
Taylor expanded in b around 0 53.4%
*-commutative53.4%
Simplified53.4%
if -1.0000000000000001e69 < (-.f64 b c) Initial program 93.4%
Simplified95.3%
Taylor expanded in x around inf 62.3%
Final simplification59.2%
(FPCore (x y z t a b c) :precision binary64 (if (<= y -2.45e+114) (/ x (+ x (* y (+ (* c (* 2.0 a)) 1.0)))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -2.45e+114) {
tmp = x / (x + (y * ((c * (2.0 * a)) + 1.0)));
} 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 (y <= (-2.45d+114)) then
tmp = x / (x + (y * ((c * (2.0d0 * a)) + 1.0d0)))
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 (y <= -2.45e+114) {
tmp = x / (x + (y * ((c * (2.0 * a)) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if y <= -2.45e+114: tmp = x / (x + (y * ((c * (2.0 * a)) + 1.0))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= -2.45e+114) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(c * Float64(2.0 * a)) + 1.0)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (y <= -2.45e+114) tmp = x / (x + (y * ((c * (2.0 * a)) + 1.0))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -2.45e+114], N[(x / N[(x + N[(y * N[(N[(c * N[(2.0 * a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.45 \cdot 10^{+114}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(c \cdot \left(2 \cdot a\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -2.45e114Initial program 97.1%
Taylor expanded in c around inf 67.9%
associate--l+67.9%
associate-*r/67.9%
metadata-eval67.9%
Simplified67.9%
Taylor expanded in a around inf 70.2%
Taylor expanded in a around 0 61.4%
associate-*r*61.4%
*-commutative61.4%
*-commutative61.4%
Simplified61.4%
if -2.45e114 < y Initial program 92.0%
Simplified93.8%
Taylor expanded in x around inf 56.6%
Final simplification57.2%
(FPCore (x y z t a b c) :precision binary64 (if (<= c 5e+47) 1.0 (/ x (+ x (* 2.0 (* a (* y c)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 5e+47) {
tmp = 1.0;
} else {
tmp = x / (x + (2.0 * (a * (y * c))));
}
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+47) then
tmp = 1.0d0
else
tmp = x / (x + (2.0d0 * (a * (y * c))))
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+47) {
tmp = 1.0;
} else {
tmp = x / (x + (2.0 * (a * (y * c))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 5e+47: tmp = 1.0 else: tmp = x / (x + (2.0 * (a * (y * c)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 5e+47) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(2.0 * Float64(a * Float64(y * c))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 5e+47) tmp = 1.0; else tmp = x / (x + (2.0 * (a * (y * c)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 5e+47], 1.0, N[(x / N[(x + N[(2.0 * N[(a * N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 5 \cdot 10^{+47}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 2 \cdot \left(a \cdot \left(y \cdot c\right)\right)}\\
\end{array}
\end{array}
if c < 5.00000000000000022e47Initial program 92.3%
Simplified93.4%
Taylor expanded in x around inf 57.8%
if 5.00000000000000022e47 < c Initial program 93.5%
Taylor expanded in c around inf 87.3%
associate--l+87.3%
associate-*r/87.3%
metadata-eval87.3%
Simplified87.3%
Taylor expanded in a around inf 58.8%
Taylor expanded in a around 0 49.5%
associate-*r*49.5%
*-commutative49.5%
*-commutative49.5%
Simplified49.5%
Taylor expanded in c around inf 53.5%
Final simplification56.7%
(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%
Simplified94.6%
Taylor expanded in x around inf 54.2%
(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 2024145
(FPCore (x y z t a b c)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, I"
:precision binary64
:alt
(! :herbie-platform default (if (< t -2118326644891581/100000000000000000000000000000000000000000000000000000000000000000) (/ x (+ x (* y (exp (* 2 (- (+ (* a c) (* 4166666666666667/5000000000000000 c)) (* a b))))))) (if (< t 5196588770651547/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ x (+ x (* y (exp (* 2 (/ (- (* (* z (sqrt (+ t a))) (* (* 3 t) (- a (/ 5 6)))) (* (- (* (+ (/ 5 6) a) (* 3 t)) 2) (* (- a (/ 5 6)) (* (- b c) t)))) (* (* (* t t) 3) (- a (/ 5 6))))))))) (/ x (+ x (* y (exp (* 2 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5 6)) (/ 2 (* t 3)))))))))))))
(/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))