
(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 19 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))
(* (+ a (- 0.8333333333333334 (/ (/ 2.0 t) 3.0))) (- c b)))))))
(/ x (+ x (* y (exp (* -2.0 (* a b)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double 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)) + ((a + (0.8333333333333334 - ((2.0 / t) / 3.0))) * (c - b))))));
} else {
tmp = x / (x + (y * exp((-2.0 * (a * b)))));
}
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)) + ((a + (0.8333333333333334 - ((2.0 / t) / 3.0))) * (c - b))))));
} else {
tmp = x / (x + (y * Math.exp((-2.0 * (a * b)))));
}
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)) + ((a + (0.8333333333333334 - ((2.0 / t) / 3.0))) * (c - b)))))) else: tmp = x / (x + (y * math.exp((-2.0 * (a * b))))) 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(a + Float64(0.8333333333333334 - Float64(Float64(2.0 / t) / 3.0))) * Float64(c - b))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(a * b)))))); 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)) + ((a + (0.8333333333333334 - ((2.0 / t) / 3.0))) * (c - b)))))); else tmp = x / (x + (y * exp((-2.0 * (a * b))))); 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[(a + N[(0.8333333333333334 - N[(N[(2.0 / t), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
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(a + \left(0.8333333333333334 - \frac{\frac{2}{t}}{3}\right)\right) \cdot \left(c - b\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(a \cdot b\right)}}\\
\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.4%
exp-prod98.4%
associate-/l*99.2%
associate--l+99.2%
metadata-eval99.2%
associate-/r*99.2%
Simplified99.2%
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 70.8%
Taylor expanded in c around 0 80.5%
Final simplification98.5%
(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 94.6%
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 (* a b)))))))))
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 * (a * b)))));
}
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 * (a * b)))));
}
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 * (a * b))))) 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(a * b)))))); 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 * (a * b))))); 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[(a * b), $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 \left(a \cdot b\right)}}\\
\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.4%
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 70.8%
Taylor expanded in c around 0 80.5%
Final simplification97.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 4.7e-177)
(/
x
(+
x
(*
y
(exp (* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 4e+77)
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(* z (sqrt (/ 1.0 t)))
(* (+ (/ -0.6666666666666666 t) 0.8333333333333334) (- c b))))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
(- b c)
(- -0.8333333333333334 (+ a (/ -0.6666666666666666 t))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 4.7e-177) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 4e+77) {
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 * ((b - c) * (-0.8333333333333334 - (a + (-0.6666666666666666 / t))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 4.7d-177) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 4d+77) 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 * ((b - c) * ((-0.8333333333333334d0) - (a + ((-0.6666666666666666d0) / t))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 4.7e-177) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 4e+77) {
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 * ((b - c) * (-0.8333333333333334 - (a + (-0.6666666666666666 / t))))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 4.7e-177: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 4e+77: 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 * ((b - c) * (-0.8333333333333334 - (a + (-0.6666666666666666 / t)))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 4.7e-177) 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 <= 4e+77) 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(b - c) * Float64(-0.8333333333333334 - Float64(a + Float64(-0.6666666666666666 / t))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 4.7e-177) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 4e+77) 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 * ((b - c) * (-0.8333333333333334 - (a + (-0.6666666666666666 / t)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 4.7e-177], 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, 4e+77], 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[(b - c), $MachinePrecision] * N[(-0.8333333333333334 - N[(a + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.7 \cdot 10^{-177}:\\
\;\;\;\;\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 4 \cdot 10^{+77}:\\
\;\;\;\;\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(b - c\right) \cdot \left(-0.8333333333333334 - \left(a + \frac{-0.6666666666666666}{t}\right)\right)\right)}}\\
\end{array}
\end{array}
if t < 4.69999999999999967e-177Initial program 90.9%
Taylor expanded in t around 0 91.1%
if 4.69999999999999967e-177 < t < 3.99999999999999993e77Initial program 100.0%
Taylor expanded in a around 0 90.9%
*-commutative90.9%
*-commutative90.9%
cancel-sign-sub-inv90.9%
metadata-eval90.9%
associate-*r/90.9%
metadata-eval90.9%
Simplified90.9%
if 3.99999999999999993e77 < t Initial program 93.2%
Taylor expanded in z around 0 97.3%
mul-1-neg97.3%
+-commutative97.3%
associate-*r/97.3%
metadata-eval97.3%
metadata-eval97.3%
associate-*l/97.3%
distribute-rgt-neg-in97.3%
neg-sub097.3%
+-commutative97.3%
associate-*l/97.3%
metadata-eval97.3%
metadata-eval97.3%
associate-*r/97.3%
associate--l+97.3%
associate--r+97.3%
metadata-eval97.3%
cancel-sign-sub-inv97.3%
metadata-eval97.3%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
Final simplification92.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 2e-165)
(/
x
(+
x
(*
y
(exp (* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
(- b c)
(- -0.8333333333333334 (+ a (/ -0.6666666666666666 t)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 2e-165) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - (a + (-0.6666666666666666 / t))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 2d-165) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * ((b - c) * ((-0.8333333333333334d0) - (a + ((-0.6666666666666666d0) / t))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 2e-165) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((b - c) * (-0.8333333333333334 - (a + (-0.6666666666666666 / t))))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 2e-165: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) else: tmp = x / (x + (y * math.exp((2.0 * ((b - c) * (-0.8333333333333334 - (a + (-0.6666666666666666 / t)))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 2e-165) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(b - c) * Float64(-0.8333333333333334 - Float64(a + Float64(-0.6666666666666666 / t))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 2e-165) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); else tmp = x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - (a + (-0.6666666666666666 / t)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 2e-165], 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], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(b - c), $MachinePrecision] * N[(-0.8333333333333334 - N[(a + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2 \cdot 10^{-165}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(b - c\right) \cdot \left(-0.8333333333333334 - \left(a + \frac{-0.6666666666666666}{t}\right)\right)\right)}}\\
\end{array}
\end{array}
if t < 2e-165Initial program 91.3%
Taylor expanded in t around 0 90.5%
if 2e-165 < t Initial program 96.8%
Taylor expanded in z around 0 90.5%
mul-1-neg90.5%
+-commutative90.5%
associate-*r/90.5%
metadata-eval90.5%
metadata-eval90.5%
associate-*l/90.5%
distribute-rgt-neg-in90.5%
neg-sub090.5%
+-commutative90.5%
associate-*l/90.5%
metadata-eval90.5%
metadata-eval90.5%
associate-*r/90.5%
associate--l+90.5%
associate--r+90.5%
metadata-eval90.5%
cancel-sign-sub-inv90.5%
metadata-eval90.5%
associate-*r/90.5%
metadata-eval90.5%
Simplified90.5%
Final simplification90.5%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -5e-238)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 5.2e-96)
(/ x (+ x (* y (exp (* 2.0 (* -0.6666666666666666 (/ c t)))))))
(if (<= t 1e-17)
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 <= -5e-238) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 5.2e-96) {
tmp = x / (x + (y * exp((2.0 * (-0.6666666666666666 * (c / t))))));
} else if (t <= 1e-17) {
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 <= (-5d-238)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 5.2d-96) then
tmp = x / (x + (y * exp((2.0d0 * ((-0.6666666666666666d0) * (c / t))))))
else if (t <= 1d-17) 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 <= -5e-238) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 5.2e-96) {
tmp = x / (x + (y * Math.exp((2.0 * (-0.6666666666666666 * (c / t))))));
} else if (t <= 1e-17) {
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 <= -5e-238: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 5.2e-96: tmp = x / (x + (y * math.exp((2.0 * (-0.6666666666666666 * (c / t)))))) elif t <= 1e-17: 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 <= -5e-238) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 5.2e-96) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(-0.6666666666666666 * Float64(c / t))))))); elseif (t <= 1e-17) 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 <= -5e-238) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 5.2e-96) tmp = x / (x + (y * exp((2.0 * (-0.6666666666666666 * (c / t)))))); elseif (t <= 1e-17) 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, -5e-238], 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, 5.2e-96], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(-0.6666666666666666 * N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-17], 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 -5 \cdot 10^{-238}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-96}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(-0.6666666666666666 \cdot \frac{c}{t}\right)}}\\
\mathbf{elif}\;t \leq 10^{-17}:\\
\;\;\;\;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 < -5e-238Initial program 93.6%
Taylor expanded in a around inf 87.6%
if -5e-238 < t < 5.2000000000000003e-96Initial program 92.0%
Taylor expanded in c around inf 69.7%
cancel-sign-sub-inv69.7%
+-commutative69.7%
metadata-eval69.7%
associate-*r/69.7%
metadata-eval69.7%
associate-+r+69.7%
Simplified69.7%
Taylor expanded in t around 0 71.0%
if 5.2000000000000003e-96 < t < 1.00000000000000007e-17Initial program 100.0%
Taylor expanded in a around inf 37.0%
Taylor expanded in a around 0 32.6%
Taylor expanded in x around inf 70.5%
if 1.00000000000000007e-17 < t Initial program 95.6%
Taylor expanded in t around inf 93.9%
mul-1-neg93.9%
+-commutative93.9%
distribute-rgt-neg-in93.9%
neg-sub093.9%
associate--r-93.9%
neg-sub093.9%
+-commutative93.9%
sub-neg93.9%
*-commutative93.9%
Simplified93.9%
Final simplification83.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/ x (+ x (* y (exp (* 2.0 (/ (* (- b c) 0.6666666666666666) t))))))))
(if (<= t 7.8e-82)
t_1
(if (<= t 1.4e-28)
1.0
(if (<= t 3e-12)
t_1
(/
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 t_1 = x / (x + (y * exp((2.0 * (((b - c) * 0.6666666666666666) / t)))));
double tmp;
if (t <= 7.8e-82) {
tmp = t_1;
} else if (t <= 1.4e-28) {
tmp = 1.0;
} else if (t <= 3e-12) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * (((b - c) * 0.6666666666666666d0) / t)))))
if (t <= 7.8d-82) then
tmp = t_1
else if (t <= 1.4d-28) then
tmp = 1.0d0
else if (t <= 3d-12) then
tmp = t_1
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 t_1 = x / (x + (y * Math.exp((2.0 * (((b - c) * 0.6666666666666666) / t)))));
double tmp;
if (t <= 7.8e-82) {
tmp = t_1;
} else if (t <= 1.4e-28) {
tmp = 1.0;
} else if (t <= 3e-12) {
tmp = t_1;
} 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): t_1 = x / (x + (y * math.exp((2.0 * (((b - c) * 0.6666666666666666) / t))))) tmp = 0 if t <= 7.8e-82: tmp = t_1 elif t <= 1.4e-28: tmp = 1.0 elif t <= 3e-12: tmp = t_1 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) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(b - c) * 0.6666666666666666) / t)))))) tmp = 0.0 if (t <= 7.8e-82) tmp = t_1; elseif (t <= 1.4e-28) tmp = 1.0; elseif (t <= 3e-12) tmp = t_1; 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) t_1 = x / (x + (y * exp((2.0 * (((b - c) * 0.6666666666666666) / t))))); tmp = 0.0; if (t <= 7.8e-82) tmp = t_1; elseif (t <= 1.4e-28) tmp = 1.0; elseif (t <= 3e-12) tmp = t_1; 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_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(b - c), $MachinePrecision] * 0.6666666666666666), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 7.8e-82], t$95$1, If[LessEqual[t, 1.4e-28], 1.0, If[LessEqual[t, 3e-12], t$95$1, 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}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \frac{\left(b - c\right) \cdot 0.6666666666666666}{t}}}\\
\mathbf{if}\;t \leq 7.8 \cdot 10^{-82}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-28}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-12}:\\
\;\;\;\;t_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 < 7.79999999999999947e-82 or 1.3999999999999999e-28 < t < 3.0000000000000001e-12Initial program 93.1%
Taylor expanded in z around 0 84.4%
mul-1-neg84.4%
+-commutative84.4%
associate-*r/84.4%
metadata-eval84.4%
metadata-eval84.4%
associate-*l/84.4%
distribute-rgt-neg-in84.4%
neg-sub084.4%
+-commutative84.4%
associate-*l/84.4%
metadata-eval84.4%
metadata-eval84.4%
associate-*r/84.4%
associate--l+84.4%
associate--r+84.4%
metadata-eval84.4%
cancel-sign-sub-inv84.4%
metadata-eval84.4%
associate-*r/84.4%
metadata-eval84.4%
Simplified84.4%
Taylor expanded in t around 0 79.9%
associate-*r/79.9%
Simplified79.9%
if 7.79999999999999947e-82 < t < 1.3999999999999999e-28Initial program 100.0%
Taylor expanded in a around inf 45.8%
Taylor expanded in a around 0 45.7%
Taylor expanded in x around inf 81.8%
if 3.0000000000000001e-12 < t Initial program 95.6%
Taylor expanded in t around inf 94.7%
mul-1-neg94.7%
+-commutative94.7%
distribute-rgt-neg-in94.7%
neg-sub094.7%
associate--r-94.7%
neg-sub094.7%
+-commutative94.7%
sub-neg94.7%
*-commutative94.7%
Simplified94.7%
Final simplification86.4%
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(* (- b c) (- -0.8333333333333334 (+ a (/ -0.6666666666666666 t))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - (a + (-0.6666666666666666 / t))))))));
}
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 * ((b - c) * ((-0.8333333333333334d0) - (a + ((-0.6666666666666666d0) / t))))))))
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 * ((b - c) * (-0.8333333333333334 - (a + (-0.6666666666666666 / t))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * ((b - c) * (-0.8333333333333334 - (a + (-0.6666666666666666 / t))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(b - c) * Float64(-0.8333333333333334 - Float64(a + Float64(-0.6666666666666666 / t))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - (a + (-0.6666666666666666 / t)))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(b - c), $MachinePrecision] * N[(-0.8333333333333334 - N[(a + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\left(b - c\right) \cdot \left(-0.8333333333333334 - \left(a + \frac{-0.6666666666666666}{t}\right)\right)\right)}}
\end{array}
Initial program 94.6%
Taylor expanded in z around 0 87.9%
mul-1-neg87.9%
+-commutative87.9%
associate-*r/87.9%
metadata-eval87.9%
metadata-eval87.9%
associate-*l/87.9%
distribute-rgt-neg-in87.9%
neg-sub087.9%
+-commutative87.9%
associate-*l/87.9%
metadata-eval87.9%
metadata-eval87.9%
associate-*r/87.9%
associate--l+87.9%
associate--r+87.9%
metadata-eval87.9%
cancel-sign-sub-inv87.9%
metadata-eval87.9%
associate-*r/87.9%
metadata-eval87.9%
Simplified87.9%
Final simplification87.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* -2.0 (* a b))))))))
(if (<= b -3.5e+55)
t_1
(if (<= b -1.05e+23)
1.0
(if (<= b -5.5e-65)
t_1
(if (<= b 7.2e-195)
1.0
(if (<= b 1.65e-125)
(/
x
(+
x
(*
y
(+
(*
2.0
(* c (- 0.8333333333333334 (- (/ 0.6666666666666666 t) a))))
1.0))))
1.0)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((-2.0 * (a * b)))));
double tmp;
if (b <= -3.5e+55) {
tmp = t_1;
} else if (b <= -1.05e+23) {
tmp = 1.0;
} else if (b <= -5.5e-65) {
tmp = t_1;
} else if (b <= 7.2e-195) {
tmp = 1.0;
} else if (b <= 1.65e-125) {
tmp = x / (x + (y * ((2.0 * (c * (0.8333333333333334 - ((0.6666666666666666 / t) - a)))) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp(((-2.0d0) * (a * b)))))
if (b <= (-3.5d+55)) then
tmp = t_1
else if (b <= (-1.05d+23)) then
tmp = 1.0d0
else if (b <= (-5.5d-65)) then
tmp = t_1
else if (b <= 7.2d-195) then
tmp = 1.0d0
else if (b <= 1.65d-125) then
tmp = x / (x + (y * ((2.0d0 * (c * (0.8333333333333334d0 - ((0.6666666666666666d0 / t) - a)))) + 1.0d0)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((-2.0 * (a * b)))));
double tmp;
if (b <= -3.5e+55) {
tmp = t_1;
} else if (b <= -1.05e+23) {
tmp = 1.0;
} else if (b <= -5.5e-65) {
tmp = t_1;
} else if (b <= 7.2e-195) {
tmp = 1.0;
} else if (b <= 1.65e-125) {
tmp = x / (x + (y * ((2.0 * (c * (0.8333333333333334 - ((0.6666666666666666 / t) - a)))) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((-2.0 * (a * b))))) tmp = 0 if b <= -3.5e+55: tmp = t_1 elif b <= -1.05e+23: tmp = 1.0 elif b <= -5.5e-65: tmp = t_1 elif b <= 7.2e-195: tmp = 1.0 elif b <= 1.65e-125: tmp = x / (x + (y * ((2.0 * (c * (0.8333333333333334 - ((0.6666666666666666 / t) - a)))) + 1.0))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(a * b)))))) tmp = 0.0 if (b <= -3.5e+55) tmp = t_1; elseif (b <= -1.05e+23) tmp = 1.0; elseif (b <= -5.5e-65) tmp = t_1; elseif (b <= 7.2e-195) tmp = 1.0; elseif (b <= 1.65e-125) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(2.0 * Float64(c * Float64(0.8333333333333334 - Float64(Float64(0.6666666666666666 / t) - a)))) + 1.0)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((-2.0 * (a * b))))); tmp = 0.0; if (b <= -3.5e+55) tmp = t_1; elseif (b <= -1.05e+23) tmp = 1.0; elseif (b <= -5.5e-65) tmp = t_1; elseif (b <= 7.2e-195) tmp = 1.0; elseif (b <= 1.65e-125) tmp = x / (x + (y * ((2.0 * (c * (0.8333333333333334 - ((0.6666666666666666 / t) - a)))) + 1.0))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.5e+55], t$95$1, If[LessEqual[b, -1.05e+23], 1.0, If[LessEqual[b, -5.5e-65], t$95$1, If[LessEqual[b, 7.2e-195], 1.0, If[LessEqual[b, 1.65e-125], N[(x / N[(x + N[(y * N[(N[(2.0 * N[(c * N[(0.8333333333333334 - N[(N[(0.6666666666666666 / t), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{-2 \cdot \left(a \cdot b\right)}}\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{+55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.05 \cdot 10^{+23}:\\
\;\;\;\;1\\
\mathbf{elif}\;b \leq -5.5 \cdot 10^{-65}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{-195}:\\
\;\;\;\;1\\
\mathbf{elif}\;b \leq 1.65 \cdot 10^{-125}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(2 \cdot \left(c \cdot \left(0.8333333333333334 - \left(\frac{0.6666666666666666}{t} - a\right)\right)\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -3.5000000000000001e55 or -1.0500000000000001e23 < b < -5.4999999999999999e-65Initial program 92.5%
Taylor expanded in a around inf 81.0%
Taylor expanded in c around 0 82.5%
if -3.5000000000000001e55 < b < -1.0500000000000001e23 or -5.4999999999999999e-65 < b < 7.2e-195 or 1.65e-125 < b Initial program 94.9%
Taylor expanded in a around inf 52.3%
Taylor expanded in a around 0 35.6%
Taylor expanded in x around inf 66.0%
if 7.2e-195 < b < 1.65e-125Initial program 100.0%
Taylor expanded in c around inf 75.8%
cancel-sign-sub-inv75.8%
+-commutative75.8%
metadata-eval75.8%
associate-*r/75.8%
metadata-eval75.8%
associate-+r+75.8%
Simplified75.8%
Taylor expanded in c around 0 57.8%
remove-double-neg57.8%
mul-1-neg57.8%
sub-neg57.8%
associate--r+57.8%
associate--r+57.8%
sub-neg57.8%
mul-1-neg57.8%
remove-double-neg57.8%
associate--l+57.8%
associate-*r/57.8%
metadata-eval57.8%
Simplified57.8%
Final simplification69.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 1.6666666666666667 (- c b))))))))
(if (<= t -1.6e-238)
t_1
(if (<= t 3.95e-243)
(/ x (+ x (* y (- 1.0 (* 2.0 (* a (- b c)))))))
(if (<= t 170.0) 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.6e-238) {
tmp = t_1;
} else if (t <= 3.95e-243) {
tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - c))))));
} else if (t <= 170.0) {
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.6d-238)) then
tmp = t_1
else if (t <= 3.95d-243) then
tmp = x / (x + (y * (1.0d0 - (2.0d0 * (a * (b - c))))))
else if (t <= 170.0d0) 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.6e-238) {
tmp = t_1;
} else if (t <= 3.95e-243) {
tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - c))))));
} else if (t <= 170.0) {
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.6e-238: tmp = t_1 elif t <= 3.95e-243: tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - c)))))) elif t <= 170.0: 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.6e-238) tmp = t_1; elseif (t <= 3.95e-243) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 - Float64(2.0 * Float64(a * Float64(b - c))))))); elseif (t <= 170.0) 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.6e-238) tmp = t_1; elseif (t <= 3.95e-243) tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - c)))))); elseif (t <= 170.0) 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.6e-238], t$95$1, If[LessEqual[t, 3.95e-243], N[(x / N[(x + N[(y * N[(1.0 - N[(2.0 * N[(a * N[(b - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 170.0], 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.6 \cdot 10^{-238}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.95 \cdot 10^{-243}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 - 2 \cdot \left(a \cdot \left(b - c\right)\right)\right)}\\
\mathbf{elif}\;t \leq 170:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.6000000000000001e-238 or 170 < t Initial program 94.9%
Taylor expanded in t around inf 93.1%
mul-1-neg93.1%
+-commutative93.1%
distribute-rgt-neg-in93.1%
neg-sub093.1%
associate--r-93.1%
neg-sub093.1%
+-commutative93.1%
sub-neg93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in a around 0 85.3%
if -1.6000000000000001e-238 < t < 3.95000000000000007e-243Initial program 92.6%
Taylor expanded in a around inf 42.7%
Taylor expanded in a around 0 64.5%
if 3.95000000000000007e-243 < t < 170Initial program 94.6%
Taylor expanded in a around inf 29.6%
Taylor expanded in a around 0 32.2%
Taylor expanded in x around inf 62.0%
Final simplification76.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* (- c b) 1.6666666666666667)))))))
(if (<= t -2.6e-237)
t_1
(if (<= t 1.2e-95)
(/ x (+ x (* y (exp (* 2.0 (* -0.6666666666666666 (/ c t)))))))
(if (<= t 170.0) 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(((c - b) * 1.6666666666666667))));
double tmp;
if (t <= -2.6e-237) {
tmp = t_1;
} else if (t <= 1.2e-95) {
tmp = x / (x + (y * exp((2.0 * (-0.6666666666666666 * (c / t))))));
} else if (t <= 170.0) {
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(((c - b) * 1.6666666666666667d0))))
if (t <= (-2.6d-237)) then
tmp = t_1
else if (t <= 1.2d-95) then
tmp = x / (x + (y * exp((2.0d0 * ((-0.6666666666666666d0) * (c / t))))))
else if (t <= 170.0d0) 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(((c - b) * 1.6666666666666667))));
double tmp;
if (t <= -2.6e-237) {
tmp = t_1;
} else if (t <= 1.2e-95) {
tmp = x / (x + (y * Math.exp((2.0 * (-0.6666666666666666 * (c / t))))));
} else if (t <= 170.0) {
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(((c - b) * 1.6666666666666667)))) tmp = 0 if t <= -2.6e-237: tmp = t_1 elif t <= 1.2e-95: tmp = x / (x + (y * math.exp((2.0 * (-0.6666666666666666 * (c / t)))))) elif t <= 170.0: 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(Float64(c - b) * 1.6666666666666667))))) tmp = 0.0 if (t <= -2.6e-237) tmp = t_1; elseif (t <= 1.2e-95) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(-0.6666666666666666 * Float64(c / t))))))); elseif (t <= 170.0) 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(((c - b) * 1.6666666666666667)))); tmp = 0.0; if (t <= -2.6e-237) tmp = t_1; elseif (t <= 1.2e-95) tmp = x / (x + (y * exp((2.0 * (-0.6666666666666666 * (c / t)))))); elseif (t <= 170.0) 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[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.6e-237], t$95$1, If[LessEqual[t, 1.2e-95], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(-0.6666666666666666 * N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 170.0], 1.0, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{-237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-95}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(-0.6666666666666666 \cdot \frac{c}{t}\right)}}\\
\mathbf{elif}\;t \leq 170:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.6000000000000002e-237 or 170 < t Initial program 94.9%
Taylor expanded in t around inf 93.1%
mul-1-neg93.1%
+-commutative93.1%
distribute-rgt-neg-in93.1%
neg-sub093.1%
associate--r-93.1%
neg-sub093.1%
+-commutative93.1%
sub-neg93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in a around 0 85.2%
if -2.6000000000000002e-237 < t < 1.2e-95Initial program 92.0%
Taylor expanded in c around inf 69.7%
cancel-sign-sub-inv69.7%
+-commutative69.7%
metadata-eval69.7%
associate-*r/69.7%
metadata-eval69.7%
associate-+r+69.7%
Simplified69.7%
Taylor expanded in t around 0 71.0%
if 1.2e-95 < t < 170Initial program 100.0%
Taylor expanded in a around inf 39.2%
Taylor expanded in a around 0 31.9%
Taylor expanded in x around inf 67.7%
Final simplification79.2%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -1.95e-237)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 1.2e-95)
(/ x (+ x (* y (exp (* 2.0 (* -0.6666666666666666 (/ c t)))))))
(if (<= t 170.0)
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 <= -1.95e-237) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 1.2e-95) {
tmp = x / (x + (y * exp((2.0 * (-0.6666666666666666 * (c / t))))));
} else if (t <= 170.0) {
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 <= (-1.95d-237)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 1.2d-95) then
tmp = x / (x + (y * exp((2.0d0 * ((-0.6666666666666666d0) * (c / t))))))
else if (t <= 170.0d0) 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 <= -1.95e-237) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 1.2e-95) {
tmp = x / (x + (y * Math.exp((2.0 * (-0.6666666666666666 * (c / t))))));
} else if (t <= 170.0) {
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 <= -1.95e-237: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 1.2e-95: tmp = x / (x + (y * math.exp((2.0 * (-0.6666666666666666 * (c / t)))))) elif t <= 170.0: 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 <= -1.95e-237) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 1.2e-95) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(-0.6666666666666666 * Float64(c / t))))))); elseif (t <= 170.0) 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 <= -1.95e-237) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 1.2e-95) tmp = x / (x + (y * exp((2.0 * (-0.6666666666666666 * (c / t)))))); elseif (t <= 170.0) 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, -1.95e-237], 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, 1.2e-95], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(-0.6666666666666666 * N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 170.0], 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 -1.95 \cdot 10^{-237}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-95}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(-0.6666666666666666 \cdot \frac{c}{t}\right)}}\\
\mathbf{elif}\;t \leq 170:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if t < -1.9499999999999999e-237Initial program 93.6%
Taylor expanded in a around inf 87.6%
if -1.9499999999999999e-237 < t < 1.2e-95Initial program 92.0%
Taylor expanded in c around inf 69.7%
cancel-sign-sub-inv69.7%
+-commutative69.7%
metadata-eval69.7%
associate-*r/69.7%
metadata-eval69.7%
associate-+r+69.7%
Simplified69.7%
Taylor expanded in t around 0 71.0%
if 1.2e-95 < t < 170Initial program 100.0%
Taylor expanded in a around inf 39.2%
Taylor expanded in a around 0 31.9%
Taylor expanded in x around inf 67.7%
if 170 < t Initial program 95.4%
Taylor expanded in t around inf 95.5%
mul-1-neg95.5%
+-commutative95.5%
distribute-rgt-neg-in95.5%
neg-sub095.5%
associate--r-95.5%
neg-sub095.5%
+-commutative95.5%
sub-neg95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in a around 0 85.8%
Final simplification79.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -5e+33)
(/ x (+ x (* y (exp (* b -1.6666666666666667)))))
(if (<= b 7.2e-195)
1.0
(if (<= b 3.8e-121)
(/
x
(+
x
(*
y
(+
(* 2.0 (* c (- 0.8333333333333334 (- (/ 0.6666666666666666 t) a))))
1.0))))
1.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -5e+33) {
tmp = x / (x + (y * exp((b * -1.6666666666666667))));
} else if (b <= 7.2e-195) {
tmp = 1.0;
} else if (b <= 3.8e-121) {
tmp = x / (x + (y * ((2.0 * (c * (0.8333333333333334 - ((0.6666666666666666 / t) - a)))) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-5d+33)) then
tmp = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
else if (b <= 7.2d-195) then
tmp = 1.0d0
else if (b <= 3.8d-121) then
tmp = x / (x + (y * ((2.0d0 * (c * (0.8333333333333334d0 - ((0.6666666666666666d0 / t) - a)))) + 1.0d0)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -5e+33) {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
} else if (b <= 7.2e-195) {
tmp = 1.0;
} else if (b <= 3.8e-121) {
tmp = x / (x + (y * ((2.0 * (c * (0.8333333333333334 - ((0.6666666666666666 / t) - a)))) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -5e+33: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) elif b <= 7.2e-195: tmp = 1.0 elif b <= 3.8e-121: tmp = x / (x + (y * ((2.0 * (c * (0.8333333333333334 - ((0.6666666666666666 / t) - a)))) + 1.0))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -5e+33) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); elseif (b <= 7.2e-195) tmp = 1.0; elseif (b <= 3.8e-121) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(2.0 * Float64(c * Float64(0.8333333333333334 - Float64(Float64(0.6666666666666666 / t) - a)))) + 1.0)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -5e+33) tmp = x / (x + (y * exp((b * -1.6666666666666667)))); elseif (b <= 7.2e-195) tmp = 1.0; elseif (b <= 3.8e-121) tmp = x / (x + (y * ((2.0 * (c * (0.8333333333333334 - ((0.6666666666666666 / t) - a)))) + 1.0))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -5e+33], N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.2e-195], 1.0, If[LessEqual[b, 3.8e-121], N[(x / N[(x + N[(y * N[(N[(2.0 * N[(c * N[(0.8333333333333334 - N[(N[(0.6666666666666666 / t), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+33}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{-195}:\\
\;\;\;\;1\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{-121}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(2 \cdot \left(c \cdot \left(0.8333333333333334 - \left(\frac{0.6666666666666666}{t} - a\right)\right)\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -4.99999999999999973e33Initial program 90.4%
Taylor expanded in t around inf 70.3%
mul-1-neg70.3%
+-commutative70.3%
distribute-rgt-neg-in70.3%
neg-sub070.3%
associate--r-70.3%
neg-sub070.3%
+-commutative70.3%
sub-neg70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in a around 0 65.6%
Taylor expanded in c around 0 70.3%
if -4.99999999999999973e33 < b < 7.2e-195 or 3.8000000000000001e-121 < b Initial program 95.6%
Taylor expanded in a around inf 56.1%
Taylor expanded in a around 0 37.1%
Taylor expanded in x around inf 65.6%
if 7.2e-195 < b < 3.8000000000000001e-121Initial program 100.0%
Taylor expanded in c around inf 75.8%
cancel-sign-sub-inv75.8%
+-commutative75.8%
metadata-eval75.8%
associate-*r/75.8%
metadata-eval75.8%
associate-+r+75.8%
Simplified75.8%
Taylor expanded in c around 0 57.8%
remove-double-neg57.8%
mul-1-neg57.8%
sub-neg57.8%
associate--r+57.8%
associate--r+57.8%
sub-neg57.8%
mul-1-neg57.8%
remove-double-neg57.8%
associate--l+57.8%
associate-*r/57.8%
metadata-eval57.8%
Simplified57.8%
Final simplification66.2%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -3.1e-65)
(/ x (- x (- (* 2.0 (* a (* y (- b c)))) y)))
(if (<= b 7.2e-195)
1.0
(if (<= b 1e-114)
(/
x
(+
x
(*
y
(+
(* 2.0 (* c (- 0.8333333333333334 (- (/ 0.6666666666666666 t) a))))
1.0))))
1.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.1e-65) {
tmp = x / (x - ((2.0 * (a * (y * (b - c)))) - y));
} else if (b <= 7.2e-195) {
tmp = 1.0;
} else if (b <= 1e-114) {
tmp = x / (x + (y * ((2.0 * (c * (0.8333333333333334 - ((0.6666666666666666 / t) - a)))) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-3.1d-65)) then
tmp = x / (x - ((2.0d0 * (a * (y * (b - c)))) - y))
else if (b <= 7.2d-195) then
tmp = 1.0d0
else if (b <= 1d-114) then
tmp = x / (x + (y * ((2.0d0 * (c * (0.8333333333333334d0 - ((0.6666666666666666d0 / t) - a)))) + 1.0d0)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.1e-65) {
tmp = x / (x - ((2.0 * (a * (y * (b - c)))) - y));
} else if (b <= 7.2e-195) {
tmp = 1.0;
} else if (b <= 1e-114) {
tmp = x / (x + (y * ((2.0 * (c * (0.8333333333333334 - ((0.6666666666666666 / t) - a)))) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -3.1e-65: tmp = x / (x - ((2.0 * (a * (y * (b - c)))) - y)) elif b <= 7.2e-195: tmp = 1.0 elif b <= 1e-114: tmp = x / (x + (y * ((2.0 * (c * (0.8333333333333334 - ((0.6666666666666666 / t) - a)))) + 1.0))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -3.1e-65) tmp = Float64(x / Float64(x - Float64(Float64(2.0 * Float64(a * Float64(y * Float64(b - c)))) - y))); elseif (b <= 7.2e-195) tmp = 1.0; elseif (b <= 1e-114) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(2.0 * Float64(c * Float64(0.8333333333333334 - Float64(Float64(0.6666666666666666 / t) - a)))) + 1.0)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -3.1e-65) tmp = x / (x - ((2.0 * (a * (y * (b - c)))) - y)); elseif (b <= 7.2e-195) tmp = 1.0; elseif (b <= 1e-114) tmp = x / (x + (y * ((2.0 * (c * (0.8333333333333334 - ((0.6666666666666666 / t) - a)))) + 1.0))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -3.1e-65], N[(x / N[(x - N[(N[(2.0 * N[(a * N[(y * N[(b - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.2e-195], 1.0, If[LessEqual[b, 1e-114], N[(x / N[(x + N[(y * N[(N[(2.0 * N[(c * N[(0.8333333333333334 - N[(N[(0.6666666666666666 / t), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.1 \cdot 10^{-65}:\\
\;\;\;\;\frac{x}{x - \left(2 \cdot \left(a \cdot \left(y \cdot \left(b - c\right)\right)\right) - y\right)}\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{-195}:\\
\;\;\;\;1\\
\mathbf{elif}\;b \leq 10^{-114}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(2 \cdot \left(c \cdot \left(0.8333333333333334 - \left(\frac{0.6666666666666666}{t} - a\right)\right)\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -3.10000000000000016e-65Initial program 92.4%
Taylor expanded in a around inf 73.1%
Taylor expanded in a around 0 56.3%
*-commutative56.3%
Simplified56.3%
if -3.10000000000000016e-65 < b < 7.2e-195 or 1.0000000000000001e-114 < b Initial program 95.1%
Taylor expanded in a around inf 53.8%
Taylor expanded in a around 0 35.8%
Taylor expanded in x around inf 66.3%
if 7.2e-195 < b < 1.0000000000000001e-114Initial program 100.0%
Taylor expanded in c around inf 75.8%
cancel-sign-sub-inv75.8%
+-commutative75.8%
metadata-eval75.8%
associate-*r/75.8%
metadata-eval75.8%
associate-+r+75.8%
Simplified75.8%
Taylor expanded in c around 0 57.8%
remove-double-neg57.8%
mul-1-neg57.8%
sub-neg57.8%
associate--r+57.8%
associate--r+57.8%
sub-neg57.8%
mul-1-neg57.8%
remove-double-neg57.8%
associate--l+57.8%
associate-*r/57.8%
metadata-eval57.8%
Simplified57.8%
Final simplification62.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -4.6e-65)
(/ x (+ x (* y (- 1.0 (* 2.0 (* a (- b c)))))))
(if (<= b 7e-195)
1.0
(if (<= b 1.55e-148)
(/ x (+ x (* y (+ (* 2.0 (* (+ a 0.8333333333333334) c)) 1.0))))
1.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -4.6e-65) {
tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - c))))));
} else if (b <= 7e-195) {
tmp = 1.0;
} else if (b <= 1.55e-148) {
tmp = x / (x + (y * ((2.0 * ((a + 0.8333333333333334) * c)) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-4.6d-65)) then
tmp = x / (x + (y * (1.0d0 - (2.0d0 * (a * (b - c))))))
else if (b <= 7d-195) then
tmp = 1.0d0
else if (b <= 1.55d-148) then
tmp = x / (x + (y * ((2.0d0 * ((a + 0.8333333333333334d0) * c)) + 1.0d0)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -4.6e-65) {
tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - c))))));
} else if (b <= 7e-195) {
tmp = 1.0;
} else if (b <= 1.55e-148) {
tmp = x / (x + (y * ((2.0 * ((a + 0.8333333333333334) * c)) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -4.6e-65: tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - c)))))) elif b <= 7e-195: tmp = 1.0 elif b <= 1.55e-148: tmp = x / (x + (y * ((2.0 * ((a + 0.8333333333333334) * c)) + 1.0))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -4.6e-65) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 - Float64(2.0 * Float64(a * Float64(b - c))))))); elseif (b <= 7e-195) tmp = 1.0; elseif (b <= 1.55e-148) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * c)) + 1.0)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -4.6e-65) tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - c)))))); elseif (b <= 7e-195) tmp = 1.0; elseif (b <= 1.55e-148) tmp = x / (x + (y * ((2.0 * ((a + 0.8333333333333334) * c)) + 1.0))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -4.6e-65], N[(x / N[(x + N[(y * N[(1.0 - N[(2.0 * N[(a * N[(b - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7e-195], 1.0, If[LessEqual[b, 1.55e-148], N[(x / N[(x + N[(y * N[(N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.6 \cdot 10^{-65}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 - 2 \cdot \left(a \cdot \left(b - c\right)\right)\right)}\\
\mathbf{elif}\;b \leq 7 \cdot 10^{-195}:\\
\;\;\;\;1\\
\mathbf{elif}\;b \leq 1.55 \cdot 10^{-148}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot c\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -4.5999999999999999e-65Initial program 92.4%
Taylor expanded in a around inf 73.1%
Taylor expanded in a around 0 54.1%
if -4.5999999999999999e-65 < b < 7.00000000000000028e-195 or 1.5500000000000001e-148 < b Initial program 95.2%
Taylor expanded in a around inf 53.5%
Taylor expanded in a around 0 35.8%
Taylor expanded in x around inf 65.7%
if 7.00000000000000028e-195 < b < 1.5500000000000001e-148Initial program 100.0%
Taylor expanded in c around inf 77.7%
cancel-sign-sub-inv77.7%
+-commutative77.7%
metadata-eval77.7%
associate-*r/77.7%
metadata-eval77.7%
associate-+r+77.7%
Simplified77.7%
Taylor expanded in c around 0 62.8%
Taylor expanded in t around inf 62.8%
Final simplification62.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -4.8e-65)
(/ x (- x (- (* 2.0 (* a (* y (- b c)))) y)))
(if (<= b 7.2e-195)
1.0
(if (<= b 3.4e-162)
(/ x (+ x (* y (+ (* 2.0 (* (+ a 0.8333333333333334) c)) 1.0))))
1.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -4.8e-65) {
tmp = x / (x - ((2.0 * (a * (y * (b - c)))) - y));
} else if (b <= 7.2e-195) {
tmp = 1.0;
} else if (b <= 3.4e-162) {
tmp = x / (x + (y * ((2.0 * ((a + 0.8333333333333334) * c)) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-4.8d-65)) then
tmp = x / (x - ((2.0d0 * (a * (y * (b - c)))) - y))
else if (b <= 7.2d-195) then
tmp = 1.0d0
else if (b <= 3.4d-162) then
tmp = x / (x + (y * ((2.0d0 * ((a + 0.8333333333333334d0) * c)) + 1.0d0)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -4.8e-65) {
tmp = x / (x - ((2.0 * (a * (y * (b - c)))) - y));
} else if (b <= 7.2e-195) {
tmp = 1.0;
} else if (b <= 3.4e-162) {
tmp = x / (x + (y * ((2.0 * ((a + 0.8333333333333334) * c)) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -4.8e-65: tmp = x / (x - ((2.0 * (a * (y * (b - c)))) - y)) elif b <= 7.2e-195: tmp = 1.0 elif b <= 3.4e-162: tmp = x / (x + (y * ((2.0 * ((a + 0.8333333333333334) * c)) + 1.0))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -4.8e-65) tmp = Float64(x / Float64(x - Float64(Float64(2.0 * Float64(a * Float64(y * Float64(b - c)))) - y))); elseif (b <= 7.2e-195) tmp = 1.0; elseif (b <= 3.4e-162) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * c)) + 1.0)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -4.8e-65) tmp = x / (x - ((2.0 * (a * (y * (b - c)))) - y)); elseif (b <= 7.2e-195) tmp = 1.0; elseif (b <= 3.4e-162) tmp = x / (x + (y * ((2.0 * ((a + 0.8333333333333334) * c)) + 1.0))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -4.8e-65], N[(x / N[(x - N[(N[(2.0 * N[(a * N[(y * N[(b - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.2e-195], 1.0, If[LessEqual[b, 3.4e-162], N[(x / N[(x + N[(y * N[(N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.8 \cdot 10^{-65}:\\
\;\;\;\;\frac{x}{x - \left(2 \cdot \left(a \cdot \left(y \cdot \left(b - c\right)\right)\right) - y\right)}\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{-195}:\\
\;\;\;\;1\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{-162}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot c\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -4.8000000000000003e-65Initial program 92.4%
Taylor expanded in a around inf 73.1%
Taylor expanded in a around 0 56.3%
*-commutative56.3%
Simplified56.3%
if -4.8000000000000003e-65 < b < 7.2e-195 or 3.4e-162 < b Initial program 95.2%
Taylor expanded in a around inf 53.8%
Taylor expanded in a around 0 35.6%
Taylor expanded in x around inf 65.4%
if 7.2e-195 < b < 3.4e-162Initial program 100.0%
Taylor expanded in c around inf 75.8%
cancel-sign-sub-inv75.8%
+-commutative75.8%
metadata-eval75.8%
associate-*r/75.8%
metadata-eval75.8%
associate-+r+75.8%
Simplified75.8%
Taylor expanded in c around 0 67.8%
Taylor expanded in t around inf 67.8%
Final simplification62.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -7.8e-65)
(/ x (+ x (* y (- 1.0 (* 2.0 (* a (- b c)))))))
(if (<= b 8.2e-290)
1.0
(if (<= b 8e-116)
(/ x (+ x (* -1.3333333333333333 (/ c (/ t y)))))
1.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -7.8e-65) {
tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - c))))));
} else if (b <= 8.2e-290) {
tmp = 1.0;
} else if (b <= 8e-116) {
tmp = x / (x + (-1.3333333333333333 * (c / (t / 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 <= (-7.8d-65)) then
tmp = x / (x + (y * (1.0d0 - (2.0d0 * (a * (b - c))))))
else if (b <= 8.2d-290) then
tmp = 1.0d0
else if (b <= 8d-116) then
tmp = x / (x + ((-1.3333333333333333d0) * (c / (t / 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 <= -7.8e-65) {
tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - c))))));
} else if (b <= 8.2e-290) {
tmp = 1.0;
} else if (b <= 8e-116) {
tmp = x / (x + (-1.3333333333333333 * (c / (t / y))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -7.8e-65: tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - c)))))) elif b <= 8.2e-290: tmp = 1.0 elif b <= 8e-116: tmp = x / (x + (-1.3333333333333333 * (c / (t / y)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -7.8e-65) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 - Float64(2.0 * Float64(a * Float64(b - c))))))); elseif (b <= 8.2e-290) tmp = 1.0; elseif (b <= 8e-116) tmp = Float64(x / Float64(x + Float64(-1.3333333333333333 * Float64(c / Float64(t / 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 <= -7.8e-65) tmp = x / (x + (y * (1.0 - (2.0 * (a * (b - c)))))); elseif (b <= 8.2e-290) tmp = 1.0; elseif (b <= 8e-116) tmp = x / (x + (-1.3333333333333333 * (c / (t / y)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -7.8e-65], N[(x / N[(x + N[(y * N[(1.0 - N[(2.0 * N[(a * N[(b - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.2e-290], 1.0, If[LessEqual[b, 8e-116], N[(x / N[(x + N[(-1.3333333333333333 * N[(c / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.8 \cdot 10^{-65}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 - 2 \cdot \left(a \cdot \left(b - c\right)\right)\right)}\\
\mathbf{elif}\;b \leq 8.2 \cdot 10^{-290}:\\
\;\;\;\;1\\
\mathbf{elif}\;b \leq 8 \cdot 10^{-116}:\\
\;\;\;\;\frac{x}{x + -1.3333333333333333 \cdot \frac{c}{\frac{t}{y}}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -7.8000000000000007e-65Initial program 92.4%
Taylor expanded in a around inf 73.1%
Taylor expanded in a around 0 54.1%
if -7.8000000000000007e-65 < b < 8.2000000000000005e-290 or 8e-116 < b Initial program 94.5%
Taylor expanded in a around inf 56.7%
Taylor expanded in a around 0 37.4%
Taylor expanded in x around inf 68.6%
if 8.2000000000000005e-290 < b < 8e-116Initial program 100.0%
Taylor expanded in c around inf 66.7%
cancel-sign-sub-inv66.7%
+-commutative66.7%
metadata-eval66.7%
associate-*r/66.7%
metadata-eval66.7%
associate-+r+66.7%
Simplified66.7%
Taylor expanded in c around 0 46.8%
Taylor expanded in t around 0 48.2%
associate-/l*51.1%
Simplified51.1%
Final simplification61.9%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 8.9e-256) (/ x (+ x (* -1.3333333333333333 (/ c (/ t y))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 8.9e-256) {
tmp = x / (x + (-1.3333333333333333 * (c / (t / 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 (t <= 8.9d-256) then
tmp = x / (x + ((-1.3333333333333333d0) * (c / (t / 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 (t <= 8.9e-256) {
tmp = x / (x + (-1.3333333333333333 * (c / (t / y))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 8.9e-256: tmp = x / (x + (-1.3333333333333333 * (c / (t / y)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 8.9e-256) tmp = Float64(x / Float64(x + Float64(-1.3333333333333333 * Float64(c / Float64(t / y))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 8.9e-256) tmp = x / (x + (-1.3333333333333333 * (c / (t / y)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 8.9e-256], N[(x / N[(x + N[(-1.3333333333333333 * N[(c / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.9 \cdot 10^{-256}:\\
\;\;\;\;\frac{x}{x + -1.3333333333333333 \cdot \frac{c}{\frac{t}{y}}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < 8.89999999999999987e-256Initial program 93.1%
Taylor expanded in c around inf 65.1%
cancel-sign-sub-inv65.1%
+-commutative65.1%
metadata-eval65.1%
associate-*r/65.1%
metadata-eval65.1%
associate-+r+65.1%
Simplified65.1%
Taylor expanded in c around 0 52.2%
Taylor expanded in t around 0 52.8%
associate-/l*52.7%
Simplified52.7%
if 8.89999999999999987e-256 < t Initial program 95.2%
Taylor expanded in a around inf 54.4%
Taylor expanded in a around 0 35.9%
Taylor expanded in x around inf 59.8%
Final simplification57.8%
(FPCore (x y z t a b c) :precision binary64 1.0)
double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = 1.0d0
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
def code(x, y, z, t, a, b, c): return 1.0
function code(x, y, z, t, a, b, c) return 1.0 end
function tmp = code(x, y, z, t, a, b, c) tmp = 1.0; end
code[x_, y_, z_, t_, a_, b_, c_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 94.6%
Taylor expanded in a around inf 59.6%
Taylor expanded in a around 0 34.9%
Taylor expanded in x around inf 55.2%
Final simplification55.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 2023318
(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)))))))))))