
(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 23 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 4.5e-241)
(/
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 <= 4.5e-241) {
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 <= 4.5e-241) 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, 4.5e-241], 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 4.5 \cdot 10^{-241}:\\
\;\;\;\;\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 < 4.4999999999999999e-241Initial program 88.3%
Taylor expanded in t around 0 95.0%
if 4.4999999999999999e-241 < t Initial program 93.9%
Simplified98.9%
Final simplification97.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (sqrt (+ t a))))
(if (<=
(+
(/ (* z t_1) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a 0.8333333333333334))))
INFINITY)
(/
1.0
(+
1.0
(/
(*
y
(exp
(*
2.0
(+
(*
(- b c)
(- (* 0.6666666666666666 (/ 1.0 t)) (+ a 0.8333333333333334)))
(* t_1 (/ z t))))))
x)))
(/
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 t_1 = sqrt((t + a));
double tmp;
if ((((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))) <= ((double) INFINITY)) {
tmp = 1.0 / (1.0 + ((y * exp((2.0 * (((b - c) * ((0.6666666666666666 * (1.0 / t)) - (a + 0.8333333333333334))) + (t_1 * (z / t)))))) / x));
} else {
tmp = x / (x + (y * exp((2.0 * (c * (0.8333333333333334 + (a - (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 = Math.sqrt((t + a));
double tmp;
if ((((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))) <= Double.POSITIVE_INFINITY) {
tmp = 1.0 / (1.0 + ((y * Math.exp((2.0 * (((b - c) * ((0.6666666666666666 * (1.0 / t)) - (a + 0.8333333333333334))) + (t_1 * (z / t)))))) / x));
} 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): t_1 = math.sqrt((t + a)) tmp = 0 if (((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))) <= math.inf: tmp = 1.0 / (1.0 + ((y * math.exp((2.0 * (((b - c) * ((0.6666666666666666 * (1.0 / t)) - (a + 0.8333333333333334))) + (t_1 * (z / t)))))) / x)) 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) t_1 = sqrt(Float64(t + a)) tmp = 0.0 if (Float64(Float64(Float64(z * t_1) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + 0.8333333333333334)))) <= Inf) tmp = Float64(1.0 / Float64(1.0 + Float64(Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(b - c) * Float64(Float64(0.6666666666666666 * Float64(1.0 / t)) - Float64(a + 0.8333333333333334))) + Float64(t_1 * Float64(z / t)))))) / x))); 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) t_1 = sqrt((t + a)); tmp = 0.0; if ((((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))) <= Inf) tmp = 1.0 / (1.0 + ((y * exp((2.0 * (((b - c) * ((0.6666666666666666 * (1.0 / t)) - (a + 0.8333333333333334))) + (t_1 * (z / t)))))) / x)); 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_] := Block[{t$95$1 = N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(z * t$95$1), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(1.0 / N[(1.0 + N[(N[(y * N[Exp[N[(2.0 * N[(N[(N[(b - c), $MachinePrecision] * N[(N[(0.6666666666666666 * N[(1.0 / t), $MachinePrecision]), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $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}
t_1 := \sqrt{t + a}\\
\mathbf{if}\;\frac{z \cdot t\_1}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + 0.8333333333333334\right)\right) \leq \infty:\\
\;\;\;\;\frac{1}{1 + \frac{y \cdot e^{2 \cdot \left(\left(b - c\right) \cdot \left(0.6666666666666666 \cdot \frac{1}{t} - \left(a + 0.8333333333333334\right)\right) + t\_1 \cdot \frac{z}{t}\right)}}{x}}\\
\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 (-.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%
Simplified97.9%
clear-num97.9%
inv-pow97.9%
+-commutative97.9%
Applied egg-rr97.9%
Simplified98.0%
Taylor expanded in y around 0 99.6%
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 69.8%
associate--l+69.8%
associate-*r/69.8%
metadata-eval69.8%
Simplified69.8%
Final simplification97.7%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= (- b c) -0.002) (not (<= (- b c) 4e-16)))
(/
1.0
(+
1.0
(/
(*
y
(exp
(*
2.0
(* (- c b) (+ (+ a 0.8333333333333334) (/ -0.6666666666666666 t))))))
x)))
(/
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 - c) <= -0.002) || !((b - c) <= 4e-16)) {
tmp = 1.0 / (1.0 + ((y * exp((2.0 * ((c - b) * ((a + 0.8333333333333334) + (-0.6666666666666666 / t)))))) / x));
} 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 - c) <= (-0.002d0)) .or. (.not. ((b - c) <= 4d-16))) then
tmp = 1.0d0 / (1.0d0 + ((y * exp((2.0d0 * ((c - b) * ((a + 0.8333333333333334d0) + ((-0.6666666666666666d0) / t)))))) / x))
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 - c) <= -0.002) || !((b - c) <= 4e-16)) {
tmp = 1.0 / (1.0 + ((y * Math.exp((2.0 * ((c - b) * ((a + 0.8333333333333334) + (-0.6666666666666666 / t)))))) / x));
} 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 - c) <= -0.002) or not ((b - c) <= 4e-16): tmp = 1.0 / (1.0 + ((y * math.exp((2.0 * ((c - b) * ((a + 0.8333333333333334) + (-0.6666666666666666 / t)))))) / x)) 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 ((Float64(b - c) <= -0.002) || !(Float64(b - c) <= 4e-16)) tmp = Float64(1.0 / Float64(1.0 + Float64(Float64(y * exp(Float64(2.0 * Float64(Float64(c - b) * Float64(Float64(a + 0.8333333333333334) + Float64(-0.6666666666666666 / t)))))) / x))); 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 - c) <= -0.002) || ~(((b - c) <= 4e-16))) tmp = 1.0 / (1.0 + ((y * exp((2.0 * ((c - b) * ((a + 0.8333333333333334) + (-0.6666666666666666 / t)))))) / x)); 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[N[(b - c), $MachinePrecision], -0.002], N[Not[LessEqual[N[(b - c), $MachinePrecision], 4e-16]], $MachinePrecision]], N[(1.0 / N[(1.0 + N[(N[(y * N[Exp[N[(2.0 * N[(N[(c - b), $MachinePrecision] * N[(N[(a + 0.8333333333333334), $MachinePrecision] + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $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 - c \leq -0.002 \lor \neg \left(b - c \leq 4 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{1}{1 + \frac{y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(\left(a + 0.8333333333333334\right) + \frac{-0.6666666666666666}{t}\right)\right)}}{x}}\\
\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 (-.f64 b c) < -2e-3 or 3.9999999999999999e-16 < (-.f64 b c) Initial program 90.0%
Simplified93.5%
clear-num93.5%
inv-pow93.5%
+-commutative93.5%
Applied egg-rr93.5%
Simplified93.7%
Taylor expanded in y around 0 92.5%
Taylor expanded in z around 0 94.2%
cancel-sign-sub-inv94.2%
metadata-eval94.2%
associate-*r/94.2%
metadata-eval94.2%
Simplified94.2%
if -2e-3 < (-.f64 b c) < 3.9999999999999999e-16Initial program 99.9%
Taylor expanded in a around inf 99.8%
Final simplification95.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 1.35e-241)
(/
x
(+
x
(*
y
(exp (* 2.0 (/ (+ (* (sqrt a) z) (* -0.6666666666666666 (- c b))) t))))))
(/
1.0
(+
1.0
(/
(*
y
(exp
(*
2.0
(*
c
(+
0.8333333333333334
(-
(-
a
(*
b
(/ (+ 0.8333333333333334 (+ a (/ -0.6666666666666666 t))) c)))
(/ 0.6666666666666666 t)))))))
x)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.35e-241) {
tmp = x / (x + (y * exp((2.0 * (((sqrt(a) * z) + (-0.6666666666666666 * (c - b))) / t)))));
} else {
tmp = 1.0 / (1.0 + ((y * exp((2.0 * (c * (0.8333333333333334 + ((a - (b * ((0.8333333333333334 + (a + (-0.6666666666666666 / t))) / c))) - (0.6666666666666666 / t))))))) / x));
}
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.35d-241) then
tmp = x / (x + (y * exp((2.0d0 * (((sqrt(a) * z) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else
tmp = 1.0d0 / (1.0d0 + ((y * exp((2.0d0 * (c * (0.8333333333333334d0 + ((a - (b * ((0.8333333333333334d0 + (a + ((-0.6666666666666666d0) / t))) / c))) - (0.6666666666666666d0 / t))))))) / x))
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.35e-241) {
tmp = x / (x + (y * Math.exp((2.0 * (((Math.sqrt(a) * z) + (-0.6666666666666666 * (c - b))) / t)))));
} else {
tmp = 1.0 / (1.0 + ((y * Math.exp((2.0 * (c * (0.8333333333333334 + ((a - (b * ((0.8333333333333334 + (a + (-0.6666666666666666 / t))) / c))) - (0.6666666666666666 / t))))))) / x));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 1.35e-241: tmp = x / (x + (y * math.exp((2.0 * (((math.sqrt(a) * z) + (-0.6666666666666666 * (c - b))) / t))))) else: tmp = 1.0 / (1.0 + ((y * math.exp((2.0 * (c * (0.8333333333333334 + ((a - (b * ((0.8333333333333334 + (a + (-0.6666666666666666 / t))) / c))) - (0.6666666666666666 / t))))))) / x)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 1.35e-241) 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(1.0 / Float64(1.0 + Float64(Float64(y * exp(Float64(2.0 * Float64(c * Float64(0.8333333333333334 + Float64(Float64(a - Float64(b * Float64(Float64(0.8333333333333334 + Float64(a + Float64(-0.6666666666666666 / t))) / c))) - Float64(0.6666666666666666 / t))))))) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 1.35e-241) tmp = x / (x + (y * exp((2.0 * (((sqrt(a) * z) + (-0.6666666666666666 * (c - b))) / t))))); else tmp = 1.0 / (1.0 + ((y * exp((2.0 * (c * (0.8333333333333334 + ((a - (b * ((0.8333333333333334 + (a + (-0.6666666666666666 / t))) / c))) - (0.6666666666666666 / t))))))) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 1.35e-241], 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[(1.0 / N[(1.0 + N[(N[(y * N[Exp[N[(2.0 * N[(c * N[(0.8333333333333334 + N[(N[(a - N[(b * N[(N[(0.8333333333333334 + N[(a + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.35 \cdot 10^{-241}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{\sqrt{a} \cdot z + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{y \cdot e^{2 \cdot \left(c \cdot \left(0.8333333333333334 + \left(\left(a - b \cdot \frac{0.8333333333333334 + \left(a + \frac{-0.6666666666666666}{t}\right)}{c}\right) - \frac{0.6666666666666666}{t}\right)\right)\right)}}{x}}\\
\end{array}
\end{array}
if t < 1.35e-241Initial program 89.5%
Taylor expanded in t around 0 96.2%
if 1.35e-241 < t Initial program 93.4%
Simplified98.4%
clear-num98.4%
inv-pow98.4%
+-commutative98.4%
Applied egg-rr98.4%
Simplified97.8%
Taylor expanded in y around 0 96.1%
Taylor expanded in z around 0 87.2%
cancel-sign-sub-inv87.2%
metadata-eval87.2%
associate-*r/87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in c around inf 85.1%
associate--l+85.1%
mul-1-neg85.1%
associate-/l*89.8%
cancel-sign-sub-inv89.8%
metadata-eval89.8%
associate-*r/89.8%
metadata-eval89.8%
associate-+r+89.8%
associate-*r/89.8%
metadata-eval89.8%
Simplified89.8%
Final simplification91.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 5e-259)
(/
x
(+
x
(* y (exp (* 2.0 (/ (- (* (sqrt a) z) (* c 0.6666666666666666)) t))))))
(/
1.0
(+
1.0
(/
(*
y
(exp
(*
2.0
(*
c
(+
0.8333333333333334
(-
(-
a
(*
b
(/ (+ 0.8333333333333334 (+ a (/ -0.6666666666666666 t))) c)))
(/ 0.6666666666666666 t)))))))
x)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 5e-259) {
tmp = x / (x + (y * exp((2.0 * (((sqrt(a) * z) - (c * 0.6666666666666666)) / t)))));
} else {
tmp = 1.0 / (1.0 + ((y * exp((2.0 * (c * (0.8333333333333334 + ((a - (b * ((0.8333333333333334 + (a + (-0.6666666666666666 / t))) / c))) - (0.6666666666666666 / t))))))) / x));
}
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 <= 5d-259) then
tmp = x / (x + (y * exp((2.0d0 * (((sqrt(a) * z) - (c * 0.6666666666666666d0)) / t)))))
else
tmp = 1.0d0 / (1.0d0 + ((y * exp((2.0d0 * (c * (0.8333333333333334d0 + ((a - (b * ((0.8333333333333334d0 + (a + ((-0.6666666666666666d0) / t))) / c))) - (0.6666666666666666d0 / t))))))) / x))
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 <= 5e-259) {
tmp = x / (x + (y * Math.exp((2.0 * (((Math.sqrt(a) * z) - (c * 0.6666666666666666)) / t)))));
} else {
tmp = 1.0 / (1.0 + ((y * Math.exp((2.0 * (c * (0.8333333333333334 + ((a - (b * ((0.8333333333333334 + (a + (-0.6666666666666666 / t))) / c))) - (0.6666666666666666 / t))))))) / x));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 5e-259: tmp = x / (x + (y * math.exp((2.0 * (((math.sqrt(a) * z) - (c * 0.6666666666666666)) / t))))) else: tmp = 1.0 / (1.0 + ((y * math.exp((2.0 * (c * (0.8333333333333334 + ((a - (b * ((0.8333333333333334 + (a + (-0.6666666666666666 / t))) / c))) - (0.6666666666666666 / t))))))) / x)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 5e-259) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(sqrt(a) * z) - Float64(c * 0.6666666666666666)) / t)))))); else tmp = Float64(1.0 / Float64(1.0 + Float64(Float64(y * exp(Float64(2.0 * Float64(c * Float64(0.8333333333333334 + Float64(Float64(a - Float64(b * Float64(Float64(0.8333333333333334 + Float64(a + Float64(-0.6666666666666666 / t))) / c))) - Float64(0.6666666666666666 / t))))))) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 5e-259) tmp = x / (x + (y * exp((2.0 * (((sqrt(a) * z) - (c * 0.6666666666666666)) / t))))); else tmp = 1.0 / (1.0 + ((y * exp((2.0 * (c * (0.8333333333333334 + ((a - (b * ((0.8333333333333334 + (a + (-0.6666666666666666 / t))) / c))) - (0.6666666666666666 / t))))))) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 5e-259], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(N[Sqrt[a], $MachinePrecision] * z), $MachinePrecision] - N[(c * 0.6666666666666666), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(1.0 + N[(N[(y * N[Exp[N[(2.0 * N[(c * N[(0.8333333333333334 + N[(N[(a - N[(b * N[(N[(0.8333333333333334 + N[(a + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{-259}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{\sqrt{a} \cdot z - c \cdot 0.6666666666666666}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{y \cdot e^{2 \cdot \left(c \cdot \left(0.8333333333333334 + \left(\left(a - b \cdot \frac{0.8333333333333334 + \left(a + \frac{-0.6666666666666666}{t}\right)}{c}\right) - \frac{0.6666666666666666}{t}\right)\right)\right)}}{x}}\\
\end{array}
\end{array}
if t < 4.99999999999999977e-259Initial program 90.3%
Taylor expanded in t around 0 96.0%
Taylor expanded in b around 0 90.6%
*-commutative90.6%
Simplified90.6%
if 4.99999999999999977e-259 < t Initial program 93.0%
Simplified97.3%
clear-num97.3%
inv-pow97.3%
+-commutative97.3%
Applied egg-rr97.3%
Simplified97.4%
Taylor expanded in y around 0 95.6%
Taylor expanded in z around 0 87.0%
cancel-sign-sub-inv87.0%
metadata-eval87.0%
associate-*r/87.0%
metadata-eval87.0%
Simplified87.0%
Taylor expanded in c around inf 84.9%
associate--l+84.9%
mul-1-neg84.9%
associate-/l*89.5%
cancel-sign-sub-inv89.5%
metadata-eval89.5%
associate-*r/89.5%
metadata-eval89.5%
associate-+r+89.5%
associate-*r/89.5%
metadata-eval89.5%
Simplified89.5%
Final simplification89.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -1.42e-208)
(/ 1.0 (+ 1.0 (/ (* y (exp (* 2.0 (* a (- c b))))) x)))
(if (<= t 1.2e-145)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 0.8)
(/
x
(+
x
(*
y
(exp
(* 2.0 (* a (- (* -0.6666666666666666 (/ b (* a (- t)))) b)))))))
(/
1.0
(+
1.0
(/ (* y (exp (* 2.0 (* (- c b) (+ a 0.8333333333333334))))) x)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.42e-208) {
tmp = 1.0 / (1.0 + ((y * exp((2.0 * (a * (c - b))))) / x));
} else if (t <= 1.2e-145) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 0.8) {
tmp = x / (x + (y * exp((2.0 * (a * ((-0.6666666666666666 * (b / (a * -t))) - b))))));
} else {
tmp = 1.0 / (1.0 + ((y * exp((2.0 * ((c - b) * (a + 0.8333333333333334))))) / x));
}
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.42d-208)) then
tmp = 1.0d0 / (1.0d0 + ((y * exp((2.0d0 * (a * (c - b))))) / x))
else if (t <= 1.2d-145) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 0.8d0) then
tmp = x / (x + (y * exp((2.0d0 * (a * (((-0.6666666666666666d0) * (b / (a * -t))) - b))))))
else
tmp = 1.0d0 / (1.0d0 + ((y * exp((2.0d0 * ((c - b) * (a + 0.8333333333333334d0))))) / x))
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.42e-208) {
tmp = 1.0 / (1.0 + ((y * Math.exp((2.0 * (a * (c - b))))) / x));
} else if (t <= 1.2e-145) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 0.8) {
tmp = x / (x + (y * Math.exp((2.0 * (a * ((-0.6666666666666666 * (b / (a * -t))) - b))))));
} else {
tmp = 1.0 / (1.0 + ((y * Math.exp((2.0 * ((c - b) * (a + 0.8333333333333334))))) / x));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.42e-208: tmp = 1.0 / (1.0 + ((y * math.exp((2.0 * (a * (c - b))))) / x)) elif t <= 1.2e-145: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 0.8: tmp = x / (x + (y * math.exp((2.0 * (a * ((-0.6666666666666666 * (b / (a * -t))) - b)))))) else: tmp = 1.0 / (1.0 + ((y * math.exp((2.0 * ((c - b) * (a + 0.8333333333333334))))) / x)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.42e-208) tmp = Float64(1.0 / Float64(1.0 + Float64(Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))) / x))); elseif (t <= 1.2e-145) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 0.8) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(Float64(-0.6666666666666666 * Float64(b / Float64(a * Float64(-t)))) - b))))))); else tmp = Float64(1.0 / Float64(1.0 + Float64(Float64(y * exp(Float64(2.0 * Float64(Float64(c - b) * Float64(a + 0.8333333333333334))))) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -1.42e-208) tmp = 1.0 / (1.0 + ((y * exp((2.0 * (a * (c - b))))) / x)); elseif (t <= 1.2e-145) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 0.8) tmp = x / (x + (y * exp((2.0 * (a * ((-0.6666666666666666 * (b / (a * -t))) - b)))))); else tmp = 1.0 / (1.0 + ((y * exp((2.0 * ((c - b) * (a + 0.8333333333333334))))) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.42e-208], N[(1.0 / N[(1.0 + N[(N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-145], 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, 0.8], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(N[(-0.6666666666666666 * N[(b / N[(a * (-t)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(1.0 + N[(N[(y * N[Exp[N[(2.0 * N[(N[(c - b), $MachinePrecision] * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.42 \cdot 10^{-208}:\\
\;\;\;\;\frac{1}{1 + \frac{y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}{x}}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-145}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 0.8:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(-0.6666666666666666 \cdot \frac{b}{a \cdot \left(-t\right)} - b\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(a + 0.8333333333333334\right)\right)}}{x}}\\
\end{array}
\end{array}
if t < -1.42e-208Initial program 97.5%
Simplified95.1%
clear-num95.1%
inv-pow95.1%
+-commutative95.1%
Applied egg-rr95.1%
Simplified97.6%
Taylor expanded in y around 0 97.5%
Taylor expanded in z around 0 83.1%
cancel-sign-sub-inv83.1%
metadata-eval83.1%
associate-*r/83.1%
metadata-eval83.1%
Simplified83.1%
Taylor expanded in a around inf 83.1%
if -1.42e-208 < t < 1.20000000000000008e-145Initial program 81.8%
Taylor expanded in t around 0 92.8%
Taylor expanded in z around 0 79.1%
if 1.20000000000000008e-145 < t < 0.80000000000000004Initial program 95.7%
Taylor expanded in b around inf 75.5%
associate-*r/75.5%
metadata-eval75.5%
Simplified75.5%
Taylor expanded in a around -inf 75.5%
associate-*r*75.5%
mul-1-neg75.5%
mul-1-neg75.5%
associate-/l*77.6%
sub-neg77.6%
associate-*r/77.6%
metadata-eval77.6%
metadata-eval77.6%
Simplified77.6%
Taylor expanded in t around 0 77.6%
if 0.80000000000000004 < t Initial program 93.9%
Simplified100.0%
clear-num100.0%
inv-pow100.0%
+-commutative100.0%
Applied egg-rr100.0%
Simplified99.1%
Taylor expanded in y around 0 99.1%
Taylor expanded in z around 0 92.4%
cancel-sign-sub-inv92.4%
metadata-eval92.4%
associate-*r/92.4%
metadata-eval92.4%
Simplified92.4%
Taylor expanded in t around inf 92.4%
Final simplification85.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -2e-208)
(/ 1.0 (+ 1.0 (/ (* y (exp (* 2.0 (* a (- c b))))) x)))
(if (<= t 2e-145)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 0.8)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/
1.0
(+
1.0
(/ (* y (exp (* 2.0 (* (- c b) (+ a 0.8333333333333334))))) x)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -2e-208) {
tmp = 1.0 / (1.0 + ((y * exp((2.0 * (a * (c - b))))) / x));
} else if (t <= 2e-145) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 0.8) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = 1.0 / (1.0 + ((y * exp((2.0 * ((c - b) * (a + 0.8333333333333334))))) / x));
}
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 <= (-2d-208)) then
tmp = 1.0d0 / (1.0d0 + ((y * exp((2.0d0 * (a * (c - b))))) / x))
else if (t <= 2d-145) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 0.8d0) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else
tmp = 1.0d0 / (1.0d0 + ((y * exp((2.0d0 * ((c - b) * (a + 0.8333333333333334d0))))) / x))
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 <= -2e-208) {
tmp = 1.0 / (1.0 + ((y * Math.exp((2.0 * (a * (c - b))))) / x));
} else if (t <= 2e-145) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 0.8) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = 1.0 / (1.0 + ((y * Math.exp((2.0 * ((c - b) * (a + 0.8333333333333334))))) / x));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -2e-208: tmp = 1.0 / (1.0 + ((y * math.exp((2.0 * (a * (c - b))))) / x)) elif t <= 2e-145: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 0.8: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) else: tmp = 1.0 / (1.0 + ((y * math.exp((2.0 * ((c - b) * (a + 0.8333333333333334))))) / x)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -2e-208) tmp = Float64(1.0 / Float64(1.0 + Float64(Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))) / x))); elseif (t <= 2e-145) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 0.8) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); else tmp = Float64(1.0 / Float64(1.0 + Float64(Float64(y * exp(Float64(2.0 * Float64(Float64(c - b) * Float64(a + 0.8333333333333334))))) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -2e-208) tmp = 1.0 / (1.0 + ((y * exp((2.0 * (a * (c - b))))) / x)); elseif (t <= 2e-145) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 0.8) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); else tmp = 1.0 / (1.0 + ((y * exp((2.0 * ((c - b) * (a + 0.8333333333333334))))) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -2e-208], N[(1.0 / N[(1.0 + N[(N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-145], 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, 0.8], 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[(1.0 / N[(1.0 + N[(N[(y * N[Exp[N[(2.0 * N[(N[(c - b), $MachinePrecision] * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-208}:\\
\;\;\;\;\frac{1}{1 + \frac{y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}{x}}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-145}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 0.8:\\
\;\;\;\;\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{1}{1 + \frac{y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(a + 0.8333333333333334\right)\right)}}{x}}\\
\end{array}
\end{array}
if t < -2.0000000000000002e-208Initial program 97.5%
Simplified95.1%
clear-num95.1%
inv-pow95.1%
+-commutative95.1%
Applied egg-rr95.1%
Simplified97.6%
Taylor expanded in y around 0 97.5%
Taylor expanded in z around 0 83.1%
cancel-sign-sub-inv83.1%
metadata-eval83.1%
associate-*r/83.1%
metadata-eval83.1%
Simplified83.1%
Taylor expanded in a around inf 83.1%
if -2.0000000000000002e-208 < t < 1.99999999999999983e-145Initial program 81.8%
Taylor expanded in t around 0 92.8%
Taylor expanded in z around 0 79.1%
if 1.99999999999999983e-145 < t < 0.80000000000000004Initial program 95.7%
Taylor expanded in b around inf 75.5%
associate-*r/75.5%
metadata-eval75.5%
Simplified75.5%
if 0.80000000000000004 < t Initial program 93.9%
Simplified100.0%
clear-num100.0%
inv-pow100.0%
+-commutative100.0%
Applied egg-rr100.0%
Simplified99.1%
Taylor expanded in y around 0 99.1%
Taylor expanded in z around 0 92.4%
cancel-sign-sub-inv92.4%
metadata-eval92.4%
associate-*r/92.4%
metadata-eval92.4%
Simplified92.4%
Taylor expanded in t around inf 92.4%
Final simplification85.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -3e-208)
(/ 1.0 (+ 1.0 (/ (* y (exp (* 2.0 (* a (- c b))))) x)))
(if (<= t 5.5e-242)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 9.8e-24)
1.0
(/
1.0
(+
1.0
(/ (* y (exp (* 2.0 (* (- c b) (+ a 0.8333333333333334))))) x)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -3e-208) {
tmp = 1.0 / (1.0 + ((y * exp((2.0 * (a * (c - b))))) / x));
} else if (t <= 5.5e-242) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 9.8e-24) {
tmp = 1.0;
} else {
tmp = 1.0 / (1.0 + ((y * exp((2.0 * ((c - b) * (a + 0.8333333333333334))))) / x));
}
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 <= (-3d-208)) then
tmp = 1.0d0 / (1.0d0 + ((y * exp((2.0d0 * (a * (c - b))))) / x))
else if (t <= 5.5d-242) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 9.8d-24) then
tmp = 1.0d0
else
tmp = 1.0d0 / (1.0d0 + ((y * exp((2.0d0 * ((c - b) * (a + 0.8333333333333334d0))))) / x))
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 <= -3e-208) {
tmp = 1.0 / (1.0 + ((y * Math.exp((2.0 * (a * (c - b))))) / x));
} else if (t <= 5.5e-242) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 9.8e-24) {
tmp = 1.0;
} else {
tmp = 1.0 / (1.0 + ((y * Math.exp((2.0 * ((c - b) * (a + 0.8333333333333334))))) / x));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -3e-208: tmp = 1.0 / (1.0 + ((y * math.exp((2.0 * (a * (c - b))))) / x)) elif t <= 5.5e-242: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 9.8e-24: tmp = 1.0 else: tmp = 1.0 / (1.0 + ((y * math.exp((2.0 * ((c - b) * (a + 0.8333333333333334))))) / x)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -3e-208) tmp = Float64(1.0 / Float64(1.0 + Float64(Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))) / x))); elseif (t <= 5.5e-242) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 9.8e-24) tmp = 1.0; else tmp = Float64(1.0 / Float64(1.0 + Float64(Float64(y * exp(Float64(2.0 * Float64(Float64(c - b) * Float64(a + 0.8333333333333334))))) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -3e-208) tmp = 1.0 / (1.0 + ((y * exp((2.0 * (a * (c - b))))) / x)); elseif (t <= 5.5e-242) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 9.8e-24) tmp = 1.0; else tmp = 1.0 / (1.0 + ((y * exp((2.0 * ((c - b) * (a + 0.8333333333333334))))) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -3e-208], N[(1.0 / N[(1.0 + N[(N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-242], 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, 9.8e-24], 1.0, N[(1.0 / N[(1.0 + N[(N[(y * N[Exp[N[(2.0 * N[(N[(c - b), $MachinePrecision] * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-208}:\\
\;\;\;\;\frac{1}{1 + \frac{y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}{x}}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-242}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-24}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \frac{y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(a + 0.8333333333333334\right)\right)}}{x}}\\
\end{array}
\end{array}
if t < -2.99999999999999986e-208Initial program 97.5%
Simplified95.1%
clear-num95.1%
inv-pow95.1%
+-commutative95.1%
Applied egg-rr95.1%
Simplified97.6%
Taylor expanded in y around 0 97.5%
Taylor expanded in z around 0 83.1%
cancel-sign-sub-inv83.1%
metadata-eval83.1%
associate-*r/83.1%
metadata-eval83.1%
Simplified83.1%
Taylor expanded in a around inf 83.1%
if -2.99999999999999986e-208 < t < 5.4999999999999998e-242Initial program 80.6%
Taylor expanded in t around 0 100.0%
Taylor expanded in z around 0 86.5%
if 5.4999999999999998e-242 < t < 9.8000000000000002e-24Initial program 90.6%
Simplified94.5%
Taylor expanded in x around inf 72.6%
if 9.8000000000000002e-24 < t Initial program 94.6%
Simplified100.0%
clear-num100.0%
inv-pow100.0%
+-commutative100.0%
Applied egg-rr100.0%
Simplified99.2%
Taylor expanded in y around 0 99.2%
Taylor expanded in z around 0 92.4%
cancel-sign-sub-inv92.4%
metadata-eval92.4%
associate-*r/92.4%
metadata-eval92.4%
Simplified92.4%
Taylor expanded in t around inf 89.4%
Final simplification84.5%
(FPCore (x y z t a b c)
:precision binary64
(/
1.0
(+
1.0
(/
(*
y
(exp
(*
2.0
(*
c
(+
0.8333333333333334
(-
(-
a
(* b (/ (+ 0.8333333333333334 (+ a (/ -0.6666666666666666 t))) c)))
(/ 0.6666666666666666 t)))))))
x))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0 / (1.0 + ((y * exp((2.0 * (c * (0.8333333333333334 + ((a - (b * ((0.8333333333333334 + (a + (-0.6666666666666666 / t))) / c))) - (0.6666666666666666 / t))))))) / x));
}
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 / (1.0d0 + ((y * exp((2.0d0 * (c * (0.8333333333333334d0 + ((a - (b * ((0.8333333333333334d0 + (a + ((-0.6666666666666666d0) / t))) / c))) - (0.6666666666666666d0 / t))))))) / x))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0 / (1.0 + ((y * Math.exp((2.0 * (c * (0.8333333333333334 + ((a - (b * ((0.8333333333333334 + (a + (-0.6666666666666666 / t))) / c))) - (0.6666666666666666 / t))))))) / x));
}
def code(x, y, z, t, a, b, c): return 1.0 / (1.0 + ((y * math.exp((2.0 * (c * (0.8333333333333334 + ((a - (b * ((0.8333333333333334 + (a + (-0.6666666666666666 / t))) / c))) - (0.6666666666666666 / t))))))) / x))
function code(x, y, z, t, a, b, c) return Float64(1.0 / Float64(1.0 + Float64(Float64(y * exp(Float64(2.0 * Float64(c * Float64(0.8333333333333334 + Float64(Float64(a - Float64(b * Float64(Float64(0.8333333333333334 + Float64(a + Float64(-0.6666666666666666 / t))) / c))) - Float64(0.6666666666666666 / t))))))) / x))) end
function tmp = code(x, y, z, t, a, b, c) tmp = 1.0 / (1.0 + ((y * exp((2.0 * (c * (0.8333333333333334 + ((a - (b * ((0.8333333333333334 + (a + (-0.6666666666666666 / t))) / c))) - (0.6666666666666666 / t))))))) / x)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(1.0 / N[(1.0 + N[(N[(y * N[Exp[N[(2.0 * N[(c * N[(0.8333333333333334 + N[(N[(a - N[(b * N[(N[(0.8333333333333334 + N[(a + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{1 + \frac{y \cdot e^{2 \cdot \left(c \cdot \left(0.8333333333333334 + \left(\left(a - b \cdot \frac{0.8333333333333334 + \left(a + \frac{-0.6666666666666666}{t}\right)}{c}\right) - \frac{0.6666666666666666}{t}\right)\right)\right)}}{x}}
\end{array}
Initial program 92.2%
Simplified95.0%
clear-num95.0%
inv-pow95.0%
+-commutative95.0%
Applied egg-rr95.0%
Simplified95.1%
Taylor expanded in y around 0 94.1%
Taylor expanded in z around 0 86.1%
cancel-sign-sub-inv86.1%
metadata-eval86.1%
associate-*r/86.1%
metadata-eval86.1%
Simplified86.1%
Taylor expanded in c around inf 83.8%
associate--l+83.8%
mul-1-neg83.8%
associate-/l*87.6%
cancel-sign-sub-inv87.6%
metadata-eval87.6%
associate-*r/87.6%
metadata-eval87.6%
associate-+r+87.6%
associate-*r/87.6%
metadata-eval87.6%
Simplified87.6%
Final simplification87.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ 1.0 (+ 1.0 (/ (* y (exp (* 2.0 (* a (- c b))))) x)))))
(if (<= t -3e-211)
t_1
(if (<= t 4.5e-241)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 8.2e-38) 1.0 t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 1.0 / (1.0 + ((y * exp((2.0 * (a * (c - b))))) / x));
double tmp;
if (t <= -3e-211) {
tmp = t_1;
} else if (t <= 4.5e-241) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 8.2e-38) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 / (1.0d0 + ((y * exp((2.0d0 * (a * (c - b))))) / x))
if (t <= (-3d-211)) then
tmp = t_1
else if (t <= 4.5d-241) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 8.2d-38) then
tmp = 1.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 1.0 / (1.0 + ((y * Math.exp((2.0 * (a * (c - b))))) / x));
double tmp;
if (t <= -3e-211) {
tmp = t_1;
} else if (t <= 4.5e-241) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 8.2e-38) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 1.0 / (1.0 + ((y * math.exp((2.0 * (a * (c - b))))) / x)) tmp = 0 if t <= -3e-211: tmp = t_1 elif t <= 4.5e-241: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 8.2e-38: tmp = 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(1.0 / Float64(1.0 + Float64(Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))) / x))) tmp = 0.0 if (t <= -3e-211) tmp = t_1; elseif (t <= 4.5e-241) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 8.2e-38) tmp = 1.0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 1.0 / (1.0 + ((y * exp((2.0 * (a * (c - b))))) / x)); tmp = 0.0; if (t <= -3e-211) tmp = t_1; elseif (t <= 4.5e-241) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 8.2e-38) tmp = 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(1.0 / N[(1.0 + N[(N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e-211], t$95$1, If[LessEqual[t, 4.5e-241], 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.2e-38], 1.0, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{1 + \frac{y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}{x}}\\
\mathbf{if}\;t \leq -3 \cdot 10^{-211}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-241}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-38}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.00000000000000005e-211 or 8.1999999999999996e-38 < t Initial program 95.5%
Simplified98.9%
clear-num98.9%
inv-pow98.9%
+-commutative98.9%
Applied egg-rr98.9%
Simplified98.9%
Taylor expanded in y around 0 98.8%
Taylor expanded in z around 0 90.6%
cancel-sign-sub-inv90.6%
metadata-eval90.6%
associate-*r/90.6%
metadata-eval90.6%
Simplified90.6%
Taylor expanded in a around inf 78.2%
if -3.00000000000000005e-211 < t < 4.4999999999999999e-241Initial program 78.4%
Taylor expanded in t around 0 97.4%
Taylor expanded in z around 0 84.3%
if 4.4999999999999999e-241 < t < 8.1999999999999996e-38Initial program 91.1%
Simplified95.7%
Taylor expanded in x around inf 76.3%
Final simplification78.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -5.4e-255)
(/ x (+ x (* y (exp (* 2.0 (* a c))))))
(if (<= t 4.5e-241)
(/ x (+ x (* y (exp (/ (* b 1.3333333333333333) t)))))
(if (<= t 7.3e-22)
1.0
(/ 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 <= -5.4e-255) {
tmp = x / (x + (y * exp((2.0 * (a * c)))));
} else if (t <= 4.5e-241) {
tmp = x / (x + (y * exp(((b * 1.3333333333333333) / t))));
} else if (t <= 7.3e-22) {
tmp = 1.0;
} 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 <= (-5.4d-255)) then
tmp = x / (x + (y * exp((2.0d0 * (a * c)))))
else if (t <= 4.5d-241) then
tmp = x / (x + (y * exp(((b * 1.3333333333333333d0) / t))))
else if (t <= 7.3d-22) then
tmp = 1.0d0
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 <= -5.4e-255) {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
} else if (t <= 4.5e-241) {
tmp = x / (x + (y * Math.exp(((b * 1.3333333333333333) / t))));
} else if (t <= 7.3e-22) {
tmp = 1.0;
} 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 <= -5.4e-255: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) elif t <= 4.5e-241: tmp = x / (x + (y * math.exp(((b * 1.3333333333333333) / t)))) elif t <= 7.3e-22: tmp = 1.0 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 <= -5.4e-255) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); elseif (t <= 4.5e-241) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b * 1.3333333333333333) / t))))); elseif (t <= 7.3e-22) tmp = 1.0; 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 <= -5.4e-255) tmp = x / (x + (y * exp((2.0 * (a * c))))); elseif (t <= 4.5e-241) tmp = x / (x + (y * exp(((b * 1.3333333333333333) / t)))); elseif (t <= 7.3e-22) tmp = 1.0; 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, -5.4e-255], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-241], N[(x / N[(x + N[(y * N[Exp[N[(N[(b * 1.3333333333333333), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.3e-22], 1.0, 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 -5.4 \cdot 10^{-255}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-241}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\frac{b \cdot 1.3333333333333333}{t}}}\\
\mathbf{elif}\;t \leq 7.3 \cdot 10^{-22}:\\
\;\;\;\;1\\
\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 < -5.40000000000000032e-255Initial program 92.0%
Taylor expanded in c around inf 78.7%
associate--l+78.7%
associate-*r/78.7%
metadata-eval78.7%
Simplified78.7%
Taylor expanded in a around inf 74.8%
*-commutative74.8%
Simplified74.8%
if -5.40000000000000032e-255 < t < 4.4999999999999999e-241Initial program 81.5%
Taylor expanded in b around inf 71.3%
associate-*r/71.3%
metadata-eval71.3%
Simplified71.3%
Taylor expanded in a around -inf 74.9%
associate-*r*74.9%
mul-1-neg74.9%
mul-1-neg74.9%
associate-/l*71.3%
sub-neg71.3%
associate-*r/71.3%
metadata-eval71.3%
metadata-eval71.3%
Simplified71.3%
Taylor expanded in t around 0 78.5%
associate-*r/78.5%
*-commutative78.5%
Simplified78.5%
if 4.4999999999999999e-241 < t < 7.30000000000000028e-22Initial program 92.5%
Simplified96.3%
Taylor expanded in x around inf 72.6%
if 7.30000000000000028e-22 < t Initial program 94.5%
Taylor expanded in b around inf 73.9%
associate-*r/73.9%
metadata-eval73.9%
Simplified73.9%
Taylor expanded in t around inf 72.4%
Final simplification73.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -9e-261)
(/ x (+ x (* y (exp (* 2.0 (* a c))))))
(if (<= t 4.5e-241)
(/ x (+ x (* y (exp (/ (* b 1.3333333333333333) t)))))
(if (<= t 1.9e-37) 1.0 (/ x (+ x (* y (exp (* (* a b) (- 2.0))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -9e-261) {
tmp = x / (x + (y * exp((2.0 * (a * c)))));
} else if (t <= 4.5e-241) {
tmp = x / (x + (y * exp(((b * 1.3333333333333333) / t))));
} else if (t <= 1.9e-37) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp(((a * b) * -2.0))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-9d-261)) then
tmp = x / (x + (y * exp((2.0d0 * (a * c)))))
else if (t <= 4.5d-241) then
tmp = x / (x + (y * exp(((b * 1.3333333333333333d0) / t))))
else if (t <= 1.9d-37) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp(((a * b) * -2.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -9e-261) {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
} else if (t <= 4.5e-241) {
tmp = x / (x + (y * Math.exp(((b * 1.3333333333333333) / t))));
} else if (t <= 1.9e-37) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp(((a * b) * -2.0))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -9e-261: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) elif t <= 4.5e-241: tmp = x / (x + (y * math.exp(((b * 1.3333333333333333) / t)))) elif t <= 1.9e-37: tmp = 1.0 else: tmp = x / (x + (y * math.exp(((a * b) * -2.0)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -9e-261) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); elseif (t <= 4.5e-241) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b * 1.3333333333333333) / t))))); elseif (t <= 1.9e-37) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(a * b) * Float64(-2.0)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -9e-261) tmp = x / (x + (y * exp((2.0 * (a * c))))); elseif (t <= 4.5e-241) tmp = x / (x + (y * exp(((b * 1.3333333333333333) / t)))); elseif (t <= 1.9e-37) tmp = 1.0; else tmp = x / (x + (y * exp(((a * b) * -2.0)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -9e-261], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-241], N[(x / N[(x + N[(y * N[Exp[N[(N[(b * 1.3333333333333333), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-37], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(N[(a * b), $MachinePrecision] * (-2.0)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{-261}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-241}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\frac{b \cdot 1.3333333333333333}{t}}}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-37}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(a \cdot b\right) \cdot \left(-2\right)}}\\
\end{array}
\end{array}
if t < -9.0000000000000002e-261Initial program 92.0%
Taylor expanded in c around inf 78.7%
associate--l+78.7%
associate-*r/78.7%
metadata-eval78.7%
Simplified78.7%
Taylor expanded in a around inf 74.8%
*-commutative74.8%
Simplified74.8%
if -9.0000000000000002e-261 < t < 4.4999999999999999e-241Initial program 81.5%
Taylor expanded in b around inf 71.3%
associate-*r/71.3%
metadata-eval71.3%
Simplified71.3%
Taylor expanded in a around -inf 74.9%
associate-*r*74.9%
mul-1-neg74.9%
mul-1-neg74.9%
associate-/l*71.3%
sub-neg71.3%
associate-*r/71.3%
metadata-eval71.3%
metadata-eval71.3%
Simplified71.3%
Taylor expanded in t around 0 78.5%
associate-*r/78.5%
*-commutative78.5%
Simplified78.5%
if 4.4999999999999999e-241 < t < 1.9000000000000002e-37Initial program 91.1%
Simplified95.7%
Taylor expanded in x around inf 76.3%
if 1.9000000000000002e-37 < t Initial program 94.8%
Taylor expanded in b around inf 73.4%
associate-*r/73.4%
metadata-eval73.4%
Simplified73.4%
Taylor expanded in a around inf 66.2%
associate-*r*66.2%
mul-1-neg66.2%
Simplified66.2%
Final simplification70.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 2.0 (* a c))))))))
(if (<= t -1.5e-254)
t_1
(if (<= t 4.2e-241)
(/ x (+ x (* y (exp (/ (* b 1.3333333333333333) t)))))
(if (<= t 9e-24) 1.0 t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((2.0 * (a * c)))));
double tmp;
if (t <= -1.5e-254) {
tmp = t_1;
} else if (t <= 4.2e-241) {
tmp = x / (x + (y * exp(((b * 1.3333333333333333) / t))));
} else if (t <= 9e-24) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * (a * c)))))
if (t <= (-1.5d-254)) then
tmp = t_1
else if (t <= 4.2d-241) then
tmp = x / (x + (y * exp(((b * 1.3333333333333333d0) / t))))
else if (t <= 9d-24) then
tmp = 1.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((2.0 * (a * c)))));
double tmp;
if (t <= -1.5e-254) {
tmp = t_1;
} else if (t <= 4.2e-241) {
tmp = x / (x + (y * Math.exp(((b * 1.3333333333333333) / t))));
} else if (t <= 9e-24) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * (a * c))))) tmp = 0 if t <= -1.5e-254: tmp = t_1 elif t <= 4.2e-241: tmp = x / (x + (y * math.exp(((b * 1.3333333333333333) / t)))) elif t <= 9e-24: tmp = 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))) tmp = 0.0 if (t <= -1.5e-254) tmp = t_1; elseif (t <= 4.2e-241) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b * 1.3333333333333333) / t))))); elseif (t <= 9e-24) tmp = 1.0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * (a * c))))); tmp = 0.0; if (t <= -1.5e-254) tmp = t_1; elseif (t <= 4.2e-241) tmp = x / (x + (y * exp(((b * 1.3333333333333333) / t)))); elseif (t <= 9e-24) tmp = 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.5e-254], t$95$1, If[LessEqual[t, 4.2e-241], N[(x / N[(x + N[(y * N[Exp[N[(N[(b * 1.3333333333333333), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e-24], 1.0, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{-254}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-241}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\frac{b \cdot 1.3333333333333333}{t}}}\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-24}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.50000000000000006e-254 or 8.9999999999999995e-24 < t Initial program 93.8%
Taylor expanded in c around inf 70.5%
associate--l+70.5%
associate-*r/70.5%
metadata-eval70.5%
Simplified70.5%
Taylor expanded in a around inf 63.8%
*-commutative63.8%
Simplified63.8%
if -1.50000000000000006e-254 < t < 4.1999999999999999e-241Initial program 81.5%
Taylor expanded in b around inf 71.3%
associate-*r/71.3%
metadata-eval71.3%
Simplified71.3%
Taylor expanded in a around -inf 74.9%
associate-*r*74.9%
mul-1-neg74.9%
mul-1-neg74.9%
associate-/l*71.3%
sub-neg71.3%
associate-*r/71.3%
metadata-eval71.3%
metadata-eval71.3%
Simplified71.3%
Taylor expanded in t around 0 78.5%
associate-*r/78.5%
*-commutative78.5%
Simplified78.5%
if 4.1999999999999999e-241 < t < 8.9999999999999995e-24Initial program 92.3%
Simplified96.3%
Taylor expanded in x around inf 73.9%
Final simplification67.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 4.5e-241)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 8e-24)
1.0
(/ 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 <= 4.5e-241) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 8e-24) {
tmp = 1.0;
} 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 <= 4.5d-241) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 8d-24) then
tmp = 1.0d0
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 <= 4.5e-241) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 8e-24) {
tmp = 1.0;
} 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 <= 4.5e-241: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 8e-24: tmp = 1.0 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 <= 4.5e-241) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 8e-24) tmp = 1.0; 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 <= 4.5e-241) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 8e-24) tmp = 1.0; 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, 4.5e-241], 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, 8e-24], 1.0, 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 4.5 \cdot 10^{-241}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-24}:\\
\;\;\;\;1\\
\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 < 4.4999999999999999e-241Initial program 88.3%
Taylor expanded in t around 0 95.0%
Taylor expanded in z around 0 77.4%
if 4.4999999999999999e-241 < t < 7.99999999999999939e-24Initial program 92.3%
Simplified96.3%
Taylor expanded in x around inf 73.9%
if 7.99999999999999939e-24 < t Initial program 94.6%
Taylor expanded in b around inf 73.4%
associate-*r/73.4%
metadata-eval73.4%
Simplified73.4%
Taylor expanded in t around inf 71.9%
Final simplification74.0%
(FPCore (x y z t a b c)
:precision binary64
(/
1.0
(+
1.0
(/
(*
y
(exp
(*
2.0
(* (- c b) (+ (+ a 0.8333333333333334) (/ -0.6666666666666666 t))))))
x))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0 / (1.0 + ((y * exp((2.0 * ((c - b) * ((a + 0.8333333333333334) + (-0.6666666666666666 / t)))))) / x));
}
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 / (1.0d0 + ((y * exp((2.0d0 * ((c - b) * ((a + 0.8333333333333334d0) + ((-0.6666666666666666d0) / t)))))) / x))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0 / (1.0 + ((y * Math.exp((2.0 * ((c - b) * ((a + 0.8333333333333334) + (-0.6666666666666666 / t)))))) / x));
}
def code(x, y, z, t, a, b, c): return 1.0 / (1.0 + ((y * math.exp((2.0 * ((c - b) * ((a + 0.8333333333333334) + (-0.6666666666666666 / t)))))) / x))
function code(x, y, z, t, a, b, c) return Float64(1.0 / Float64(1.0 + Float64(Float64(y * exp(Float64(2.0 * Float64(Float64(c - b) * Float64(Float64(a + 0.8333333333333334) + Float64(-0.6666666666666666 / t)))))) / x))) end
function tmp = code(x, y, z, t, a, b, c) tmp = 1.0 / (1.0 + ((y * exp((2.0 * ((c - b) * ((a + 0.8333333333333334) + (-0.6666666666666666 / t)))))) / x)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(1.0 / N[(1.0 + N[(N[(y * N[Exp[N[(2.0 * N[(N[(c - b), $MachinePrecision] * N[(N[(a + 0.8333333333333334), $MachinePrecision] + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{1 + \frac{y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(\left(a + 0.8333333333333334\right) + \frac{-0.6666666666666666}{t}\right)\right)}}{x}}
\end{array}
Initial program 92.2%
Simplified95.0%
clear-num95.0%
inv-pow95.0%
+-commutative95.0%
Applied egg-rr95.0%
Simplified95.1%
Taylor expanded in y around 0 94.1%
Taylor expanded in z around 0 86.1%
cancel-sign-sub-inv86.1%
metadata-eval86.1%
associate-*r/86.1%
metadata-eval86.1%
Simplified86.1%
Final simplification86.1%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -5e-180) (not (<= t 1.45e+21))) (/ x (+ x (* y (exp (* c 1.6666666666666667))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -5e-180) || !(t <= 1.45e+21)) {
tmp = x / (x + (y * exp((c * 1.6666666666666667))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((t <= (-5d-180)) .or. (.not. (t <= 1.45d+21))) then
tmp = x / (x + (y * exp((c * 1.6666666666666667d0))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -5e-180) || !(t <= 1.45e+21)) {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -5e-180) or not (t <= 1.45e+21): tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -5e-180) || !(t <= 1.45e+21)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -5e-180) || ~((t <= 1.45e+21))) tmp = x / (x + (y * exp((c * 1.6666666666666667)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -5e-180], N[Not[LessEqual[t, 1.45e+21]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-180} \lor \neg \left(t \leq 1.45 \cdot 10^{+21}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -5.0000000000000001e-180 or 1.45e21 < t Initial program 94.5%
Taylor expanded in c around inf 70.9%
associate--l+70.9%
associate-*r/70.9%
metadata-eval70.9%
Simplified70.9%
Taylor expanded in t around inf 70.9%
Taylor expanded in a around 0 64.0%
*-commutative64.0%
Simplified64.0%
if -5.0000000000000001e-180 < t < 1.45e21Initial program 89.4%
Simplified90.3%
Taylor expanded in x around inf 58.0%
Final simplification61.4%
(FPCore (x y z t a b c) :precision binary64 (if (<= a 3.5) 1.0 (/ x (+ x (* y (exp (* 2.0 (* a c))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= 3.5) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp((2.0 * (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 (a <= 3.5d0) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp((2.0d0 * (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 (a <= 3.5) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if a <= 3.5: tmp = 1.0 else: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= 3.5) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (a <= 3.5) tmp = 1.0; else tmp = x / (x + (y * exp((2.0 * (a * c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, 3.5], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.5:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\end{array}
\end{array}
if a < 3.5Initial program 93.1%
Simplified99.2%
Taylor expanded in x around inf 61.8%
if 3.5 < a Initial program 91.4%
Taylor expanded in c around inf 70.0%
associate--l+70.0%
associate-*r/70.0%
metadata-eval70.0%
Simplified70.0%
Taylor expanded in a around inf 63.9%
*-commutative63.9%
Simplified63.9%
Final simplification62.9%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -3.55e+53) (/ x (* y (exp (* -2.0 (* a b))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.55e+53) {
tmp = x / (y * exp((-2.0 * (a * b))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-3.55d+53)) then
tmp = x / (y * exp(((-2.0d0) * (a * b))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.55e+53) {
tmp = x / (y * Math.exp((-2.0 * (a * b))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -3.55e+53: tmp = x / (y * math.exp((-2.0 * (a * b)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -3.55e+53) tmp = Float64(x / Float64(y * exp(Float64(-2.0 * Float64(a * b))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -3.55e+53) tmp = x / (y * exp((-2.0 * (a * b)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -3.55e+53], N[(x / N[(y * N[Exp[N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.55 \cdot 10^{+53}:\\
\;\;\;\;\frac{x}{y \cdot e^{-2 \cdot \left(a \cdot b\right)}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -3.54999999999999987e53Initial program 87.3%
Taylor expanded in b around inf 91.2%
associate-*r/91.2%
metadata-eval91.2%
Simplified91.2%
Taylor expanded in a around inf 66.6%
associate-*r*66.6%
mul-1-neg66.6%
Simplified66.6%
Taylor expanded in x around 0 55.9%
if -3.54999999999999987e53 < b Initial program 93.6%
Simplified93.6%
Taylor expanded in x around inf 56.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (- b c) -1e+134)
1.0
(if (<= (- b c) -1e-196)
(/ x (+ x (+ y (* 2.0 (* c (* y (+ a 0.8333333333333334)))))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -1e+134) {
tmp = 1.0;
} else if ((b - c) <= -1e-196) {
tmp = x / (x + (y + (2.0 * (c * (y * (a + 0.8333333333333334))))));
} 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+134)) then
tmp = 1.0d0
else if ((b - c) <= (-1d-196)) then
tmp = x / (x + (y + (2.0d0 * (c * (y * (a + 0.8333333333333334d0))))))
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+134) {
tmp = 1.0;
} else if ((b - c) <= -1e-196) {
tmp = x / (x + (y + (2.0 * (c * (y * (a + 0.8333333333333334))))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b - c) <= -1e+134: tmp = 1.0 elif (b - c) <= -1e-196: tmp = x / (x + (y + (2.0 * (c * (y * (a + 0.8333333333333334)))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b - c) <= -1e+134) tmp = 1.0; elseif (Float64(b - c) <= -1e-196) tmp = Float64(x / Float64(x + Float64(y + Float64(2.0 * Float64(c * Float64(y * Float64(a + 0.8333333333333334))))))); 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+134) tmp = 1.0; elseif ((b - c) <= -1e-196) tmp = x / (x + (y + (2.0 * (c * (y * (a + 0.8333333333333334)))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b - c), $MachinePrecision], -1e+134], 1.0, If[LessEqual[N[(b - c), $MachinePrecision], -1e-196], N[(x / N[(x + N[(y + N[(2.0 * N[(c * N[(y * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - c \leq -1 \cdot 10^{+134}:\\
\;\;\;\;1\\
\mathbf{elif}\;b - c \leq -1 \cdot 10^{-196}:\\
\;\;\;\;\frac{x}{x + \left(y + 2 \cdot \left(c \cdot \left(y \cdot \left(a + 0.8333333333333334\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 b c) < -9.99999999999999921e133 or -1e-196 < (-.f64 b c) Initial program 90.0%
Simplified94.8%
Taylor expanded in x around inf 60.7%
if -9.99999999999999921e133 < (-.f64 b c) < -1e-196Initial program 98.5%
Taylor expanded in c around inf 66.4%
associate--l+66.4%
associate-*r/66.4%
metadata-eval66.4%
Simplified66.4%
Taylor expanded in t around inf 60.6%
Taylor expanded in c around 0 50.4%
Final simplification58.1%
(FPCore (x y z t a b c) :precision binary64 (if (<= a 2.35e+181) 1.0 (if (<= a 8.2e+254) (/ x (+ x (* b (+ (* -2.0 (* y a)) (/ y b))))) 1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= 2.35e+181) {
tmp = 1.0;
} else if (a <= 8.2e+254) {
tmp = x / (x + (b * ((-2.0 * (y * a)) + (y / b))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (a <= 2.35d+181) then
tmp = 1.0d0
else if (a <= 8.2d+254) then
tmp = x / (x + (b * (((-2.0d0) * (y * a)) + (y / b))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= 2.35e+181) {
tmp = 1.0;
} else if (a <= 8.2e+254) {
tmp = x / (x + (b * ((-2.0 * (y * a)) + (y / b))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if a <= 2.35e+181: tmp = 1.0 elif a <= 8.2e+254: tmp = x / (x + (b * ((-2.0 * (y * a)) + (y / b)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= 2.35e+181) tmp = 1.0; elseif (a <= 8.2e+254) tmp = Float64(x / Float64(x + Float64(b * Float64(Float64(-2.0 * Float64(y * a)) + Float64(y / b))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (a <= 2.35e+181) tmp = 1.0; elseif (a <= 8.2e+254) tmp = x / (x + (b * ((-2.0 * (y * a)) + (y / b)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, 2.35e+181], 1.0, If[LessEqual[a, 8.2e+254], N[(x / N[(x + N[(b * N[(N[(-2.0 * N[(y * a), $MachinePrecision]), $MachinePrecision] + N[(y / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.35 \cdot 10^{+181}:\\
\;\;\;\;1\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{+254}:\\
\;\;\;\;\frac{x}{x + b \cdot \left(-2 \cdot \left(y \cdot a\right) + \frac{y}{b}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if a < 2.35000000000000014e181 or 8.19999999999999974e254 < a Initial program 93.1%
Simplified95.9%
Taylor expanded in x around inf 57.2%
if 2.35000000000000014e181 < a < 8.19999999999999974e254Initial program 87.2%
Taylor expanded in b around inf 67.8%
associate-*r/67.8%
metadata-eval67.8%
Simplified67.8%
Taylor expanded in a around inf 65.3%
associate-*r*65.3%
mul-1-neg65.3%
Simplified65.3%
Taylor expanded in a around 0 45.9%
Taylor expanded in b around inf 55.4%
Final simplification56.9%
(FPCore (x y z t a b c) :precision binary64 (if (<= y 1.2e+203) 1.0 (/ x (+ x (- y (* 1.3333333333333333 (* y (/ (- c b) t))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= 1.2e+203) {
tmp = 1.0;
} else {
tmp = x / (x + (y - (1.3333333333333333 * (y * ((c - b) / 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 (y <= 1.2d+203) then
tmp = 1.0d0
else
tmp = x / (x + (y - (1.3333333333333333d0 * (y * ((c - b) / 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 (y <= 1.2e+203) {
tmp = 1.0;
} else {
tmp = x / (x + (y - (1.3333333333333333 * (y * ((c - b) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if y <= 1.2e+203: tmp = 1.0 else: tmp = x / (x + (y - (1.3333333333333333 * (y * ((c - b) / t))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= 1.2e+203) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y - Float64(1.3333333333333333 * Float64(y * Float64(Float64(c - b) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (y <= 1.2e+203) tmp = 1.0; else tmp = x / (x + (y - (1.3333333333333333 * (y * ((c - b) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, 1.2e+203], 1.0, N[(x / N[(x + N[(y - N[(1.3333333333333333 * N[(y * N[(N[(c - b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.2 \cdot 10^{+203}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + \left(y - 1.3333333333333333 \cdot \left(y \cdot \frac{c - b}{t}\right)\right)}\\
\end{array}
\end{array}
if y < 1.2000000000000001e203Initial program 91.7%
Simplified94.6%
Taylor expanded in x around inf 54.7%
if 1.2000000000000001e203 < y Initial program 100.0%
Taylor expanded in t around 0 65.7%
Taylor expanded in t around inf 59.7%
Taylor expanded in z around 0 71.5%
associate-/l*66.2%
Simplified66.2%
Final simplification55.4%
(FPCore (x y z t a b c) :precision binary64 (if (<= a 1.85e+180) 1.0 (/ x (- x (* y (- -1.0 (* 2.0 (* a c))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= 1.85e+180) {
tmp = 1.0;
} else {
tmp = x / (x - (y * (-1.0 - (2.0 * (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 (a <= 1.85d+180) then
tmp = 1.0d0
else
tmp = x / (x - (y * ((-1.0d0) - (2.0d0 * (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 (a <= 1.85e+180) {
tmp = 1.0;
} else {
tmp = x / (x - (y * (-1.0 - (2.0 * (a * c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if a <= 1.85e+180: tmp = 1.0 else: tmp = x / (x - (y * (-1.0 - (2.0 * (a * c))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= 1.85e+180) tmp = 1.0; else tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(2.0 * Float64(a * c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (a <= 1.85e+180) tmp = 1.0; else tmp = x / (x - (y * (-1.0 - (2.0 * (a * c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, 1.85e+180], 1.0, N[(x / N[(x - N[(y * N[(-1.0 - N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.85 \cdot 10^{+180}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - 2 \cdot \left(a \cdot c\right)\right)}\\
\end{array}
\end{array}
if a < 1.8500000000000001e180Initial program 94.0%
Simplified98.0%
Taylor expanded in x around inf 57.3%
if 1.8500000000000001e180 < a Initial program 86.4%
Taylor expanded in c around inf 66.5%
associate--l+66.5%
associate-*r/66.5%
metadata-eval66.5%
Simplified66.5%
Taylor expanded in a around inf 69.8%
*-commutative69.8%
Simplified69.8%
Taylor expanded in c around 0 48.9%
Final simplification55.3%
(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.2%
Simplified95.0%
Taylor expanded in x around inf 53.5%
(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 2024185
(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)))))))))))