
(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 (* (- c b) (- (+ 0.8333333333333334 a) (/ 2.0 (* t 3.0)))))
(t_2 (sqrt (+ a t))))
(if (<= (+ (/ (* t_2 z) t) t_1) INFINITY)
(/ x (+ x (* y (exp (* 2.0 (log (exp (+ (* t_2 (/ z t)) t_1))))))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0)));
double t_2 = sqrt((a + t));
double tmp;
if ((((t_2 * z) / t) + t_1) <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * log(exp(((t_2 * (z / t)) + t_1)))))));
} else {
tmp = 1.0;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0)));
double t_2 = Math.sqrt((a + t));
double tmp;
if ((((t_2 * z) / t) + t_1) <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.exp((2.0 * Math.log(Math.exp(((t_2 * (z / t)) + t_1)))))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0))) t_2 = math.sqrt((a + t)) tmp = 0 if (((t_2 * z) / t) + t_1) <= math.inf: tmp = x / (x + (y * math.exp((2.0 * math.log(math.exp(((t_2 * (z / t)) + t_1))))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(c - b) * Float64(Float64(0.8333333333333334 + a) - Float64(2.0 / Float64(t * 3.0)))) t_2 = sqrt(Float64(a + t)) tmp = 0.0 if (Float64(Float64(Float64(t_2 * z) / t) + t_1) <= Inf) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * log(exp(Float64(Float64(t_2 * Float64(z / t)) + t_1)))))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0))); t_2 = sqrt((a + t)); tmp = 0.0; if ((((t_2 * z) / t) + t_1) <= Inf) tmp = x / (x + (y * exp((2.0 * log(exp(((t_2 * (z / t)) + t_1))))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(c - b), $MachinePrecision] * N[(N[(0.8333333333333334 + a), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(t$95$2 * z), $MachinePrecision] / t), $MachinePrecision] + t$95$1), $MachinePrecision], Infinity], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[Log[N[Exp[N[(N[(t$95$2 * N[(z / t), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c - b\right) \cdot \left(\left(0.8333333333333334 + a\right) - \frac{2}{t \cdot 3}\right)\\
t_2 := \sqrt{a + t}\\
\mathbf{if}\;\frac{t_2 \cdot z}{t} + t_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \log \left(e^{t_2 \cdot \frac{z}{t} + t_1}\right)}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 98.8%
associate-/l*98.7%
metadata-eval98.7%
add-log-exp98.8%
associate-/r/100.0%
*-commutative100.0%
Applied egg-rr100.0%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) Initial program 0.0%
Taylor expanded in a around inf 33.4%
Taylor expanded in x around inf 75.8%
Final simplification98.5%
(FPCore (x y z t a b c)
:precision binary64
(/
x
(fma
y
(pow
(exp 2.0)
(fma
(+ 0.8333333333333334 (- a (/ 0.6666666666666666 t)))
(- c b)
(* (sqrt (+ a t)) (/ z t))))
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((0.8333333333333334 + (a - (0.6666666666666666 / t))), (c - b), (sqrt((a + t)) * (z / t)))), x);
}
function code(x, y, z, t, a, b, c) return Float64(x / fma(y, (exp(2.0) ^ fma(Float64(0.8333333333333334 + Float64(a - Float64(0.6666666666666666 / t))), Float64(c - b), Float64(sqrt(Float64(a + t)) * Float64(z / t)))), x)) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(0.8333333333333334 + N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(c - b), $MachinePrecision] + N[(N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\mathsf{fma}\left(y, {\left(e^{2}\right)}^{\left(\mathsf{fma}\left(0.8333333333333334 + \left(a - \frac{0.6666666666666666}{t}\right), c - b, \sqrt{a + t} \cdot \frac{z}{t}\right)\right)}, x\right)}
\end{array}
Initial program 92.6%
+-commutative92.6%
fma-def92.6%
Simplified97.7%
Final simplification97.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* (sqrt (+ a t)) z) t)
(* (- c b) (- (+ 0.8333333333333334 a) (/ 2.0 (* t 3.0)))))))
(if (<= t_1 INFINITY) (/ x (+ x (* y (exp (* 2.0 t_1))))) 1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((sqrt((a + t)) * z) / t) + ((c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0))));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * t_1))));
} else {
tmp = 1.0;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((Math.sqrt((a + t)) * z) / t) + ((c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0))));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.exp((2.0 * t_1))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((math.sqrt((a + t)) * z) / t) + ((c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0)))) tmp = 0 if t_1 <= math.inf: tmp = x / (x + (y * math.exp((2.0 * t_1)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(sqrt(Float64(a + t)) * z) / t) + Float64(Float64(c - b) * Float64(Float64(0.8333333333333334 + a) - Float64(2.0 / Float64(t * 3.0))))) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * t_1))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((sqrt((a + t)) * z) / t) + ((c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0)))); tmp = 0.0; if (t_1 <= Inf) tmp = x / (x + (y * exp((2.0 * t_1)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision] + N[(N[(c - b), $MachinePrecision] * N[(N[(0.8333333333333334 + a), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $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], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\sqrt{a + t} \cdot z}{t} + \left(c - b\right) \cdot \left(\left(0.8333333333333334 + a\right) - \frac{2}{t \cdot 3}\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot t_1}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 98.8%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) Initial program 0.0%
Taylor expanded in a around inf 33.4%
Taylor expanded in x around inf 75.8%
Final simplification97.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
c
(+ (+ 0.8333333333333334 a) (/ -0.6666666666666666 t))))))))))
(if (<= c -3e-10)
t_1
(if (<= c -2.3e-212)
(/ x (+ x (* y (exp (* 2.0 (* (sqrt (+ a t)) (/ z t)))))))
(if (<= c 2050.0)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ 0.8333333333333334 a))))))))
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 * (c * ((0.8333333333333334 + a) + (-0.6666666666666666 / t)))))));
double tmp;
if (c <= -3e-10) {
tmp = t_1;
} else if (c <= -2.3e-212) {
tmp = x / (x + (y * exp((2.0 * (sqrt((a + t)) * (z / t))))));
} else if (c <= 2050.0) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
} 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 * (c * ((0.8333333333333334d0 + a) + ((-0.6666666666666666d0) / t)))))))
if (c <= (-3d-10)) then
tmp = t_1
else if (c <= (-2.3d-212)) then
tmp = x / (x + (y * exp((2.0d0 * (sqrt((a + t)) * (z / t))))))
else if (c <= 2050.0d0) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (0.8333333333333334d0 + a)))))))
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 * (c * ((0.8333333333333334 + a) + (-0.6666666666666666 / t)))))));
double tmp;
if (c <= -3e-10) {
tmp = t_1;
} else if (c <= -2.3e-212) {
tmp = x / (x + (y * Math.exp((2.0 * (Math.sqrt((a + t)) * (z / t))))));
} else if (c <= 2050.0) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * (c * ((0.8333333333333334 + a) + (-0.6666666666666666 / t))))))) tmp = 0 if c <= -3e-10: tmp = t_1 elif c <= -2.3e-212: tmp = x / (x + (y * math.exp((2.0 * (math.sqrt((a + t)) * (z / t)))))) elif c <= 2050.0: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))) 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(c * Float64(Float64(0.8333333333333334 + a) + Float64(-0.6666666666666666 / t)))))))) tmp = 0.0 if (c <= -3e-10) tmp = t_1; elseif (c <= -2.3e-212) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(sqrt(Float64(a + t)) * Float64(z / t))))))); elseif (c <= 2050.0) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(0.8333333333333334 + a)))))))); 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 * (c * ((0.8333333333333334 + a) + (-0.6666666666666666 / t))))))); tmp = 0.0; if (c <= -3e-10) tmp = t_1; elseif (c <= -2.3e-212) tmp = x / (x + (y * exp((2.0 * (sqrt((a + t)) * (z / t)))))); elseif (c <= 2050.0) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))); 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[(c * N[(N[(0.8333333333333334 + a), $MachinePrecision] + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3e-10], t$95$1, If[LessEqual[c, -2.3e-212], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2050.0], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(\left(0.8333333333333334 + a\right) + \frac{-0.6666666666666666}{t}\right)\right)}}\\
\mathbf{if}\;c \leq -3 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -2.3 \cdot 10^{-212}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\sqrt{a + t} \cdot \frac{z}{t}\right)}}\\
\mathbf{elif}\;c \leq 2050:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(0.8333333333333334 + a\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if c < -3e-10 or 2050 < c Initial program 91.0%
Taylor expanded in c around inf 81.1%
sub-neg81.1%
associate-*r/81.1%
metadata-eval81.1%
distribute-neg-frac81.1%
metadata-eval81.1%
Simplified81.1%
if -3e-10 < c < -2.3000000000000001e-212Initial program 97.8%
Taylor expanded in z around inf 87.1%
if -2.3000000000000001e-212 < c < 2050Initial program 92.1%
Taylor expanded in b around inf 83.5%
associate-*r/83.5%
metadata-eval83.5%
Simplified83.5%
Final simplification82.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/ x (+ x (* y (exp (* 2.0 (* (- c b) (+ 0.8333333333333334 a)))))))))
(if (<= t -5e-310)
t_1
(if (<= t 9.4e-149)
(/ x (+ x (* y (exp (* 2.0 (/ (* 0.6666666666666666 b) t))))))
(if (<= t 3.1e-117)
1.0
(if (<= t 1.6e-12)
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
b
(- (/ 0.6666666666666666 t) (+ 0.8333333333333334 a))))))))
(if (<= t 0.082) 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 * ((c - b) * (0.8333333333333334 + a))))));
double tmp;
if (t <= -5e-310) {
tmp = t_1;
} else if (t <= 9.4e-149) {
tmp = x / (x + (y * exp((2.0 * ((0.6666666666666666 * b) / t)))));
} else if (t <= 3.1e-117) {
tmp = 1.0;
} else if (t <= 1.6e-12) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
} else if (t <= 0.082) {
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 * ((c - b) * (0.8333333333333334d0 + a))))))
if (t <= (-5d-310)) then
tmp = t_1
else if (t <= 9.4d-149) then
tmp = x / (x + (y * exp((2.0d0 * ((0.6666666666666666d0 * b) / t)))))
else if (t <= 3.1d-117) then
tmp = 1.0d0
else if (t <= 1.6d-12) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (0.8333333333333334d0 + a)))))))
else if (t <= 0.082d0) 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 * ((c - b) * (0.8333333333333334 + a))))));
double tmp;
if (t <= -5e-310) {
tmp = t_1;
} else if (t <= 9.4e-149) {
tmp = x / (x + (y * Math.exp((2.0 * ((0.6666666666666666 * b) / t)))));
} else if (t <= 3.1e-117) {
tmp = 1.0;
} else if (t <= 1.6e-12) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
} else if (t <= 0.082) {
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 * ((c - b) * (0.8333333333333334 + a)))))) tmp = 0 if t <= -5e-310: tmp = t_1 elif t <= 9.4e-149: tmp = x / (x + (y * math.exp((2.0 * ((0.6666666666666666 * b) / t))))) elif t <= 3.1e-117: tmp = 1.0 elif t <= 1.6e-12: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))) elif t <= 0.082: 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(Float64(c - b) * Float64(0.8333333333333334 + a))))))) tmp = 0.0 if (t <= -5e-310) tmp = t_1; elseif (t <= 9.4e-149) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(0.6666666666666666 * b) / t)))))); elseif (t <= 3.1e-117) tmp = 1.0; elseif (t <= 1.6e-12) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(0.8333333333333334 + a)))))))); elseif (t <= 0.082) 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 * ((c - b) * (0.8333333333333334 + a)))))); tmp = 0.0; if (t <= -5e-310) tmp = t_1; elseif (t <= 9.4e-149) tmp = x / (x + (y * exp((2.0 * ((0.6666666666666666 * b) / t))))); elseif (t <= 3.1e-117) tmp = 1.0; elseif (t <= 1.6e-12) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))); elseif (t <= 0.082) 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[(N[(c - b), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-310], t$95$1, If[LessEqual[t, 9.4e-149], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(0.6666666666666666 * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e-117], 1.0, If[LessEqual[t, 1.6e-12], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.082], 1.0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(0.8333333333333334 + a\right)\right)}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 9.4 \cdot 10^{-149}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{0.6666666666666666 \cdot b}{t}}}\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-117}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-12}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(0.8333333333333334 + a\right)\right)\right)}}\\
\mathbf{elif}\;t \leq 0.082:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.999999999999985e-310 or 0.0820000000000000034 < t Initial program 92.4%
Taylor expanded in t around inf 84.7%
mul-1-neg84.7%
+-commutative84.7%
*-commutative84.7%
distribute-lft-neg-in84.7%
neg-sub084.7%
associate--r-84.7%
neg-sub084.7%
+-commutative84.7%
sub-neg84.7%
+-commutative84.7%
Simplified84.7%
if -4.999999999999985e-310 < t < 9.4000000000000002e-149Initial program 89.5%
Taylor expanded in b around inf 70.9%
associate-*r/70.9%
metadata-eval70.9%
Simplified70.9%
Taylor expanded in t around 0 81.1%
associate-*r/81.1%
Simplified81.1%
if 9.4000000000000002e-149 < t < 3.10000000000000011e-117 or 1.6e-12 < t < 0.0820000000000000034Initial program 94.1%
Taylor expanded in a around inf 43.1%
Taylor expanded in x around inf 88.6%
if 3.10000000000000011e-117 < t < 1.6e-12Initial program 96.7%
Taylor expanded in b around inf 71.0%
associate-*r/71.0%
metadata-eval71.0%
Simplified71.0%
Final simplification82.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/ x (+ x (* y (exp (* 2.0 (* (- c b) (+ 0.8333333333333334 a)))))))))
(if (<= t -5e-310)
t_1
(if (<= t 6.8e-151)
(/ x (+ x (* y (exp (* 2.0 (/ (* 0.6666666666666666 b) t))))))
(if (<= t 0.058) 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 * ((c - b) * (0.8333333333333334 + a))))));
double tmp;
if (t <= -5e-310) {
tmp = t_1;
} else if (t <= 6.8e-151) {
tmp = x / (x + (y * exp((2.0 * ((0.6666666666666666 * b) / t)))));
} else if (t <= 0.058) {
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 * ((c - b) * (0.8333333333333334d0 + a))))))
if (t <= (-5d-310)) then
tmp = t_1
else if (t <= 6.8d-151) then
tmp = x / (x + (y * exp((2.0d0 * ((0.6666666666666666d0 * b) / t)))))
else if (t <= 0.058d0) 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 * ((c - b) * (0.8333333333333334 + a))))));
double tmp;
if (t <= -5e-310) {
tmp = t_1;
} else if (t <= 6.8e-151) {
tmp = x / (x + (y * Math.exp((2.0 * ((0.6666666666666666 * b) / t)))));
} else if (t <= 0.058) {
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 * ((c - b) * (0.8333333333333334 + a)))))) tmp = 0 if t <= -5e-310: tmp = t_1 elif t <= 6.8e-151: tmp = x / (x + (y * math.exp((2.0 * ((0.6666666666666666 * b) / t))))) elif t <= 0.058: 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(Float64(c - b) * Float64(0.8333333333333334 + a))))))) tmp = 0.0 if (t <= -5e-310) tmp = t_1; elseif (t <= 6.8e-151) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(0.6666666666666666 * b) / t)))))); elseif (t <= 0.058) 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 * ((c - b) * (0.8333333333333334 + a)))))); tmp = 0.0; if (t <= -5e-310) tmp = t_1; elseif (t <= 6.8e-151) tmp = x / (x + (y * exp((2.0 * ((0.6666666666666666 * b) / t))))); elseif (t <= 0.058) 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[(N[(c - b), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-310], t$95$1, If[LessEqual[t, 6.8e-151], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(0.6666666666666666 * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.058], 1.0, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(0.8333333333333334 + a\right)\right)}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-151}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{0.6666666666666666 \cdot b}{t}}}\\
\mathbf{elif}\;t \leq 0.058:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.999999999999985e-310 or 0.0580000000000000029 < t Initial program 92.4%
Taylor expanded in t around inf 84.7%
mul-1-neg84.7%
+-commutative84.7%
*-commutative84.7%
distribute-lft-neg-in84.7%
neg-sub084.7%
associate--r-84.7%
neg-sub084.7%
+-commutative84.7%
sub-neg84.7%
+-commutative84.7%
Simplified84.7%
if -4.999999999999985e-310 < t < 6.8000000000000005e-151Initial program 89.5%
Taylor expanded in b around inf 70.9%
associate-*r/70.9%
metadata-eval70.9%
Simplified70.9%
Taylor expanded in t around 0 81.1%
associate-*r/81.1%
Simplified81.1%
if 6.8000000000000005e-151 < t < 0.0580000000000000029Initial program 95.7%
Taylor expanded in a around inf 50.7%
Taylor expanded in x around inf 63.4%
Final simplification80.2%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= c -2.3e+70) (not (<= c 0.00027)))
(/
x
(+
x
(*
y
(exp
(* 2.0 (* c (+ (+ 0.8333333333333334 a) (/ -0.6666666666666666 t))))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ 0.8333333333333334 a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((c <= -2.3e+70) || !(c <= 0.00027)) {
tmp = x / (x + (y * exp((2.0 * (c * ((0.8333333333333334 + a) + (-0.6666666666666666 / t)))))));
} else {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (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 ((c <= (-2.3d+70)) .or. (.not. (c <= 0.00027d0))) then
tmp = x / (x + (y * exp((2.0d0 * (c * ((0.8333333333333334d0 + a) + ((-0.6666666666666666d0) / t)))))))
else
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (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 ((c <= -2.3e+70) || !(c <= 0.00027)) {
tmp = x / (x + (y * Math.exp((2.0 * (c * ((0.8333333333333334 + a) + (-0.6666666666666666 / t)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (c <= -2.3e+70) or not (c <= 0.00027): tmp = x / (x + (y * math.exp((2.0 * (c * ((0.8333333333333334 + a) + (-0.6666666666666666 / t))))))) else: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((c <= -2.3e+70) || !(c <= 0.00027)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(Float64(0.8333333333333334 + a) + Float64(-0.6666666666666666 / t)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(0.8333333333333334 + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((c <= -2.3e+70) || ~((c <= 0.00027))) tmp = x / (x + (y * exp((2.0 * (c * ((0.8333333333333334 + a) + (-0.6666666666666666 / t))))))); else tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[c, -2.3e+70], N[Not[LessEqual[c, 0.00027]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(N[(0.8333333333333334 + a), $MachinePrecision] + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.3 \cdot 10^{+70} \lor \neg \left(c \leq 0.00027\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(\left(0.8333333333333334 + a\right) + \frac{-0.6666666666666666}{t}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(0.8333333333333334 + a\right)\right)\right)}}\\
\end{array}
\end{array}
if c < -2.29999999999999994e70 or 2.70000000000000003e-4 < c Initial program 91.4%
Taylor expanded in c around inf 83.2%
sub-neg83.2%
associate-*r/83.2%
metadata-eval83.2%
distribute-neg-frac83.2%
metadata-eval83.2%
Simplified83.2%
if -2.29999999999999994e70 < c < 2.70000000000000003e-4Initial program 93.6%
Taylor expanded in b around inf 79.0%
associate-*r/79.0%
metadata-eval79.0%
Simplified79.0%
Final simplification80.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -5e-310)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 4.5e-151)
(/ x (+ x (* y (exp (* 2.0 (/ (* 0.6666666666666666 b) t))))))
(if (<= t 0.04)
1.0
(/ x (+ x (* y (exp (* (- c b) 1.6666666666666667)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -5e-310) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 4.5e-151) {
tmp = x / (x + (y * exp((2.0 * ((0.6666666666666666 * b) / t)))));
} else if (t <= 0.04) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp(((c - 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 <= (-5d-310)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 4.5d-151) then
tmp = x / (x + (y * exp((2.0d0 * ((0.6666666666666666d0 * b) / t)))))
else if (t <= 0.04d0) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp(((c - 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 <= -5e-310) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 4.5e-151) {
tmp = x / (x + (y * Math.exp((2.0 * ((0.6666666666666666 * b) / t)))));
} else if (t <= 0.04) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -5e-310: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 4.5e-151: tmp = x / (x + (y * math.exp((2.0 * ((0.6666666666666666 * b) / t))))) elif t <= 0.04: tmp = 1.0 else: tmp = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -5e-310) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 4.5e-151) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(0.6666666666666666 * b) / t)))))); elseif (t <= 0.04) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -5e-310) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 4.5e-151) tmp = x / (x + (y * exp((2.0 * ((0.6666666666666666 * b) / t))))); elseif (t <= 0.04) tmp = 1.0; else tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -5e-310], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-151], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(0.6666666666666666 * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.04], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-151}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{0.6666666666666666 \cdot b}{t}}}\\
\mathbf{elif}\;t \leq 0.04:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 84.7%
Taylor expanded in a around inf 79.3%
if -4.999999999999985e-310 < t < 4.5000000000000002e-151Initial program 89.5%
Taylor expanded in b around inf 70.9%
associate-*r/70.9%
metadata-eval70.9%
Simplified70.9%
Taylor expanded in t around 0 81.1%
associate-*r/81.1%
Simplified81.1%
if 4.5000000000000002e-151 < t < 0.0400000000000000008Initial program 95.7%
Taylor expanded in a around inf 50.7%
Taylor expanded in x around inf 63.4%
if 0.0400000000000000008 < t Initial program 97.2%
Taylor expanded in t around inf 87.8%
mul-1-neg87.8%
+-commutative87.8%
*-commutative87.8%
distribute-lft-neg-in87.8%
neg-sub087.8%
associate--r-87.8%
neg-sub087.8%
+-commutative87.8%
sub-neg87.8%
+-commutative87.8%
Simplified87.8%
Taylor expanded in a around 0 77.0%
Final simplification75.7%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -2.9e-294) (not (<= t 0.032))) (/ x (+ x (* y (exp (* (- c b) 1.6666666666666667))))) (/ x (+ x (* y (exp (* 2.0 (* -0.6666666666666666 (/ c t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -2.9e-294) || !(t <= 0.032)) {
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
} else {
tmp = x / (x + (y * exp((2.0 * (-0.6666666666666666 * (c / 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 ((t <= (-2.9d-294)) .or. (.not. (t <= 0.032d0))) then
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
else
tmp = x / (x + (y * exp((2.0d0 * ((-0.6666666666666666d0) * (c / 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 ((t <= -2.9e-294) || !(t <= 0.032)) {
tmp = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (-0.6666666666666666 * (c / t))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -2.9e-294) or not (t <= 0.032): tmp = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) else: tmp = x / (x + (y * math.exp((2.0 * (-0.6666666666666666 * (c / t)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -2.9e-294) || !(t <= 0.032)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(-0.6666666666666666 * Float64(c / t))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -2.9e-294) || ~((t <= 0.032))) tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); else tmp = x / (x + (y * exp((2.0 * (-0.6666666666666666 * (c / t)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -2.9e-294], N[Not[LessEqual[t, 0.032]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(-0.6666666666666666 * N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{-294} \lor \neg \left(t \leq 0.032\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(-0.6666666666666666 \cdot \frac{c}{t}\right)}}\\
\end{array}
\end{array}
if t < -2.9000000000000001e-294 or 0.032000000000000001 < t Initial program 92.9%
Taylor expanded in t around inf 84.5%
mul-1-neg84.5%
+-commutative84.5%
*-commutative84.5%
distribute-lft-neg-in84.5%
neg-sub084.5%
associate--r-84.5%
neg-sub084.5%
+-commutative84.5%
sub-neg84.5%
+-commutative84.5%
Simplified84.5%
Taylor expanded in a around 0 76.6%
if -2.9000000000000001e-294 < t < 0.032000000000000001Initial program 92.0%
Taylor expanded in c around inf 65.1%
sub-neg65.1%
associate-*r/65.1%
metadata-eval65.1%
distribute-neg-frac65.1%
metadata-eval65.1%
Simplified65.1%
Taylor expanded in t around 0 64.0%
Final simplification72.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -8e-295)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 0.19)
(/ x (+ x (* y (exp (* 2.0 (* -0.6666666666666666 (/ c t)))))))
(/ x (+ x (* y (exp (* (- c b) 1.6666666666666667))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -8e-295) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 0.19) {
tmp = x / (x + (y * exp((2.0 * (-0.6666666666666666 * (c / t))))));
} else {
tmp = x / (x + (y * exp(((c - 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 <= (-8d-295)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 0.19d0) then
tmp = x / (x + (y * exp((2.0d0 * ((-0.6666666666666666d0) * (c / t))))))
else
tmp = x / (x + (y * exp(((c - 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 <= -8e-295) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 0.19) {
tmp = x / (x + (y * Math.exp((2.0 * (-0.6666666666666666 * (c / t))))));
} else {
tmp = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -8e-295: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 0.19: tmp = x / (x + (y * math.exp((2.0 * (-0.6666666666666666 * (c / t)))))) else: tmp = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -8e-295) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 0.19) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(-0.6666666666666666 * Float64(c / t))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -8e-295) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 0.19) tmp = x / (x + (y * exp((2.0 * (-0.6666666666666666 * (c / t)))))); else tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -8e-295], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.19], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(-0.6666666666666666 * N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-295}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 0.19:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(-0.6666666666666666 \cdot \frac{c}{t}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if t < -8.00000000000000048e-295Initial program 85.8%
Taylor expanded in a around inf 78.7%
if -8.00000000000000048e-295 < t < 0.19Initial program 92.0%
Taylor expanded in c around inf 65.2%
sub-neg65.2%
associate-*r/65.2%
metadata-eval65.2%
distribute-neg-frac65.2%
metadata-eval65.2%
Simplified65.2%
Taylor expanded in t around 0 64.1%
if 0.19 < t Initial program 97.2%
Taylor expanded in t around inf 87.7%
mul-1-neg87.7%
+-commutative87.7%
*-commutative87.7%
distribute-lft-neg-in87.7%
neg-sub087.7%
associate--r-87.7%
neg-sub087.7%
+-commutative87.7%
sub-neg87.7%
+-commutative87.7%
Simplified87.7%
Taylor expanded in a around 0 77.1%
Final simplification73.0%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -1.36e-177) (not (<= t 1.22e+60))) (/ x (+ x (* y (exp (* -2.0 (* a b)))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.36e-177) || !(t <= 1.22e+60)) {
tmp = x / (x + (y * exp((-2.0 * (a * b)))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((t <= (-1.36d-177)) .or. (.not. (t <= 1.22d+60))) then
tmp = x / (x + (y * exp(((-2.0d0) * (a * b)))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.36e-177) || !(t <= 1.22e+60)) {
tmp = x / (x + (y * Math.exp((-2.0 * (a * b)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -1.36e-177) or not (t <= 1.22e+60): tmp = x / (x + (y * math.exp((-2.0 * (a * b))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -1.36e-177) || !(t <= 1.22e+60)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(a * b)))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -1.36e-177) || ~((t <= 1.22e+60))) tmp = x / (x + (y * exp((-2.0 * (a * b))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -1.36e-177], N[Not[LessEqual[t, 1.22e+60]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.36 \cdot 10^{-177} \lor \neg \left(t \leq 1.22 \cdot 10^{+60}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(a \cdot b\right)}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.35999999999999989e-177 or 1.21999999999999995e60 < t Initial program 95.3%
Taylor expanded in a around inf 74.6%
Taylor expanded in c around 0 59.3%
if -1.35999999999999989e-177 < t < 1.21999999999999995e60Initial program 90.0%
Taylor expanded in a around inf 48.8%
Taylor expanded in x around inf 60.7%
Final simplification60.0%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -4e-178) (not (<= t 0.09))) (/ x (+ x (* y (exp (* (- c b) 1.6666666666666667))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -4e-178) || !(t <= 0.09)) {
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((t <= (-4d-178)) .or. (.not. (t <= 0.09d0))) then
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -4e-178) || !(t <= 0.09)) {
tmp = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -4e-178) or not (t <= 0.09): tmp = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -4e-178) || !(t <= 0.09)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -4e-178) || ~((t <= 0.09))) tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -4e-178], N[Not[LessEqual[t, 0.09]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{-178} \lor \neg \left(t \leq 0.09\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -3.9999999999999998e-178 or 0.089999999999999997 < t Initial program 96.0%
Taylor expanded in t around inf 86.7%
mul-1-neg86.7%
+-commutative86.7%
*-commutative86.7%
distribute-lft-neg-in86.7%
neg-sub086.7%
associate--r-86.7%
neg-sub086.7%
+-commutative86.7%
sub-neg86.7%
+-commutative86.7%
Simplified86.7%
Taylor expanded in a around 0 78.5%
if -3.9999999999999998e-178 < t < 0.089999999999999997Initial program 87.9%
Taylor expanded in a around inf 45.0%
Taylor expanded in x around inf 60.4%
Final simplification70.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= z 1.25e-212)
1.0
(if (<= z 5.8e+91)
(/ x (+ x (* y (+ (* (/ c t) -1.3333333333333333) 1.0))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 1.25e-212) {
tmp = 1.0;
} else if (z <= 5.8e+91) {
tmp = x / (x + (y * (((c / t) * -1.3333333333333333) + 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 (z <= 1.25d-212) then
tmp = 1.0d0
else if (z <= 5.8d+91) then
tmp = x / (x + (y * (((c / t) * (-1.3333333333333333d0)) + 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 (z <= 1.25e-212) {
tmp = 1.0;
} else if (z <= 5.8e+91) {
tmp = x / (x + (y * (((c / t) * -1.3333333333333333) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= 1.25e-212: tmp = 1.0 elif z <= 5.8e+91: tmp = x / (x + (y * (((c / t) * -1.3333333333333333) + 1.0))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= 1.25e-212) tmp = 1.0; elseif (z <= 5.8e+91) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(Float64(c / t) * -1.3333333333333333) + 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 (z <= 1.25e-212) tmp = 1.0; elseif (z <= 5.8e+91) tmp = x / (x + (y * (((c / t) * -1.3333333333333333) + 1.0))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, 1.25e-212], 1.0, If[LessEqual[z, 5.8e+91], N[(x / N[(x + N[(y * N[(N[(N[(c / t), $MachinePrecision] * -1.3333333333333333), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.25 \cdot 10^{-212}:\\
\;\;\;\;1\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+91}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(\frac{c}{t} \cdot -1.3333333333333333 + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if z < 1.25000000000000011e-212 or 5.80000000000000028e91 < z Initial program 90.8%
Taylor expanded in a around inf 57.5%
Taylor expanded in x around inf 59.1%
if 1.25000000000000011e-212 < z < 5.80000000000000028e91Initial program 98.4%
Taylor expanded in c around inf 81.1%
sub-neg81.1%
associate-*r/81.1%
metadata-eval81.1%
distribute-neg-frac81.1%
metadata-eval81.1%
Simplified81.1%
Taylor expanded in t around 0 65.6%
Taylor expanded in c around 0 56.3%
Final simplification58.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= z 1.15e-212)
1.0
(if (<= z 2.45e+92)
(/ x (+ x (+ y (* -1.3333333333333333 (/ (* y c) t)))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 1.15e-212) {
tmp = 1.0;
} else if (z <= 2.45e+92) {
tmp = x / (x + (y + (-1.3333333333333333 * ((y * c) / 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 (z <= 1.15d-212) then
tmp = 1.0d0
else if (z <= 2.45d+92) then
tmp = x / (x + (y + ((-1.3333333333333333d0) * ((y * c) / 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 (z <= 1.15e-212) {
tmp = 1.0;
} else if (z <= 2.45e+92) {
tmp = x / (x + (y + (-1.3333333333333333 * ((y * c) / t))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= 1.15e-212: tmp = 1.0 elif z <= 2.45e+92: tmp = x / (x + (y + (-1.3333333333333333 * ((y * c) / t)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= 1.15e-212) tmp = 1.0; elseif (z <= 2.45e+92) tmp = Float64(x / Float64(x + Float64(y + Float64(-1.3333333333333333 * Float64(Float64(y * c) / t))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (z <= 1.15e-212) tmp = 1.0; elseif (z <= 2.45e+92) tmp = x / (x + (y + (-1.3333333333333333 * ((y * c) / t)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, 1.15e-212], 1.0, If[LessEqual[z, 2.45e+92], N[(x / N[(x + N[(y + N[(-1.3333333333333333 * N[(N[(y * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.15 \cdot 10^{-212}:\\
\;\;\;\;1\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{+92}:\\
\;\;\;\;\frac{x}{x + \left(y + -1.3333333333333333 \cdot \frac{y \cdot c}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if z < 1.15e-212 or 2.4500000000000001e92 < z Initial program 90.8%
Taylor expanded in a around inf 57.5%
Taylor expanded in x around inf 59.1%
if 1.15e-212 < z < 2.4500000000000001e92Initial program 98.4%
Taylor expanded in c around inf 81.1%
sub-neg81.1%
associate-*r/81.1%
metadata-eval81.1%
distribute-neg-frac81.1%
metadata-eval81.1%
Simplified81.1%
Taylor expanded in t around 0 65.6%
Taylor expanded in c around 0 57.9%
Final simplification58.8%
(FPCore (x y z t a b c) :precision binary64 (if (<= z 1.14e-212) 1.0 (if (<= z 4.4e+93) (/ x (+ x y)) 1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 1.14e-212) {
tmp = 1.0;
} else if (z <= 4.4e+93) {
tmp = x / (x + y);
} 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 (z <= 1.14d-212) then
tmp = 1.0d0
else if (z <= 4.4d+93) then
tmp = x / (x + y)
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 (z <= 1.14e-212) {
tmp = 1.0;
} else if (z <= 4.4e+93) {
tmp = x / (x + y);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= 1.14e-212: tmp = 1.0 elif z <= 4.4e+93: tmp = x / (x + y) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= 1.14e-212) tmp = 1.0; elseif (z <= 4.4e+93) tmp = Float64(x / Float64(x + y)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (z <= 1.14e-212) tmp = 1.0; elseif (z <= 4.4e+93) tmp = x / (x + y); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, 1.14e-212], 1.0, If[LessEqual[z, 4.4e+93], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.14 \cdot 10^{-212}:\\
\;\;\;\;1\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+93}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if z < 1.13999999999999999e-212 or 4.40000000000000042e93 < z Initial program 90.8%
Taylor expanded in a around inf 57.5%
Taylor expanded in x around inf 59.1%
if 1.13999999999999999e-212 < z < 4.40000000000000042e93Initial program 98.4%
Taylor expanded in a around inf 74.0%
Taylor expanded in a around 0 47.9%
Final simplification56.4%
(FPCore (x y z t a b c) :precision binary64 1.0)
double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = 1.0d0
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
def code(x, y, z, t, a, b, c): return 1.0
function code(x, y, z, t, a, b, c) return 1.0 end
function tmp = code(x, y, z, t, a, b, c) tmp = 1.0; end
code[x_, y_, z_, t_, a_, b_, c_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 92.6%
Taylor expanded in a around inf 61.5%
Taylor expanded in x around inf 53.2%
Final simplification53.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 2023279
(FPCore (x y z t a b c)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, I"
:precision binary64
:herbie-target
(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 (/ (- (* (* z (sqrt (+ t a))) (* (* 3.0 t) (- a (/ 5.0 6.0)))) (* (- (* (+ (/ 5.0 6.0) a) (* 3.0 t)) 2.0) (* (- a (/ 5.0 6.0)) (* (- b c) t)))) (* (* (* t t) 3.0) (- a (/ 5.0 6.0))))))))) (/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))))
(/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))