
(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 (sqrt (+ a t))))
(if (<=
(+
(/ (* z t_1) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a 0.8333333333333334))))
INFINITY)
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(+
(/ z (/ t t_1))
(* (- b c) (- (- (/ (/ 2.0 t) 3.0) 0.8333333333333334) a)))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = sqrt((a + t));
double tmp;
if ((((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))) <= ((double) INFINITY)) {
tmp = x / (x + (y * pow(exp(2.0), ((z / (t / t_1)) + ((b - c) * ((((2.0 / t) / 3.0) - 0.8333333333333334) - a))))));
} else {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = Math.sqrt((a + t));
double tmp;
if ((((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))) <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.pow(Math.exp(2.0), ((z / (t / t_1)) + ((b - c) * ((((2.0 / t) / 3.0) - 0.8333333333333334) - a))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = math.sqrt((a + t)) tmp = 0 if (((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))) <= math.inf: tmp = x / (x + (y * math.pow(math.exp(2.0), ((z / (t / t_1)) + ((b - c) * ((((2.0 / t) / 3.0) - 0.8333333333333334) - a)))))) else: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = sqrt(Float64(a + t)) tmp = 0.0 if (Float64(Float64(Float64(z * t_1) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + 0.8333333333333334)))) <= Inf) tmp = Float64(x / Float64(x + Float64(y * (exp(2.0) ^ Float64(Float64(z / Float64(t / t_1)) + Float64(Float64(b - c) * Float64(Float64(Float64(Float64(2.0 / t) / 3.0) - 0.8333333333333334) - a))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = sqrt((a + t)); tmp = 0.0; if ((((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))) <= Inf) tmp = x / (x + (y * (exp(2.0) ^ ((z / (t / t_1)) + ((b - c) * ((((2.0 / t) / 3.0) - 0.8333333333333334) - a)))))); else tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(z * t$95$1), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x / N[(x + N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(z / N[(t / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(N[(N[(2.0 / t), $MachinePrecision] / 3.0), $MachinePrecision] - 0.8333333333333334), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{a + t}\\
\mathbf{if}\;\frac{z \cdot t_1}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + 0.8333333333333334\right)\right) \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{z}{\frac{t}{t_1}} + \left(b - c\right) \cdot \left(\left(\frac{\frac{2}{t}}{3} - 0.8333333333333334\right) - a\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 98.0%
exp-prod98.0%
associate-/l*98.8%
associate--l+98.8%
metadata-eval98.8%
associate-/r*98.8%
Simplified98.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 t around 0 83.9%
Final simplification98.1%
(FPCore (x y z t a b c)
:precision binary64
(/
x
(fma
y
(pow
(exp 2.0)
(fma
(+ (+ a 0.8333333333333334) (/ -0.6666666666666666 t))
(- c b)
(* (/ z t) (sqrt (+ a 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(((a + 0.8333333333333334) + (-0.6666666666666666 / t)), (c - b), ((z / t) * sqrt((a + t))))), x);
}
function code(x, y, z, t, a, b, c) return Float64(x / fma(y, (exp(2.0) ^ fma(Float64(Float64(a + 0.8333333333333334) + Float64(-0.6666666666666666 / t)), Float64(c - b), Float64(Float64(z / t) * sqrt(Float64(a + t))))), x)) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(N[(a + 0.8333333333333334), $MachinePrecision] + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision] * N[(c - b), $MachinePrecision] + N[(N[(z / t), $MachinePrecision] * N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\mathsf{fma}\left(y, {\left(e^{2}\right)}^{\left(\mathsf{fma}\left(\left(a + 0.8333333333333334\right) + \frac{-0.6666666666666666}{t}, c - b, \frac{z}{t} \cdot \sqrt{a + t}\right)\right)}, x\right)}
\end{array}
Initial program 93.4%
Simplified97.4%
Final simplification97.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* z (sqrt (+ a t))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a 0.8333333333333334))))))
(if (<= t_1 INFINITY)
(/ x (+ x (* y (exp (* 2.0 t_1)))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * sqrt((a + t))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * Math.sqrt((a + t))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((z * math.sqrt((a + t))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))) tmp = 0 if t_1 <= math.inf: tmp = x / (x + (y * math.exp((2.0 * t_1)))) else: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(z * sqrt(Float64(a + t))) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + 0.8333333333333334)))) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * t_1))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((z * sqrt((a + t))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))); tmp = 0.0; if (t_1 <= Inf) tmp = x / (x + (y * exp((2.0 * t_1)))); else tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(z * N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \sqrt{a + t}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + 0.8333333333333334\right)\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot t_1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 98.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 t around 0 83.9%
Final simplification97.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 5e-269)
(/
x
(+
x
(*
y
(exp (* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 2e+176)
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(* z (sqrt (/ 1.0 t)))
(* (+ (/ -0.6666666666666666 t) 0.8333333333333334) (- c b))))))))
(/ x (+ x (* y (exp (* 2.0 (* (+ a 0.8333333333333334) (- c b))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 5e-269) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 2e+176) {
tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) + (((-0.6666666666666666 / t) + 0.8333333333333334) * (c - b)))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 5d-269) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 2d+176) then
tmp = x / (x + (y * exp((2.0d0 * ((z * sqrt((1.0d0 / t))) + ((((-0.6666666666666666d0) / t) + 0.8333333333333334d0) * (c - b)))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((a + 0.8333333333333334d0) * (c - b))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 5e-269) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 2e+176) {
tmp = x / (x + (y * Math.exp((2.0 * ((z * Math.sqrt((1.0 / t))) + (((-0.6666666666666666 / t) + 0.8333333333333334) * (c - b)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 5e-269: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 2e+176: tmp = x / (x + (y * math.exp((2.0 * ((z * math.sqrt((1.0 / t))) + (((-0.6666666666666666 / t) + 0.8333333333333334) * (c - b))))))) else: tmp = x / (x + (y * math.exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 5e-269) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); elseif (t <= 2e+176) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(z * sqrt(Float64(1.0 / t))) + Float64(Float64(Float64(-0.6666666666666666 / t) + 0.8333333333333334) * Float64(c - b)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 5e-269) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 2e+176) tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) + (((-0.6666666666666666 / t) + 0.8333333333333334) * (c - b))))))); else tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 5e-269], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+176], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(z * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(-0.6666666666666666 / t), $MachinePrecision] + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{-269}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+176}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(z \cdot \sqrt{\frac{1}{t}} + \left(\frac{-0.6666666666666666}{t} + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < 4.99999999999999979e-269Initial program 92.4%
Taylor expanded in t around 0 93.9%
if 4.99999999999999979e-269 < t < 2e176Initial program 95.2%
Taylor expanded in a around 0 85.4%
*-commutative85.4%
*-commutative85.4%
cancel-sign-sub-inv85.4%
metadata-eval85.4%
associate-*r/85.4%
metadata-eval85.4%
Simplified85.4%
if 2e176 < t Initial program 90.5%
Taylor expanded in t around inf 94.3%
mul-1-neg94.3%
+-commutative94.3%
distribute-rgt-neg-in94.3%
neg-sub094.3%
associate--r-94.3%
neg-sub094.3%
+-commutative94.3%
sub-neg94.3%
*-commutative94.3%
Simplified94.3%
Final simplification89.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 2.5e-176)
(/
x
(+
x
(*
y
(exp (* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 1.2e-48)
1.0
(/ x (+ x (* y (exp (* 2.0 (* (+ a 0.8333333333333334) (- c b))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 2.5e-176) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1.2e-48) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 2.5d-176) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 1.2d-48) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp((2.0d0 * ((a + 0.8333333333333334d0) * (c - b))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 2.5e-176) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1.2e-48) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 2.5e-176: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 1.2e-48: tmp = 1.0 else: tmp = x / (x + (y * math.exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 2.5e-176) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); elseif (t <= 1.2e-48) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 2.5e-176) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 1.2e-48) tmp = 1.0; else tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 2.5e-176], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-48], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.5 \cdot 10^{-176}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-48}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < 2.5e-176Initial program 90.5%
Taylor expanded in t around 0 89.8%
if 2.5e-176 < t < 1.2e-48Initial program 94.4%
Taylor expanded in a around inf 48.7%
Taylor expanded in x around inf 67.7%
if 1.2e-48 < t Initial program 95.8%
Taylor expanded in t around inf 88.2%
mul-1-neg88.2%
+-commutative88.2%
distribute-rgt-neg-in88.2%
neg-sub088.2%
associate--r-88.2%
neg-sub088.2%
+-commutative88.2%
sub-neg88.2%
*-commutative88.2%
Simplified88.2%
Final simplification86.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 6.2e-80)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (or (<= t 8.2e+169) (not (<= t 9.5e+259)))
(/ x (+ x (* y (exp (* 1.6666666666666667 (- c b))))))
(/ x (+ x (* y (exp (* 2.0 (* a (- c b))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 6.2e-80) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 8.2e+169) || !(t <= 9.5e+259)) {
tmp = x / (x + (y * exp((1.6666666666666667 * (c - b)))));
} else {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 6.2d-80) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if ((t <= 8.2d+169) .or. (.not. (t <= 9.5d+259))) then
tmp = x / (x + (y * exp((1.6666666666666667d0 * (c - b)))))
else
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 6.2e-80) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 8.2e+169) || !(t <= 9.5e+259)) {
tmp = x / (x + (y * Math.exp((1.6666666666666667 * (c - b)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 6.2e-80: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif (t <= 8.2e+169) or not (t <= 9.5e+259): tmp = x / (x + (y * math.exp((1.6666666666666667 * (c - b))))) else: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 6.2e-80) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif ((t <= 8.2e+169) || !(t <= 9.5e+259)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.6666666666666667 * Float64(c - b)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 6.2e-80) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif ((t <= 8.2e+169) || ~((t <= 9.5e+259))) tmp = x / (x + (y * exp((1.6666666666666667 * (c - b))))); else tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 6.2e-80], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 8.2e+169], N[Not[LessEqual[t, 9.5e+259]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(1.6666666666666667 * N[(c - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.2 \cdot 10^{-80}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+169} \lor \neg \left(t \leq 9.5 \cdot 10^{+259}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.6666666666666667 \cdot \left(c - b\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < 6.20000000000000032e-80Initial program 91.0%
Taylor expanded in t around 0 80.1%
Taylor expanded in a around 0 77.5%
if 6.20000000000000032e-80 < t < 8.2000000000000006e169 or 9.4999999999999993e259 < t Initial program 98.9%
Taylor expanded in t around inf 85.0%
mul-1-neg85.0%
+-commutative85.0%
distribute-rgt-neg-in85.0%
neg-sub085.0%
associate--r-85.0%
neg-sub085.0%
+-commutative85.0%
sub-neg85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in a around 0 76.4%
if 8.2000000000000006e169 < t < 9.4999999999999993e259Initial program 88.3%
Taylor expanded in a around inf 79.5%
Final simplification77.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 1.6666666666666667 (- c b))))))))
(if (<= t -1.15e-300)
t_1
(if (<= t 3.8e-173)
(/ x (+ x (* y (- 1.0 (* 1.3333333333333333 (/ (- c b) t))))))
(if (<= t 7.5e-45) 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((1.6666666666666667 * (c - b)))));
double tmp;
if (t <= -1.15e-300) {
tmp = t_1;
} else if (t <= 3.8e-173) {
tmp = x / (x + (y * (1.0 - (1.3333333333333333 * ((c - b) / t)))));
} else if (t <= 7.5e-45) {
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((1.6666666666666667d0 * (c - b)))))
if (t <= (-1.15d-300)) then
tmp = t_1
else if (t <= 3.8d-173) then
tmp = x / (x + (y * (1.0d0 - (1.3333333333333333d0 * ((c - b) / t)))))
else if (t <= 7.5d-45) 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((1.6666666666666667 * (c - b)))));
double tmp;
if (t <= -1.15e-300) {
tmp = t_1;
} else if (t <= 3.8e-173) {
tmp = x / (x + (y * (1.0 - (1.3333333333333333 * ((c - b) / t)))));
} else if (t <= 7.5e-45) {
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((1.6666666666666667 * (c - b))))) tmp = 0 if t <= -1.15e-300: tmp = t_1 elif t <= 3.8e-173: tmp = x / (x + (y * (1.0 - (1.3333333333333333 * ((c - b) / t))))) elif t <= 7.5e-45: 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(1.6666666666666667 * Float64(c - b)))))) tmp = 0.0 if (t <= -1.15e-300) tmp = t_1; elseif (t <= 3.8e-173) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 - Float64(1.3333333333333333 * Float64(Float64(c - b) / t)))))); elseif (t <= 7.5e-45) 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((1.6666666666666667 * (c - b))))); tmp = 0.0; if (t <= -1.15e-300) tmp = t_1; elseif (t <= 3.8e-173) tmp = x / (x + (y * (1.0 - (1.3333333333333333 * ((c - b) / t))))); elseif (t <= 7.5e-45) 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[(1.6666666666666667 * N[(c - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e-300], t$95$1, If[LessEqual[t, 3.8e-173], N[(x / N[(x + N[(y * N[(1.0 - N[(1.3333333333333333 * N[(N[(c - b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e-45], 1.0, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{1.6666666666666667 \cdot \left(c - b\right)}}\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{-300}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-173}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 - 1.3333333333333333 \cdot \frac{c - b}{t}\right)}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-45}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.15e-300 or 7.5000000000000006e-45 < t Initial program 94.7%
Taylor expanded in t around inf 88.0%
mul-1-neg88.0%
+-commutative88.0%
distribute-rgt-neg-in88.0%
neg-sub088.0%
associate--r-88.0%
neg-sub088.0%
+-commutative88.0%
sub-neg88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in a around 0 77.5%
if -1.15e-300 < t < 3.8000000000000003e-173Initial program 86.1%
Taylor expanded in t around 0 78.1%
Taylor expanded in t around inf 62.1%
Taylor expanded in a around 0 62.5%
if 3.8000000000000003e-173 < t < 7.5000000000000006e-45Initial program 94.3%
Taylor expanded in a around inf 49.9%
Taylor expanded in x around inf 69.6%
Final simplification74.3%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 8.5e-80) (/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t)))))) (/ x (+ x (* y (exp (* 2.0 (* (+ a 0.8333333333333334) (- c b)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 8.5e-80) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 8.5d-80) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * ((a + 0.8333333333333334d0) * (c - b))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 8.5e-80) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 8.5e-80: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 8.5e-80) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 8.5e-80) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 8.5e-80], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.5 \cdot 10^{-80}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < 8.49999999999999939e-80Initial program 91.0%
Taylor expanded in t around 0 80.1%
Taylor expanded in a around 0 77.5%
if 8.49999999999999939e-80 < t Initial program 96.1%
Taylor expanded in t around inf 86.6%
mul-1-neg86.6%
+-commutative86.6%
distribute-rgt-neg-in86.6%
neg-sub086.6%
associate--r-86.6%
neg-sub086.6%
+-commutative86.6%
sub-neg86.6%
*-commutative86.6%
Simplified86.6%
Final simplification81.9%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 2.6e-79) (/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b 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 <= 2.6e-79) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - 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 <= 2.6d-79) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - 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 <= 2.6e-79) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - 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 <= 2.6e-79: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - 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 <= 2.6e-79) 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(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 <= 2.6e-79) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - 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, 2.6e-79], 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[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.6 \cdot 10^{-79}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if t < 2.59999999999999994e-79Initial program 91.0%
Taylor expanded in t around 0 80.1%
Taylor expanded in a around 0 77.5%
if 2.59999999999999994e-79 < t Initial program 96.1%
Taylor expanded in t around inf 86.6%
mul-1-neg86.6%
+-commutative86.6%
distribute-rgt-neg-in86.6%
neg-sub086.6%
associate--r-86.6%
neg-sub086.6%
+-commutative86.6%
sub-neg86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in a around 0 73.3%
Final simplification75.5%
(FPCore (x y z t a b c) :precision binary64 (if (<= (- b c) -1e-45) (/ 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 ((b - c) <= -1e-45) {
tmp = 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 ((b - c) <= (-1d-45)) then
tmp = 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 ((b - c) <= -1e-45) {
tmp = 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 (b - c) <= -1e-45: tmp = 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 (Float64(b - c) <= -1e-45) tmp = 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 ((b - c) <= -1e-45) tmp = 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[LessEqual[N[(b - c), $MachinePrecision], -1e-45], N[(x / N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - c \leq -1 \cdot 10^{-45}:\\
\;\;\;\;\frac{x}{y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 b c) < -9.99999999999999984e-46Initial program 96.0%
Taylor expanded in t around inf 83.6%
mul-1-neg83.6%
+-commutative83.6%
distribute-rgt-neg-in83.6%
neg-sub083.6%
associate--r-83.6%
neg-sub083.6%
+-commutative83.6%
sub-neg83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in a around 0 73.9%
Taylor expanded in x around 0 70.9%
if -9.99999999999999984e-46 < (-.f64 b c) Initial program 91.7%
Taylor expanded in a around inf 59.1%
Taylor expanded in x around inf 64.6%
Final simplification67.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -2.4e+122)
(/ x (* y (exp (* -2.0 (* a b)))))
(if (<= b -5.6e-49)
(/ x (+ x (* y (- 1.0 (* 1.3333333333333333 (/ (- c b) t))))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -2.4e+122) {
tmp = x / (y * exp((-2.0 * (a * b))));
} else if (b <= -5.6e-49) {
tmp = x / (x + (y * (1.0 - (1.3333333333333333 * ((c - b) / 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 <= (-2.4d+122)) then
tmp = x / (y * exp(((-2.0d0) * (a * b))))
else if (b <= (-5.6d-49)) then
tmp = x / (x + (y * (1.0d0 - (1.3333333333333333d0 * ((c - b) / 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 <= -2.4e+122) {
tmp = x / (y * Math.exp((-2.0 * (a * b))));
} else if (b <= -5.6e-49) {
tmp = x / (x + (y * (1.0 - (1.3333333333333333 * ((c - b) / t)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -2.4e+122: tmp = x / (y * math.exp((-2.0 * (a * b)))) elif b <= -5.6e-49: tmp = x / (x + (y * (1.0 - (1.3333333333333333 * ((c - b) / t))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -2.4e+122) tmp = Float64(x / Float64(y * exp(Float64(-2.0 * Float64(a * b))))); elseif (b <= -5.6e-49) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 - Float64(1.3333333333333333 * Float64(Float64(c - b) / 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 <= -2.4e+122) tmp = x / (y * exp((-2.0 * (a * b)))); elseif (b <= -5.6e-49) tmp = x / (x + (y * (1.0 - (1.3333333333333333 * ((c - b) / t))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -2.4e+122], N[(x / N[(y * N[Exp[N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -5.6e-49], N[(x / N[(x + N[(y * N[(1.0 - N[(1.3333333333333333 * N[(N[(c - b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.4 \cdot 10^{+122}:\\
\;\;\;\;\frac{x}{y \cdot e^{-2 \cdot \left(a \cdot b\right)}}\\
\mathbf{elif}\;b \leq -5.6 \cdot 10^{-49}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 - 1.3333333333333333 \cdot \frac{c - b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -2.4000000000000002e122Initial program 97.7%
Taylor expanded in a around inf 73.1%
Taylor expanded in c around 0 64.2%
associate-*r*64.2%
Simplified64.2%
Taylor expanded in x around 0 55.0%
if -2.4000000000000002e122 < b < -5.59999999999999995e-49Initial program 92.4%
Taylor expanded in t around 0 59.5%
Taylor expanded in t around inf 44.8%
Taylor expanded in a around 0 60.4%
if -5.59999999999999995e-49 < b Initial program 92.6%
Taylor expanded in a around inf 58.9%
Taylor expanded in x around inf 61.6%
Final simplification60.3%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -3.6e-46) (/ x (+ x (* y (- 1.0 (* 1.3333333333333333 (/ (- c b) t)))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.6e-46) {
tmp = x / (x + (y * (1.0 - (1.3333333333333333 * ((c - b) / 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 <= (-3.6d-46)) then
tmp = x / (x + (y * (1.0d0 - (1.3333333333333333d0 * ((c - b) / 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 <= -3.6e-46) {
tmp = x / (x + (y * (1.0 - (1.3333333333333333 * ((c - b) / t)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -3.6e-46: tmp = x / (x + (y * (1.0 - (1.3333333333333333 * ((c - b) / t))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -3.6e-46) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 - Float64(1.3333333333333333 * Float64(Float64(c - b) / 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 <= -3.6e-46) tmp = x / (x + (y * (1.0 - (1.3333333333333333 * ((c - b) / t))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -3.6e-46], N[(x / N[(x + N[(y * N[(1.0 - N[(1.3333333333333333 * N[(N[(c - b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.6 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 - 1.3333333333333333 \cdot \frac{c - b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -3.6e-46Initial program 95.2%
Taylor expanded in t around 0 52.0%
Taylor expanded in t around inf 40.0%
Taylor expanded in a around 0 51.5%
if -3.6e-46 < b Initial program 92.6%
Taylor expanded in a around inf 58.9%
Taylor expanded in x around inf 61.6%
Final simplification58.4%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -3.6e+63) 1.0 (if (<= b -2.1e-33) (* -0.75 (* (/ t c) (/ x y))) 1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.6e+63) {
tmp = 1.0;
} else if (b <= -2.1e-33) {
tmp = -0.75 * ((t / c) * (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 (b <= (-3.6d+63)) then
tmp = 1.0d0
else if (b <= (-2.1d-33)) then
tmp = (-0.75d0) * ((t / c) * (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 (b <= -3.6e+63) {
tmp = 1.0;
} else if (b <= -2.1e-33) {
tmp = -0.75 * ((t / c) * (x / y));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -3.6e+63: tmp = 1.0 elif b <= -2.1e-33: tmp = -0.75 * ((t / c) * (x / y)) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -3.6e+63) tmp = 1.0; elseif (b <= -2.1e-33) tmp = Float64(-0.75 * Float64(Float64(t / c) * 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 (b <= -3.6e+63) tmp = 1.0; elseif (b <= -2.1e-33) tmp = -0.75 * ((t / c) * (x / y)); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -3.6e+63], 1.0, If[LessEqual[b, -2.1e-33], N[(-0.75 * N[(N[(t / c), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.6 \cdot 10^{+63}:\\
\;\;\;\;1\\
\mathbf{elif}\;b \leq -2.1 \cdot 10^{-33}:\\
\;\;\;\;-0.75 \cdot \left(\frac{t}{c} \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -3.59999999999999999e63 or -2.1e-33 < b Initial program 93.7%
Taylor expanded in a around inf 63.4%
Taylor expanded in x around inf 53.8%
if -3.59999999999999999e63 < b < -2.1e-33Initial program 90.5%
Taylor expanded in c around inf 72.4%
cancel-sign-sub-inv72.4%
+-commutative72.4%
metadata-eval72.4%
associate-*r/72.4%
metadata-eval72.4%
associate-+r+72.4%
Simplified72.4%
Taylor expanded in c around 0 64.5%
associate-*r/64.5%
metadata-eval64.5%
Simplified64.5%
Taylor expanded in t around 0 44.9%
times-frac58.4%
Simplified58.4%
Final simplification54.2%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -2.05e+136) (* -0.5 (/ x (* a (* y b)))) (if (<= b -1.35e-40) (/ 1.0 (/ (+ x y) x)) 1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -2.05e+136) {
tmp = -0.5 * (x / (a * (y * b)));
} else if (b <= -1.35e-40) {
tmp = 1.0 / ((x + y) / x);
} 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 <= (-2.05d+136)) then
tmp = (-0.5d0) * (x / (a * (y * b)))
else if (b <= (-1.35d-40)) then
tmp = 1.0d0 / ((x + y) / x)
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 <= -2.05e+136) {
tmp = -0.5 * (x / (a * (y * b)));
} else if (b <= -1.35e-40) {
tmp = 1.0 / ((x + y) / x);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -2.05e+136: tmp = -0.5 * (x / (a * (y * b))) elif b <= -1.35e-40: tmp = 1.0 / ((x + y) / x) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -2.05e+136) tmp = Float64(-0.5 * Float64(x / Float64(a * Float64(y * b)))); elseif (b <= -1.35e-40) tmp = Float64(1.0 / Float64(Float64(x + y) / x)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -2.05e+136) tmp = -0.5 * (x / (a * (y * b))); elseif (b <= -1.35e-40) tmp = 1.0 / ((x + y) / x); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -2.05e+136], N[(-0.5 * N[(x / N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.35e-40], N[(1.0 / N[(N[(x + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.05 \cdot 10^{+136}:\\
\;\;\;\;-0.5 \cdot \frac{x}{a \cdot \left(y \cdot b\right)}\\
\mathbf{elif}\;b \leq -1.35 \cdot 10^{-40}:\\
\;\;\;\;\frac{1}{\frac{x + y}{x}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -2.0499999999999999e136Initial program 97.4%
Taylor expanded in a around inf 72.0%
Taylor expanded in c around 0 66.9%
associate-*r*66.9%
Simplified66.9%
Taylor expanded in a around 0 39.2%
*-commutative39.2%
*-commutative39.2%
associate-*r*39.2%
Simplified39.2%
Taylor expanded in b around inf 41.4%
if -2.0499999999999999e136 < b < -1.35e-40Initial program 93.3%
Taylor expanded in a around inf 71.6%
Taylor expanded in a around 0 39.9%
+-commutative39.9%
Simplified39.9%
clear-num41.1%
inv-pow41.1%
+-commutative41.1%
Applied egg-rr41.1%
unpow-141.1%
Simplified41.1%
if -1.35e-40 < b Initial program 92.6%
Taylor expanded in a around inf 58.9%
Taylor expanded in x around inf 61.6%
Final simplification55.1%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -3.6e-46) (/ x (+ x (* 1.3333333333333333 (/ (* y b) t)))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.6e-46) {
tmp = x / (x + (1.3333333333333333 * ((y * b) / 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 <= (-3.6d-46)) then
tmp = x / (x + (1.3333333333333333d0 * ((y * b) / 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 <= -3.6e-46) {
tmp = x / (x + (1.3333333333333333 * ((y * b) / t)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -3.6e-46: tmp = x / (x + (1.3333333333333333 * ((y * b) / t))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -3.6e-46) tmp = Float64(x / Float64(x + Float64(1.3333333333333333 * Float64(Float64(y * b) / 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 <= -3.6e-46) tmp = x / (x + (1.3333333333333333 * ((y * b) / t))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -3.6e-46], N[(x / N[(x + N[(1.3333333333333333 * N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.6 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{x + 1.3333333333333333 \cdot \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -3.6e-46Initial program 95.2%
Taylor expanded in t around 0 52.0%
Taylor expanded in t around inf 40.0%
Taylor expanded in b around inf 43.3%
if -3.6e-46 < b Initial program 92.6%
Taylor expanded in a around inf 58.9%
Taylor expanded in x around inf 61.6%
Final simplification55.7%
(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.4%
Taylor expanded in a around inf 63.0%
Taylor expanded in x around inf 51.2%
Final simplification51.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 2024024
(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)))))))))))