
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* (sqrt (+ a t)) z) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ 0.8333333333333334 a))))))
(if (<= t_1 INFINITY)
(/ x (+ x (* y (exp (* 2.0 t_1)))))
(/ x (+ x (* y (exp (* 2.0 (* (- c b) (+ 0.8333333333333334 a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((sqrt((a + t)) * z) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (0.8333333333333334 + a)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((Math.sqrt((a + t)) * z) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (0.8333333333333334 + a)));
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 * ((c - b) * (0.8333333333333334 + a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((math.sqrt((a + t)) * z) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (0.8333333333333334 + a))) 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 * ((c - b) * (0.8333333333333334 + a)))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(sqrt(Float64(a + t)) * z) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(0.8333333333333334 + a)))) 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(c - b) * Float64(0.8333333333333334 + a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((sqrt((a + t)) * z) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (0.8333333333333334 + a))); tmp = 0.0; if (t_1 <= Inf) tmp = x / (x + (y * exp((2.0 * t_1)))); else tmp = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(0.8333333333333334 + a), $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[(c - b), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\sqrt{a + t} \cdot z}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(0.8333333333333334 + a\right)\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot t_1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(0.8333333333333334 + a\right)\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.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 inf 82.9%
+-commutative82.9%
*-commutative82.9%
associate-*r*82.9%
neg-mul-182.9%
neg-sub082.9%
associate--r-82.9%
neg-sub082.9%
+-commutative82.9%
sub-neg82.9%
Simplified82.9%
Final simplification97.7%
(FPCore (x y z t a b c)
:precision binary64
(/
x
(fma
y
(pow
(exp 2.0)
(fma
(- 0.8333333333333334 (- (/ 0.6666666666666666 t) a))
(- c b)
(* (sqrt (+ a t)) (/ z t))))
x)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / fma(y, pow(exp(2.0), fma((0.8333333333333334 - ((0.6666666666666666 / t) - a)), (c - b), (sqrt((a + t)) * (z / t)))), x);
}
function code(x, y, z, t, a, b, c) return Float64(x / fma(y, (exp(2.0) ^ fma(Float64(0.8333333333333334 - Float64(Float64(0.6666666666666666 / t) - a)), Float64(c - b), Float64(sqrt(Float64(a + t)) * Float64(z / t)))), x)) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(0.8333333333333334 - N[(N[(0.6666666666666666 / t), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] * N[(c - b), $MachinePrecision] + N[(N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\mathsf{fma}\left(y, {\left(e^{2}\right)}^{\left(\mathsf{fma}\left(0.8333333333333334 - \left(\frac{0.6666666666666666}{t} - a\right), c - b, \sqrt{a + t} \cdot \frac{z}{t}\right)\right)}, x\right)}
\end{array}
Initial program 92.2%
+-commutative92.2%
fma-def92.2%
Simplified97.0%
Final simplification97.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -8.2e-22)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 1.1e-186)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* (- c b) -0.6666666666666666)) t))))))
(if (<= t 1e+76)
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(* z (sqrt (/ 1.0 t)))
(*
(- c b)
(+ 0.8333333333333334 (* 0.6666666666666666 (/ -1.0 t))))))))))
(/ x (+ x (* y (exp (* 2.0 (* (- c b) (+ 0.8333333333333334 a)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -8.2e-22) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 1.1e-186) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + ((c - b) * -0.6666666666666666)) / t)))));
} else if (t <= 1e+76) {
tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) + ((c - b) * (0.8333333333333334 + (0.6666666666666666 * (-1.0 / t)))))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-8.2d-22)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 1.1d-186) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((c - b) * (-0.6666666666666666d0))) / t)))))
else if (t <= 1d+76) then
tmp = x / (x + (y * exp((2.0d0 * ((z * sqrt((1.0d0 / t))) + ((c - b) * (0.8333333333333334d0 + (0.6666666666666666d0 * ((-1.0d0) / t)))))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((c - b) * (0.8333333333333334d0 + a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -8.2e-22) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 1.1e-186) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + ((c - b) * -0.6666666666666666)) / t)))));
} else if (t <= 1e+76) {
tmp = x / (x + (y * Math.exp((2.0 * ((z * Math.sqrt((1.0 / t))) + ((c - b) * (0.8333333333333334 + (0.6666666666666666 * (-1.0 / t)))))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -8.2e-22: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 1.1e-186: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + ((c - b) * -0.6666666666666666)) / t))))) elif t <= 1e+76: tmp = x / (x + (y * math.exp((2.0 * ((z * math.sqrt((1.0 / t))) + ((c - b) * (0.8333333333333334 + (0.6666666666666666 * (-1.0 / t))))))))) else: tmp = x / (x + (y * math.exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -8.2e-22) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 1.1e-186) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(Float64(c - b) * -0.6666666666666666)) / t)))))); elseif (t <= 1e+76) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(z * sqrt(Float64(1.0 / t))) + Float64(Float64(c - b) * Float64(0.8333333333333334 + Float64(0.6666666666666666 * Float64(-1.0 / t)))))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c - b) * Float64(0.8333333333333334 + a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -8.2e-22) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 1.1e-186) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + ((c - b) * -0.6666666666666666)) / t))))); elseif (t <= 1e+76) tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) + ((c - b) * (0.8333333333333334 + (0.6666666666666666 * (-1.0 / t))))))))); else tmp = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -8.2e-22], 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.1e-186], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(N[(c - b), $MachinePrecision] * -0.6666666666666666), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+76], 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[(c - b), $MachinePrecision] * N[(0.8333333333333334 + N[(0.6666666666666666 * N[(-1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c - b), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{-22}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-186}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + \left(c - b\right) \cdot -0.6666666666666666}{t}}}\\
\mathbf{elif}\;t \leq 10^{+76}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(z \cdot \sqrt{\frac{1}{t}} + \left(c - b\right) \cdot \left(0.8333333333333334 + 0.6666666666666666 \cdot \frac{-1}{t}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(0.8333333333333334 + a\right)\right)}}\\
\end{array}
\end{array}
if t < -8.1999999999999999e-22Initial program 83.3%
Taylor expanded in a around inf 100.0%
if -8.1999999999999999e-22 < t < 1.10000000000000007e-186Initial program 87.0%
Taylor expanded in t around 0 94.3%
if 1.10000000000000007e-186 < t < 1e76Initial program 97.4%
Taylor expanded in a around 0 90.1%
if 1e76 < t Initial program 93.5%
Taylor expanded in t around inf 96.8%
+-commutative96.8%
*-commutative96.8%
associate-*r*96.8%
neg-mul-196.8%
neg-sub096.8%
associate--r-96.8%
neg-sub096.8%
+-commutative96.8%
sub-neg96.8%
Simplified96.8%
Final simplification94.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -1.5e-16)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 1.52e-117)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* (- c b) -0.6666666666666666)) t))))))
(if (<= t 2.4e-43)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 1950000000000.0)
(/ x (+ x (* y (pow (exp (+ 0.8333333333333334 a)) (* b -2.0)))))
(if (<= t 1.7e+29)
(/ x (+ x (* y (exp (* 2.0 (* z (sqrt (/ 1.0 t))))))))
(/
x
(+
x
(* y (exp (* 2.0 (* (- c b) (+ 0.8333333333333334 a)))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.5e-16) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 1.52e-117) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + ((c - b) * -0.6666666666666666)) / t)))));
} else if (t <= 2.4e-43) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 1950000000000.0) {
tmp = x / (x + (y * pow(exp((0.8333333333333334 + a)), (b * -2.0))));
} else if (t <= 1.7e+29) {
tmp = x / (x + (y * exp((2.0 * (z * sqrt((1.0 / t)))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-1.5d-16)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 1.52d-117) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((c - b) * (-0.6666666666666666d0))) / t)))))
else if (t <= 2.4d-43) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 1950000000000.0d0) then
tmp = x / (x + (y * (exp((0.8333333333333334d0 + a)) ** (b * (-2.0d0)))))
else if (t <= 1.7d+29) then
tmp = x / (x + (y * exp((2.0d0 * (z * sqrt((1.0d0 / t)))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((c - b) * (0.8333333333333334d0 + a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.5e-16) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 1.52e-117) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + ((c - b) * -0.6666666666666666)) / t)))));
} else if (t <= 2.4e-43) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 1950000000000.0) {
tmp = x / (x + (y * Math.pow(Math.exp((0.8333333333333334 + a)), (b * -2.0))));
} else if (t <= 1.7e+29) {
tmp = x / (x + (y * Math.exp((2.0 * (z * Math.sqrt((1.0 / t)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.5e-16: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 1.52e-117: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + ((c - b) * -0.6666666666666666)) / t))))) elif t <= 2.4e-43: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 1950000000000.0: tmp = x / (x + (y * math.pow(math.exp((0.8333333333333334 + a)), (b * -2.0)))) elif t <= 1.7e+29: tmp = x / (x + (y * math.exp((2.0 * (z * math.sqrt((1.0 / t))))))) else: tmp = x / (x + (y * math.exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.5e-16) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 1.52e-117) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(Float64(c - b) * -0.6666666666666666)) / t)))))); elseif (t <= 2.4e-43) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 1950000000000.0) tmp = Float64(x / Float64(x + Float64(y * (exp(Float64(0.8333333333333334 + a)) ^ Float64(b * -2.0))))); elseif (t <= 1.7e+29) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(z * sqrt(Float64(1.0 / t)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c - b) * Float64(0.8333333333333334 + a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -1.5e-16) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 1.52e-117) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + ((c - b) * -0.6666666666666666)) / t))))); elseif (t <= 2.4e-43) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 1950000000000.0) tmp = x / (x + (y * (exp((0.8333333333333334 + a)) ^ (b * -2.0)))); elseif (t <= 1.7e+29) tmp = x / (x + (y * exp((2.0 * (z * sqrt((1.0 / t))))))); else tmp = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.5e-16], 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.52e-117], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(N[(c - b), $MachinePrecision] * -0.6666666666666666), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-43], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1950000000000.0], N[(x / N[(x + N[(y * N[Power[N[Exp[N[(0.8333333333333334 + a), $MachinePrecision]], $MachinePrecision], N[(b * -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e+29], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(z * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c - b), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 1.52 \cdot 10^{-117}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + \left(c - b\right) \cdot -0.6666666666666666}{t}}}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-43}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 1950000000000:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{0.8333333333333334 + a}\right)}^{\left(b \cdot -2\right)}}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+29}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(z \cdot \sqrt{\frac{1}{t}}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(0.8333333333333334 + a\right)\right)}}\\
\end{array}
\end{array}
if t < -1.49999999999999997e-16Initial program 83.3%
Taylor expanded in a around inf 100.0%
if -1.49999999999999997e-16 < t < 1.52e-117Initial program 89.4%
Taylor expanded in t around 0 89.6%
if 1.52e-117 < t < 2.4000000000000002e-43Initial program 100.0%
Taylor expanded in t around 0 42.3%
Taylor expanded in a around 0 89.9%
if 2.4000000000000002e-43 < t < 1.95e12Initial program 86.7%
Taylor expanded in b around inf 67.6%
associate-*r/67.6%
metadata-eval67.6%
+-commutative67.6%
Simplified67.6%
Taylor expanded in t around inf 61.2%
associate-*r*61.2%
+-commutative61.2%
*-commutative61.2%
exp-prod80.6%
+-commutative80.6%
*-commutative80.6%
Simplified80.6%
if 1.95e12 < t < 1.69999999999999991e29Initial program 100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in z around inf 100.0%
if 1.69999999999999991e29 < t Initial program 94.7%
Taylor expanded in t around inf 95.3%
+-commutative95.3%
*-commutative95.3%
associate-*r*95.3%
neg-mul-195.3%
neg-sub095.3%
associate--r-95.3%
neg-sub095.3%
+-commutative95.3%
sub-neg95.3%
Simplified95.3%
Final simplification92.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -2.95e-64)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t -3.8e-127)
(/ x (+ x (* y (exp (* 2.0 (* (/ z t) (sqrt a)))))))
(if (<= t 8.5e-242)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (<= t 2e-192)
(/ x (+ x (* y (exp (* 2.0 (* z (sqrt (/ 1.0 t))))))))
(if (<= t 5.4e-10)
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
b
(- (/ 0.6666666666666666 t) (+ 0.8333333333333334 a))))))))
(/
x
(+
x
(* y (exp (* 2.0 (* (- c b) (+ 0.8333333333333334 a)))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -2.95e-64) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= -3.8e-127) {
tmp = x / (x + (y * exp((2.0 * ((z / t) * sqrt(a))))));
} else if (t <= 8.5e-242) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 2e-192) {
tmp = x / (x + (y * exp((2.0 * (z * sqrt((1.0 / t)))))));
} else if (t <= 5.4e-10) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-2.95d-64)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= (-3.8d-127)) then
tmp = x / (x + (y * exp((2.0d0 * ((z / t) * sqrt(a))))))
else if (t <= 8.5d-242) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if (t <= 2d-192) then
tmp = x / (x + (y * exp((2.0d0 * (z * sqrt((1.0d0 / t)))))))
else if (t <= 5.4d-10) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (0.8333333333333334d0 + a)))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((c - b) * (0.8333333333333334d0 + a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -2.95e-64) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= -3.8e-127) {
tmp = x / (x + (y * Math.exp((2.0 * ((z / t) * Math.sqrt(a))))));
} else if (t <= 8.5e-242) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if (t <= 2e-192) {
tmp = x / (x + (y * Math.exp((2.0 * (z * Math.sqrt((1.0 / t)))))));
} else if (t <= 5.4e-10) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -2.95e-64: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= -3.8e-127: tmp = x / (x + (y * math.exp((2.0 * ((z / t) * math.sqrt(a)))))) elif t <= 8.5e-242: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif t <= 2e-192: tmp = x / (x + (y * math.exp((2.0 * (z * math.sqrt((1.0 / t))))))) elif t <= 5.4e-10: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))) else: tmp = x / (x + (y * math.exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -2.95e-64) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= -3.8e-127) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(z / t) * sqrt(a))))))); elseif (t <= 8.5e-242) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif (t <= 2e-192) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(z * sqrt(Float64(1.0 / t)))))))); elseif (t <= 5.4e-10) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(0.8333333333333334 + a)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c - b) * Float64(0.8333333333333334 + a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -2.95e-64) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= -3.8e-127) tmp = x / (x + (y * exp((2.0 * ((z / t) * sqrt(a)))))); elseif (t <= 8.5e-242) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif (t <= 2e-192) tmp = x / (x + (y * exp((2.0 * (z * sqrt((1.0 / t))))))); elseif (t <= 5.4e-10) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))); else tmp = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -2.95e-64], 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, -3.8e-127], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(z / t), $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-242], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-192], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(z * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e-10], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c - b), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.95 \cdot 10^{-64}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-127}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z}{t} \cdot \sqrt{a}\right)}}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-242}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-192}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(z \cdot \sqrt{\frac{1}{t}}\right)}}\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-10}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(0.8333333333333334 + a\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(0.8333333333333334 + a\right)\right)}}\\
\end{array}
\end{array}
if t < -2.94999999999999997e-64Initial program 86.4%
Taylor expanded in a around inf 95.6%
if -2.94999999999999997e-64 < t < -3.80000000000000003e-127Initial program 83.3%
Taylor expanded in t around 0 100.0%
Taylor expanded in z around inf 100.0%
if -3.80000000000000003e-127 < t < 8.4999999999999997e-242Initial program 94.6%
Taylor expanded in t around 0 97.3%
Taylor expanded in a around 0 86.9%
if 8.4999999999999997e-242 < t < 2.0000000000000002e-192Initial program 69.2%
Taylor expanded in a around 0 62.0%
Taylor expanded in z around inf 92.5%
if 2.0000000000000002e-192 < t < 5.4e-10Initial program 96.0%
Taylor expanded in b around inf 72.9%
associate-*r/72.9%
metadata-eval72.9%
+-commutative72.9%
Simplified72.9%
if 5.4e-10 < t Initial program 94.3%
Taylor expanded in t around inf 93.3%
+-commutative93.3%
*-commutative93.3%
associate-*r*93.3%
neg-mul-193.3%
neg-sub093.3%
associate--r-93.3%
neg-sub093.3%
+-commutative93.3%
sub-neg93.3%
Simplified93.3%
Final simplification88.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -2e-63)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t -7e-129)
(/ x (+ x (* y (exp (* 2.0 (* (/ z t) (sqrt a)))))))
(if (<= t 1.1e-45)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(/ x (+ x (* y (exp (* 2.0 (* (- c b) (+ 0.8333333333333334 a)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -2e-63) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= -7e-129) {
tmp = x / (x + (y * exp((2.0 * ((z / t) * sqrt(a))))));
} else if (t <= 1.1e-45) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-2d-63)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= (-7d-129)) then
tmp = x / (x + (y * exp((2.0d0 * ((z / t) * sqrt(a))))))
else if (t <= 1.1d-45) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * ((c - b) * (0.8333333333333334d0 + a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -2e-63) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= -7e-129) {
tmp = x / (x + (y * Math.exp((2.0 * ((z / t) * Math.sqrt(a))))));
} else if (t <= 1.1e-45) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -2e-63: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= -7e-129: tmp = x / (x + (y * math.exp((2.0 * ((z / t) * math.sqrt(a)))))) elif t <= 1.1e-45: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -2e-63) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= -7e-129) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(z / t) * sqrt(a))))))); elseif (t <= 1.1e-45) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c - b) * Float64(0.8333333333333334 + a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -2e-63) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= -7e-129) tmp = x / (x + (y * exp((2.0 * ((z / t) * sqrt(a)))))); elseif (t <= 1.1e-45) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -2e-63], 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, -7e-129], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(z / t), $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e-45], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c - b), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-63}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq -7 \cdot 10^{-129}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z}{t} \cdot \sqrt{a}\right)}}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-45}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(0.8333333333333334 + a\right)\right)}}\\
\end{array}
\end{array}
if t < -2.00000000000000013e-63Initial program 86.4%
Taylor expanded in a around inf 95.6%
if -2.00000000000000013e-63 < t < -6.9999999999999995e-129Initial program 83.3%
Taylor expanded in t around 0 100.0%
Taylor expanded in z around inf 100.0%
if -6.9999999999999995e-129 < t < 1.09999999999999997e-45Initial program 92.0%
Taylor expanded in t around 0 77.5%
Taylor expanded in a around 0 76.9%
if 1.09999999999999997e-45 < t Initial program 94.1%
Taylor expanded in t around inf 89.6%
+-commutative89.6%
*-commutative89.6%
associate-*r*89.6%
neg-mul-189.6%
neg-sub089.6%
associate--r-89.6%
neg-sub089.6%
+-commutative89.6%
sub-neg89.6%
Simplified89.6%
Final simplification86.2%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 5.6e-40)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (or (<= t 1.2e+207) (not (<= t 1.2e+275)))
(/ x (+ x (* y (exp (* 2.0 (* 0.8333333333333334 (- 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 <= 5.6e-40) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 1.2e+207) || !(t <= 1.2e+275)) {
tmp = x / (x + (y * exp((2.0 * (0.8333333333333334 * (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 <= 5.6d-40) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if ((t <= 1.2d+207) .or. (.not. (t <= 1.2d+275))) then
tmp = x / (x + (y * exp((2.0d0 * (0.8333333333333334d0 * (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 <= 5.6e-40) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 1.2e+207) || !(t <= 1.2e+275)) {
tmp = x / (x + (y * Math.exp((2.0 * (0.8333333333333334 * (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 <= 5.6e-40: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif (t <= 1.2e+207) or not (t <= 1.2e+275): tmp = x / (x + (y * math.exp((2.0 * (0.8333333333333334 * (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 <= 5.6e-40) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif ((t <= 1.2e+207) || !(t <= 1.2e+275)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(0.8333333333333334 * 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 <= 5.6e-40) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif ((t <= 1.2e+207) || ~((t <= 1.2e+275))) tmp = x / (x + (y * exp((2.0 * (0.8333333333333334 * (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, 5.6e-40], 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, 1.2e+207], N[Not[LessEqual[t, 1.2e+275]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(0.8333333333333334 * N[(c - b), $MachinePrecision]), $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 5.6 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+207} \lor \neg \left(t \leq 1.2 \cdot 10^{+275}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(0.8333333333333334 \cdot \left(c - b\right)\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 < 5.5999999999999999e-40Initial program 90.2%
Taylor expanded in t around 0 79.2%
Taylor expanded in a around 0 73.2%
if 5.5999999999999999e-40 < t < 1.2e207 or 1.19999999999999998e275 < t Initial program 95.1%
Taylor expanded in t around inf 87.1%
+-commutative87.1%
*-commutative87.1%
associate-*r*87.1%
neg-mul-187.1%
neg-sub087.1%
associate--r-87.1%
neg-sub087.1%
+-commutative87.1%
sub-neg87.1%
Simplified87.1%
Taylor expanded in a around 0 78.5%
if 1.2e207 < t < 1.19999999999999998e275Initial program 90.8%
Taylor expanded in a around inf 96.0%
Final simplification78.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 6.5e-45)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (or (<= t 3.6e+244) (not (<= t 1.25e+276)))
(/ x (+ x (* y (exp (* c 1.6666666666666667)))))
(/ x (+ x (* y (exp (* a (* 2.0 c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 6.5e-45) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 3.6e+244) || !(t <= 1.25e+276)) {
tmp = x / (x + (y * exp((c * 1.6666666666666667))));
} else {
tmp = x / (x + (y * exp((a * (2.0 * c)))));
}
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.5d-45) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if ((t <= 3.6d+244) .or. (.not. (t <= 1.25d+276))) then
tmp = x / (x + (y * exp((c * 1.6666666666666667d0))))
else
tmp = x / (x + (y * exp((a * (2.0d0 * c)))))
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.5e-45) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 3.6e+244) || !(t <= 1.25e+276)) {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
} else {
tmp = x / (x + (y * Math.exp((a * (2.0 * c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 6.5e-45: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif (t <= 3.6e+244) or not (t <= 1.25e+276): tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) else: tmp = x / (x + (y * math.exp((a * (2.0 * c))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 6.5e-45) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif ((t <= 3.6e+244) || !(t <= 1.25e+276)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(a * Float64(2.0 * c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 6.5e-45) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif ((t <= 3.6e+244) || ~((t <= 1.25e+276))) tmp = x / (x + (y * exp((c * 1.6666666666666667)))); else tmp = x / (x + (y * exp((a * (2.0 * c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 6.5e-45], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 3.6e+244], N[Not[LessEqual[t, 1.25e+276]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(a * N[(2.0 * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.5 \cdot 10^{-45}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+244} \lor \neg \left(t \leq 1.25 \cdot 10^{+276}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{a \cdot \left(2 \cdot c\right)}}\\
\end{array}
\end{array}
if t < 6.4999999999999995e-45Initial program 90.2%
Taylor expanded in t around 0 79.0%
Taylor expanded in a around 0 73.8%
if 6.4999999999999995e-45 < t < 3.6e244 or 1.25e276 < t Initial program 94.9%
Taylor expanded in t around inf 88.0%
+-commutative88.0%
*-commutative88.0%
associate-*r*88.0%
neg-mul-188.0%
neg-sub088.0%
associate--r-88.0%
neg-sub088.0%
+-commutative88.0%
sub-neg88.0%
Simplified88.0%
Taylor expanded in a around 0 78.7%
Taylor expanded in b around 0 67.0%
if 3.6e244 < t < 1.25e276Initial program 89.1%
Taylor expanded in a around inf 98.2%
Taylor expanded in c around inf 82.0%
*-commutative82.0%
associate-*l*82.0%
Simplified82.0%
Final simplification71.3%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 1e-39) (/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t)))))) (/ x (+ x (* y (exp (* 2.0 (* (- c b) (+ 0.8333333333333334 a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1e-39) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 1d-39) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * ((c - b) * (0.8333333333333334d0 + a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1e-39) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 1e-39: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 1e-39) 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(c - b) * Float64(0.8333333333333334 + a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 1e-39) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 1e-39], 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[(c - b), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 10^{-39}:\\
\;\;\;\;\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(c - b\right) \cdot \left(0.8333333333333334 + a\right)\right)}}\\
\end{array}
\end{array}
if t < 9.99999999999999929e-40Initial program 90.2%
Taylor expanded in t around 0 79.2%
Taylor expanded in a around 0 73.2%
if 9.99999999999999929e-40 < t Initial program 94.1%
Taylor expanded in t around inf 90.2%
+-commutative90.2%
*-commutative90.2%
associate-*r*90.2%
neg-mul-190.2%
neg-sub090.2%
associate--r-90.2%
neg-sub090.2%
+-commutative90.2%
sub-neg90.2%
Simplified90.2%
Final simplification82.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -5e+83)
(/ x (* y (exp (* (- c b) 1.6666666666666667))))
(if (<= b 9e-149)
(/ x (+ x (* y (exp (* c 1.6666666666666667)))))
(/ x (+ x (* y (exp (* b (* a -2.0)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -5e+83) {
tmp = x / (y * exp(((c - b) * 1.6666666666666667)));
} else if (b <= 9e-149) {
tmp = x / (x + (y * exp((c * 1.6666666666666667))));
} else {
tmp = x / (x + (y * exp((b * (a * -2.0)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-5d+83)) then
tmp = x / (y * exp(((c - b) * 1.6666666666666667d0)))
else if (b <= 9d-149) then
tmp = x / (x + (y * exp((c * 1.6666666666666667d0))))
else
tmp = x / (x + (y * exp((b * (a * (-2.0d0))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -5e+83) {
tmp = x / (y * Math.exp(((c - b) * 1.6666666666666667)));
} else if (b <= 9e-149) {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
} else {
tmp = x / (x + (y * Math.exp((b * (a * -2.0)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -5e+83: tmp = x / (y * math.exp(((c - b) * 1.6666666666666667))) elif b <= 9e-149: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) else: tmp = x / (x + (y * math.exp((b * (a * -2.0))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -5e+83) tmp = Float64(x / Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667)))); elseif (b <= 9e-149) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * Float64(a * -2.0)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -5e+83) tmp = x / (y * exp(((c - b) * 1.6666666666666667))); elseif (b <= 9e-149) tmp = x / (x + (y * exp((c * 1.6666666666666667)))); else tmp = x / (x + (y * exp((b * (a * -2.0))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -5e+83], N[(x / N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9e-149], N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(b * N[(a * -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+83}:\\
\;\;\;\;\frac{x}{y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-149}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot \left(a \cdot -2\right)}}\\
\end{array}
\end{array}
if b < -5.00000000000000029e83Initial program 87.2%
Taylor expanded in t around inf 72.7%
+-commutative72.7%
*-commutative72.7%
associate-*r*72.7%
neg-mul-172.7%
neg-sub072.7%
associate--r-72.7%
neg-sub072.7%
+-commutative72.7%
sub-neg72.7%
Simplified72.7%
Taylor expanded in a around 0 70.2%
Taylor expanded in x around 0 65.0%
if -5.00000000000000029e83 < b < 8.9999999999999996e-149Initial program 93.5%
Taylor expanded in t around inf 72.1%
+-commutative72.1%
*-commutative72.1%
associate-*r*72.1%
neg-mul-172.1%
neg-sub072.1%
associate--r-72.1%
neg-sub072.1%
+-commutative72.1%
sub-neg72.1%
Simplified72.1%
Taylor expanded in a around 0 66.6%
Taylor expanded in b around 0 65.2%
if 8.9999999999999996e-149 < b Initial program 92.6%
Taylor expanded in a around inf 72.0%
Taylor expanded in c around 0 68.9%
*-commutative68.9%
*-commutative68.9%
associate-*l*68.9%
Simplified68.9%
Final simplification66.5%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 6.8e-40) (/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t)))))) (/ 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.8e-40) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} 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.8d-40) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
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.8e-40) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} 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.8e-40: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) 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.8e-40) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 6.8e-40) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); 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.8e-40], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.8 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < 6.79999999999999968e-40Initial program 90.2%
Taylor expanded in t around 0 79.2%
Taylor expanded in a around 0 73.2%
if 6.79999999999999968e-40 < t Initial program 94.1%
Taylor expanded in a around inf 71.9%
Final simplification72.5%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -1.75e+84) (/ x (* y (exp (* (- c b) 1.6666666666666667)))) (if (<= b 4.5e+88) (/ x (+ x (* y (exp (* c 1.6666666666666667))))) 1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -1.75e+84) {
tmp = x / (y * exp(((c - b) * 1.6666666666666667)));
} else if (b <= 4.5e+88) {
tmp = x / (x + (y * exp((c * 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 <= (-1.75d+84)) then
tmp = x / (y * exp(((c - b) * 1.6666666666666667d0)))
else if (b <= 4.5d+88) then
tmp = x / (x + (y * exp((c * 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 <= -1.75e+84) {
tmp = x / (y * Math.exp(((c - b) * 1.6666666666666667)));
} else if (b <= 4.5e+88) {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -1.75e+84: tmp = x / (y * math.exp(((c - b) * 1.6666666666666667))) elif b <= 4.5e+88: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -1.75e+84) tmp = Float64(x / Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667)))); elseif (b <= 4.5e+88) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 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 <= -1.75e+84) tmp = x / (y * exp(((c - b) * 1.6666666666666667))); elseif (b <= 4.5e+88) tmp = x / (x + (y * exp((c * 1.6666666666666667)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -1.75e+84], N[(x / N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.5e+88], N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.75 \cdot 10^{+84}:\\
\;\;\;\;\frac{x}{y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+88}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -1.7499999999999999e84Initial program 87.2%
Taylor expanded in t around inf 72.7%
+-commutative72.7%
*-commutative72.7%
associate-*r*72.7%
neg-mul-172.7%
neg-sub072.7%
associate--r-72.7%
neg-sub072.7%
+-commutative72.7%
sub-neg72.7%
Simplified72.7%
Taylor expanded in a around 0 70.2%
Taylor expanded in x around 0 65.0%
if -1.7499999999999999e84 < b < 4.5e88Initial program 95.2%
Taylor expanded in t around inf 70.5%
+-commutative70.5%
*-commutative70.5%
associate-*r*70.5%
neg-mul-170.5%
neg-sub070.5%
associate--r-70.5%
neg-sub070.5%
+-commutative70.5%
sub-neg70.5%
Simplified70.5%
Taylor expanded in a around 0 64.1%
Taylor expanded in b around 0 63.6%
if 4.5e88 < b Initial program 86.3%
Taylor expanded in t around inf 79.1%
+-commutative79.1%
*-commutative79.1%
associate-*r*79.1%
neg-mul-179.1%
neg-sub079.1%
associate--r-79.1%
neg-sub079.1%
+-commutative79.1%
sub-neg79.1%
Simplified79.1%
Taylor expanded in a around 0 71.5%
Taylor expanded in x around inf 69.6%
Final simplification65.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- (/ 0.6666666666666666 t) 0.8333333333333334)))
(if (<= b -4.5e+83)
(/ x (* y (exp (* (- c b) 1.6666666666666667))))
(if (<= b -2.8e-209)
1.0
(if (<= b -5.8e-290)
(/
x
(+
x
(- y (* 2.0 (* (* y c) (/ (- (* t_1 t_1) (* a a)) (+ a t_1)))))))
1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (0.6666666666666666 / t) - 0.8333333333333334;
double tmp;
if (b <= -4.5e+83) {
tmp = x / (y * exp(((c - b) * 1.6666666666666667)));
} else if (b <= -2.8e-209) {
tmp = 1.0;
} else if (b <= -5.8e-290) {
tmp = x / (x + (y - (2.0 * ((y * c) * (((t_1 * t_1) - (a * a)) / (a + t_1))))));
} 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 = (0.6666666666666666d0 / t) - 0.8333333333333334d0
if (b <= (-4.5d+83)) then
tmp = x / (y * exp(((c - b) * 1.6666666666666667d0)))
else if (b <= (-2.8d-209)) then
tmp = 1.0d0
else if (b <= (-5.8d-290)) then
tmp = x / (x + (y - (2.0d0 * ((y * c) * (((t_1 * t_1) - (a * a)) / (a + t_1))))))
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 = (0.6666666666666666 / t) - 0.8333333333333334;
double tmp;
if (b <= -4.5e+83) {
tmp = x / (y * Math.exp(((c - b) * 1.6666666666666667)));
} else if (b <= -2.8e-209) {
tmp = 1.0;
} else if (b <= -5.8e-290) {
tmp = x / (x + (y - (2.0 * ((y * c) * (((t_1 * t_1) - (a * a)) / (a + t_1))))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (0.6666666666666666 / t) - 0.8333333333333334 tmp = 0 if b <= -4.5e+83: tmp = x / (y * math.exp(((c - b) * 1.6666666666666667))) elif b <= -2.8e-209: tmp = 1.0 elif b <= -5.8e-290: tmp = x / (x + (y - (2.0 * ((y * c) * (((t_1 * t_1) - (a * a)) / (a + t_1)))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(0.6666666666666666 / t) - 0.8333333333333334) tmp = 0.0 if (b <= -4.5e+83) tmp = Float64(x / Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667)))); elseif (b <= -2.8e-209) tmp = 1.0; elseif (b <= -5.8e-290) tmp = Float64(x / Float64(x + Float64(y - Float64(2.0 * Float64(Float64(y * c) * Float64(Float64(Float64(t_1 * t_1) - Float64(a * a)) / Float64(a + t_1))))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (0.6666666666666666 / t) - 0.8333333333333334; tmp = 0.0; if (b <= -4.5e+83) tmp = x / (y * exp(((c - b) * 1.6666666666666667))); elseif (b <= -2.8e-209) tmp = 1.0; elseif (b <= -5.8e-290) tmp = x / (x + (y - (2.0 * ((y * c) * (((t_1 * t_1) - (a * a)) / (a + t_1)))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(0.6666666666666666 / t), $MachinePrecision] - 0.8333333333333334), $MachinePrecision]}, If[LessEqual[b, -4.5e+83], N[(x / N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.8e-209], 1.0, If[LessEqual[b, -5.8e-290], N[(x / N[(x + N[(y - N[(2.0 * N[(N[(y * c), $MachinePrecision] * N[(N[(N[(t$95$1 * t$95$1), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision] / N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{0.6666666666666666}{t} - 0.8333333333333334\\
\mathbf{if}\;b \leq -4.5 \cdot 10^{+83}:\\
\;\;\;\;\frac{x}{y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{elif}\;b \leq -2.8 \cdot 10^{-209}:\\
\;\;\;\;1\\
\mathbf{elif}\;b \leq -5.8 \cdot 10^{-290}:\\
\;\;\;\;\frac{x}{x + \left(y - 2 \cdot \left(\left(y \cdot c\right) \cdot \frac{t_1 \cdot t_1 - a \cdot a}{a + t_1}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -4.4999999999999999e83Initial program 87.2%
Taylor expanded in t around inf 72.7%
+-commutative72.7%
*-commutative72.7%
associate-*r*72.7%
neg-mul-172.7%
neg-sub072.7%
associate--r-72.7%
neg-sub072.7%
+-commutative72.7%
sub-neg72.7%
Simplified72.7%
Taylor expanded in a around 0 70.2%
Taylor expanded in x around 0 65.0%
if -4.4999999999999999e83 < b < -2.80000000000000012e-209 or -5.79999999999999989e-290 < b Initial program 92.3%
Taylor expanded in t around inf 74.3%
+-commutative74.3%
*-commutative74.3%
associate-*r*74.3%
neg-mul-174.3%
neg-sub074.3%
associate--r-74.3%
neg-sub074.3%
+-commutative74.3%
sub-neg74.3%
Simplified74.3%
Taylor expanded in a around 0 67.8%
Taylor expanded in x around inf 60.0%
if -2.80000000000000012e-209 < b < -5.79999999999999989e-290Initial program 100.0%
Taylor expanded in c around inf 74.8%
associate-*r/74.8%
metadata-eval74.8%
+-commutative74.8%
Simplified74.8%
Taylor expanded in c around 0 41.6%
associate-*r*41.7%
+-commutative41.7%
associate-*r/41.7%
metadata-eval41.7%
associate-+r-41.7%
Simplified41.7%
flip-+58.2%
Applied egg-rr58.2%
Final simplification60.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- (/ 0.6666666666666666 t) 0.8333333333333334)))
(if (<= b -7.5e+88)
(/ x (+ x (* y (+ 1.0 (* (- c b) (* 2.0 a))))))
(if (<= b -2e-209)
1.0
(if (<= b -1.16e-289)
(/
x
(+
x
(- y (* 2.0 (* (* y c) (/ (- (* t_1 t_1) (* a a)) (+ a t_1)))))))
1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (0.6666666666666666 / t) - 0.8333333333333334;
double tmp;
if (b <= -7.5e+88) {
tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a)))));
} else if (b <= -2e-209) {
tmp = 1.0;
} else if (b <= -1.16e-289) {
tmp = x / (x + (y - (2.0 * ((y * c) * (((t_1 * t_1) - (a * a)) / (a + t_1))))));
} 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 = (0.6666666666666666d0 / t) - 0.8333333333333334d0
if (b <= (-7.5d+88)) then
tmp = x / (x + (y * (1.0d0 + ((c - b) * (2.0d0 * a)))))
else if (b <= (-2d-209)) then
tmp = 1.0d0
else if (b <= (-1.16d-289)) then
tmp = x / (x + (y - (2.0d0 * ((y * c) * (((t_1 * t_1) - (a * a)) / (a + t_1))))))
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 = (0.6666666666666666 / t) - 0.8333333333333334;
double tmp;
if (b <= -7.5e+88) {
tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a)))));
} else if (b <= -2e-209) {
tmp = 1.0;
} else if (b <= -1.16e-289) {
tmp = x / (x + (y - (2.0 * ((y * c) * (((t_1 * t_1) - (a * a)) / (a + t_1))))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (0.6666666666666666 / t) - 0.8333333333333334 tmp = 0 if b <= -7.5e+88: tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a))))) elif b <= -2e-209: tmp = 1.0 elif b <= -1.16e-289: tmp = x / (x + (y - (2.0 * ((y * c) * (((t_1 * t_1) - (a * a)) / (a + t_1)))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(0.6666666666666666 / t) - 0.8333333333333334) tmp = 0.0 if (b <= -7.5e+88) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 + Float64(Float64(c - b) * Float64(2.0 * a)))))); elseif (b <= -2e-209) tmp = 1.0; elseif (b <= -1.16e-289) tmp = Float64(x / Float64(x + Float64(y - Float64(2.0 * Float64(Float64(y * c) * Float64(Float64(Float64(t_1 * t_1) - Float64(a * a)) / Float64(a + t_1))))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (0.6666666666666666 / t) - 0.8333333333333334; tmp = 0.0; if (b <= -7.5e+88) tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a))))); elseif (b <= -2e-209) tmp = 1.0; elseif (b <= -1.16e-289) tmp = x / (x + (y - (2.0 * ((y * c) * (((t_1 * t_1) - (a * a)) / (a + t_1)))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(0.6666666666666666 / t), $MachinePrecision] - 0.8333333333333334), $MachinePrecision]}, If[LessEqual[b, -7.5e+88], N[(x / N[(x + N[(y * N[(1.0 + N[(N[(c - b), $MachinePrecision] * N[(2.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2e-209], 1.0, If[LessEqual[b, -1.16e-289], N[(x / N[(x + N[(y - N[(2.0 * N[(N[(y * c), $MachinePrecision] * N[(N[(N[(t$95$1 * t$95$1), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision] / N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{0.6666666666666666}{t} - 0.8333333333333334\\
\mathbf{if}\;b \leq -7.5 \cdot 10^{+88}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 + \left(c - b\right) \cdot \left(2 \cdot a\right)\right)}\\
\mathbf{elif}\;b \leq -2 \cdot 10^{-209}:\\
\;\;\;\;1\\
\mathbf{elif}\;b \leq -1.16 \cdot 10^{-289}:\\
\;\;\;\;\frac{x}{x + \left(y - 2 \cdot \left(\left(y \cdot c\right) \cdot \frac{t_1 \cdot t_1 - a \cdot a}{a + t_1}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -7.50000000000000031e88Initial program 86.8%
Taylor expanded in a around inf 58.4%
Taylor expanded in a around 0 56.1%
associate-*r*56.1%
Simplified56.1%
if -7.50000000000000031e88 < b < -2.0000000000000001e-209 or -1.15999999999999998e-289 < b Initial program 92.4%
Taylor expanded in t around inf 74.4%
+-commutative74.4%
*-commutative74.4%
associate-*r*74.4%
neg-mul-174.4%
neg-sub074.4%
associate--r-74.4%
neg-sub074.4%
+-commutative74.4%
sub-neg74.4%
Simplified74.4%
Taylor expanded in a around 0 67.9%
Taylor expanded in x around inf 59.7%
if -2.0000000000000001e-209 < b < -1.15999999999999998e-289Initial program 100.0%
Taylor expanded in c around inf 74.8%
associate-*r/74.8%
metadata-eval74.8%
+-commutative74.8%
Simplified74.8%
Taylor expanded in c around 0 41.6%
associate-*r*41.7%
+-commutative41.7%
associate-*r/41.7%
metadata-eval41.7%
associate-+r-41.7%
Simplified41.7%
flip-+58.2%
Applied egg-rr58.2%
Final simplification59.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -6.6e-16)
1.0
(if (<= c -5.5e-213)
(/ x (+ x (* y (+ 1.0 (* (- c b) (* 2.0 a))))))
(if (<= c 1.2e+79)
1.0
(/
x
(*
y
(+
1.0
(*
(* 2.0 c)
(- a (- (/ 0.6666666666666666 t) 0.8333333333333334))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -6.6e-16) {
tmp = 1.0;
} else if (c <= -5.5e-213) {
tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a)))));
} else if (c <= 1.2e+79) {
tmp = 1.0;
} else {
tmp = x / (y * (1.0 + ((2.0 * c) * (a - ((0.6666666666666666 / t) - 0.8333333333333334)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= (-6.6d-16)) then
tmp = 1.0d0
else if (c <= (-5.5d-213)) then
tmp = x / (x + (y * (1.0d0 + ((c - b) * (2.0d0 * a)))))
else if (c <= 1.2d+79) then
tmp = 1.0d0
else
tmp = x / (y * (1.0d0 + ((2.0d0 * c) * (a - ((0.6666666666666666d0 / t) - 0.8333333333333334d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -6.6e-16) {
tmp = 1.0;
} else if (c <= -5.5e-213) {
tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a)))));
} else if (c <= 1.2e+79) {
tmp = 1.0;
} else {
tmp = x / (y * (1.0 + ((2.0 * c) * (a - ((0.6666666666666666 / t) - 0.8333333333333334)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -6.6e-16: tmp = 1.0 elif c <= -5.5e-213: tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a))))) elif c <= 1.2e+79: tmp = 1.0 else: tmp = x / (y * (1.0 + ((2.0 * c) * (a - ((0.6666666666666666 / t) - 0.8333333333333334))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -6.6e-16) tmp = 1.0; elseif (c <= -5.5e-213) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 + Float64(Float64(c - b) * Float64(2.0 * a)))))); elseif (c <= 1.2e+79) tmp = 1.0; else tmp = Float64(x / Float64(y * Float64(1.0 + Float64(Float64(2.0 * c) * Float64(a - Float64(Float64(0.6666666666666666 / t) - 0.8333333333333334)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -6.6e-16) tmp = 1.0; elseif (c <= -5.5e-213) tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a))))); elseif (c <= 1.2e+79) tmp = 1.0; else tmp = x / (y * (1.0 + ((2.0 * c) * (a - ((0.6666666666666666 / t) - 0.8333333333333334))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -6.6e-16], 1.0, If[LessEqual[c, -5.5e-213], N[(x / N[(x + N[(y * N[(1.0 + N[(N[(c - b), $MachinePrecision] * N[(2.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.2e+79], 1.0, N[(x / N[(y * N[(1.0 + N[(N[(2.0 * c), $MachinePrecision] * N[(a - N[(N[(0.6666666666666666 / t), $MachinePrecision] - 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -6.6 \cdot 10^{-16}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq -5.5 \cdot 10^{-213}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 + \left(c - b\right) \cdot \left(2 \cdot a\right)\right)}\\
\mathbf{elif}\;c \leq 1.2 \cdot 10^{+79}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + \left(2 \cdot c\right) \cdot \left(a - \left(\frac{0.6666666666666666}{t} - 0.8333333333333334\right)\right)\right)}\\
\end{array}
\end{array}
if c < -6.59999999999999976e-16 or -5.50000000000000008e-213 < c < 1.19999999999999993e79Initial program 92.3%
Taylor expanded in t around inf 71.5%
+-commutative71.5%
*-commutative71.5%
associate-*r*71.5%
neg-mul-171.5%
neg-sub071.5%
associate--r-71.5%
neg-sub071.5%
+-commutative71.5%
sub-neg71.5%
Simplified71.5%
Taylor expanded in a around 0 66.3%
Taylor expanded in x around inf 59.0%
if -6.59999999999999976e-16 < c < -5.50000000000000008e-213Initial program 97.8%
Taylor expanded in a around inf 65.2%
Taylor expanded in a around 0 61.0%
associate-*r*61.0%
Simplified61.0%
if 1.19999999999999993e79 < c Initial program 86.2%
Taylor expanded in c around inf 82.0%
associate-*r/82.0%
metadata-eval82.0%
+-commutative82.0%
Simplified82.0%
Taylor expanded in c around 0 47.4%
associate-*r*47.4%
+-commutative47.4%
associate-*r/47.4%
metadata-eval47.4%
associate-+r-47.4%
Simplified47.4%
Taylor expanded in y around inf 51.0%
associate-*r*51.0%
associate-*r/51.0%
metadata-eval51.0%
+-commutative51.0%
associate-+r-51.0%
Simplified51.0%
Final simplification58.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -2.9e-17)
1.0
(if (or (<= c -1.25e-213) (not (<= c 3.2e+79)))
(/ x (+ x (* y (+ 1.0 (* (- c b) (* 2.0 a))))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -2.9e-17) {
tmp = 1.0;
} else if ((c <= -1.25e-213) || !(c <= 3.2e+79)) {
tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a)))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= (-2.9d-17)) then
tmp = 1.0d0
else if ((c <= (-1.25d-213)) .or. (.not. (c <= 3.2d+79))) then
tmp = x / (x + (y * (1.0d0 + ((c - b) * (2.0d0 * a)))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -2.9e-17) {
tmp = 1.0;
} else if ((c <= -1.25e-213) || !(c <= 3.2e+79)) {
tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -2.9e-17: tmp = 1.0 elif (c <= -1.25e-213) or not (c <= 3.2e+79): tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -2.9e-17) tmp = 1.0; elseif ((c <= -1.25e-213) || !(c <= 3.2e+79)) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 + Float64(Float64(c - b) * Float64(2.0 * a)))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -2.9e-17) tmp = 1.0; elseif ((c <= -1.25e-213) || ~((c <= 3.2e+79))) tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -2.9e-17], 1.0, If[Or[LessEqual[c, -1.25e-213], N[Not[LessEqual[c, 3.2e+79]], $MachinePrecision]], N[(x / N[(x + N[(y * N[(1.0 + N[(N[(c - b), $MachinePrecision] * N[(2.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.9 \cdot 10^{-17}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq -1.25 \cdot 10^{-213} \lor \neg \left(c \leq 3.2 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 + \left(c - b\right) \cdot \left(2 \cdot a\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if c < -2.9000000000000003e-17 or -1.24999999999999994e-213 < c < 3.20000000000000003e79Initial program 92.3%
Taylor expanded in t around inf 71.5%
+-commutative71.5%
*-commutative71.5%
associate-*r*71.5%
neg-mul-171.5%
neg-sub071.5%
associate--r-71.5%
neg-sub071.5%
+-commutative71.5%
sub-neg71.5%
Simplified71.5%
Taylor expanded in a around 0 66.3%
Taylor expanded in x around inf 59.0%
if -2.9000000000000003e-17 < c < -1.24999999999999994e-213 or 3.20000000000000003e79 < c Initial program 92.1%
Taylor expanded in a around inf 70.1%
Taylor expanded in a around 0 56.1%
associate-*r*56.1%
Simplified56.1%
Final simplification58.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -1.2e-20)
1.0
(if (<= c -1.65e-205)
(/ x (+ x (* y (+ 1.0 (* (- c b) (* 2.0 a))))))
(if (<= c 1.42e+79) 1.0 (/ x (+ x (+ y (* 2.0 (* a (* y (- c b)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -1.2e-20) {
tmp = 1.0;
} else if (c <= -1.65e-205) {
tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a)))));
} else if (c <= 1.42e+79) {
tmp = 1.0;
} else {
tmp = x / (x + (y + (2.0 * (a * (y * (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 (c <= (-1.2d-20)) then
tmp = 1.0d0
else if (c <= (-1.65d-205)) then
tmp = x / (x + (y * (1.0d0 + ((c - b) * (2.0d0 * a)))))
else if (c <= 1.42d+79) then
tmp = 1.0d0
else
tmp = x / (x + (y + (2.0d0 * (a * (y * (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 (c <= -1.2e-20) {
tmp = 1.0;
} else if (c <= -1.65e-205) {
tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a)))));
} else if (c <= 1.42e+79) {
tmp = 1.0;
} else {
tmp = x / (x + (y + (2.0 * (a * (y * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -1.2e-20: tmp = 1.0 elif c <= -1.65e-205: tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a))))) elif c <= 1.42e+79: tmp = 1.0 else: tmp = x / (x + (y + (2.0 * (a * (y * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -1.2e-20) tmp = 1.0; elseif (c <= -1.65e-205) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 + Float64(Float64(c - b) * Float64(2.0 * a)))))); elseif (c <= 1.42e+79) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y + Float64(2.0 * Float64(a * Float64(y * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -1.2e-20) tmp = 1.0; elseif (c <= -1.65e-205) tmp = x / (x + (y * (1.0 + ((c - b) * (2.0 * a))))); elseif (c <= 1.42e+79) tmp = 1.0; else tmp = x / (x + (y + (2.0 * (a * (y * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -1.2e-20], 1.0, If[LessEqual[c, -1.65e-205], N[(x / N[(x + N[(y * N[(1.0 + N[(N[(c - b), $MachinePrecision] * N[(2.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.42e+79], 1.0, N[(x / N[(x + N[(y + N[(2.0 * N[(a * N[(y * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.2 \cdot 10^{-20}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq -1.65 \cdot 10^{-205}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 + \left(c - b\right) \cdot \left(2 \cdot a\right)\right)}\\
\mathbf{elif}\;c \leq 1.42 \cdot 10^{+79}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + \left(y + 2 \cdot \left(a \cdot \left(y \cdot \left(c - b\right)\right)\right)\right)}\\
\end{array}
\end{array}
if c < -1.19999999999999996e-20 or -1.65e-205 < c < 1.41999999999999998e79Initial program 92.3%
Taylor expanded in t around inf 71.5%
+-commutative71.5%
*-commutative71.5%
associate-*r*71.5%
neg-mul-171.5%
neg-sub071.5%
associate--r-71.5%
neg-sub071.5%
+-commutative71.5%
sub-neg71.5%
Simplified71.5%
Taylor expanded in a around 0 66.3%
Taylor expanded in x around inf 59.0%
if -1.19999999999999996e-20 < c < -1.65e-205Initial program 97.8%
Taylor expanded in a around inf 65.2%
Taylor expanded in a around 0 61.0%
associate-*r*61.0%
Simplified61.0%
if 1.41999999999999998e79 < c Initial program 86.2%
Taylor expanded in a around inf 75.2%
Taylor expanded in a around 0 50.9%
*-commutative50.9%
Simplified50.9%
Final simplification58.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -9.5e-24)
1.0
(if (<= c -6.8e-208)
(/ x (+ x (* y (+ 1.0 (* -2.0 (* a b))))))
(if (<= c 6.8e+78)
1.0
(* 0.5 (/ x (* y (* c (+ 0.8333333333333334 a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -9.5e-24) {
tmp = 1.0;
} else if (c <= -6.8e-208) {
tmp = x / (x + (y * (1.0 + (-2.0 * (a * b)))));
} else if (c <= 6.8e+78) {
tmp = 1.0;
} else {
tmp = 0.5 * (x / (y * (c * (0.8333333333333334 + a))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= (-9.5d-24)) then
tmp = 1.0d0
else if (c <= (-6.8d-208)) then
tmp = x / (x + (y * (1.0d0 + ((-2.0d0) * (a * b)))))
else if (c <= 6.8d+78) then
tmp = 1.0d0
else
tmp = 0.5d0 * (x / (y * (c * (0.8333333333333334d0 + a))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -9.5e-24) {
tmp = 1.0;
} else if (c <= -6.8e-208) {
tmp = x / (x + (y * (1.0 + (-2.0 * (a * b)))));
} else if (c <= 6.8e+78) {
tmp = 1.0;
} else {
tmp = 0.5 * (x / (y * (c * (0.8333333333333334 + a))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -9.5e-24: tmp = 1.0 elif c <= -6.8e-208: tmp = x / (x + (y * (1.0 + (-2.0 * (a * b))))) elif c <= 6.8e+78: tmp = 1.0 else: tmp = 0.5 * (x / (y * (c * (0.8333333333333334 + a)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -9.5e-24) tmp = 1.0; elseif (c <= -6.8e-208) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 + Float64(-2.0 * Float64(a * b)))))); elseif (c <= 6.8e+78) tmp = 1.0; else tmp = Float64(0.5 * Float64(x / Float64(y * Float64(c * Float64(0.8333333333333334 + a))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -9.5e-24) tmp = 1.0; elseif (c <= -6.8e-208) tmp = x / (x + (y * (1.0 + (-2.0 * (a * b))))); elseif (c <= 6.8e+78) tmp = 1.0; else tmp = 0.5 * (x / (y * (c * (0.8333333333333334 + a)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -9.5e-24], 1.0, If[LessEqual[c, -6.8e-208], N[(x / N[(x + N[(y * N[(1.0 + N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.8e+78], 1.0, N[(0.5 * N[(x / N[(y * N[(c * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -9.5 \cdot 10^{-24}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq -6.8 \cdot 10^{-208}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 + -2 \cdot \left(a \cdot b\right)\right)}\\
\mathbf{elif}\;c \leq 6.8 \cdot 10^{+78}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{x}{y \cdot \left(c \cdot \left(0.8333333333333334 + a\right)\right)}\\
\end{array}
\end{array}
if c < -9.50000000000000029e-24 or -6.8e-208 < c < 6.80000000000000014e78Initial program 92.3%
Taylor expanded in t around inf 71.5%
+-commutative71.5%
*-commutative71.5%
associate-*r*71.5%
neg-mul-171.5%
neg-sub071.5%
associate--r-71.5%
neg-sub071.5%
+-commutative71.5%
sub-neg71.5%
Simplified71.5%
Taylor expanded in a around 0 66.3%
Taylor expanded in x around inf 59.0%
if -9.50000000000000029e-24 < c < -6.8e-208Initial program 97.8%
Taylor expanded in a around inf 65.2%
Taylor expanded in c around 0 65.2%
*-commutative65.2%
*-commutative65.2%
associate-*l*65.2%
Simplified65.2%
Taylor expanded in b around 0 58.9%
*-commutative58.9%
Simplified58.9%
if 6.80000000000000014e78 < c Initial program 86.2%
Taylor expanded in c around inf 82.0%
associate-*r/82.0%
metadata-eval82.0%
+-commutative82.0%
Simplified82.0%
Taylor expanded in c around 0 47.4%
associate-*r*47.4%
+-commutative47.4%
associate-*r/47.4%
metadata-eval47.4%
associate-+r-47.4%
Simplified47.4%
Taylor expanded in t around inf 47.3%
Taylor expanded in c around inf 42.1%
associate-*r*42.1%
*-commutative42.1%
associate-*l*46.5%
Simplified46.5%
Final simplification56.9%
(FPCore (x y z t a b c) :precision binary64 (if (<= c 7.2e+80) 1.0 (* 0.5 (/ x (* y (* c (+ 0.8333333333333334 a)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 7.2e+80) {
tmp = 1.0;
} else {
tmp = 0.5 * (x / (y * (c * (0.8333333333333334 + a))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= 7.2d+80) then
tmp = 1.0d0
else
tmp = 0.5d0 * (x / (y * (c * (0.8333333333333334d0 + a))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 7.2e+80) {
tmp = 1.0;
} else {
tmp = 0.5 * (x / (y * (c * (0.8333333333333334 + a))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 7.2e+80: tmp = 1.0 else: tmp = 0.5 * (x / (y * (c * (0.8333333333333334 + a)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 7.2e+80) tmp = 1.0; else tmp = Float64(0.5 * Float64(x / Float64(y * Float64(c * Float64(0.8333333333333334 + a))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 7.2e+80) tmp = 1.0; else tmp = 0.5 * (x / (y * (c * (0.8333333333333334 + a)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 7.2e+80], 1.0, N[(0.5 * N[(x / N[(y * N[(c * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 7.2 \cdot 10^{+80}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{x}{y \cdot \left(c \cdot \left(0.8333333333333334 + a\right)\right)}\\
\end{array}
\end{array}
if c < 7.1999999999999999e80Initial program 93.4%
Taylor expanded in t around inf 70.2%
+-commutative70.2%
*-commutative70.2%
associate-*r*70.2%
neg-mul-170.2%
neg-sub070.2%
associate--r-70.2%
neg-sub070.2%
+-commutative70.2%
sub-neg70.2%
Simplified70.2%
Taylor expanded in a around 0 64.7%
Taylor expanded in x around inf 55.4%
if 7.1999999999999999e80 < c Initial program 86.2%
Taylor expanded in c around inf 82.0%
associate-*r/82.0%
metadata-eval82.0%
+-commutative82.0%
Simplified82.0%
Taylor expanded in c around 0 47.4%
associate-*r*47.4%
+-commutative47.4%
associate-*r/47.4%
metadata-eval47.4%
associate-+r-47.4%
Simplified47.4%
Taylor expanded in t around inf 47.3%
Taylor expanded in c around inf 42.1%
associate-*r*42.1%
*-commutative42.1%
associate-*l*46.5%
Simplified46.5%
Final simplification53.9%
(FPCore (x y z t a b c) :precision binary64 1.0)
double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = 1.0d0
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
def code(x, y, z, t, a, b, c): return 1.0
function code(x, y, z, t, a, b, c) return 1.0 end
function tmp = code(x, y, z, t, a, b, c) tmp = 1.0; end
code[x_, y_, z_, t_, a_, b_, c_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 92.2%
Taylor expanded in t around inf 72.5%
+-commutative72.5%
*-commutative72.5%
associate-*r*72.5%
neg-mul-172.5%
neg-sub072.5%
associate--r-72.5%
neg-sub072.5%
+-commutative72.5%
sub-neg72.5%
Simplified72.5%
Taylor expanded in a around 0 66.5%
Taylor expanded in x around inf 51.9%
Final simplification51.9%
(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 2023290
(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)))))))))))