
(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 20 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 1.2e-230)
(/
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)
(* (+ a (- 0.8333333333333334 (/ 0.6666666666666666 t))) (- c b))))
x))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.2e-230) {
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), ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * (c - b)))), x);
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 1.2e-230) 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(a + Float64(0.8333333333333334 - Float64(0.6666666666666666 / t))) * Float64(c - b)))), x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 1.2e-230], 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[(a + N[(0.8333333333333334 - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.2 \cdot 10^{-230}:\\
\;\;\;\;\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(a + \left(0.8333333333333334 - \frac{0.6666666666666666}{t}\right)\right) \cdot \left(c - b\right)\right)\right)}, x\right)}\\
\end{array}
\end{array}
if t < 1.2000000000000001e-230Initial program 85.5%
Taylor expanded in t around 0 95.9%
if 1.2000000000000001e-230 < t Initial program 96.4%
Simplified100.0%
Final simplification98.6%
(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 (* c (/ -0.6666666666666666 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 * (c * (-0.6666666666666666 / 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 * (c * (-0.6666666666666666 / 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 * (c * (-0.6666666666666666 / 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(c * Float64(-0.6666666666666666 / 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 * (c * (-0.6666666666666666 / 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[(c * N[(-0.6666666666666666 / t), $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(c \cdot \frac{-0.6666666666666666}{t}\right)}}\\
\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 99.2%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) Initial program 0.0%
Taylor expanded in c around inf 46.7%
associate--l+46.7%
associate-*r/46.7%
metadata-eval46.7%
Simplified46.7%
Taylor expanded in t around 0 69.5%
Final simplification97.2%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 4e-231)
(/
x
(+
x
(*
y
(exp (* 2.0 (/ (+ (* (sqrt a) z) (* -0.6666666666666666 (- c b))) t))))))
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(+
(* z (/ (sqrt (+ t a)) t))
(* (- b c) (- (- (/ 2.0 (* t 3.0)) 0.8333333333333334) a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 4e-231) {
tmp = x / (x + (y * exp((2.0 * (((sqrt(a) * z) + (-0.6666666666666666 * (c - b))) / t)))));
} else {
tmp = x / (x + (y * pow(exp(2.0), ((z * (sqrt((t + a)) / t)) + ((b - c) * (((2.0 / (t * 3.0)) - 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 <= 4d-231) then
tmp = x / (x + (y * exp((2.0d0 * (((sqrt(a) * z) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else
tmp = x / (x + (y * (exp(2.0d0) ** ((z * (sqrt((t + a)) / t)) + ((b - c) * (((2.0d0 / (t * 3.0d0)) - 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 <= 4e-231) {
tmp = x / (x + (y * Math.exp((2.0 * (((Math.sqrt(a) * z) + (-0.6666666666666666 * (c - b))) / t)))));
} else {
tmp = x / (x + (y * Math.pow(Math.exp(2.0), ((z * (Math.sqrt((t + a)) / t)) + ((b - c) * (((2.0 / (t * 3.0)) - 0.8333333333333334) - a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 4e-231: tmp = x / (x + (y * math.exp((2.0 * (((math.sqrt(a) * z) + (-0.6666666666666666 * (c - b))) / t))))) else: tmp = x / (x + (y * math.pow(math.exp(2.0), ((z * (math.sqrt((t + a)) / t)) + ((b - c) * (((2.0 / (t * 3.0)) - 0.8333333333333334) - a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 4e-231) 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 / Float64(x + Float64(y * (exp(2.0) ^ Float64(Float64(z * Float64(sqrt(Float64(t + a)) / t)) + Float64(Float64(b - c) * Float64(Float64(Float64(2.0 / Float64(t * 3.0)) - 0.8333333333333334) - a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 4e-231) tmp = x / (x + (y * exp((2.0 * (((sqrt(a) * z) + (-0.6666666666666666 * (c - b))) / t))))); else tmp = x / (x + (y * (exp(2.0) ^ ((z * (sqrt((t + a)) / t)) + ((b - c) * (((2.0 / (t * 3.0)) - 0.8333333333333334) - a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 4e-231], 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[(x + N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(z * N[(N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - 0.8333333333333334), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4 \cdot 10^{-231}:\\
\;\;\;\;\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}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\left(\frac{2}{t \cdot 3} - 0.8333333333333334\right) - a\right)\right)}}\\
\end{array}
\end{array}
if t < 4e-231Initial program 85.5%
Taylor expanded in t around 0 95.9%
if 4e-231 < t Initial program 96.4%
exp-prod96.4%
Simplified98.8%
Final simplification97.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 1.95e-153)
(/
x
(+
x
(*
y
(exp (* 2.0 (/ (+ (* (sqrt a) z) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 4.6e-85)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(/
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 (t <= 1.95e-153) {
tmp = x / (x + (y * exp((2.0 * (((sqrt(a) * z) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 4.6e-85) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} 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 (t <= 1.95d-153) then
tmp = x / (x + (y * exp((2.0d0 * (((sqrt(a) * z) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 4.6d-85) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
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 (t <= 1.95e-153) {
tmp = x / (x + (y * Math.exp((2.0 * (((Math.sqrt(a) * z) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 4.6e-85) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} 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 t <= 1.95e-153: tmp = x / (x + (y * math.exp((2.0 * (((math.sqrt(a) * z) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 4.6e-85: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) 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 (t <= 1.95e-153) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(sqrt(a) * z) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); elseif (t <= 4.6e-85) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); 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 (t <= 1.95e-153) tmp = x / (x + (y * exp((2.0 * (((sqrt(a) * z) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 4.6e-85) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); 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[LessEqual[t, 1.95e-153], 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], If[LessEqual[t, 4.6e-85], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $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}\;t \leq 1.95 \cdot 10^{-153}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{\sqrt{a} \cdot z + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-85}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\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 t < 1.9500000000000001e-153Initial program 87.6%
Taylor expanded in t around 0 94.7%
if 1.9500000000000001e-153 < t < 4.6000000000000001e-85Initial program 92.9%
Taylor expanded in t around 0 61.2%
Taylor expanded in z around 0 79.2%
if 4.6000000000000001e-85 < t Initial program 96.8%
Taylor expanded in a around inf 79.1%
Final simplification85.5%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= b -4.7e-7) (not (<= b 2.9e+101)))
(/
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 <= -4.7e-7) || !(b <= 2.9e+101)) {
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 <= (-4.7d-7)) .or. (.not. (b <= 2.9d+101))) 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 <= -4.7e-7) || !(b <= 2.9e+101)) {
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 <= -4.7e-7) or not (b <= 2.9e+101): 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 <= -4.7e-7) || !(b <= 2.9e+101)) 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 <= -4.7e-7) || ~((b <= 2.9e+101))) 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, -4.7e-7], N[Not[LessEqual[b, 2.9e+101]], $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 -4.7 \cdot 10^{-7} \lor \neg \left(b \leq 2.9 \cdot 10^{+101}\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 < -4.7e-7 or 2.89999999999999987e101 < b Initial program 89.1%
Taylor expanded in b around inf 85.0%
associate-*r/85.0%
metadata-eval85.0%
Simplified85.0%
if -4.7e-7 < b < 2.89999999999999987e101Initial program 95.2%
Taylor expanded in c around inf 81.3%
associate--l+81.3%
associate-*r/81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in t around 0 82.0%
Final simplification83.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -6e+219)
(/ x (+ x (* y (exp (* 2.0 (* a c))))))
(if (<= c -7.5e+40)
1.0
(if (<= c 3.7e+53)
(/ x (+ x (* y (exp (* -2.0 (* b (+ a 0.8333333333333334)))))))
(/ x (+ x (* y (exp (* c 1.6666666666666667)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -6e+219) {
tmp = x / (x + (y * exp((2.0 * (a * c)))));
} else if (c <= -7.5e+40) {
tmp = 1.0;
} else if (c <= 3.7e+53) {
tmp = x / (x + (y * exp((-2.0 * (b * (a + 0.8333333333333334))))));
} else {
tmp = x / (x + (y * exp((c * 1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= (-6d+219)) then
tmp = x / (x + (y * exp((2.0d0 * (a * c)))))
else if (c <= (-7.5d+40)) then
tmp = 1.0d0
else if (c <= 3.7d+53) then
tmp = x / (x + (y * exp(((-2.0d0) * (b * (a + 0.8333333333333334d0))))))
else
tmp = x / (x + (y * exp((c * 1.6666666666666667d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -6e+219) {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
} else if (c <= -7.5e+40) {
tmp = 1.0;
} else if (c <= 3.7e+53) {
tmp = x / (x + (y * Math.exp((-2.0 * (b * (a + 0.8333333333333334))))));
} else {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -6e+219: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) elif c <= -7.5e+40: tmp = 1.0 elif c <= 3.7e+53: tmp = x / (x + (y * math.exp((-2.0 * (b * (a + 0.8333333333333334)))))) else: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -6e+219) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); elseif (c <= -7.5e+40) tmp = 1.0; elseif (c <= 3.7e+53) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(b * Float64(a + 0.8333333333333334))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -6e+219) tmp = x / (x + (y * exp((2.0 * (a * c))))); elseif (c <= -7.5e+40) tmp = 1.0; elseif (c <= 3.7e+53) tmp = x / (x + (y * exp((-2.0 * (b * (a + 0.8333333333333334)))))); else tmp = x / (x + (y * exp((c * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -6e+219], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -7.5e+40], 1.0, If[LessEqual[c, 3.7e+53], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(b * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -6 \cdot 10^{+219}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\mathbf{elif}\;c \leq -7.5 \cdot 10^{+40}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 3.7 \cdot 10^{+53}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(b \cdot \left(a + 0.8333333333333334\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if c < -5.9999999999999995e219Initial program 90.9%
Taylor expanded in c around inf 95.6%
associate--l+95.6%
associate-*r/95.6%
metadata-eval95.6%
Simplified95.6%
Taylor expanded in a around inf 78.0%
if -5.9999999999999995e219 < c < -7.4999999999999996e40Initial program 91.9%
Simplified91.9%
Taylor expanded in x around inf 76.4%
if -7.4999999999999996e40 < c < 3.7e53Initial program 92.8%
Taylor expanded in b around inf 76.9%
associate-*r/76.9%
metadata-eval76.9%
Simplified76.9%
Taylor expanded in t around inf 66.4%
if 3.7e53 < c Initial program 93.3%
Taylor expanded in c around inf 80.3%
associate--l+80.3%
associate-*r/80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in a around 0 78.7%
associate-*r/78.7%
metadata-eval78.7%
sub-neg78.7%
distribute-neg-frac78.7%
metadata-eval78.7%
Simplified78.7%
Taylor expanded in t around inf 77.0%
*-commutative77.0%
Simplified77.0%
Final simplification71.3%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= b -4.6e-8) (not (<= b 4e+101)))
(/
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 <= -4.6e-8) || !(b <= 4e+101)) {
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 <= (-4.6d-8)) .or. (.not. (b <= 4d+101))) 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 <= -4.6e-8) || !(b <= 4e+101)) {
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 <= -4.6e-8) or not (b <= 4e+101): 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 <= -4.6e-8) || !(b <= 4e+101)) 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 <= -4.6e-8) || ~((b <= 4e+101))) 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, -4.6e-8], N[Not[LessEqual[b, 4e+101]], $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 -4.6 \cdot 10^{-8} \lor \neg \left(b \leq 4 \cdot 10^{+101}\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 < -4.6000000000000002e-8 or 3.9999999999999999e101 < b Initial program 89.1%
Taylor expanded in b around inf 85.0%
associate-*r/85.0%
metadata-eval85.0%
Simplified85.0%
if -4.6000000000000002e-8 < b < 3.9999999999999999e101Initial program 95.2%
Taylor expanded in c around inf 81.3%
associate--l+81.3%
associate-*r/81.3%
metadata-eval81.3%
Simplified81.3%
Final simplification82.9%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= c -9e+40) (not (<= c 8.8e+18)))
(/
x
(+
x
(*
y
(exp (* 2.0 (* c (+ 0.8333333333333334 (/ -0.6666666666666666 t))))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((c <= -9e+40) || !(c <= 8.8e+18)) {
tmp = x / (x + (y * exp((2.0 * (c * (0.8333333333333334 + (-0.6666666666666666 / t)))))));
} else {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (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 ((c <= (-9d+40)) .or. (.not. (c <= 8.8d+18))) then
tmp = x / (x + (y * exp((2.0d0 * (c * (0.8333333333333334d0 + ((-0.6666666666666666d0) / t)))))))
else
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (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 ((c <= -9e+40) || !(c <= 8.8e+18)) {
tmp = x / (x + (y * Math.exp((2.0 * (c * (0.8333333333333334 + (-0.6666666666666666 / t)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (c <= -9e+40) or not (c <= 8.8e+18): tmp = x / (x + (y * math.exp((2.0 * (c * (0.8333333333333334 + (-0.6666666666666666 / t))))))) else: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((c <= -9e+40) || !(c <= 8.8e+18)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(0.8333333333333334 + Float64(-0.6666666666666666 / t)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((c <= -9e+40) || ~((c <= 8.8e+18))) tmp = x / (x + (y * exp((2.0 * (c * (0.8333333333333334 + (-0.6666666666666666 / t))))))); else tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[c, -9e+40], N[Not[LessEqual[c, 8.8e+18]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(0.8333333333333334 + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -9 \cdot 10^{+40} \lor \neg \left(c \leq 8.8 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(0.8333333333333334 + \frac{-0.6666666666666666}{t}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\end{array}
\end{array}
if c < -9.00000000000000064e40 or 8.8e18 < c Initial program 92.9%
Taylor expanded in c around inf 83.1%
associate--l+83.1%
associate-*r/83.1%
metadata-eval83.1%
Simplified83.1%
Taylor expanded in a around 0 80.0%
associate-*r/80.0%
metadata-eval80.0%
sub-neg80.0%
distribute-neg-frac80.0%
metadata-eval80.0%
Simplified80.0%
if -9.00000000000000064e40 < c < 8.8e18Initial program 92.3%
Taylor expanded in b around inf 80.0%
associate-*r/80.0%
metadata-eval80.0%
Simplified80.0%
Final simplification80.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -3e+219)
(/ x (+ x (* y (exp (* 2.0 (* a c))))))
(if (<= c -2.45e+39)
1.0
(if (<= c 1.16e+55)
(/ x (+ x (* y (exp (* -2.0 (* a b))))))
(/ x (+ x (* y (exp (* c 1.6666666666666667)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -3e+219) {
tmp = x / (x + (y * exp((2.0 * (a * c)))));
} else if (c <= -2.45e+39) {
tmp = 1.0;
} else if (c <= 1.16e+55) {
tmp = x / (x + (y * exp((-2.0 * (a * b)))));
} else {
tmp = x / (x + (y * exp((c * 1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= (-3d+219)) then
tmp = x / (x + (y * exp((2.0d0 * (a * c)))))
else if (c <= (-2.45d+39)) then
tmp = 1.0d0
else if (c <= 1.16d+55) then
tmp = x / (x + (y * exp(((-2.0d0) * (a * b)))))
else
tmp = x / (x + (y * exp((c * 1.6666666666666667d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -3e+219) {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
} else if (c <= -2.45e+39) {
tmp = 1.0;
} else if (c <= 1.16e+55) {
tmp = x / (x + (y * Math.exp((-2.0 * (a * b)))));
} else {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -3e+219: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) elif c <= -2.45e+39: tmp = 1.0 elif c <= 1.16e+55: tmp = x / (x + (y * math.exp((-2.0 * (a * b))))) else: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -3e+219) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); elseif (c <= -2.45e+39) tmp = 1.0; elseif (c <= 1.16e+55) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(a * b)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -3e+219) tmp = x / (x + (y * exp((2.0 * (a * c))))); elseif (c <= -2.45e+39) tmp = 1.0; elseif (c <= 1.16e+55) tmp = x / (x + (y * exp((-2.0 * (a * b))))); else tmp = x / (x + (y * exp((c * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -3e+219], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -2.45e+39], 1.0, If[LessEqual[c, 1.16e+55], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3 \cdot 10^{+219}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\mathbf{elif}\;c \leq -2.45 \cdot 10^{+39}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 1.16 \cdot 10^{+55}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(a \cdot b\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if c < -2.9999999999999997e219Initial program 90.9%
Taylor expanded in c around inf 95.6%
associate--l+95.6%
associate-*r/95.6%
metadata-eval95.6%
Simplified95.6%
Taylor expanded in a around inf 78.0%
if -2.9999999999999997e219 < c < -2.44999999999999994e39Initial program 91.9%
Simplified91.9%
Taylor expanded in x around inf 76.4%
if -2.44999999999999994e39 < c < 1.1599999999999999e55Initial program 92.8%
Taylor expanded in b around inf 76.9%
associate-*r/76.9%
metadata-eval76.9%
Simplified76.9%
Taylor expanded in t around inf 66.4%
Taylor expanded in a around inf 63.2%
*-commutative63.2%
Simplified63.2%
if 1.1599999999999999e55 < c Initial program 93.3%
Taylor expanded in c around inf 80.3%
associate--l+80.3%
associate-*r/80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in a around 0 78.7%
associate-*r/78.7%
metadata-eval78.7%
sub-neg78.7%
distribute-neg-frac78.7%
metadata-eval78.7%
Simplified78.7%
Taylor expanded in t around inf 77.0%
*-commutative77.0%
Simplified77.0%
Final simplification69.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -2.4e+220)
(/ x (+ x (* y (exp (* 2.0 (* a c))))))
(if (<= c -1e+38)
1.0
(if (<= c 8e+55)
(/ x (+ x (* y (exp (* b -1.6666666666666667)))))
(/ x (+ x (* y (exp (* c 1.6666666666666667)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -2.4e+220) {
tmp = x / (x + (y * exp((2.0 * (a * c)))));
} else if (c <= -1e+38) {
tmp = 1.0;
} else if (c <= 8e+55) {
tmp = x / (x + (y * exp((b * -1.6666666666666667))));
} else {
tmp = x / (x + (y * exp((c * 1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= (-2.4d+220)) then
tmp = x / (x + (y * exp((2.0d0 * (a * c)))))
else if (c <= (-1d+38)) then
tmp = 1.0d0
else if (c <= 8d+55) then
tmp = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
else
tmp = x / (x + (y * exp((c * 1.6666666666666667d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -2.4e+220) {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
} else if (c <= -1e+38) {
tmp = 1.0;
} else if (c <= 8e+55) {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
} else {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -2.4e+220: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) elif c <= -1e+38: tmp = 1.0 elif c <= 8e+55: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) else: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -2.4e+220) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); elseif (c <= -1e+38) tmp = 1.0; elseif (c <= 8e+55) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -2.4e+220) tmp = x / (x + (y * exp((2.0 * (a * c))))); elseif (c <= -1e+38) tmp = 1.0; elseif (c <= 8e+55) tmp = x / (x + (y * exp((b * -1.6666666666666667)))); else tmp = x / (x + (y * exp((c * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -2.4e+220], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1e+38], 1.0, If[LessEqual[c, 8e+55], N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.4 \cdot 10^{+220}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\mathbf{elif}\;c \leq -1 \cdot 10^{+38}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 8 \cdot 10^{+55}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if c < -2.3999999999999998e220Initial program 90.9%
Taylor expanded in c around inf 95.6%
associate--l+95.6%
associate-*r/95.6%
metadata-eval95.6%
Simplified95.6%
Taylor expanded in a around inf 78.0%
if -2.3999999999999998e220 < c < -9.99999999999999977e37Initial program 91.9%
Simplified91.9%
Taylor expanded in x around inf 76.4%
if -9.99999999999999977e37 < c < 8.00000000000000008e55Initial program 92.8%
Taylor expanded in b around inf 76.9%
associate-*r/76.9%
metadata-eval76.9%
Simplified76.9%
Taylor expanded in t around inf 66.4%
Taylor expanded in a around 0 61.7%
*-commutative61.7%
Simplified61.7%
if 8.00000000000000008e55 < c Initial program 93.3%
Taylor expanded in c around inf 80.3%
associate--l+80.3%
associate-*r/80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in a around 0 78.7%
associate-*r/78.7%
metadata-eval78.7%
sub-neg78.7%
distribute-neg-frac78.7%
metadata-eval78.7%
Simplified78.7%
Taylor expanded in t around inf 77.0%
*-commutative77.0%
Simplified77.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 7e-75)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 8.5e+119)
(/ x (+ x (* y (exp (* c 1.6666666666666667)))))
(/ 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 <= 7e-75) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 8.5e+119) {
tmp = x / (x + (y * exp((c * 1.6666666666666667))));
} 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 <= 7d-75) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 8.5d+119) then
tmp = x / (x + (y * exp((c * 1.6666666666666667d0))))
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 <= 7e-75) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 8.5e+119) {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
} 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 <= 7e-75: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 8.5e+119: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) 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 <= 7e-75) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 8.5e+119) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(b * Float64(a + 0.8333333333333334))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 7e-75) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 8.5e+119) tmp = x / (x + (y * exp((c * 1.6666666666666667)))); 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, 7e-75], 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, 8.5e+119], N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(b * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7 \cdot 10^{-75}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+119}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\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 < 6.9999999999999997e-75Initial program 88.9%
Taylor expanded in t around 0 87.1%
Taylor expanded in z around 0 81.5%
if 6.9999999999999997e-75 < t < 8.49999999999999997e119Initial program 100.0%
Taylor expanded in c around inf 73.6%
associate--l+73.6%
associate-*r/73.6%
metadata-eval73.6%
Simplified73.6%
Taylor expanded in a around 0 64.3%
associate-*r/64.3%
metadata-eval64.3%
sub-neg64.3%
distribute-neg-frac64.3%
metadata-eval64.3%
Simplified64.3%
Taylor expanded in t around inf 68.9%
*-commutative68.9%
Simplified68.9%
if 8.49999999999999997e119 < t Initial program 93.3%
Taylor expanded in b around inf 70.8%
associate-*r/70.8%
metadata-eval70.8%
Simplified70.8%
Taylor expanded in t around inf 70.8%
Final simplification76.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -2.15e+36)
1.0
(if (<= c 8.2e+53)
(/ x (+ x (* y (exp (* b -1.6666666666666667)))))
(/ x (+ x (* y (exp (* c 1.6666666666666667))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -2.15e+36) {
tmp = 1.0;
} else if (c <= 8.2e+53) {
tmp = x / (x + (y * exp((b * -1.6666666666666667))));
} else {
tmp = x / (x + (y * exp((c * 1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= (-2.15d+36)) then
tmp = 1.0d0
else if (c <= 8.2d+53) then
tmp = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
else
tmp = x / (x + (y * exp((c * 1.6666666666666667d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -2.15e+36) {
tmp = 1.0;
} else if (c <= 8.2e+53) {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
} else {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -2.15e+36: tmp = 1.0 elif c <= 8.2e+53: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) else: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -2.15e+36) tmp = 1.0; elseif (c <= 8.2e+53) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -2.15e+36) tmp = 1.0; elseif (c <= 8.2e+53) tmp = x / (x + (y * exp((b * -1.6666666666666667)))); else tmp = x / (x + (y * exp((c * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -2.15e+36], 1.0, If[LessEqual[c, 8.2e+53], N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.15 \cdot 10^{+36}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 8.2 \cdot 10^{+53}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if c < -2.15000000000000002e36Initial program 91.5%
Simplified93.2%
Taylor expanded in x around inf 68.8%
if -2.15000000000000002e36 < c < 8.20000000000000037e53Initial program 92.8%
Taylor expanded in b around inf 76.9%
associate-*r/76.9%
metadata-eval76.9%
Simplified76.9%
Taylor expanded in t around inf 66.4%
Taylor expanded in a around 0 61.7%
*-commutative61.7%
Simplified61.7%
if 8.20000000000000037e53 < c Initial program 93.3%
Taylor expanded in c around inf 80.3%
associate--l+80.3%
associate-*r/80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in a around 0 78.7%
associate-*r/78.7%
metadata-eval78.7%
sub-neg78.7%
distribute-neg-frac78.7%
metadata-eval78.7%
Simplified78.7%
Taylor expanded in t around inf 77.0%
*-commutative77.0%
Simplified77.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -1.35e+42)
1.0
(if (<= c 8.5e+56)
(/ x (+ x (* y (exp (* b -1.6666666666666667)))))
(/
(/ x y)
(+
(*
2.0
(/
(+ (* -0.6666666666666666 c) (* c (* t (+ a 0.8333333333333334))))
t))
1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -1.35e+42) {
tmp = 1.0;
} else if (c <= 8.5e+56) {
tmp = x / (x + (y * exp((b * -1.6666666666666667))));
} else {
tmp = (x / y) / ((2.0 * (((-0.6666666666666666 * c) + (c * (t * (a + 0.8333333333333334)))) / t)) + 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 (c <= (-1.35d+42)) then
tmp = 1.0d0
else if (c <= 8.5d+56) then
tmp = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
else
tmp = (x / y) / ((2.0d0 * ((((-0.6666666666666666d0) * c) + (c * (t * (a + 0.8333333333333334d0)))) / t)) + 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 (c <= -1.35e+42) {
tmp = 1.0;
} else if (c <= 8.5e+56) {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
} else {
tmp = (x / y) / ((2.0 * (((-0.6666666666666666 * c) + (c * (t * (a + 0.8333333333333334)))) / t)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -1.35e+42: tmp = 1.0 elif c <= 8.5e+56: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) else: tmp = (x / y) / ((2.0 * (((-0.6666666666666666 * c) + (c * (t * (a + 0.8333333333333334)))) / t)) + 1.0) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -1.35e+42) tmp = 1.0; elseif (c <= 8.5e+56) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); else tmp = Float64(Float64(x / y) / Float64(Float64(2.0 * Float64(Float64(Float64(-0.6666666666666666 * c) + Float64(c * Float64(t * Float64(a + 0.8333333333333334)))) / t)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -1.35e+42) tmp = 1.0; elseif (c <= 8.5e+56) tmp = x / (x + (y * exp((b * -1.6666666666666667)))); else tmp = (x / y) / ((2.0 * (((-0.6666666666666666 * c) + (c * (t * (a + 0.8333333333333334)))) / t)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -1.35e+42], 1.0, If[LessEqual[c, 8.5e+56], N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(N[(2.0 * N[(N[(N[(-0.6666666666666666 * c), $MachinePrecision] + N[(c * N[(t * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.35 \cdot 10^{+42}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 8.5 \cdot 10^{+56}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{2 \cdot \frac{-0.6666666666666666 \cdot c + c \cdot \left(t \cdot \left(a + 0.8333333333333334\right)\right)}{t} + 1}\\
\end{array}
\end{array}
if c < -1.35e42Initial program 91.5%
Simplified93.2%
Taylor expanded in x around inf 68.8%
if -1.35e42 < c < 8.4999999999999998e56Initial program 92.8%
Taylor expanded in b around inf 76.9%
associate-*r/76.9%
metadata-eval76.9%
Simplified76.9%
Taylor expanded in t around inf 66.4%
Taylor expanded in a around 0 61.7%
*-commutative61.7%
Simplified61.7%
if 8.4999999999999998e56 < c Initial program 93.3%
Taylor expanded in c around inf 80.3%
associate--l+80.3%
associate-*r/80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in c around 0 61.7%
Taylor expanded in y around inf 63.0%
associate-/r*53.5%
cancel-sign-sub-inv53.5%
metadata-eval53.5%
associate-*r/53.5%
metadata-eval53.5%
associate-+l+53.5%
Simplified53.5%
Taylor expanded in t around 0 67.5%
Final simplification64.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c 1.5e+55)
1.0
(/
(/ x y)
(+
(*
2.0
(/ (+ (* -0.6666666666666666 c) (* c (* t (+ a 0.8333333333333334)))) t))
1.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 1.5e+55) {
tmp = 1.0;
} else {
tmp = (x / y) / ((2.0 * (((-0.6666666666666666 * c) + (c * (t * (a + 0.8333333333333334)))) / t)) + 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 (c <= 1.5d+55) then
tmp = 1.0d0
else
tmp = (x / y) / ((2.0d0 * ((((-0.6666666666666666d0) * c) + (c * (t * (a + 0.8333333333333334d0)))) / t)) + 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 (c <= 1.5e+55) {
tmp = 1.0;
} else {
tmp = (x / y) / ((2.0 * (((-0.6666666666666666 * c) + (c * (t * (a + 0.8333333333333334)))) / t)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 1.5e+55: tmp = 1.0 else: tmp = (x / y) / ((2.0 * (((-0.6666666666666666 * c) + (c * (t * (a + 0.8333333333333334)))) / t)) + 1.0) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 1.5e+55) tmp = 1.0; else tmp = Float64(Float64(x / y) / Float64(Float64(2.0 * Float64(Float64(Float64(-0.6666666666666666 * c) + Float64(c * Float64(t * Float64(a + 0.8333333333333334)))) / t)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 1.5e+55) tmp = 1.0; else tmp = (x / y) / ((2.0 * (((-0.6666666666666666 * c) + (c * (t * (a + 0.8333333333333334)))) / t)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 1.5e+55], 1.0, N[(N[(x / y), $MachinePrecision] / N[(N[(2.0 * N[(N[(N[(-0.6666666666666666 * c), $MachinePrecision] + N[(c * N[(t * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 1.5 \cdot 10^{+55}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{2 \cdot \frac{-0.6666666666666666 \cdot c + c \cdot \left(t \cdot \left(a + 0.8333333333333334\right)\right)}{t} + 1}\\
\end{array}
\end{array}
if c < 1.50000000000000008e55Initial program 92.4%
Simplified96.0%
Taylor expanded in x around inf 58.3%
if 1.50000000000000008e55 < c Initial program 93.3%
Taylor expanded in c around inf 80.3%
associate--l+80.3%
associate-*r/80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in c around 0 61.7%
Taylor expanded in y around inf 63.0%
associate-/r*53.5%
cancel-sign-sub-inv53.5%
metadata-eval53.5%
associate-*r/53.5%
metadata-eval53.5%
associate-+l+53.5%
Simplified53.5%
Taylor expanded in t around 0 67.5%
Final simplification60.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c 7.4e+53)
1.0
(/
(/ x y)
(-
1.0
(*
2.0
(*
a
(- (* c (/ (- (/ 0.6666666666666666 t) 0.8333333333333334) a)) c)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 7.4e+53) {
tmp = 1.0;
} else {
tmp = (x / y) / (1.0 - (2.0 * (a * ((c * (((0.6666666666666666 / t) - 0.8333333333333334) / a)) - 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 <= 7.4d+53) then
tmp = 1.0d0
else
tmp = (x / y) / (1.0d0 - (2.0d0 * (a * ((c * (((0.6666666666666666d0 / t) - 0.8333333333333334d0) / a)) - 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 <= 7.4e+53) {
tmp = 1.0;
} else {
tmp = (x / y) / (1.0 - (2.0 * (a * ((c * (((0.6666666666666666 / t) - 0.8333333333333334) / a)) - c))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 7.4e+53: tmp = 1.0 else: tmp = (x / y) / (1.0 - (2.0 * (a * ((c * (((0.6666666666666666 / t) - 0.8333333333333334) / a)) - c)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 7.4e+53) tmp = 1.0; else tmp = Float64(Float64(x / y) / Float64(1.0 - Float64(2.0 * Float64(a * Float64(Float64(c * Float64(Float64(Float64(0.6666666666666666 / t) - 0.8333333333333334) / a)) - c))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 7.4e+53) tmp = 1.0; else tmp = (x / y) / (1.0 - (2.0 * (a * ((c * (((0.6666666666666666 / t) - 0.8333333333333334) / a)) - c)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 7.4e+53], 1.0, N[(N[(x / y), $MachinePrecision] / N[(1.0 - N[(2.0 * N[(a * N[(N[(c * N[(N[(N[(0.6666666666666666 / t), $MachinePrecision] - 0.8333333333333334), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 7.4 \cdot 10^{+53}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{1 - 2 \cdot \left(a \cdot \left(c \cdot \frac{\frac{0.6666666666666666}{t} - 0.8333333333333334}{a} - c\right)\right)}\\
\end{array}
\end{array}
if c < 7.4e53Initial program 92.4%
Simplified96.0%
Taylor expanded in x around inf 58.3%
if 7.4e53 < c Initial program 93.3%
Taylor expanded in c around inf 80.3%
associate--l+80.3%
associate-*r/80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in c around 0 61.7%
Taylor expanded in y around inf 63.0%
associate-/r*53.5%
cancel-sign-sub-inv53.5%
metadata-eval53.5%
associate-*r/53.5%
metadata-eval53.5%
associate-+l+53.5%
Simplified53.5%
Taylor expanded in a around inf 64.0%
associate-/l*64.0%
associate-*r/64.0%
metadata-eval64.0%
Simplified64.0%
Final simplification59.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c 1.5e+56)
1.0
(/
x
(+
x
(+
y
(*
2.0
(* c (* y (+ 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 (c <= 1.5e+56) {
tmp = 1.0;
} else {
tmp = x / (x + (y + (2.0 * (c * (y * (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 (c <= 1.5d+56) then
tmp = 1.0d0
else
tmp = x / (x + (y + (2.0d0 * (c * (y * (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 (c <= 1.5e+56) {
tmp = 1.0;
} else {
tmp = x / (x + (y + (2.0 * (c * (y * (a + (0.8333333333333334 + (-0.6666666666666666 / t))))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 1.5e+56: tmp = 1.0 else: tmp = x / (x + (y + (2.0 * (c * (y * (a + (0.8333333333333334 + (-0.6666666666666666 / t)))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 1.5e+56) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y + Float64(2.0 * Float64(c * Float64(y * Float64(a + Float64(0.8333333333333334 + Float64(-0.6666666666666666 / t))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 1.5e+56) tmp = 1.0; else tmp = x / (x + (y + (2.0 * (c * (y * (a + (0.8333333333333334 + (-0.6666666666666666 / t)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 1.5e+56], 1.0, N[(x / N[(x + N[(y + N[(2.0 * N[(c * N[(y * N[(a + N[(0.8333333333333334 + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 1.5 \cdot 10^{+56}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + \left(y + 2 \cdot \left(c \cdot \left(y \cdot \left(a + \left(0.8333333333333334 + \frac{-0.6666666666666666}{t}\right)\right)\right)\right)\right)}\\
\end{array}
\end{array}
if c < 1.50000000000000003e56Initial program 92.4%
Simplified96.0%
Taylor expanded in x around inf 58.3%
if 1.50000000000000003e56 < c Initial program 93.3%
Taylor expanded in c around inf 80.3%
associate--l+80.3%
associate-*r/80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in c around 0 61.7%
associate-*r/61.7%
metadata-eval61.7%
+-commutative61.7%
associate--l+61.7%
sub-neg61.7%
distribute-neg-frac61.7%
metadata-eval61.7%
Simplified61.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c 3.8e+56)
1.0
(/
(* x 0.5)
(* c (* y (+ 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 (c <= 3.8e+56) {
tmp = 1.0;
} else {
tmp = (x * 0.5) / (c * (y * (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 (c <= 3.8d+56) then
tmp = 1.0d0
else
tmp = (x * 0.5d0) / (c * (y * (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 (c <= 3.8e+56) {
tmp = 1.0;
} else {
tmp = (x * 0.5) / (c * (y * (0.8333333333333334 + (a + (-0.6666666666666666 / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 3.8e+56: tmp = 1.0 else: tmp = (x * 0.5) / (c * (y * (0.8333333333333334 + (a + (-0.6666666666666666 / t))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 3.8e+56) tmp = 1.0; else tmp = Float64(Float64(x * 0.5) / Float64(c * Float64(y * 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 (c <= 3.8e+56) tmp = 1.0; else tmp = (x * 0.5) / (c * (y * (0.8333333333333334 + (a + (-0.6666666666666666 / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 3.8e+56], 1.0, N[(N[(x * 0.5), $MachinePrecision] / N[(c * N[(y * N[(0.8333333333333334 + N[(a + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 3.8 \cdot 10^{+56}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 0.5}{c \cdot \left(y \cdot \left(0.8333333333333334 + \left(a + \frac{-0.6666666666666666}{t}\right)\right)\right)}\\
\end{array}
\end{array}
if c < 3.79999999999999996e56Initial program 92.4%
Simplified96.0%
Taylor expanded in x around inf 58.3%
if 3.79999999999999996e56 < c Initial program 93.3%
Taylor expanded in c around inf 80.3%
associate--l+80.3%
associate-*r/80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in c around 0 61.7%
Taylor expanded in c around inf 61.4%
associate-*r/61.4%
cancel-sign-sub-inv61.4%
metadata-eval61.4%
associate-*r/61.4%
metadata-eval61.4%
associate-+l+61.4%
Simplified61.4%
Final simplification59.0%
(FPCore (x y z t a b c) :precision binary64 (if (<= c 5.5e+55) 1.0 (/ x (* y (+ (* 2.0 (* c (+ a 0.8333333333333334))) 1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 5.5e+55) {
tmp = 1.0;
} else {
tmp = x / (y * ((2.0 * (c * (a + 0.8333333333333334))) + 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 (c <= 5.5d+55) then
tmp = 1.0d0
else
tmp = x / (y * ((2.0d0 * (c * (a + 0.8333333333333334d0))) + 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 (c <= 5.5e+55) {
tmp = 1.0;
} else {
tmp = x / (y * ((2.0 * (c * (a + 0.8333333333333334))) + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 5.5e+55: tmp = 1.0 else: tmp = x / (y * ((2.0 * (c * (a + 0.8333333333333334))) + 1.0)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 5.5e+55) tmp = 1.0; else tmp = Float64(x / Float64(y * Float64(Float64(2.0 * Float64(c * Float64(a + 0.8333333333333334))) + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 5.5e+55) tmp = 1.0; else tmp = x / (y * ((2.0 * (c * (a + 0.8333333333333334))) + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 5.5e+55], 1.0, N[(x / N[(y * N[(N[(2.0 * N[(c * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 5.5 \cdot 10^{+55}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(2 \cdot \left(c \cdot \left(a + 0.8333333333333334\right)\right) + 1\right)}\\
\end{array}
\end{array}
if c < 5.5000000000000004e55Initial program 92.4%
Simplified96.0%
Taylor expanded in x around inf 58.3%
if 5.5000000000000004e55 < c Initial program 93.3%
Taylor expanded in c around inf 80.3%
associate--l+80.3%
associate-*r/80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in c around 0 61.7%
Taylor expanded in y around inf 63.0%
associate-/r*53.5%
cancel-sign-sub-inv53.5%
metadata-eval53.5%
associate-*r/53.5%
metadata-eval53.5%
associate-+l+53.5%
Simplified53.5%
Taylor expanded in t around inf 54.8%
Final simplification57.5%
(FPCore (x y z t a b c) :precision binary64 (if (<= c 1.3e+57) 1.0 (* -0.75 (* t (/ x (* y c))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 1.3e+57) {
tmp = 1.0;
} else {
tmp = -0.75 * (t * (x / (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 <= 1.3d+57) then
tmp = 1.0d0
else
tmp = (-0.75d0) * (t * (x / (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 <= 1.3e+57) {
tmp = 1.0;
} else {
tmp = -0.75 * (t * (x / (y * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 1.3e+57: tmp = 1.0 else: tmp = -0.75 * (t * (x / (y * c))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 1.3e+57) tmp = 1.0; else tmp = Float64(-0.75 * Float64(t * Float64(x / Float64(y * c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 1.3e+57) tmp = 1.0; else tmp = -0.75 * (t * (x / (y * c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 1.3e+57], 1.0, N[(-0.75 * N[(t * N[(x / N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 1.3 \cdot 10^{+57}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;-0.75 \cdot \left(t \cdot \frac{x}{y \cdot c}\right)\\
\end{array}
\end{array}
if c < 1.3e57Initial program 92.4%
Simplified96.0%
Taylor expanded in x around inf 58.3%
if 1.3e57 < c Initial program 93.3%
Taylor expanded in c around inf 80.3%
associate--l+80.3%
associate-*r/80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in c around 0 61.7%
Taylor expanded in y around inf 63.0%
associate-/r*53.5%
cancel-sign-sub-inv53.5%
metadata-eval53.5%
associate-*r/53.5%
metadata-eval53.5%
associate-+l+53.5%
Simplified53.5%
Taylor expanded in t around 0 42.7%
associate-/l*49.4%
Simplified49.4%
Final simplification56.2%
(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%
Simplified95.0%
Taylor expanded in x around inf 50.9%
(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 2024144
(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)))))))))))