
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ 2.0 (* t 3.0))) (t_2 (sqrt (+ t a))))
(if (<=
(+ (/ (* z t_2) t) (* (- b c) (- t_1 (+ a 0.8333333333333334))))
INFINITY)
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(+ (* z (/ t_2 t)) (* (- b c) (- (- t_1 0.8333333333333334) a)))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* (+ a (- 0.8333333333333334 (/ 0.6666666666666666 t))) c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 2.0 / (t * 3.0);
double t_2 = sqrt((t + a));
double tmp;
if ((((z * t_2) / t) + ((b - c) * (t_1 - (a + 0.8333333333333334)))) <= ((double) INFINITY)) {
tmp = x / (x + (y * pow(exp(2.0), ((z * (t_2 / t)) + ((b - c) * ((t_1 - 0.8333333333333334) - a))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 2.0 / (t * 3.0);
double t_2 = Math.sqrt((t + a));
double tmp;
if ((((z * t_2) / t) + ((b - c) * (t_1 - (a + 0.8333333333333334)))) <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.pow(Math.exp(2.0), ((z * (t_2 / t)) + ((b - c) * ((t_1 - 0.8333333333333334) - a))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 2.0 / (t * 3.0) t_2 = math.sqrt((t + a)) tmp = 0 if (((z * t_2) / t) + ((b - c) * (t_1 - (a + 0.8333333333333334)))) <= math.inf: tmp = x / (x + (y * math.pow(math.exp(2.0), ((z * (t_2 / t)) + ((b - c) * ((t_1 - 0.8333333333333334) - a)))))) else: tmp = x / (x + (y * math.exp((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(2.0 / Float64(t * 3.0)) t_2 = sqrt(Float64(t + a)) tmp = 0.0 if (Float64(Float64(Float64(z * t_2) / t) + Float64(Float64(b - c) * Float64(t_1 - Float64(a + 0.8333333333333334)))) <= Inf) tmp = Float64(x / Float64(x + Float64(y * (exp(2.0) ^ Float64(Float64(z * Float64(t_2 / t)) + Float64(Float64(b - c) * Float64(Float64(t_1 - 0.8333333333333334) - a))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + Float64(0.8333333333333334 - Float64(0.6666666666666666 / t))) * c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 2.0 / (t * 3.0); t_2 = sqrt((t + a)); tmp = 0.0; if ((((z * t_2) / t) + ((b - c) * (t_1 - (a + 0.8333333333333334)))) <= Inf) tmp = x / (x + (y * (exp(2.0) ^ ((z * (t_2 / t)) + ((b - c) * ((t_1 - 0.8333333333333334) - a)))))); else tmp = x / (x + (y * exp((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(z * t$95$2), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(t$95$1 - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x / N[(x + N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(z * N[(t$95$2 / t), $MachinePrecision]), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(t$95$1 - 0.8333333333333334), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(a + N[(0.8333333333333334 - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2}{t \cdot 3}\\
t_2 := \sqrt{t + a}\\
\mathbf{if}\;\frac{z \cdot t\_2}{t} + \left(b - c\right) \cdot \left(t\_1 - \left(a + 0.8333333333333334\right)\right) \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{t\_2}{t} + \left(b - c\right) \cdot \left(\left(t\_1 - 0.8333333333333334\right) - a\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + \left(0.8333333333333334 - \frac{0.6666666666666666}{t}\right)\right) \cdot c\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 97.6%
exp-prod97.6%
Simplified98.4%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) Initial program 0.0%
Taylor expanded in c around inf 71.0%
+-commutative71.0%
associate-*r/71.0%
metadata-eval71.0%
associate-+r-71.0%
Simplified71.0%
Final simplification97.3%
(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 93.8%
Simplified97.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a 0.8333333333333334))))))
(if (<= t_1 INFINITY)
(/ x (+ x (* y (exp (* 2.0 t_1)))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* (+ a (- 0.8333333333333334 (/ 0.6666666666666666 t))) c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * exp((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * Math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((z * math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))) tmp = 0 if t_1 <= math.inf: tmp = x / (x + (y * math.exp((2.0 * t_1)))) else: tmp = x / (x + (y * math.exp((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c))))) 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(a + Float64(0.8333333333333334 - Float64(0.6666666666666666 / t))) * c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))); tmp = 0.0; if (t_1 <= Inf) tmp = x / (x + (y * exp((2.0 * t_1)))); else tmp = x / (x + (y * exp((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c))))); 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[(a + N[(0.8333333333333334 - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + 0.8333333333333334\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot t\_1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + \left(0.8333333333333334 - \frac{0.6666666666666666}{t}\right)\right) \cdot c\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 97.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 71.0%
+-commutative71.0%
associate-*r/71.0%
metadata-eval71.0%
associate-+r-71.0%
Simplified71.0%
Final simplification96.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= a -5.2e-16)
(/ x (+ x (* y (exp (* 2.0 (* a c))))))
(if (<= a 2.6e-247)
1.0
(if (<= a 1.25e-28)
(/ x (+ x (* y (exp (* (/ c t) -1.3333333333333333)))))
(if (<= a 5.5e+70) 1.0 (/ x (+ x (* y (exp (* 2.0 (* a (- b))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -5.2e-16) {
tmp = x / (x + (y * exp((2.0 * (a * c)))));
} else if (a <= 2.6e-247) {
tmp = 1.0;
} else if (a <= 1.25e-28) {
tmp = x / (x + (y * exp(((c / t) * -1.3333333333333333))));
} else if (a <= 5.5e+70) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp((2.0 * (a * -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 (a <= (-5.2d-16)) then
tmp = x / (x + (y * exp((2.0d0 * (a * c)))))
else if (a <= 2.6d-247) then
tmp = 1.0d0
else if (a <= 1.25d-28) then
tmp = x / (x + (y * exp(((c / t) * (-1.3333333333333333d0)))))
else if (a <= 5.5d+70) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp((2.0d0 * (a * -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 (a <= -5.2e-16) {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
} else if (a <= 2.6e-247) {
tmp = 1.0;
} else if (a <= 1.25e-28) {
tmp = x / (x + (y * Math.exp(((c / t) * -1.3333333333333333))));
} else if (a <= 5.5e+70) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((2.0 * (a * -b)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if a <= -5.2e-16: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) elif a <= 2.6e-247: tmp = 1.0 elif a <= 1.25e-28: tmp = x / (x + (y * math.exp(((c / t) * -1.3333333333333333)))) elif a <= 5.5e+70: tmp = 1.0 else: tmp = x / (x + (y * math.exp((2.0 * (a * -b))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= -5.2e-16) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); elseif (a <= 2.6e-247) tmp = 1.0; elseif (a <= 1.25e-28) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c / t) * -1.3333333333333333))))); elseif (a <= 5.5e+70) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(-b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (a <= -5.2e-16) tmp = x / (x + (y * exp((2.0 * (a * c))))); elseif (a <= 2.6e-247) tmp = 1.0; elseif (a <= 1.25e-28) tmp = x / (x + (y * exp(((c / t) * -1.3333333333333333)))); elseif (a <= 5.5e+70) tmp = 1.0; else tmp = x / (x + (y * exp((2.0 * (a * -b))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, -5.2e-16], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.6e-247], 1.0, If[LessEqual[a, 1.25e-28], N[(x / N[(x + N[(y * N[Exp[N[(N[(c / t), $MachinePrecision] * -1.3333333333333333), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e+70], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * (-b)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-247}:\\
\;\;\;\;1\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-28}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\frac{c}{t} \cdot -1.3333333333333333}}\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{+70}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(-b\right)\right)}}\\
\end{array}
\end{array}
if a < -5.1999999999999997e-16Initial program 95.6%
Taylor expanded in c around inf 86.8%
+-commutative86.8%
associate-*r/86.8%
metadata-eval86.8%
associate-+r-86.8%
Simplified86.8%
Taylor expanded in a around inf 82.4%
if -5.1999999999999997e-16 < a < 2.6e-247 or 1.25e-28 < a < 5.49999999999999986e70Initial program 97.9%
Simplified100.0%
Taylor expanded in x around inf 65.6%
if 2.6e-247 < a < 1.25e-28Initial program 89.9%
Taylor expanded in t around 0 82.2%
Taylor expanded in z around 0 70.4%
Taylor expanded in b around 0 70.4%
*-commutative70.4%
Simplified70.4%
if 5.49999999999999986e70 < a Initial program 91.3%
Taylor expanded in b around inf 69.6%
associate-*r/69.6%
metadata-eval69.6%
+-commutative69.6%
Simplified69.6%
Taylor expanded in a around inf 67.5%
mul-1-neg67.5%
Simplified67.5%
Final simplification68.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 2.0 (* a c))))))))
(if (<= a -5.2e-16)
t_1
(if (<= a 8e-248)
1.0
(if (<= a 1.25e-28)
(/ x (+ x (* y (exp (* (/ c t) -1.3333333333333333)))))
(if (<= a 1.75e+105) 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 (a <= -5.2e-16) {
tmp = t_1;
} else if (a <= 8e-248) {
tmp = 1.0;
} else if (a <= 1.25e-28) {
tmp = x / (x + (y * exp(((c / t) * -1.3333333333333333))));
} else if (a <= 1.75e+105) {
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 (a <= (-5.2d-16)) then
tmp = t_1
else if (a <= 8d-248) then
tmp = 1.0d0
else if (a <= 1.25d-28) then
tmp = x / (x + (y * exp(((c / t) * (-1.3333333333333333d0)))))
else if (a <= 1.75d+105) 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 (a <= -5.2e-16) {
tmp = t_1;
} else if (a <= 8e-248) {
tmp = 1.0;
} else if (a <= 1.25e-28) {
tmp = x / (x + (y * Math.exp(((c / t) * -1.3333333333333333))));
} else if (a <= 1.75e+105) {
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 a <= -5.2e-16: tmp = t_1 elif a <= 8e-248: tmp = 1.0 elif a <= 1.25e-28: tmp = x / (x + (y * math.exp(((c / t) * -1.3333333333333333)))) elif a <= 1.75e+105: 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 (a <= -5.2e-16) tmp = t_1; elseif (a <= 8e-248) tmp = 1.0; elseif (a <= 1.25e-28) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c / t) * -1.3333333333333333))))); elseif (a <= 1.75e+105) 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 (a <= -5.2e-16) tmp = t_1; elseif (a <= 8e-248) tmp = 1.0; elseif (a <= 1.25e-28) tmp = x / (x + (y * exp(((c / t) * -1.3333333333333333)))); elseif (a <= 1.75e+105) 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[a, -5.2e-16], t$95$1, If[LessEqual[a, 8e-248], 1.0, If[LessEqual[a, 1.25e-28], N[(x / N[(x + N[(y * N[Exp[N[(N[(c / t), $MachinePrecision] * -1.3333333333333333), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.75e+105], 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}\;a \leq -5.2 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 8 \cdot 10^{-248}:\\
\;\;\;\;1\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-28}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\frac{c}{t} \cdot -1.3333333333333333}}\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{+105}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.1999999999999997e-16 or 1.74999999999999996e105 < a Initial program 93.7%
Taylor expanded in c around inf 75.5%
+-commutative75.5%
associate-*r/75.5%
metadata-eval75.5%
associate-+r-75.5%
Simplified75.5%
Taylor expanded in a around inf 69.3%
if -5.1999999999999997e-16 < a < 7.99999999999999984e-248 or 1.25e-28 < a < 1.74999999999999996e105Initial program 95.6%
Simplified98.2%
Taylor expanded in x around inf 66.3%
if 7.99999999999999984e-248 < a < 1.25e-28Initial program 89.9%
Taylor expanded in t around 0 82.2%
Taylor expanded in z around 0 70.4%
Taylor expanded in b around 0 70.4%
*-commutative70.4%
Simplified70.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 2.0 (* a c))))))))
(if (<= a -0.85)
t_1
(if (<= a 2.3e-255)
1.0
(if (<= a 5.4e-138)
(/
x
(+
x
(*
a
(-
(*
y
(/
(+
(/
(* 2.0 (* b (+ 0.6666666666666666 (* t -0.8333333333333334))))
t)
1.0)
a))
(* 2.0 (* y b))))))
(if (<= a 1.35e+105) 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 (a <= -0.85) {
tmp = t_1;
} else if (a <= 2.3e-255) {
tmp = 1.0;
} else if (a <= 5.4e-138) {
tmp = x / (x + (a * ((y * ((((2.0 * (b * (0.6666666666666666 + (t * -0.8333333333333334)))) / t) + 1.0) / a)) - (2.0 * (y * b)))));
} else if (a <= 1.35e+105) {
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 (a <= (-0.85d0)) then
tmp = t_1
else if (a <= 2.3d-255) then
tmp = 1.0d0
else if (a <= 5.4d-138) then
tmp = x / (x + (a * ((y * ((((2.0d0 * (b * (0.6666666666666666d0 + (t * (-0.8333333333333334d0))))) / t) + 1.0d0) / a)) - (2.0d0 * (y * b)))))
else if (a <= 1.35d+105) 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 (a <= -0.85) {
tmp = t_1;
} else if (a <= 2.3e-255) {
tmp = 1.0;
} else if (a <= 5.4e-138) {
tmp = x / (x + (a * ((y * ((((2.0 * (b * (0.6666666666666666 + (t * -0.8333333333333334)))) / t) + 1.0) / a)) - (2.0 * (y * b)))));
} else if (a <= 1.35e+105) {
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 a <= -0.85: tmp = t_1 elif a <= 2.3e-255: tmp = 1.0 elif a <= 5.4e-138: tmp = x / (x + (a * ((y * ((((2.0 * (b * (0.6666666666666666 + (t * -0.8333333333333334)))) / t) + 1.0) / a)) - (2.0 * (y * b))))) elif a <= 1.35e+105: 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 (a <= -0.85) tmp = t_1; elseif (a <= 2.3e-255) tmp = 1.0; elseif (a <= 5.4e-138) tmp = Float64(x / Float64(x + Float64(a * Float64(Float64(y * Float64(Float64(Float64(Float64(2.0 * Float64(b * Float64(0.6666666666666666 + Float64(t * -0.8333333333333334)))) / t) + 1.0) / a)) - Float64(2.0 * Float64(y * b)))))); elseif (a <= 1.35e+105) 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 (a <= -0.85) tmp = t_1; elseif (a <= 2.3e-255) tmp = 1.0; elseif (a <= 5.4e-138) tmp = x / (x + (a * ((y * ((((2.0 * (b * (0.6666666666666666 + (t * -0.8333333333333334)))) / t) + 1.0) / a)) - (2.0 * (y * b))))); elseif (a <= 1.35e+105) 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[a, -0.85], t$95$1, If[LessEqual[a, 2.3e-255], 1.0, If[LessEqual[a, 5.4e-138], N[(x / N[(x + N[(a * N[(N[(y * N[(N[(N[(N[(2.0 * N[(b * N[(0.6666666666666666 + N[(t * -0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e+105], 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}\;a \leq -0.85:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{-255}:\\
\;\;\;\;1\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{-138}:\\
\;\;\;\;\frac{x}{x + a \cdot \left(y \cdot \frac{\frac{2 \cdot \left(b \cdot \left(0.6666666666666666 + t \cdot -0.8333333333333334\right)\right)}{t} + 1}{a} - 2 \cdot \left(y \cdot b\right)\right)}\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{+105}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -0.849999999999999978 or 1.35000000000000008e105 < a Initial program 93.7%
Taylor expanded in c around inf 75.2%
+-commutative75.2%
associate-*r/75.2%
metadata-eval75.2%
associate-+r-75.2%
Simplified75.2%
Taylor expanded in a around inf 70.0%
if -0.849999999999999978 < a < 2.2999999999999999e-255 or 5.40000000000000057e-138 < a < 1.35000000000000008e105Initial program 95.6%
Simplified98.6%
Taylor expanded in x around inf 63.7%
if 2.2999999999999999e-255 < a < 5.40000000000000057e-138Initial program 84.9%
Taylor expanded in b around inf 70.2%
associate-*r/70.2%
metadata-eval70.2%
+-commutative70.2%
Simplified70.2%
Taylor expanded in b around 0 48.1%
Taylor expanded in t around 0 48.1%
mul-1-neg48.1%
*-commutative48.1%
distribute-lft-neg-in48.1%
distribute-neg-in48.1%
metadata-eval48.1%
unsub-neg48.1%
Simplified48.1%
Taylor expanded in a around -inf 81.2%
mul-1-neg81.2%
*-commutative81.2%
distribute-rgt-neg-in81.2%
Simplified81.2%
Final simplification67.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(* 2.0 (* (+ a (- 0.8333333333333334 (/ 0.6666666666666666 t))) c))))
(if (<= c -3300.0)
(/ x (+ x (* y (exp t_1))))
(if (<= c 1.06e-38)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/ x (+ x (* y (pow E t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c);
double tmp;
if (c <= -3300.0) {
tmp = x / (x + (y * exp(t_1)));
} else if (c <= 1.06e-38) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * pow(((double) M_E), t_1)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c);
double tmp;
if (c <= -3300.0) {
tmp = x / (x + (y * Math.exp(t_1)));
} else if (c <= 1.06e-38) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * Math.pow(Math.E, t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c) tmp = 0 if c <= -3300.0: tmp = x / (x + (y * math.exp(t_1))) elif c <= 1.06e-38: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) else: tmp = x / (x + (y * math.pow(math.e, t_1))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(2.0 * Float64(Float64(a + Float64(0.8333333333333334 - Float64(0.6666666666666666 / t))) * c)) tmp = 0.0 if (c <= -3300.0) tmp = Float64(x / Float64(x + Float64(y * exp(t_1)))); elseif (c <= 1.06e-38) 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(1) ^ t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c); tmp = 0.0; if (c <= -3300.0) tmp = x / (x + (y * exp(t_1))); elseif (c <= 1.06e-38) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); else tmp = x / (x + (y * (2.71828182845904523536 ^ t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(2.0 * N[(N[(a + N[(0.8333333333333334 - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3300.0], N[(x / N[(x + N[(y * N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.06e-38], 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[Power[E, t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(\left(a + \left(0.8333333333333334 - \frac{0.6666666666666666}{t}\right)\right) \cdot c\right)\\
\mathbf{if}\;c \leq -3300:\\
\;\;\;\;\frac{x}{x + y \cdot e^{t\_1}}\\
\mathbf{elif}\;c \leq 1.06 \cdot 10^{-38}:\\
\;\;\;\;\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}^{t\_1}}\\
\end{array}
\end{array}
if c < -3300Initial program 94.4%
Taylor expanded in c around inf 90.3%
+-commutative90.3%
associate-*r/90.3%
metadata-eval90.3%
associate-+r-90.3%
Simplified90.3%
if -3300 < c < 1.06000000000000001e-38Initial program 96.5%
Taylor expanded in b around inf 78.5%
associate-*r/78.5%
metadata-eval78.5%
+-commutative78.5%
Simplified78.5%
if 1.06000000000000001e-38 < c Initial program 88.8%
Taylor expanded in c around inf 93.2%
+-commutative93.2%
associate-*r/93.2%
metadata-eval93.2%
associate-+r-93.2%
Simplified93.2%
*-un-lft-identity93.2%
exp-prod93.2%
associate-*r*93.2%
associate-+r-93.2%
Applied egg-rr93.2%
exp-1-e93.2%
associate-*l*93.2%
associate--l+93.2%
Simplified93.2%
Final simplification85.8%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= c -8000000000.0) (not (<= c 1.06e-38)))
(/
x
(+
x
(*
y
(exp
(* 2.0 (* (+ a (- 0.8333333333333334 (/ 0.6666666666666666 t))) c))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((c <= -8000000000.0) || !(c <= 1.06e-38)) {
tmp = x / (x + (y * exp((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c)))));
} else {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((c <= (-8000000000.0d0)) .or. (.not. (c <= 1.06d-38))) then
tmp = x / (x + (y * exp((2.0d0 * ((a + (0.8333333333333334d0 - (0.6666666666666666d0 / t))) * c)))))
else
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((c <= -8000000000.0) || !(c <= 1.06e-38)) {
tmp = x / (x + (y * Math.exp((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (c <= -8000000000.0) or not (c <= 1.06e-38): tmp = x / (x + (y * math.exp((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c))))) else: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((c <= -8000000000.0) || !(c <= 1.06e-38)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + Float64(0.8333333333333334 - Float64(0.6666666666666666 / t))) * c)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((c <= -8000000000.0) || ~((c <= 1.06e-38))) tmp = x / (x + (y * exp((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c))))); else tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[c, -8000000000.0], N[Not[LessEqual[c, 1.06e-38]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(a + N[(0.8333333333333334 - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -8000000000 \lor \neg \left(c \leq 1.06 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + \left(0.8333333333333334 - \frac{0.6666666666666666}{t}\right)\right) \cdot c\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\end{array}
\end{array}
if c < -8e9 or 1.06000000000000001e-38 < c Initial program 91.6%
Taylor expanded in c around inf 91.8%
+-commutative91.8%
associate-*r/91.8%
metadata-eval91.8%
associate-+r-91.8%
Simplified91.8%
if -8e9 < c < 1.06000000000000001e-38Initial program 96.5%
Taylor expanded in b around inf 78.5%
associate-*r/78.5%
metadata-eval78.5%
+-commutative78.5%
Simplified78.5%
Final simplification85.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 1.05e-44)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 9.2e+117)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/ x (+ x (* y (exp (* 2.0 (* c (+ a 0.8333333333333334))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.05e-44) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 9.2e+117) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * exp((2.0 * (c * (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 <= 1.05d-44) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 9.2d+117) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else
tmp = x / (x + (y * exp((2.0d0 * (c * (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 <= 1.05e-44) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 9.2e+117) {
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 * (a + 0.8333333333333334))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 1.05e-44: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 9.2e+117: 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 * (a + 0.8333333333333334)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 1.05e-44) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 9.2e+117) 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(a + 0.8333333333333334))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 1.05e-44) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 9.2e+117) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); else tmp = x / (x + (y * exp((2.0 * (c * (a + 0.8333333333333334)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 1.05e-44], 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.2e+117], 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[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.05 \cdot 10^{-44}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{+117}:\\
\;\;\;\;\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(a + 0.8333333333333334\right)\right)}}\\
\end{array}
\end{array}
if t < 1.05000000000000001e-44Initial program 93.5%
Taylor expanded in t around 0 81.7%
Taylor expanded in z around 0 79.0%
if 1.05000000000000001e-44 < t < 9.19999999999999951e117Initial program 96.5%
Taylor expanded in b around inf 76.3%
associate-*r/76.3%
metadata-eval76.3%
+-commutative76.3%
Simplified76.3%
if 9.19999999999999951e117 < t Initial program 92.2%
Taylor expanded in c around inf 78.1%
+-commutative78.1%
associate-*r/78.1%
metadata-eval78.1%
associate-+r-78.1%
Simplified78.1%
Taylor expanded in t around inf 78.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 1.3e-44)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 1.65e+19)
(/ x (+ x (* y (exp (* 2.0 (* a (- b)))))))
(/ x (+ x (* y (exp (* 2.0 (* c (+ a 0.8333333333333334))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.3e-44) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 1.65e+19) {
tmp = x / (x + (y * exp((2.0 * (a * -b)))));
} else {
tmp = x / (x + (y * exp((2.0 * (c * (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 <= 1.3d-44) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 1.65d+19) then
tmp = x / (x + (y * exp((2.0d0 * (a * -b)))))
else
tmp = x / (x + (y * exp((2.0d0 * (c * (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 <= 1.3e-44) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 1.65e+19) {
tmp = x / (x + (y * Math.exp((2.0 * (a * -b)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (c * (a + 0.8333333333333334))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 1.3e-44: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 1.65e+19: tmp = x / (x + (y * math.exp((2.0 * (a * -b))))) else: tmp = x / (x + (y * math.exp((2.0 * (c * (a + 0.8333333333333334)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 1.3e-44) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 1.65e+19) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(-b))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + 0.8333333333333334))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 1.3e-44) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 1.65e+19) tmp = x / (x + (y * exp((2.0 * (a * -b))))); else tmp = x / (x + (y * exp((2.0 * (c * (a + 0.8333333333333334)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 1.3e-44], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+19], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * (-b)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.3 \cdot 10^{-44}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+19}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(-b\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + 0.8333333333333334\right)\right)}}\\
\end{array}
\end{array}
if t < 1.2999999999999999e-44Initial program 93.5%
Taylor expanded in t around 0 81.7%
Taylor expanded in z around 0 79.0%
if 1.2999999999999999e-44 < t < 1.65e19Initial program 96.0%
Taylor expanded in b around inf 65.1%
associate-*r/65.1%
metadata-eval65.1%
+-commutative65.1%
Simplified65.1%
Taylor expanded in a around inf 69.0%
mul-1-neg69.0%
Simplified69.0%
if 1.65e19 < t Initial program 93.6%
Taylor expanded in c around inf 78.4%
+-commutative78.4%
associate-*r/78.4%
metadata-eval78.4%
associate-+r-78.4%
Simplified78.4%
Taylor expanded in t around inf 78.4%
Final simplification77.7%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 1.7e-13) (/ 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.7e-13) {
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.7d-13) 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.7e-13) {
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.7e-13: 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.7e-13) 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.7e-13) 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.7e-13], 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.7 \cdot 10^{-13}:\\
\;\;\;\;\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.70000000000000008e-13Initial program 93.5%
Taylor expanded in t around 0 76.4%
Taylor expanded in z around 0 76.2%
if 1.70000000000000008e-13 < t Initial program 94.2%
Taylor expanded in b around inf 71.5%
associate-*r/71.5%
metadata-eval71.5%
+-commutative71.5%
Simplified71.5%
Taylor expanded in t around inf 71.5%
distribute-lft-in71.5%
metadata-eval71.5%
metadata-eval71.5%
mul-1-neg71.5%
unsub-neg71.5%
metadata-eval71.5%
Simplified71.5%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 5e-45) (/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t)))))) (/ x (+ x (* y (exp (* 2.0 (* a (- b)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 5e-45) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * (a * -b)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 5d-45) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * (a * -b)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 5e-45) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (a * -b)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 5e-45: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp((2.0 * (a * -b))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 5e-45) 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(a * Float64(-b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 5e-45) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp((2.0 * (a * -b))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 5e-45], 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[(a * (-b)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{-45}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(-b\right)\right)}}\\
\end{array}
\end{array}
if t < 4.99999999999999976e-45Initial program 93.5%
Taylor expanded in t around 0 81.7%
Taylor expanded in z around 0 79.0%
if 4.99999999999999976e-45 < t Initial program 94.1%
Taylor expanded in b around inf 70.1%
associate-*r/70.1%
metadata-eval70.1%
+-commutative70.1%
Simplified70.1%
Taylor expanded in a around inf 61.4%
mul-1-neg61.4%
Simplified61.4%
Final simplification69.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c 4.8e-46)
1.0
(if (<= c 1.35e+93)
(/
x
(+
x
(*
y
(-
1.0
(*
2.0
(*
a
(-
b
(* b (/ (+ (/ 0.6666666666666666 t) -0.8333333333333334) a)))))))))
(/
x
(-
x
(*
y
(-
-1.0
(*
2.0
(/
(* c (- (* t (+ a 0.8333333333333334)) 0.6666666666666666))
t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 4.8e-46) {
tmp = 1.0;
} else if (c <= 1.35e+93) {
tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - (b * (((0.6666666666666666 / t) + -0.8333333333333334) / a))))))));
} else {
tmp = x / (x - (y * (-1.0 - (2.0 * ((c * ((t * (a + 0.8333333333333334)) - 0.6666666666666666)) / t)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= 4.8d-46) then
tmp = 1.0d0
else if (c <= 1.35d+93) then
tmp = x / (x + (y * (1.0d0 - (2.0d0 * (a * (b - (b * (((0.6666666666666666d0 / t) + (-0.8333333333333334d0)) / a))))))))
else
tmp = x / (x - (y * ((-1.0d0) - (2.0d0 * ((c * ((t * (a + 0.8333333333333334d0)) - 0.6666666666666666d0)) / t)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 4.8e-46) {
tmp = 1.0;
} else if (c <= 1.35e+93) {
tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - (b * (((0.6666666666666666 / t) + -0.8333333333333334) / a))))))));
} else {
tmp = x / (x - (y * (-1.0 - (2.0 * ((c * ((t * (a + 0.8333333333333334)) - 0.6666666666666666)) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 4.8e-46: tmp = 1.0 elif c <= 1.35e+93: tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - (b * (((0.6666666666666666 / t) + -0.8333333333333334) / a)))))))) else: tmp = x / (x - (y * (-1.0 - (2.0 * ((c * ((t * (a + 0.8333333333333334)) - 0.6666666666666666)) / t))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 4.8e-46) tmp = 1.0; elseif (c <= 1.35e+93) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 - Float64(2.0 * Float64(a * Float64(b - Float64(b * Float64(Float64(Float64(0.6666666666666666 / t) + -0.8333333333333334) / a))))))))); else tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(2.0 * Float64(Float64(c * Float64(Float64(t * Float64(a + 0.8333333333333334)) - 0.6666666666666666)) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 4.8e-46) tmp = 1.0; elseif (c <= 1.35e+93) tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - (b * (((0.6666666666666666 / t) + -0.8333333333333334) / a)))))))); else tmp = x / (x - (y * (-1.0 - (2.0 * ((c * ((t * (a + 0.8333333333333334)) - 0.6666666666666666)) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 4.8e-46], 1.0, If[LessEqual[c, 1.35e+93], N[(x / N[(x + N[(y * N[(1.0 - N[(2.0 * N[(a * N[(b - N[(b * N[(N[(N[(0.6666666666666666 / t), $MachinePrecision] + -0.8333333333333334), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x - N[(y * N[(-1.0 - N[(2.0 * N[(N[(c * N[(N[(t * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision] - 0.6666666666666666), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 4.8 \cdot 10^{-46}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{+93}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 - 2 \cdot \left(a \cdot \left(b - b \cdot \frac{\frac{0.6666666666666666}{t} + -0.8333333333333334}{a}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - 2 \cdot \frac{c \cdot \left(t \cdot \left(a + 0.8333333333333334\right) - 0.6666666666666666\right)}{t}\right)}\\
\end{array}
\end{array}
if c < 4.80000000000000027e-46Initial program 95.7%
Simplified98.4%
Taylor expanded in x around inf 59.5%
if 4.80000000000000027e-46 < c < 1.35e93Initial program 85.4%
Taylor expanded in b around inf 74.9%
associate-*r/74.9%
metadata-eval74.9%
+-commutative74.9%
Simplified74.9%
Taylor expanded in b around 0 57.1%
Taylor expanded in a around inf 64.2%
+-commutative64.2%
mul-1-neg64.2%
unsub-neg64.2%
associate-/l*64.2%
sub-neg64.2%
associate-*r/64.2%
metadata-eval64.2%
metadata-eval64.2%
Simplified64.2%
if 1.35e93 < c Initial program 91.5%
Taylor expanded in c around inf 95.9%
+-commutative95.9%
associate-*r/95.9%
metadata-eval95.9%
associate-+r-95.9%
Simplified95.9%
Taylor expanded in t around 0 95.9%
fma-define95.9%
associate-*r*95.9%
Simplified95.9%
Taylor expanded in c around 0 69.2%
Final simplification61.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (- b c) -5e+32)
(/
x
(+
x
(*
y
(+
(*
2.0
(/
(+ (* b (* t (- -0.8333333333333334 a))) (* 0.6666666666666666 b))
t))
1.0))))
1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -5e+32) {
tmp = x / (x + (y * ((2.0 * (((b * (t * (-0.8333333333333334 - a))) + (0.6666666666666666 * b)) / t)) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b - c) <= (-5d+32)) then
tmp = x / (x + (y * ((2.0d0 * (((b * (t * ((-0.8333333333333334d0) - a))) + (0.6666666666666666d0 * b)) / t)) + 1.0d0)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -5e+32) {
tmp = x / (x + (y * ((2.0 * (((b * (t * (-0.8333333333333334 - a))) + (0.6666666666666666 * b)) / t)) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b - c) <= -5e+32: tmp = x / (x + (y * ((2.0 * (((b * (t * (-0.8333333333333334 - a))) + (0.6666666666666666 * b)) / t)) + 1.0))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b - c) <= -5e+32) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(2.0 * Float64(Float64(Float64(b * Float64(t * Float64(-0.8333333333333334 - a))) + Float64(0.6666666666666666 * b)) / t)) + 1.0)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b - c) <= -5e+32) tmp = x / (x + (y * ((2.0 * (((b * (t * (-0.8333333333333334 - a))) + (0.6666666666666666 * b)) / t)) + 1.0))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b - c), $MachinePrecision], -5e+32], N[(x / N[(x + N[(y * N[(N[(2.0 * N[(N[(N[(b * N[(t * N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.6666666666666666 * b), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - c \leq -5 \cdot 10^{+32}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(2 \cdot \frac{b \cdot \left(t \cdot \left(-0.8333333333333334 - a\right)\right) + 0.6666666666666666 \cdot b}{t} + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 b c) < -4.9999999999999997e32Initial program 92.1%
Taylor expanded in b around inf 65.5%
associate-*r/65.5%
metadata-eval65.5%
+-commutative65.5%
Simplified65.5%
Taylor expanded in b around 0 45.9%
Taylor expanded in t around 0 55.3%
mul-1-neg55.3%
*-commutative55.3%
distribute-lft-neg-in55.3%
*-commutative55.3%
distribute-lft-neg-in55.3%
distribute-neg-in55.3%
metadata-eval55.3%
unsub-neg55.3%
Simplified55.3%
if -4.9999999999999997e32 < (-.f64 b c) Initial program 94.9%
Simplified97.4%
Taylor expanded in x around inf 64.4%
Final simplification60.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c 9e-46)
1.0
(if (<= c 1.02e+93)
(/
x
(-
x
(*
y
(-
-1.0
(/
(* 2.0 (* b (+ 0.6666666666666666 (* t -0.8333333333333334))))
t)))))
(/
x
(+
x
(*
y
(+
(* 2.0 (* (+ a (- 0.8333333333333334 (/ 0.6666666666666666 t))) c))
1.0)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 9e-46) {
tmp = 1.0;
} else if (c <= 1.02e+93) {
tmp = x / (x - (y * (-1.0 - ((2.0 * (b * (0.6666666666666666 + (t * -0.8333333333333334)))) / t))));
} else {
tmp = x / (x + (y * ((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c)) + 1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= 9d-46) then
tmp = 1.0d0
else if (c <= 1.02d+93) then
tmp = x / (x - (y * ((-1.0d0) - ((2.0d0 * (b * (0.6666666666666666d0 + (t * (-0.8333333333333334d0))))) / t))))
else
tmp = x / (x + (y * ((2.0d0 * ((a + (0.8333333333333334d0 - (0.6666666666666666d0 / t))) * c)) + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 9e-46) {
tmp = 1.0;
} else if (c <= 1.02e+93) {
tmp = x / (x - (y * (-1.0 - ((2.0 * (b * (0.6666666666666666 + (t * -0.8333333333333334)))) / t))));
} else {
tmp = x / (x + (y * ((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c)) + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 9e-46: tmp = 1.0 elif c <= 1.02e+93: tmp = x / (x - (y * (-1.0 - ((2.0 * (b * (0.6666666666666666 + (t * -0.8333333333333334)))) / t)))) else: tmp = x / (x + (y * ((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c)) + 1.0))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 9e-46) tmp = 1.0; elseif (c <= 1.02e+93) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(Float64(2.0 * Float64(b * Float64(0.6666666666666666 + Float64(t * -0.8333333333333334)))) / t))))); else tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(2.0 * Float64(Float64(a + Float64(0.8333333333333334 - Float64(0.6666666666666666 / t))) * c)) + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 9e-46) tmp = 1.0; elseif (c <= 1.02e+93) tmp = x / (x - (y * (-1.0 - ((2.0 * (b * (0.6666666666666666 + (t * -0.8333333333333334)))) / t)))); else tmp = x / (x + (y * ((2.0 * ((a + (0.8333333333333334 - (0.6666666666666666 / t))) * c)) + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 9e-46], 1.0, If[LessEqual[c, 1.02e+93], N[(x / N[(x - N[(y * N[(-1.0 - N[(N[(2.0 * N[(b * N[(0.6666666666666666 + N[(t * -0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[(N[(2.0 * N[(N[(a + N[(0.8333333333333334 - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 9 \cdot 10^{-46}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 1.02 \cdot 10^{+93}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - \frac{2 \cdot \left(b \cdot \left(0.6666666666666666 + t \cdot -0.8333333333333334\right)\right)}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(2 \cdot \left(\left(a + \left(0.8333333333333334 - \frac{0.6666666666666666}{t}\right)\right) \cdot c\right) + 1\right)}\\
\end{array}
\end{array}
if c < 9.00000000000000001e-46Initial program 95.7%
Simplified98.4%
Taylor expanded in x around inf 59.5%
if 9.00000000000000001e-46 < c < 1.0200000000000001e93Initial program 85.4%
Taylor expanded in b around inf 74.9%
associate-*r/74.9%
metadata-eval74.9%
+-commutative74.9%
Simplified74.9%
Taylor expanded in b around 0 57.1%
Taylor expanded in t around 0 60.7%
mul-1-neg60.7%
*-commutative60.7%
distribute-lft-neg-in60.7%
distribute-neg-in60.7%
metadata-eval60.7%
unsub-neg60.7%
Simplified60.7%
Taylor expanded in a around 0 60.8%
associate-*r/60.8%
*-commutative60.8%
Simplified60.8%
if 1.0200000000000001e93 < c Initial program 91.5%
Taylor expanded in c around inf 95.9%
+-commutative95.9%
associate-*r/95.9%
metadata-eval95.9%
associate-+r-95.9%
Simplified95.9%
Taylor expanded in c around 0 59.1%
+-commutative59.1%
associate-*r/59.1%
metadata-eval59.1%
associate--l+59.1%
Simplified59.1%
Final simplification59.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (- b c) -5e+32)
(/
x
(-
x
(*
y
(-
-1.0
(*
2.0
(/ (* c (- (* t (+ 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) <= -5e+32) {
tmp = x / (x - (y * (-1.0 - (2.0 * ((c * ((t * (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) <= (-5d+32)) then
tmp = x / (x - (y * ((-1.0d0) - (2.0d0 * ((c * ((t * (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) <= -5e+32) {
tmp = x / (x - (y * (-1.0 - (2.0 * ((c * ((t * (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) <= -5e+32: tmp = x / (x - (y * (-1.0 - (2.0 * ((c * ((t * (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) <= -5e+32) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(2.0 * Float64(Float64(c * Float64(Float64(t * Float64(a + 0.8333333333333334)) - 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) <= -5e+32) tmp = x / (x - (y * (-1.0 - (2.0 * ((c * ((t * (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], -5e+32], N[(x / N[(x - N[(y * N[(-1.0 - N[(2.0 * N[(N[(c * N[(N[(t * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision] - 0.6666666666666666), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - c \leq -5 \cdot 10^{+32}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - 2 \cdot \frac{c \cdot \left(t \cdot \left(a + 0.8333333333333334\right) - 0.6666666666666666\right)}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 b c) < -4.9999999999999997e32Initial program 92.1%
Taylor expanded in c around inf 73.2%
+-commutative73.2%
associate-*r/73.2%
metadata-eval73.2%
associate-+r-73.2%
Simplified73.2%
Taylor expanded in t around 0 73.2%
fma-define73.2%
associate-*r*73.2%
Simplified73.2%
Taylor expanded in c around 0 53.4%
if -4.9999999999999997e32 < (-.f64 b c) Initial program 94.9%
Simplified97.4%
Taylor expanded in x around inf 64.4%
Final simplification60.1%
(FPCore (x y z t a b c) :precision binary64 (if (<= (- b c) -5e+32) (/ x (+ x (* y (+ (* c (* 2.0 a)) 1.0)))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -5e+32) {
tmp = x / (x + (y * ((c * (2.0 * a)) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b - c) <= (-5d+32)) then
tmp = x / (x + (y * ((c * (2.0d0 * a)) + 1.0d0)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -5e+32) {
tmp = x / (x + (y * ((c * (2.0 * a)) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b - c) <= -5e+32: tmp = x / (x + (y * ((c * (2.0 * a)) + 1.0))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b - c) <= -5e+32) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(c * Float64(2.0 * a)) + 1.0)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b - c) <= -5e+32) tmp = x / (x + (y * ((c * (2.0 * a)) + 1.0))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b - c), $MachinePrecision], -5e+32], N[(x / N[(x + N[(y * N[(N[(c * N[(2.0 * a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - c \leq -5 \cdot 10^{+32}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(c \cdot \left(2 \cdot a\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 b c) < -4.9999999999999997e32Initial program 92.1%
Taylor expanded in c around inf 73.2%
+-commutative73.2%
associate-*r/73.2%
metadata-eval73.2%
associate-+r-73.2%
Simplified73.2%
Taylor expanded in t around 0 73.2%
fma-define73.2%
associate-*r*73.2%
Simplified73.2%
Taylor expanded in a around inf 52.2%
*-commutative52.2%
*-commutative52.2%
Simplified52.2%
Taylor expanded in c around 0 47.6%
*-commutative47.6%
*-commutative47.6%
associate-*r*47.6%
Simplified47.6%
if -4.9999999999999997e32 < (-.f64 b c) Initial program 94.9%
Simplified97.4%
Taylor expanded in x around inf 64.4%
Final simplification57.8%
(FPCore (x y z t a b c) :precision binary64 (if (<= a 5.8e+235) 1.0 (/ x (* y (+ (* -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 (a <= 5.8e+235) {
tmp = 1.0;
} else {
tmp = x / (y * ((-2.0 * (a * b)) + 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 <= 5.8d+235) then
tmp = 1.0d0
else
tmp = x / (y * (((-2.0d0) * (a * b)) + 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 <= 5.8e+235) {
tmp = 1.0;
} else {
tmp = x / (y * ((-2.0 * (a * b)) + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if a <= 5.8e+235: tmp = 1.0 else: tmp = x / (y * ((-2.0 * (a * b)) + 1.0)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= 5.8e+235) tmp = 1.0; else tmp = Float64(x / Float64(y * Float64(Float64(-2.0 * Float64(a * b)) + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (a <= 5.8e+235) tmp = 1.0; else tmp = x / (y * ((-2.0 * (a * b)) + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, 5.8e+235], 1.0, N[(x / N[(y * N[(N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.8 \cdot 10^{+235}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(-2 \cdot \left(a \cdot b\right) + 1\right)}\\
\end{array}
\end{array}
if a < 5.80000000000000042e235Initial program 94.0%
Simplified97.0%
Taylor expanded in x around inf 53.8%
if 5.80000000000000042e235 < a Initial program 91.4%
Taylor expanded in b around inf 79.0%
associate-*r/79.0%
metadata-eval79.0%
+-commutative79.0%
Simplified79.0%
Taylor expanded in b around 0 61.9%
Taylor expanded in a around inf 61.9%
associate-*r*61.9%
mul-1-neg61.9%
Simplified61.9%
Taylor expanded in x around 0 61.8%
Final simplification54.6%
(FPCore (x y z t a b c) :precision binary64 (if (<= a 3.9e+240) 1.0 (* -0.5 (/ x (* a (* y b))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= 3.9e+240) {
tmp = 1.0;
} else {
tmp = -0.5 * (x / (a * (y * 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 (a <= 3.9d+240) then
tmp = 1.0d0
else
tmp = (-0.5d0) * (x / (a * (y * 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 (a <= 3.9e+240) {
tmp = 1.0;
} else {
tmp = -0.5 * (x / (a * (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if a <= 3.9e+240: tmp = 1.0 else: tmp = -0.5 * (x / (a * (y * b))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= 3.9e+240) tmp = 1.0; else tmp = Float64(-0.5 * Float64(x / Float64(a * Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (a <= 3.9e+240) tmp = 1.0; else tmp = -0.5 * (x / (a * (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, 3.9e+240], 1.0, N[(-0.5 * N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.9 \cdot 10^{+240}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{x}{a \cdot \left(y \cdot b\right)}\\
\end{array}
\end{array}
if a < 3.89999999999999981e240Initial program 94.0%
Simplified97.0%
Taylor expanded in x around inf 53.8%
if 3.89999999999999981e240 < a Initial program 91.4%
Taylor expanded in b around inf 79.0%
associate-*r/79.0%
metadata-eval79.0%
+-commutative79.0%
Simplified79.0%
Taylor expanded in b around 0 61.9%
Taylor expanded in a around inf 53.3%
Final simplification53.8%
(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 93.8%
Simplified97.3%
Taylor expanded in x around inf 51.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 2024116
(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)))))))))))