
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a 0.8333333333333334))))))
(if (<= t_1 INFINITY)
(/ x (+ x (* y (exp (* 2.0 t_1)))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * Math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((z * math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))) tmp = 0 if t_1 <= math.inf: tmp = x / (x + (y * math.exp((2.0 * t_1)))) else: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + 0.8333333333333334)))) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * t_1))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))); tmp = 0.0; if (t_1 <= Inf) tmp = x / (x + (y * exp((2.0 * t_1)))); else tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + 0.8333333333333334\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot t\_1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < +inf.0Initial program 100.0%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) Initial program 0.0%
Taylor expanded in t around 0 64.2%
Final simplification98.5%
(FPCore (x y z t a b c)
:precision binary64
(/
x
(fma
y
(pow
(exp 2.0)
(fma
z
(/ (sqrt (+ t a)) t)
(* (+ a (- 0.8333333333333334 (/ 0.6666666666666666 t))) (- c b))))
x)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / fma(y, pow(exp(2.0), fma(z, (sqrt((t + a)) / t), ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * (c - b)))), x);
}
function code(x, y, z, t, a, b, c) return Float64(x / fma(y, (exp(2.0) ^ fma(z, Float64(sqrt(Float64(t + a)) / t), Float64(Float64(a + Float64(0.8333333333333334 - Float64(0.6666666666666666 / t))) * Float64(c - b)))), x)) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(z * N[(N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision] + N[(N[(a + N[(0.8333333333333334 - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\mathsf{fma}\left(y, {\left(e^{2}\right)}^{\left(\mathsf{fma}\left(z, \frac{\sqrt{t + a}}{t}, \left(a + \left(0.8333333333333334 - \frac{0.6666666666666666}{t}\right)\right) \cdot \left(c - b\right)\right)\right)}, x\right)}
\end{array}
Initial program 95.7%
Simplified96.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -6.8e+100)
(/
x
(+
x
(*
y
(exp
(* 2.0 (* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(if (<= b 1.9e+124)
(/
x
(+ x (* y (exp (* 2.0 (+ (/ (* z (sqrt (+ t a))) t) (* a (- c b))))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
b
(/
(+ 0.6666666666666666 (* t (- -0.8333333333333334 a)))
t))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -6.8e+100) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else if (b <= 1.9e+124) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) + (a * (c - b)))))));
} else {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 + (t * (-0.8333333333333334 - a))) / t))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-6.8d+100)) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else if (b <= 1.9d+124) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) + (a * (c - b)))))))
else
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 + (t * ((-0.8333333333333334d0) - a))) / t))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -6.8e+100) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else if (b <= 1.9e+124) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) + (a * (c - b)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 + (t * (-0.8333333333333334 - a))) / t))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -6.8e+100: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) elif b <= 1.9e+124: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) + (a * (c - b))))))) else: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 + (t * (-0.8333333333333334 - a))) / t)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -6.8e+100) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); elseif (b <= 1.9e+124) 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)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 + Float64(t * Float64(-0.8333333333333334 - a))) / t))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -6.8e+100) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); elseif (b <= 1.9e+124) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) + (a * (c - b))))))); else tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 + (t * (-0.8333333333333334 - a))) / t)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -6.8e+100], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.9e+124], 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], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 + N[(t * N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.8 \cdot 10^{+100}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+124}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} + a \cdot \left(c - b\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \frac{0.6666666666666666 + t \cdot \left(-0.8333333333333334 - a\right)}{t}\right)}}\\
\end{array}
\end{array}
if b < -6.79999999999999988e100Initial program 94.6%
Taylor expanded in b around inf 97.4%
associate-*r/97.4%
metadata-eval97.4%
Simplified97.4%
if -6.79999999999999988e100 < b < 1.8999999999999999e124Initial program 96.0%
Taylor expanded in a around inf 81.6%
if 1.8999999999999999e124 < b Initial program 95.6%
Taylor expanded in b around inf 89.2%
associate-*r/89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in t around 0 89.2%
mul-1-neg89.2%
+-commutative89.2%
distribute-rgt-neg-in89.2%
+-commutative89.2%
distribute-neg-in89.2%
unsub-neg89.2%
metadata-eval89.2%
Simplified89.2%
Final simplification85.2%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= b -1.5e-98) (not (<= b 5.8e-38)))
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
b
(/
(- 0.6666666666666666 (* a (+ t (* 0.8333333333333334 (/ t a)))))
t)))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* c (+ 0.8333333333333334 (- a (/ 0.6666666666666666 t)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1.5e-98) || !(b <= 5.8e-38)) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 - (a * (t + (0.8333333333333334 * (t / a))))) / t))))));
} else {
tmp = x / (x + (y * exp((2.0 * (c * (0.8333333333333334 + (a - (0.6666666666666666 / t))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b <= (-1.5d-98)) .or. (.not. (b <= 5.8d-38))) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 - (a * (t + (0.8333333333333334d0 * (t / a))))) / t))))))
else
tmp = x / (x + (y * exp((2.0d0 * (c * (0.8333333333333334d0 + (a - (0.6666666666666666d0 / t))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1.5e-98) || !(b <= 5.8e-38)) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 - (a * (t + (0.8333333333333334 * (t / a))))) / t))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (c * (0.8333333333333334 + (a - (0.6666666666666666 / t))))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -1.5e-98) or not (b <= 5.8e-38): tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 - (a * (t + (0.8333333333333334 * (t / a))))) / t)))))) else: tmp = x / (x + (y * math.exp((2.0 * (c * (0.8333333333333334 + (a - (0.6666666666666666 / t)))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -1.5e-98) || !(b <= 5.8e-38)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 - Float64(a * Float64(t + Float64(0.8333333333333334 * Float64(t / a))))) / t))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(0.8333333333333334 + Float64(a - Float64(0.6666666666666666 / t))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b <= -1.5e-98) || ~((b <= 5.8e-38))) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 - (a * (t + (0.8333333333333334 * (t / a))))) / t)))))); else tmp = x / (x + (y * exp((2.0 * (c * (0.8333333333333334 + (a - (0.6666666666666666 / t)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -1.5e-98], N[Not[LessEqual[b, 5.8e-38]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 - N[(a * N[(t + N[(0.8333333333333334 * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(0.8333333333333334 + N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.5 \cdot 10^{-98} \lor \neg \left(b \leq 5.8 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \frac{0.6666666666666666 - a \cdot \left(t + 0.8333333333333334 \cdot \frac{t}{a}\right)}{t}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(0.8333333333333334 + \left(a - \frac{0.6666666666666666}{t}\right)\right)\right)}}\\
\end{array}
\end{array}
if b < -1.5e-98 or 5.79999999999999988e-38 < b Initial program 95.5%
Taylor expanded in b around inf 81.8%
associate-*r/81.8%
metadata-eval81.8%
Simplified81.8%
Taylor expanded in t around 0 81.8%
mul-1-neg81.8%
+-commutative81.8%
distribute-rgt-neg-in81.8%
+-commutative81.8%
distribute-neg-in81.8%
unsub-neg81.8%
metadata-eval81.8%
Simplified81.8%
Taylor expanded in a around -inf 83.7%
associate-*r*83.7%
neg-mul-183.7%
Simplified83.7%
if -1.5e-98 < b < 5.79999999999999988e-38Initial program 96.1%
Taylor expanded in c around inf 79.6%
associate--l+79.6%
associate-*r/79.6%
metadata-eval79.6%
Simplified79.6%
Final simplification82.0%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= b -30.0) (not (<= b 1.35e-12)))
(/
x
(+
x
(*
y
(exp
(* 2.0 (* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* c (+ 0.8333333333333334 (- a (/ 0.6666666666666666 t)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -30.0) || !(b <= 1.35e-12)) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * exp((2.0 * (c * (0.8333333333333334 + (a - (0.6666666666666666 / t))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b <= (-30.0d0)) .or. (.not. (b <= 1.35d-12))) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else
tmp = x / (x + (y * exp((2.0d0 * (c * (0.8333333333333334d0 + (a - (0.6666666666666666d0 / t))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -30.0) || !(b <= 1.35e-12)) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (c * (0.8333333333333334 + (a - (0.6666666666666666 / t))))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -30.0) or not (b <= 1.35e-12): tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) else: tmp = x / (x + (y * math.exp((2.0 * (c * (0.8333333333333334 + (a - (0.6666666666666666 / t)))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -30.0) || !(b <= 1.35e-12)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(0.8333333333333334 + Float64(a - Float64(0.6666666666666666 / t))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b <= -30.0) || ~((b <= 1.35e-12))) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); else tmp = x / (x + (y * exp((2.0 * (c * (0.8333333333333334 + (a - (0.6666666666666666 / t)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -30.0], N[Not[LessEqual[b, 1.35e-12]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(0.8333333333333334 + N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -30 \lor \neg \left(b \leq 1.35 \cdot 10^{-12}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(0.8333333333333334 + \left(a - \frac{0.6666666666666666}{t}\right)\right)\right)}}\\
\end{array}
\end{array}
if b < -30 or 1.3499999999999999e-12 < b Initial program 94.7%
Taylor expanded in b around inf 85.4%
associate-*r/85.4%
metadata-eval85.4%
Simplified85.4%
if -30 < b < 1.3499999999999999e-12Initial program 96.7%
Taylor expanded in c around inf 76.8%
associate--l+76.8%
associate-*r/76.8%
metadata-eval76.8%
Simplified76.8%
Final simplification81.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 4.4e-48)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 4.4e-48) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 4.4d-48) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 4.4e-48) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 4.4e-48: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 4.4e-48) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 4.4e-48) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 4.4e-48], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.4 \cdot 10^{-48}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\end{array}
\end{array}
if t < 4.40000000000000025e-48Initial program 92.2%
Taylor expanded in t around 0 77.6%
Taylor expanded in z around 0 78.1%
if 4.40000000000000025e-48 < t Initial program 98.6%
Taylor expanded in b around inf 75.4%
associate-*r/75.4%
metadata-eval75.4%
Simplified75.4%
Final simplification76.6%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 1.22e-20) (/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t)))))) (/ x (+ x (* y (exp (* 2.0 (* b (- -0.8333333333333334 a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.22e-20) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * (b * (-0.8333333333333334 - a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 1.22d-20) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * (b * ((-0.8333333333333334d0) - a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.22e-20) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (b * (-0.8333333333333334 - a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 1.22e-20: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp((2.0 * (b * (-0.8333333333333334 - a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 1.22e-20) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(-0.8333333333333334 - a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 1.22e-20) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp((2.0 * (b * (-0.8333333333333334 - a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 1.22e-20], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.22 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(-0.8333333333333334 - a\right)\right)}}\\
\end{array}
\end{array}
if t < 1.22000000000000003e-20Initial program 92.9%
Taylor expanded in t around 0 72.5%
Taylor expanded in z around 0 76.9%
if 1.22000000000000003e-20 < t Initial program 98.5%
Taylor expanded in b around inf 76.3%
associate-*r/76.3%
metadata-eval76.3%
Simplified76.3%
Taylor expanded in t around inf 75.6%
mul-1-neg75.6%
+-commutative75.6%
distribute-rgt-neg-in75.6%
+-commutative75.6%
distribute-neg-in75.6%
unsub-neg75.6%
metadata-eval75.6%
Simplified75.6%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 11200.0) (/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t)))))) (/ x (+ x (* y (exp (* b -1.6666666666666667)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 11200.0) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp((b * -1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 11200.0d0) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 11200.0) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 11200.0: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 11200.0) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 11200.0) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp((b * -1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 11200.0], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 11200:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\end{array}
\end{array}
if t < 11200Initial program 93.2%
Taylor expanded in t around 0 71.0%
Taylor expanded in z around 0 76.0%
if 11200 < t Initial program 98.4%
Taylor expanded in b around inf 76.5%
associate-*r/76.5%
metadata-eval76.5%
Simplified76.5%
Taylor expanded in t around inf 76.5%
mul-1-neg76.5%
+-commutative76.5%
distribute-rgt-neg-in76.5%
+-commutative76.5%
distribute-neg-in76.5%
unsub-neg76.5%
metadata-eval76.5%
Simplified76.5%
Taylor expanded in a around 0 71.5%
*-commutative71.5%
Simplified71.5%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 7.5e-22) (/ x (+ x (* y (exp (* -1.3333333333333333 (/ c t)))))) (/ x (+ x (* y (exp (* b -1.6666666666666667)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 7.5e-22) {
tmp = x / (x + (y * exp((-1.3333333333333333 * (c / t)))));
} else {
tmp = x / (x + (y * exp((b * -1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 7.5d-22) then
tmp = x / (x + (y * exp(((-1.3333333333333333d0) * (c / t)))))
else
tmp = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 7.5e-22) {
tmp = x / (x + (y * Math.exp((-1.3333333333333333 * (c / t)))));
} else {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 7.5e-22: tmp = x / (x + (y * math.exp((-1.3333333333333333 * (c / t))))) else: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 7.5e-22) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-1.3333333333333333 * Float64(c / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 7.5e-22) tmp = x / (x + (y * exp((-1.3333333333333333 * (c / t))))); else tmp = x / (x + (y * exp((b * -1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 7.5e-22], N[(x / N[(x + N[(y * N[Exp[N[(-1.3333333333333333 * N[(c / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.5 \cdot 10^{-22}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-1.3333333333333333 \cdot \frac{c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\end{array}
\end{array}
if t < 7.49999999999999978e-22Initial program 92.9%
Taylor expanded in t around 0 72.5%
Taylor expanded in z around 0 76.9%
Taylor expanded in b around 0 60.3%
if 7.49999999999999978e-22 < t Initial program 98.5%
Taylor expanded in b around inf 76.3%
associate-*r/76.3%
metadata-eval76.3%
Simplified76.3%
Taylor expanded in t around inf 75.6%
mul-1-neg75.6%
+-commutative75.6%
distribute-rgt-neg-in75.6%
+-commutative75.6%
distribute-neg-in75.6%
unsub-neg75.6%
metadata-eval75.6%
Simplified75.6%
Taylor expanded in a around 0 70.0%
*-commutative70.0%
Simplified70.0%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 6500.0) 1.0 (/ x (+ x (* y (exp (* b -1.6666666666666667)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 6500.0) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp((b * -1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 6500.0d0) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 6500.0) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 6500.0: tmp = 1.0 else: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 6500.0) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 6500.0) tmp = 1.0; else tmp = x / (x + (y * exp((b * -1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 6500.0], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6500:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\end{array}
\end{array}
if t < 6500Initial program 93.2%
Simplified94.0%
Taylor expanded in x around inf 55.0%
if 6500 < t Initial program 98.4%
Taylor expanded in b around inf 75.9%
associate-*r/75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in t around inf 75.9%
mul-1-neg75.9%
+-commutative75.9%
distribute-rgt-neg-in75.9%
+-commutative75.9%
distribute-neg-in75.9%
unsub-neg75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in a around 0 70.9%
*-commutative70.9%
Simplified70.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (- b c) -1e-245)
(/
x
(+
x
(*
y
(-
1.0
(*
b
(*
2.0
(+
(*
b
(*
(+ (/ 0.6666666666666666 t) (- -0.8333333333333334 a))
(- (- a -0.8333333333333334) (/ 0.6666666666666666 t))))
(- a (+ (/ 0.6666666666666666 t) -0.8333333333333334)))))))))
(if (<= (- b c) 6e-38)
(/
x
(+
x
(-
y
(*
2.0
(* b (* y (- (+ a 0.8333333333333334) (/ 0.6666666666666666 t))))))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -1e-245) {
tmp = x / (x + (y * (1.0 - (b * (2.0 * ((b * (((0.6666666666666666 / t) + (-0.8333333333333334 - a)) * ((a - -0.8333333333333334) - (0.6666666666666666 / t)))) + (a - ((0.6666666666666666 / t) + -0.8333333333333334))))))));
} else if ((b - c) <= 6e-38) {
tmp = x / (x + (y - (2.0 * (b * (y * ((a + 0.8333333333333334) - (0.6666666666666666 / t)))))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b - c) <= (-1d-245)) then
tmp = x / (x + (y * (1.0d0 - (b * (2.0d0 * ((b * (((0.6666666666666666d0 / t) + ((-0.8333333333333334d0) - a)) * ((a - (-0.8333333333333334d0)) - (0.6666666666666666d0 / t)))) + (a - ((0.6666666666666666d0 / t) + (-0.8333333333333334d0)))))))))
else if ((b - c) <= 6d-38) then
tmp = x / (x + (y - (2.0d0 * (b * (y * ((a + 0.8333333333333334d0) - (0.6666666666666666d0 / t)))))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -1e-245) {
tmp = x / (x + (y * (1.0 - (b * (2.0 * ((b * (((0.6666666666666666 / t) + (-0.8333333333333334 - a)) * ((a - -0.8333333333333334) - (0.6666666666666666 / t)))) + (a - ((0.6666666666666666 / t) + -0.8333333333333334))))))));
} else if ((b - c) <= 6e-38) {
tmp = x / (x + (y - (2.0 * (b * (y * ((a + 0.8333333333333334) - (0.6666666666666666 / t)))))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b - c) <= -1e-245: tmp = x / (x + (y * (1.0 - (b * (2.0 * ((b * (((0.6666666666666666 / t) + (-0.8333333333333334 - a)) * ((a - -0.8333333333333334) - (0.6666666666666666 / t)))) + (a - ((0.6666666666666666 / t) + -0.8333333333333334)))))))) elif (b - c) <= 6e-38: tmp = x / (x + (y - (2.0 * (b * (y * ((a + 0.8333333333333334) - (0.6666666666666666 / t))))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b - c) <= -1e-245) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 - Float64(b * Float64(2.0 * Float64(Float64(b * Float64(Float64(Float64(0.6666666666666666 / t) + Float64(-0.8333333333333334 - a)) * Float64(Float64(a - -0.8333333333333334) - Float64(0.6666666666666666 / t)))) + Float64(a - Float64(Float64(0.6666666666666666 / t) + -0.8333333333333334))))))))); elseif (Float64(b - c) <= 6e-38) tmp = Float64(x / Float64(x + Float64(y - Float64(2.0 * Float64(b * Float64(y * Float64(Float64(a + 0.8333333333333334) - Float64(0.6666666666666666 / t)))))))); 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-245) tmp = x / (x + (y * (1.0 - (b * (2.0 * ((b * (((0.6666666666666666 / t) + (-0.8333333333333334 - a)) * ((a - -0.8333333333333334) - (0.6666666666666666 / t)))) + (a - ((0.6666666666666666 / t) + -0.8333333333333334)))))))); elseif ((b - c) <= 6e-38) tmp = x / (x + (y - (2.0 * (b * (y * ((a + 0.8333333333333334) - (0.6666666666666666 / t))))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b - c), $MachinePrecision], -1e-245], N[(x / N[(x + N[(y * N[(1.0 - N[(b * N[(2.0 * N[(N[(b * N[(N[(N[(0.6666666666666666 / t), $MachinePrecision] + N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision] * N[(N[(a - -0.8333333333333334), $MachinePrecision] - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a - N[(N[(0.6666666666666666 / t), $MachinePrecision] + -0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - c), $MachinePrecision], 6e-38], N[(x / N[(x + N[(y - N[(2.0 * N[(b * N[(y * N[(N[(a + 0.8333333333333334), $MachinePrecision] - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - c \leq -1 \cdot 10^{-245}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 - b \cdot \left(2 \cdot \left(b \cdot \left(\left(\frac{0.6666666666666666}{t} + \left(-0.8333333333333334 - a\right)\right) \cdot \left(\left(a - -0.8333333333333334\right) - \frac{0.6666666666666666}{t}\right)\right) + \left(a - \left(\frac{0.6666666666666666}{t} + -0.8333333333333334\right)\right)\right)\right)\right)}\\
\mathbf{elif}\;b - c \leq 6 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{x + \left(y - 2 \cdot \left(b \cdot \left(y \cdot \left(\left(a + 0.8333333333333334\right) - \frac{0.6666666666666666}{t}\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 b c) < -9.9999999999999993e-246Initial program 96.4%
Taylor expanded in b around inf 70.7%
associate-*r/70.7%
metadata-eval70.7%
Simplified70.7%
Taylor expanded in b around 0 56.1%
distribute-lft-out56.1%
associate--r+56.1%
sub-neg56.1%
associate-*r/56.1%
metadata-eval56.1%
metadata-eval56.1%
associate--r+56.1%
sub-neg56.1%
associate-*r/56.1%
metadata-eval56.1%
metadata-eval56.1%
Simplified56.1%
unpow256.1%
associate--l+56.1%
associate--l+56.1%
Applied egg-rr56.1%
if -9.9999999999999993e-246 < (-.f64 b c) < 5.99999999999999977e-38Initial program 100.0%
Taylor expanded in b around inf 71.2%
associate-*r/71.2%
metadata-eval71.2%
Simplified71.2%
Taylor expanded in b around 0 51.8%
distribute-lft-out51.8%
associate--r+51.8%
sub-neg51.8%
associate-*r/51.8%
metadata-eval51.8%
metadata-eval51.8%
associate--r+51.8%
sub-neg51.8%
associate-*r/51.8%
metadata-eval51.8%
metadata-eval51.8%
Simplified51.8%
Taylor expanded in b around 0 69.4%
associate-*r/69.4%
metadata-eval69.4%
Simplified69.4%
if 5.99999999999999977e-38 < (-.f64 b c) Initial program 93.9%
Simplified95.7%
Taylor expanded in x around inf 66.9%
Final simplification62.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (- b c) 6e-38)
(/
x
(-
x
(*
y
(+
-1.0
(* (* 2.0 b) (- a (+ (/ 0.6666666666666666 t) -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) <= 6e-38) {
tmp = x / (x - (y * (-1.0 + ((2.0 * b) * (a - ((0.6666666666666666 / t) + -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) <= 6d-38) then
tmp = x / (x - (y * ((-1.0d0) + ((2.0d0 * b) * (a - ((0.6666666666666666d0 / t) + (-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) <= 6e-38) {
tmp = x / (x - (y * (-1.0 + ((2.0 * b) * (a - ((0.6666666666666666 / t) + -0.8333333333333334))))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b - c) <= 6e-38: tmp = x / (x - (y * (-1.0 + ((2.0 * b) * (a - ((0.6666666666666666 / t) + -0.8333333333333334)))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b - c) <= 6e-38) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 + Float64(Float64(2.0 * b) * Float64(a - Float64(Float64(0.6666666666666666 / t) + -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) <= 6e-38) tmp = x / (x - (y * (-1.0 + ((2.0 * b) * (a - ((0.6666666666666666 / t) + -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], 6e-38], N[(x / N[(x - N[(y * N[(-1.0 + N[(N[(2.0 * b), $MachinePrecision] * N[(a - N[(N[(0.6666666666666666 / t), $MachinePrecision] + -0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - c \leq 6 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 + \left(2 \cdot b\right) \cdot \left(a - \left(\frac{0.6666666666666666}{t} + -0.8333333333333334\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 b c) < 5.99999999999999977e-38Initial program 97.2%
Taylor expanded in b around inf 70.8%
associate-*r/70.8%
metadata-eval70.8%
Simplified70.8%
Taylor expanded in b around 0 47.9%
associate-*r*47.9%
associate--r+47.9%
sub-neg47.9%
associate-*r/47.9%
metadata-eval47.9%
metadata-eval47.9%
Simplified47.9%
if 5.99999999999999977e-38 < (-.f64 b c) Initial program 93.9%
Simplified95.7%
Taylor expanded in x around inf 66.9%
Final simplification56.3%
(FPCore (x y z t a b c) :precision binary64 (if (<= y 1.46e+85) 1.0 (if (<= y 1.4e+232) (/ x (+ x (+ y (* (* 2.0 c) (* y a))))) 1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= 1.46e+85) {
tmp = 1.0;
} else if (y <= 1.4e+232) {
tmp = x / (x + (y + ((2.0 * c) * (y * a))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (y <= 1.46d+85) then
tmp = 1.0d0
else if (y <= 1.4d+232) then
tmp = x / (x + (y + ((2.0d0 * c) * (y * a))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= 1.46e+85) {
tmp = 1.0;
} else if (y <= 1.4e+232) {
tmp = x / (x + (y + ((2.0 * c) * (y * a))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if y <= 1.46e+85: tmp = 1.0 elif y <= 1.4e+232: tmp = x / (x + (y + ((2.0 * c) * (y * a)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= 1.46e+85) tmp = 1.0; elseif (y <= 1.4e+232) tmp = Float64(x / Float64(x + Float64(y + Float64(Float64(2.0 * c) * Float64(y * a))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (y <= 1.46e+85) tmp = 1.0; elseif (y <= 1.4e+232) tmp = x / (x + (y + ((2.0 * c) * (y * a)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, 1.46e+85], 1.0, If[LessEqual[y, 1.4e+232], N[(x / N[(x + N[(y + N[(N[(2.0 * c), $MachinePrecision] * N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.46 \cdot 10^{+85}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+232}:\\
\;\;\;\;\frac{x}{x + \left(y + \left(2 \cdot c\right) \cdot \left(y \cdot a\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < 1.46e85 or 1.3999999999999999e232 < y Initial program 96.0%
Simplified97.4%
Taylor expanded in x around inf 55.2%
if 1.46e85 < y < 1.3999999999999999e232Initial program 93.1%
Taylor expanded in c around inf 73.3%
associate--l+73.3%
associate-*r/73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in c around 0 67.0%
associate-*r*67.0%
associate-*r/67.0%
metadata-eval67.0%
+-commutative67.0%
associate--l+67.0%
sub-neg67.0%
distribute-neg-frac67.0%
metadata-eval67.0%
Simplified67.0%
Taylor expanded in a around inf 63.5%
(FPCore (x y z t a b c) :precision binary64 (if (<= y 5.4e+87) 1.0 (if (<= y 1.55e+234) (/ x (- x (* y (- -1.0 (* 2.0 (* a c)))))) 1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= 5.4e+87) {
tmp = 1.0;
} else if (y <= 1.55e+234) {
tmp = x / (x - (y * (-1.0 - (2.0 * (a * c)))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (y <= 5.4d+87) then
tmp = 1.0d0
else if (y <= 1.55d+234) then
tmp = x / (x - (y * ((-1.0d0) - (2.0d0 * (a * c)))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= 5.4e+87) {
tmp = 1.0;
} else if (y <= 1.55e+234) {
tmp = x / (x - (y * (-1.0 - (2.0 * (a * c)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if y <= 5.4e+87: tmp = 1.0 elif y <= 1.55e+234: tmp = x / (x - (y * (-1.0 - (2.0 * (a * c))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= 5.4e+87) tmp = 1.0; elseif (y <= 1.55e+234) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(2.0 * Float64(a * c)))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (y <= 5.4e+87) tmp = 1.0; elseif (y <= 1.55e+234) tmp = x / (x - (y * (-1.0 - (2.0 * (a * c))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, 5.4e+87], 1.0, If[LessEqual[y, 1.55e+234], N[(x / N[(x - N[(y * N[(-1.0 - N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.4 \cdot 10^{+87}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+234}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - 2 \cdot \left(a \cdot c\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < 5.40000000000000013e87 or 1.54999999999999995e234 < y Initial program 96.1%
Simplified97.4%
Taylor expanded in x around inf 55.0%
if 5.40000000000000013e87 < y < 1.54999999999999995e234Initial program 92.9%
Taylor expanded in c around inf 75.8%
associate--l+75.8%
associate-*r/75.8%
metadata-eval75.8%
Simplified75.8%
Taylor expanded in a around inf 65.3%
Taylor expanded in a around 0 65.4%
Final simplification56.1%
(FPCore (x y z t a b c) :precision binary64 (if (<= y 2.9e+84) 1.0 (/ x (- x (* y (- -1.0 (* (+ a 0.8333333333333334) (* b -2.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= 2.9e+84) {
tmp = 1.0;
} else {
tmp = x / (x - (y * (-1.0 - ((a + 0.8333333333333334) * (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 (y <= 2.9d+84) then
tmp = 1.0d0
else
tmp = x / (x - (y * ((-1.0d0) - ((a + 0.8333333333333334d0) * (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 (y <= 2.9e+84) {
tmp = 1.0;
} else {
tmp = x / (x - (y * (-1.0 - ((a + 0.8333333333333334) * (b * -2.0)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if y <= 2.9e+84: tmp = 1.0 else: tmp = x / (x - (y * (-1.0 - ((a + 0.8333333333333334) * (b * -2.0))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= 2.9e+84) tmp = 1.0; else tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(Float64(a + 0.8333333333333334) * Float64(b * -2.0)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (y <= 2.9e+84) tmp = 1.0; else tmp = x / (x - (y * (-1.0 - ((a + 0.8333333333333334) * (b * -2.0))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, 2.9e+84], 1.0, N[(x / N[(x - N[(y * N[(-1.0 - N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(b * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.9 \cdot 10^{+84}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - \left(a + 0.8333333333333334\right) \cdot \left(b \cdot -2\right)\right)}\\
\end{array}
\end{array}
if y < 2.89999999999999989e84Initial program 95.9%
Simplified97.3%
Taylor expanded in x around inf 54.3%
if 2.89999999999999989e84 < y Initial program 94.7%
Taylor expanded in b around inf 79.7%
associate-*r/79.7%
metadata-eval79.7%
Simplified79.7%
Taylor expanded in t around inf 72.0%
mul-1-neg72.0%
+-commutative72.0%
distribute-rgt-neg-in72.0%
+-commutative72.0%
distribute-neg-in72.0%
unsub-neg72.0%
metadata-eval72.0%
Simplified72.0%
Taylor expanded in b around 0 59.5%
associate-*r*59.5%
*-commutative59.5%
Simplified59.5%
Final simplification55.0%
(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 95.7%
Simplified96.9%
Taylor expanded in x around inf 52.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* z (sqrt (+ t a)))) (t_2 (- a (/ 5.0 6.0))))
(if (< t -2.118326644891581e-50)
(/
x
(+
x
(* y (exp (* 2.0 (- (+ (* a c) (* 0.8333333333333334 c)) (* a b)))))))
(if (< t 5.196588770651547e-123)
(/
x
(+
x
(*
y
(exp
(*
2.0
(/
(-
(* t_1 (* (* 3.0 t) t_2))
(*
(- (* (+ (/ 5.0 6.0) a) (* 3.0 t)) 2.0)
(* t_2 (* (- b c) t))))
(* (* (* t t) 3.0) t_2)))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ t_1 t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = z * sqrt((t + a));
double t_2 = a - (5.0 / 6.0);
double tmp;
if (t < -2.118326644891581e-50) {
tmp = x / (x + (y * exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b))))));
} else if (t < 5.196588770651547e-123) {
tmp = x / (x + (y * exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * sqrt((t + a))
t_2 = a - (5.0d0 / 6.0d0)
if (t < (-2.118326644891581d-50)) then
tmp = x / (x + (y * exp((2.0d0 * (((a * c) + (0.8333333333333334d0 * c)) - (a * b))))))
else if (t < 5.196588770651547d-123) then
tmp = x / (x + (y * exp((2.0d0 * (((t_1 * ((3.0d0 * t) * t_2)) - (((((5.0d0 / 6.0d0) + a) * (3.0d0 * t)) - 2.0d0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0d0) * t_2))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((t_1 / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = z * Math.sqrt((t + a));
double t_2 = a - (5.0 / 6.0);
double tmp;
if (t < -2.118326644891581e-50) {
tmp = x / (x + (y * Math.exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b))))));
} else if (t < 5.196588770651547e-123) {
tmp = x / (x + (y * Math.exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = z * math.sqrt((t + a)) t_2 = a - (5.0 / 6.0) tmp = 0 if t < -2.118326644891581e-50: tmp = x / (x + (y * math.exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b)))))) elif t < 5.196588770651547e-123: tmp = x / (x + (y * math.exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2)))))) else: tmp = x / (x + (y * math.exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(z * sqrt(Float64(t + a))) t_2 = Float64(a - Float64(5.0 / 6.0)) tmp = 0.0 if (t < -2.118326644891581e-50) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(a * c) + Float64(0.8333333333333334 * c)) - Float64(a * b))))))); elseif (t < 5.196588770651547e-123) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(t_1 * Float64(Float64(3.0 * t) * t_2)) - Float64(Float64(Float64(Float64(Float64(5.0 / 6.0) + a) * Float64(3.0 * t)) - 2.0) * Float64(t_2 * Float64(Float64(b - c) * t)))) / Float64(Float64(Float64(t * t) * 3.0) * t_2))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(t_1 / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = z * sqrt((t + a)); t_2 = a - (5.0 / 6.0); tmp = 0.0; if (t < -2.118326644891581e-50) tmp = x / (x + (y * exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b)))))); elseif (t < 5.196588770651547e-123) tmp = x / (x + (y * exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2)))))); else tmp = x / (x + (y * exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a - N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -2.118326644891581e-50], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(a * c), $MachinePrecision] + N[(0.8333333333333334 * c), $MachinePrecision]), $MachinePrecision] - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[t, 5.196588770651547e-123], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(t$95$1 * N[(N[(3.0 * t), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(N[(5.0 / 6.0), $MachinePrecision] + a), $MachinePrecision] * N[(3.0 * t), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision] * N[(t$95$2 * N[(N[(b - c), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(t * t), $MachinePrecision] * 3.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(t$95$1 / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \sqrt{t + a}\\
t_2 := a - \frac{5}{6}\\
\mathbf{if}\;t < -2.118326644891581 \cdot 10^{-50}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a \cdot c + 0.8333333333333334 \cdot c\right) - a \cdot b\right)}}\\
\mathbf{elif}\;t < 5.196588770651547 \cdot 10^{-123}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{t\_1 \cdot \left(\left(3 \cdot t\right) \cdot t\_2\right) - \left(\left(\frac{5}{6} + a\right) \cdot \left(3 \cdot t\right) - 2\right) \cdot \left(t\_2 \cdot \left(\left(b - c\right) \cdot t\right)\right)}{\left(\left(t \cdot t\right) \cdot 3\right) \cdot t\_2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{t\_1}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\\
\end{array}
\end{array}
herbie shell --seed 2024170
(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)))))))))))