
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(/
x
(fma
y
(pow
(exp 2.0)
(fma
(+ 0.8333333333333334 (- a (/ 0.6666666666666666 t)))
(- c b)
(* (sqrt (+ a t)) (/ z t))))
x)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / fma(y, pow(exp(2.0), fma((0.8333333333333334 + (a - (0.6666666666666666 / t))), (c - b), (sqrt((a + t)) * (z / t)))), x);
}
function code(x, y, z, t, a, b, c) return Float64(x / fma(y, (exp(2.0) ^ fma(Float64(0.8333333333333334 + Float64(a - Float64(0.6666666666666666 / t))), Float64(c - b), Float64(sqrt(Float64(a + t)) * Float64(z / t)))), x)) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(0.8333333333333334 + N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(c - b), $MachinePrecision] + N[(N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\mathsf{fma}\left(y, {\left(e^{2}\right)}^{\left(\mathsf{fma}\left(0.8333333333333334 + \left(a - \frac{0.6666666666666666}{t}\right), c - b, \sqrt{a + t} \cdot \frac{z}{t}\right)\right)}, x\right)}
\end{array}
Initial program 96.8%
+-commutative96.8%
fma-def96.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* (sqrt (+ a t)) z) t)
(* (- c b) (- (+ 0.8333333333333334 a) (/ 2.0 (* t 3.0)))))))
(if (<= t_1 INFINITY)
(/ x (+ x (* y (exp (* 2.0 t_1)))))
(/ x (+ x (* y (exp (* 2.0 (* (/ c t) -0.6666666666666666)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((sqrt((a + t)) * z) / t) + ((c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0))));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * exp((2.0 * ((c / t) * -0.6666666666666666)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((Math.sqrt((a + t)) * z) / t) + ((c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0))));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((c / t) * -0.6666666666666666)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((math.sqrt((a + t)) * z) / t) + ((c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0)))) tmp = 0 if t_1 <= math.inf: tmp = x / (x + (y * math.exp((2.0 * t_1)))) else: tmp = x / (x + (y * math.exp((2.0 * ((c / t) * -0.6666666666666666))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(sqrt(Float64(a + t)) * z) / t) + Float64(Float64(c - b) * Float64(Float64(0.8333333333333334 + a) - Float64(2.0 / Float64(t * 3.0))))) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * t_1))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c / t) * -0.6666666666666666)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((sqrt((a + t)) * z) / t) + ((c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0)))); tmp = 0.0; if (t_1 <= Inf) tmp = x / (x + (y * exp((2.0 * t_1)))); else tmp = x / (x + (y * exp((2.0 * ((c / t) * -0.6666666666666666))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision] + N[(N[(c - b), $MachinePrecision] * N[(N[(0.8333333333333334 + a), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c / t), $MachinePrecision] * -0.6666666666666666), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\sqrt{a + t} \cdot z}{t} + \left(c - b\right) \cdot \left(\left(0.8333333333333334 + a\right) - \frac{2}{t \cdot 3}\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot t_1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{c}{t} \cdot -0.6666666666666666\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 99.6%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) Initial program 0.0%
Taylor expanded in t around 0 57.6%
Taylor expanded in c around inf 72.3%
*-commutative72.3%
Simplified72.3%
Final simplification98.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -10.0)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 1e-284)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* (- c b) -0.6666666666666666)) t))))))
(if (<= t 2e+185)
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(* z (sqrt (/ 1.0 t)))
(* (- c b) (- 0.8333333333333334 (/ 0.6666666666666666 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 <= -10.0) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 1e-284) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + ((c - b) * -0.6666666666666666)) / t)))));
} else if (t <= 2e+185) {
tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) + ((c - b) * (0.8333333333333334 - (0.6666666666666666 / 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 <= (-10.0d0)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 1d-284) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((c - b) * (-0.6666666666666666d0))) / t)))))
else if (t <= 2d+185) then
tmp = x / (x + (y * exp((2.0d0 * ((z * sqrt((1.0d0 / t))) + ((c - b) * (0.8333333333333334d0 - (0.6666666666666666d0 / 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 <= -10.0) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 1e-284) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + ((c - b) * -0.6666666666666666)) / t)))));
} else if (t <= 2e+185) {
tmp = x / (x + (y * Math.exp((2.0 * ((z * Math.sqrt((1.0 / t))) + ((c - b) * (0.8333333333333334 - (0.6666666666666666 / 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 <= -10.0: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 1e-284: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + ((c - b) * -0.6666666666666666)) / t))))) elif t <= 2e+185: tmp = x / (x + (y * math.exp((2.0 * ((z * math.sqrt((1.0 / t))) + ((c - b) * (0.8333333333333334 - (0.6666666666666666 / 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 <= -10.0) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 1e-284) 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 <= 2e+185) 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 / 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 <= -10.0) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 1e-284) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + ((c - b) * -0.6666666666666666)) / t))))); elseif (t <= 2e+185) tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) + ((c - b) * (0.8333333333333334 - (0.6666666666666666 / 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, -10.0], 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, 1e-284], 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, 2e+185], 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 / t), $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 -10:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 10^{-284}:\\
\;\;\;\;\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 \cdot 10^{+185}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(z \cdot \sqrt{\frac{1}{t}} + \left(c - b\right) \cdot \left(0.8333333333333334 - \frac{0.6666666666666666}{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 < -10Initial program 100.0%
Taylor expanded in a around inf 100.0%
if -10 < t < 1.00000000000000004e-284Initial program 96.0%
Taylor expanded in t around 0 96.1%
if 1.00000000000000004e-284 < t < 2e185Initial program 96.2%
Taylor expanded in a around 0 93.3%
*-commutative93.3%
associate-*r/93.3%
metadata-eval93.3%
Simplified93.3%
if 2e185 < t Initial program 98.0%
Taylor expanded in t around inf 92.8%
associate-*r*92.8%
neg-mul-192.8%
neg-sub092.8%
associate--r-92.8%
neg-sub092.8%
+-commutative92.8%
sub-neg92.8%
*-commutative92.8%
+-commutative92.8%
Simplified92.8%
Final simplification94.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -0.0001)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 1.9e-149)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* (- c b) -0.6666666666666666)) t))))))
(if (<= t 1.5e-18)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* c (+ a (- 0.8333333333333334 (/ 0.6666666666666666 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 <= -0.0001) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 1.9e-149) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + ((c - b) * -0.6666666666666666)) / t)))));
} else if (t <= 1.5e-18) {
tmp = x / (x + (y * exp((2.0 * (c * (a + (0.8333333333333334 - (0.6666666666666666 / 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 <= (-0.0001d0)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 1.9d-149) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((c - b) * (-0.6666666666666666d0))) / t)))))
else if (t <= 1.5d-18) then
tmp = x / (x + (y * exp((2.0d0 * (c * (a + (0.8333333333333334d0 - (0.6666666666666666d0 / 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 <= -0.0001) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 1.9e-149) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + ((c - b) * -0.6666666666666666)) / t)))));
} else if (t <= 1.5e-18) {
tmp = x / (x + (y * Math.exp((2.0 * (c * (a + (0.8333333333333334 - (0.6666666666666666 / 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 <= -0.0001: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 1.9e-149: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + ((c - b) * -0.6666666666666666)) / t))))) elif t <= 1.5e-18: tmp = x / (x + (y * math.exp((2.0 * (c * (a + (0.8333333333333334 - (0.6666666666666666 / 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 <= -0.0001) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 1.9e-149) 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 <= 1.5e-18) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(0.8333333333333334 - Float64(0.6666666666666666 / 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 <= -0.0001) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 1.9e-149) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + ((c - b) * -0.6666666666666666)) / t))))); elseif (t <= 1.5e-18) tmp = x / (x + (y * exp((2.0 * (c * (a + (0.8333333333333334 - (0.6666666666666666 / 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, -0.0001], 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.9e-149], 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, 1.5e-18], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(0.8333333333333334 - N[(0.6666666666666666 / t), $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 -0.0001:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-149}:\\
\;\;\;\;\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 1.5 \cdot 10^{-18}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(0.8333333333333334 - \frac{0.6666666666666666}{t}\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 < -1.00000000000000005e-4Initial program 100.0%
Taylor expanded in a around inf 100.0%
if -1.00000000000000005e-4 < t < 1.90000000000000003e-149Initial program 95.6%
Taylor expanded in t around 0 92.3%
if 1.90000000000000003e-149 < t < 1.49999999999999991e-18Initial program 97.1%
Taylor expanded in c around inf 75.9%
+-commutative75.9%
associate-*r/75.9%
metadata-eval75.9%
associate--l+75.9%
Simplified75.9%
if 1.49999999999999991e-18 < t Initial program 97.2%
Taylor expanded in t around inf 88.6%
associate-*r*88.6%
neg-mul-188.6%
neg-sub088.6%
associate--r-88.6%
neg-sub088.6%
+-commutative88.6%
sub-neg88.6%
*-commutative88.6%
+-commutative88.6%
Simplified88.6%
Final simplification89.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* (- c b) 1.6666666666666667))))))
(t_2 (/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))))
(if (<= t -3.5e-240)
t_2
(if (<= t 3e-174)
(/ x (+ x (* y (exp (* 2.0 (* (/ c t) -0.6666666666666666))))))
(if (<= t 1.05e-38)
(/ x (+ x (* y (exp (* 2.0 (/ (* 0.6666666666666666 b) t))))))
(if (<= t 1.2e-20)
t_1
(if (<= t 9.6e+32)
(/ x (+ x (* y (exp (* -2.0 (* a b))))))
(if (<= t 2.1e+187) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
double t_2 = x / (x + (y * exp((2.0 * (a * (c - b))))));
double tmp;
if (t <= -3.5e-240) {
tmp = t_2;
} else if (t <= 3e-174) {
tmp = x / (x + (y * exp((2.0 * ((c / t) * -0.6666666666666666)))));
} else if (t <= 1.05e-38) {
tmp = x / (x + (y * exp((2.0 * ((0.6666666666666666 * b) / t)))));
} else if (t <= 1.2e-20) {
tmp = t_1;
} else if (t <= 9.6e+32) {
tmp = x / (x + (y * exp((-2.0 * (a * b)))));
} else if (t <= 2.1e+187) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
t_2 = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
if (t <= (-3.5d-240)) then
tmp = t_2
else if (t <= 3d-174) then
tmp = x / (x + (y * exp((2.0d0 * ((c / t) * (-0.6666666666666666d0))))))
else if (t <= 1.05d-38) then
tmp = x / (x + (y * exp((2.0d0 * ((0.6666666666666666d0 * b) / t)))))
else if (t <= 1.2d-20) then
tmp = t_1
else if (t <= 9.6d+32) then
tmp = x / (x + (y * exp(((-2.0d0) * (a * b)))))
else if (t <= 2.1d+187) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
double t_2 = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
double tmp;
if (t <= -3.5e-240) {
tmp = t_2;
} else if (t <= 3e-174) {
tmp = x / (x + (y * Math.exp((2.0 * ((c / t) * -0.6666666666666666)))));
} else if (t <= 1.05e-38) {
tmp = x / (x + (y * Math.exp((2.0 * ((0.6666666666666666 * b) / t)))));
} else if (t <= 1.2e-20) {
tmp = t_1;
} else if (t <= 9.6e+32) {
tmp = x / (x + (y * Math.exp((-2.0 * (a * b)))));
} else if (t <= 2.1e+187) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) t_2 = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) tmp = 0 if t <= -3.5e-240: tmp = t_2 elif t <= 3e-174: tmp = x / (x + (y * math.exp((2.0 * ((c / t) * -0.6666666666666666))))) elif t <= 1.05e-38: tmp = x / (x + (y * math.exp((2.0 * ((0.6666666666666666 * b) / t))))) elif t <= 1.2e-20: tmp = t_1 elif t <= 9.6e+32: tmp = x / (x + (y * math.exp((-2.0 * (a * b))))) elif t <= 2.1e+187: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))) t_2 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))) tmp = 0.0 if (t <= -3.5e-240) tmp = t_2; elseif (t <= 3e-174) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c / t) * -0.6666666666666666)))))); elseif (t <= 1.05e-38) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(0.6666666666666666 * b) / t)))))); elseif (t <= 1.2e-20) tmp = t_1; elseif (t <= 9.6e+32) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(a * b)))))); elseif (t <= 2.1e+187) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); t_2 = x / (x + (y * exp((2.0 * (a * (c - b)))))); tmp = 0.0; if (t <= -3.5e-240) tmp = t_2; elseif (t <= 3e-174) tmp = x / (x + (y * exp((2.0 * ((c / t) * -0.6666666666666666))))); elseif (t <= 1.05e-38) tmp = x / (x + (y * exp((2.0 * ((0.6666666666666666 * b) / t))))); elseif (t <= 1.2e-20) tmp = t_1; elseif (t <= 9.6e+32) tmp = x / (x + (y * exp((-2.0 * (a * b))))); elseif (t <= 2.1e+187) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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.5e-240], t$95$2, If[LessEqual[t, 3e-174], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c / t), $MachinePrecision] * -0.6666666666666666), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-38], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(0.6666666666666666 * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-20], t$95$1, If[LessEqual[t, 9.6e+32], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e+187], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
t_2 := \frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{-240}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-174}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{c}{t} \cdot -0.6666666666666666\right)}}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{0.6666666666666666 \cdot b}{t}}}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{+32}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(a \cdot b\right)}}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+187}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -3.50000000000000016e-240 or 2.1e187 < t Initial program 99.0%
Taylor expanded in a around inf 80.8%
if -3.50000000000000016e-240 < t < 3.00000000000000021e-174Initial program 92.9%
Taylor expanded in t around 0 90.5%
Taylor expanded in c around inf 74.6%
*-commutative74.6%
Simplified74.6%
if 3.00000000000000021e-174 < t < 1.05000000000000006e-38Initial program 94.9%
Taylor expanded in b around inf 73.0%
*-commutative73.0%
associate-*r/73.0%
metadata-eval73.0%
+-commutative73.0%
Simplified73.0%
Taylor expanded in t around 0 75.5%
associate-*r/75.5%
Simplified75.5%
if 1.05000000000000006e-38 < t < 1.19999999999999996e-20 or 9.59999999999999965e32 < t < 2.1e187Initial program 95.8%
Taylor expanded in t around inf 93.8%
associate-*r*93.8%
neg-mul-193.8%
neg-sub093.8%
associate--r-93.8%
neg-sub093.8%
+-commutative93.8%
sub-neg93.8%
*-commutative93.8%
+-commutative93.8%
Simplified93.8%
Taylor expanded in a around 0 95.9%
if 1.19999999999999996e-20 < t < 9.59999999999999965e32Initial program 100.0%
Taylor expanded in a around inf 69.6%
Taylor expanded in c around 0 75.7%
Final simplification81.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/ x (+ x (* y (exp (* 2.0 (* (- c b) (+ 0.8333333333333334 a)))))))))
(if (<= t -5e-293)
t_1
(if (<= t 6e-173)
(/ x (+ x (* y (exp (* 2.0 (* (/ c t) -0.6666666666666666))))))
(if (<= t 1.2e-19)
(/ x (+ x (* y (exp (* 2.0 (/ (* 0.6666666666666666 b) t))))))
(if (<= t 9.6e+32) (/ x (+ x (* y (exp (* -2.0 (* a b)))))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
double tmp;
if (t <= -5e-293) {
tmp = t_1;
} else if (t <= 6e-173) {
tmp = x / (x + (y * exp((2.0 * ((c / t) * -0.6666666666666666)))));
} else if (t <= 1.2e-19) {
tmp = x / (x + (y * exp((2.0 * ((0.6666666666666666 * b) / t)))));
} else if (t <= 9.6e+32) {
tmp = x / (x + (y * exp((-2.0 * (a * b)))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * ((c - b) * (0.8333333333333334d0 + a))))))
if (t <= (-5d-293)) then
tmp = t_1
else if (t <= 6d-173) then
tmp = x / (x + (y * exp((2.0d0 * ((c / t) * (-0.6666666666666666d0))))))
else if (t <= 1.2d-19) then
tmp = x / (x + (y * exp((2.0d0 * ((0.6666666666666666d0 * b) / t)))))
else if (t <= 9.6d+32) then
tmp = x / (x + (y * exp(((-2.0d0) * (a * b)))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
double tmp;
if (t <= -5e-293) {
tmp = t_1;
} else if (t <= 6e-173) {
tmp = x / (x + (y * Math.exp((2.0 * ((c / t) * -0.6666666666666666)))));
} else if (t <= 1.2e-19) {
tmp = x / (x + (y * Math.exp((2.0 * ((0.6666666666666666 * b) / t)))));
} else if (t <= 9.6e+32) {
tmp = x / (x + (y * Math.exp((-2.0 * (a * b)))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))) tmp = 0 if t <= -5e-293: tmp = t_1 elif t <= 6e-173: tmp = x / (x + (y * math.exp((2.0 * ((c / t) * -0.6666666666666666))))) elif t <= 1.2e-19: tmp = x / (x + (y * math.exp((2.0 * ((0.6666666666666666 * b) / t))))) elif t <= 9.6e+32: tmp = x / (x + (y * math.exp((-2.0 * (a * b))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c - b) * Float64(0.8333333333333334 + a))))))) tmp = 0.0 if (t <= -5e-293) tmp = t_1; elseif (t <= 6e-173) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c / t) * -0.6666666666666666)))))); elseif (t <= 1.2e-19) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(0.6666666666666666 * b) / t)))))); elseif (t <= 9.6e+32) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(a * b)))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))); tmp = 0.0; if (t <= -5e-293) tmp = t_1; elseif (t <= 6e-173) tmp = x / (x + (y * exp((2.0 * ((c / t) * -0.6666666666666666))))); elseif (t <= 1.2e-19) tmp = x / (x + (y * exp((2.0 * ((0.6666666666666666 * b) / t))))); elseif (t <= 9.6e+32) tmp = x / (x + (y * exp((-2.0 * (a * b))))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c - b), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-293], t$95$1, If[LessEqual[t, 6e-173], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c / t), $MachinePrecision] * -0.6666666666666666), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-19], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(0.6666666666666666 * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.6e+32], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(0.8333333333333334 + a\right)\right)}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-293}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-173}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{c}{t} \cdot -0.6666666666666666\right)}}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-19}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{0.6666666666666666 \cdot b}{t}}}\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{+32}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(a \cdot b\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -5.0000000000000003e-293 or 9.59999999999999965e32 < t Initial program 98.0%
Taylor expanded in t around inf 89.5%
associate-*r*89.5%
neg-mul-189.5%
neg-sub089.5%
associate--r-89.5%
neg-sub089.5%
+-commutative89.5%
sub-neg89.5%
*-commutative89.5%
+-commutative89.5%
Simplified89.5%
if -5.0000000000000003e-293 < t < 6.0000000000000002e-173Initial program 92.1%
Taylor expanded in t around 0 89.5%
Taylor expanded in c around inf 74.5%
*-commutative74.5%
Simplified74.5%
if 6.0000000000000002e-173 < t < 1.20000000000000011e-19Initial program 95.6%
Taylor expanded in b around inf 68.1%
*-commutative68.1%
associate-*r/68.1%
metadata-eval68.1%
+-commutative68.1%
Simplified68.1%
Taylor expanded in t around 0 70.3%
associate-*r/70.3%
Simplified70.3%
if 1.20000000000000011e-19 < t < 9.59999999999999965e32Initial program 100.0%
Taylor expanded in a around inf 74.1%
Taylor expanded in c around 0 80.5%
Final simplification83.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))))
(if (<= t -2e-310)
t_1
(if (<= t 2.55e-198)
(/ x (- x (* y (- -1.0 (/ (* c -1.3333333333333333) t)))))
(if (<= t 3.2e-96)
1.0
(if (<= t 5.2e+187)
(/ x (+ x (* y (exp (* (- c b) 1.6666666666666667)))))
t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((2.0 * (a * (c - b))))));
double tmp;
if (t <= -2e-310) {
tmp = t_1;
} else if (t <= 2.55e-198) {
tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t))));
} else if (t <= 3.2e-96) {
tmp = 1.0;
} else if (t <= 5.2e+187) {
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
if (t <= (-2d-310)) then
tmp = t_1
else if (t <= 2.55d-198) then
tmp = x / (x - (y * ((-1.0d0) - ((c * (-1.3333333333333333d0)) / t))))
else if (t <= 3.2d-96) then
tmp = 1.0d0
else if (t <= 5.2d+187) then
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
double tmp;
if (t <= -2e-310) {
tmp = t_1;
} else if (t <= 2.55e-198) {
tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t))));
} else if (t <= 3.2e-96) {
tmp = 1.0;
} else if (t <= 5.2e+187) {
tmp = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) tmp = 0 if t <= -2e-310: tmp = t_1 elif t <= 2.55e-198: tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t)))) elif t <= 3.2e-96: tmp = 1.0 elif t <= 5.2e+187: tmp = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))) tmp = 0.0 if (t <= -2e-310) tmp = t_1; elseif (t <= 2.55e-198) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(Float64(c * -1.3333333333333333) / t))))); elseif (t <= 3.2e-96) tmp = 1.0; elseif (t <= 5.2e+187) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * (a * (c - b)))))); tmp = 0.0; if (t <= -2e-310) tmp = t_1; elseif (t <= 2.55e-198) tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t)))); elseif (t <= 3.2e-96) tmp = 1.0; elseif (t <= 5.2e+187) tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-310], t$95$1, If[LessEqual[t, 2.55e-198], N[(x / N[(x - N[(y * N[(-1.0 - N[(N[(c * -1.3333333333333333), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-96], 1.0, If[LessEqual[t, 5.2e+187], N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{-198}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - \frac{c \cdot -1.3333333333333333}{t}\right)}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-96}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+187}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.999999999999994e-310 or 5.1999999999999997e187 < t Initial program 99.0%
Taylor expanded in a around inf 81.0%
if -1.999999999999994e-310 < t < 2.5499999999999998e-198Initial program 90.0%
Taylor expanded in t around 0 86.7%
Taylor expanded in c around inf 70.9%
*-commutative70.9%
Simplified70.9%
Taylor expanded in c around 0 77.4%
associate-*r/77.4%
Simplified77.4%
if 2.5499999999999998e-198 < t < 3.20000000000000012e-96Initial program 94.1%
Taylor expanded in a around inf 34.7%
Taylor expanded in a around 0 37.5%
Taylor expanded in x around inf 57.3%
if 3.20000000000000012e-96 < t < 5.1999999999999997e187Initial program 97.3%
Taylor expanded in t around inf 80.8%
associate-*r*80.8%
neg-mul-180.8%
neg-sub080.8%
associate--r-80.8%
neg-sub080.8%
+-commutative80.8%
sub-neg80.8%
*-commutative80.8%
+-commutative80.8%
Simplified80.8%
Taylor expanded in a around 0 82.1%
Final simplification77.7%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= c -1.8e-9) (not (<= c 8e-37)))
(/
x
(+
x
(*
y
(exp
(* 2.0 (* c (+ a (- 0.8333333333333334 (/ 0.6666666666666666 t)))))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ 0.8333333333333334 a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((c <= -1.8e-9) || !(c <= 8e-37)) {
tmp = x / (x + (y * exp((2.0 * (c * (a + (0.8333333333333334 - (0.6666666666666666 / t))))))));
} else {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((c <= (-1.8d-9)) .or. (.not. (c <= 8d-37))) then
tmp = x / (x + (y * exp((2.0d0 * (c * (a + (0.8333333333333334d0 - (0.6666666666666666d0 / t))))))))
else
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (0.8333333333333334d0 + a)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((c <= -1.8e-9) || !(c <= 8e-37)) {
tmp = x / (x + (y * Math.exp((2.0 * (c * (a + (0.8333333333333334 - (0.6666666666666666 / t))))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (c <= -1.8e-9) or not (c <= 8e-37): tmp = x / (x + (y * math.exp((2.0 * (c * (a + (0.8333333333333334 - (0.6666666666666666 / t)))))))) else: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((c <= -1.8e-9) || !(c <= 8e-37)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(0.8333333333333334 - Float64(0.6666666666666666 / t))))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(0.8333333333333334 + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((c <= -1.8e-9) || ~((c <= 8e-37))) tmp = x / (x + (y * exp((2.0 * (c * (a + (0.8333333333333334 - (0.6666666666666666 / t)))))))); else tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[c, -1.8e-9], N[Not[LessEqual[c, 8e-37]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(0.8333333333333334 - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.8 \cdot 10^{-9} \lor \neg \left(c \leq 8 \cdot 10^{-37}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(0.8333333333333334 - \frac{0.6666666666666666}{t}\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(0.8333333333333334 + a\right)\right)\right)}}\\
\end{array}
\end{array}
if c < -1.8e-9 or 8.00000000000000053e-37 < c Initial program 95.4%
Taylor expanded in c around inf 86.9%
+-commutative86.9%
associate-*r/86.9%
metadata-eval86.9%
associate--l+86.9%
Simplified86.9%
if -1.8e-9 < c < 8.00000000000000053e-37Initial program 98.4%
Taylor expanded in b around inf 82.5%
*-commutative82.5%
associate-*r/82.5%
metadata-eval82.5%
+-commutative82.5%
Simplified82.5%
Final simplification84.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* (- c b) 1.6666666666666667)))))))
(if (<= t -5.5e-299)
t_1
(if (<= t 2.9e-198)
(/ x (- x (* y (- -1.0 (/ (* c -1.3333333333333333) t)))))
(if (<= t 4.6e-96)
1.0
(if (<= t 5.7e+187) t_1 (/ x (+ x (* y (exp (* -2.0 (* a b))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
double tmp;
if (t <= -5.5e-299) {
tmp = t_1;
} else if (t <= 2.9e-198) {
tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t))));
} else if (t <= 4.6e-96) {
tmp = 1.0;
} else if (t <= 5.7e+187) {
tmp = t_1;
} else {
tmp = x / (x + (y * exp((-2.0 * (a * b)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
if (t <= (-5.5d-299)) then
tmp = t_1
else if (t <= 2.9d-198) then
tmp = x / (x - (y * ((-1.0d0) - ((c * (-1.3333333333333333d0)) / t))))
else if (t <= 4.6d-96) then
tmp = 1.0d0
else if (t <= 5.7d+187) then
tmp = t_1
else
tmp = x / (x + (y * exp(((-2.0d0) * (a * b)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
double tmp;
if (t <= -5.5e-299) {
tmp = t_1;
} else if (t <= 2.9e-198) {
tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t))));
} else if (t <= 4.6e-96) {
tmp = 1.0;
} else if (t <= 5.7e+187) {
tmp = t_1;
} else {
tmp = x / (x + (y * Math.exp((-2.0 * (a * b)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) tmp = 0 if t <= -5.5e-299: tmp = t_1 elif t <= 2.9e-198: tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t)))) elif t <= 4.6e-96: tmp = 1.0 elif t <= 5.7e+187: tmp = t_1 else: tmp = x / (x + (y * math.exp((-2.0 * (a * b))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))) tmp = 0.0 if (t <= -5.5e-299) tmp = t_1; elseif (t <= 2.9e-198) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(Float64(c * -1.3333333333333333) / t))))); elseif (t <= 4.6e-96) tmp = 1.0; elseif (t <= 5.7e+187) tmp = t_1; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(a * b)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); tmp = 0.0; if (t <= -5.5e-299) tmp = t_1; elseif (t <= 2.9e-198) tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t)))); elseif (t <= 4.6e-96) tmp = 1.0; elseif (t <= 5.7e+187) tmp = t_1; else tmp = x / (x + (y * exp((-2.0 * (a * b))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e-299], t$95$1, If[LessEqual[t, 2.9e-198], N[(x / N[(x - N[(y * N[(-1.0 - N[(N[(c * -1.3333333333333333), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e-96], 1.0, If[LessEqual[t, 5.7e+187], t$95$1, N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{-299}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-198}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - \frac{c \cdot -1.3333333333333333}{t}\right)}\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-96}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 5.7 \cdot 10^{+187}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(a \cdot b\right)}}\\
\end{array}
\end{array}
if t < -5.5e-299 or 4.6e-96 < t < 5.7000000000000004e187Initial program 98.5%
Taylor expanded in t around inf 82.3%
associate-*r*82.3%
neg-mul-182.3%
neg-sub082.3%
associate--r-82.3%
neg-sub082.3%
+-commutative82.3%
sub-neg82.3%
*-commutative82.3%
+-commutative82.3%
Simplified82.3%
Taylor expanded in a around 0 78.9%
if -5.5e-299 < t < 2.90000000000000001e-198Initial program 90.3%
Taylor expanded in t around 0 87.1%
Taylor expanded in c around inf 71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in c around 0 75.0%
associate-*r/75.0%
Simplified75.0%
if 2.90000000000000001e-198 < t < 4.6e-96Initial program 94.1%
Taylor expanded in a around inf 34.7%
Taylor expanded in a around 0 37.5%
Taylor expanded in x around inf 57.3%
if 5.7000000000000004e187 < t Initial program 98.0%
Taylor expanded in a around inf 78.9%
Taylor expanded in c around 0 71.9%
Final simplification74.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))))
(if (<= t -7.6e-239)
t_1
(if (<= t 6e-51)
(/ x (+ x (* y (exp (* 2.0 (* (/ c t) -0.6666666666666666))))))
(if (<= t 2.7e+185)
(/ x (+ x (* y (exp (* (- c b) 1.6666666666666667)))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((2.0 * (a * (c - b))))));
double tmp;
if (t <= -7.6e-239) {
tmp = t_1;
} else if (t <= 6e-51) {
tmp = x / (x + (y * exp((2.0 * ((c / t) * -0.6666666666666666)))));
} else if (t <= 2.7e+185) {
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
if (t <= (-7.6d-239)) then
tmp = t_1
else if (t <= 6d-51) then
tmp = x / (x + (y * exp((2.0d0 * ((c / t) * (-0.6666666666666666d0))))))
else if (t <= 2.7d+185) then
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
double tmp;
if (t <= -7.6e-239) {
tmp = t_1;
} else if (t <= 6e-51) {
tmp = x / (x + (y * Math.exp((2.0 * ((c / t) * -0.6666666666666666)))));
} else if (t <= 2.7e+185) {
tmp = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) tmp = 0 if t <= -7.6e-239: tmp = t_1 elif t <= 6e-51: tmp = x / (x + (y * math.exp((2.0 * ((c / t) * -0.6666666666666666))))) elif t <= 2.7e+185: tmp = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))) tmp = 0.0 if (t <= -7.6e-239) tmp = t_1; elseif (t <= 6e-51) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c / t) * -0.6666666666666666)))))); elseif (t <= 2.7e+185) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * (a * (c - b)))))); tmp = 0.0; if (t <= -7.6e-239) tmp = t_1; elseif (t <= 6e-51) tmp = x / (x + (y * exp((2.0 * ((c / t) * -0.6666666666666666))))); elseif (t <= 2.7e+185) tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.6e-239], t$95$1, If[LessEqual[t, 6e-51], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c / t), $MachinePrecision] * -0.6666666666666666), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+185], N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{if}\;t \leq -7.6 \cdot 10^{-239}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-51}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{c}{t} \cdot -0.6666666666666666\right)}}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+185}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -7.6000000000000004e-239 or 2.70000000000000007e185 < t Initial program 99.0%
Taylor expanded in a around inf 80.8%
if -7.6000000000000004e-239 < t < 6.00000000000000005e-51Initial program 93.7%
Taylor expanded in t around 0 80.1%
Taylor expanded in c around inf 70.0%
*-commutative70.0%
Simplified70.0%
if 6.00000000000000005e-51 < t < 2.70000000000000007e185Initial program 97.0%
Taylor expanded in t around inf 83.6%
associate-*r*83.6%
neg-mul-183.6%
neg-sub083.6%
associate--r-83.6%
neg-sub083.6%
+-commutative83.6%
sub-neg83.6%
*-commutative83.6%
+-commutative83.6%
Simplified83.6%
Taylor expanded in a around 0 85.1%
Final simplification78.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* (- c b) 1.6666666666666667)))))))
(if (<= t -5.5e-299)
t_1
(if (<= t 2.8e-198)
(/ x (- x (* y (- -1.0 (/ (* c -1.3333333333333333) t)))))
(if (<= t 3.9e-96) 1.0 t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
double tmp;
if (t <= -5.5e-299) {
tmp = t_1;
} else if (t <= 2.8e-198) {
tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t))));
} else if (t <= 3.9e-96) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
if (t <= (-5.5d-299)) then
tmp = t_1
else if (t <= 2.8d-198) then
tmp = x / (x - (y * ((-1.0d0) - ((c * (-1.3333333333333333d0)) / t))))
else if (t <= 3.9d-96) then
tmp = 1.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
double tmp;
if (t <= -5.5e-299) {
tmp = t_1;
} else if (t <= 2.8e-198) {
tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t))));
} else if (t <= 3.9e-96) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) tmp = 0 if t <= -5.5e-299: tmp = t_1 elif t <= 2.8e-198: tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t)))) elif t <= 3.9e-96: tmp = 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))) tmp = 0.0 if (t <= -5.5e-299) tmp = t_1; elseif (t <= 2.8e-198) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(Float64(c * -1.3333333333333333) / t))))); elseif (t <= 3.9e-96) tmp = 1.0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); tmp = 0.0; if (t <= -5.5e-299) tmp = t_1; elseif (t <= 2.8e-198) tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t)))); elseif (t <= 3.9e-96) tmp = 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e-299], t$95$1, If[LessEqual[t, 2.8e-198], N[(x / N[(x - N[(y * N[(-1.0 - N[(N[(c * -1.3333333333333333), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e-96], 1.0, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{-299}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-198}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - \frac{c \cdot -1.3333333333333333}{t}\right)}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-96}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -5.5e-299 or 3.8999999999999998e-96 < t Initial program 98.4%
Taylor expanded in t around inf 85.3%
associate-*r*85.3%
neg-mul-185.3%
neg-sub085.3%
associate--r-85.3%
neg-sub085.3%
+-commutative85.3%
sub-neg85.3%
*-commutative85.3%
+-commutative85.3%
Simplified85.3%
Taylor expanded in a around 0 73.8%
if -5.5e-299 < t < 2.7999999999999999e-198Initial program 90.3%
Taylor expanded in t around 0 87.1%
Taylor expanded in c around inf 71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in c around 0 75.0%
associate-*r/75.0%
Simplified75.0%
if 2.7999999999999999e-198 < t < 3.8999999999999998e-96Initial program 94.1%
Taylor expanded in a around inf 34.7%
Taylor expanded in a around 0 37.5%
Taylor expanded in x around inf 57.3%
Final simplification71.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 1.3e-305)
1.0
(if (<= t 1.65e-198)
(/ x (- x (* y (- -1.0 (/ (* c -1.3333333333333333) t)))))
(if (<= t 1.8e-34)
1.0
(if (<= t 8500000000.0)
(/ x (+ x (* y (- 1.0 (* (- b c) (* 2.0 a))))))
1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.3e-305) {
tmp = 1.0;
} else if (t <= 1.65e-198) {
tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t))));
} else if (t <= 1.8e-34) {
tmp = 1.0;
} else if (t <= 8500000000.0) {
tmp = x / (x + (y * (1.0 - ((b - c) * (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 (t <= 1.3d-305) then
tmp = 1.0d0
else if (t <= 1.65d-198) then
tmp = x / (x - (y * ((-1.0d0) - ((c * (-1.3333333333333333d0)) / t))))
else if (t <= 1.8d-34) then
tmp = 1.0d0
else if (t <= 8500000000.0d0) then
tmp = x / (x + (y * (1.0d0 - ((b - c) * (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 (t <= 1.3e-305) {
tmp = 1.0;
} else if (t <= 1.65e-198) {
tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t))));
} else if (t <= 1.8e-34) {
tmp = 1.0;
} else if (t <= 8500000000.0) {
tmp = x / (x + (y * (1.0 - ((b - c) * (2.0 * a)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 1.3e-305: tmp = 1.0 elif t <= 1.65e-198: tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t)))) elif t <= 1.8e-34: tmp = 1.0 elif t <= 8500000000.0: tmp = x / (x + (y * (1.0 - ((b - c) * (2.0 * a))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 1.3e-305) tmp = 1.0; elseif (t <= 1.65e-198) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(Float64(c * -1.3333333333333333) / t))))); elseif (t <= 1.8e-34) tmp = 1.0; elseif (t <= 8500000000.0) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 - Float64(Float64(b - c) * 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 (t <= 1.3e-305) tmp = 1.0; elseif (t <= 1.65e-198) tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t)))); elseif (t <= 1.8e-34) tmp = 1.0; elseif (t <= 8500000000.0) tmp = x / (x + (y * (1.0 - ((b - c) * (2.0 * a))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 1.3e-305], 1.0, If[LessEqual[t, 1.65e-198], N[(x / N[(x - N[(y * N[(-1.0 - N[(N[(c * -1.3333333333333333), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e-34], 1.0, If[LessEqual[t, 8500000000.0], N[(x / N[(x + N[(y * N[(1.0 - N[(N[(b - c), $MachinePrecision] * N[(2.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.3 \cdot 10^{-305}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-198}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - \frac{c \cdot -1.3333333333333333}{t}\right)}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-34}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 8500000000:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 - \left(b - c\right) \cdot \left(2 \cdot a\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < 1.3000000000000001e-305 or 1.65e-198 < t < 1.80000000000000004e-34 or 8.5e9 < t Initial program 97.6%
Taylor expanded in a around inf 66.5%
Taylor expanded in a around 0 39.4%
Taylor expanded in x around inf 60.4%
if 1.3000000000000001e-305 < t < 1.65e-198Initial program 89.3%
Taylor expanded in t around 0 85.7%
Taylor expanded in c around inf 68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in c around 0 79.3%
associate-*r/79.3%
Simplified79.3%
if 1.80000000000000004e-34 < t < 8.5e9Initial program 100.0%
Taylor expanded in a around inf 74.2%
Taylor expanded in a around 0 63.1%
associate-*r*63.1%
Simplified63.1%
Final simplification62.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 1.35e-305)
1.0
(if (or (<= t 2.7e-198) (and (not (<= t 4.4e-96)) (<= t 1200000000.0)))
(/ x (- x (* y (- -1.0 (/ (* c -1.3333333333333333) t)))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.35e-305) {
tmp = 1.0;
} else if ((t <= 2.7e-198) || (!(t <= 4.4e-96) && (t <= 1200000000.0))) {
tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 1.35d-305) then
tmp = 1.0d0
else if ((t <= 2.7d-198) .or. (.not. (t <= 4.4d-96)) .and. (t <= 1200000000.0d0)) then
tmp = x / (x - (y * ((-1.0d0) - ((c * (-1.3333333333333333d0)) / t))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.35e-305) {
tmp = 1.0;
} else if ((t <= 2.7e-198) || (!(t <= 4.4e-96) && (t <= 1200000000.0))) {
tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 1.35e-305: tmp = 1.0 elif (t <= 2.7e-198) or (not (t <= 4.4e-96) and (t <= 1200000000.0)): tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 1.35e-305) tmp = 1.0; elseif ((t <= 2.7e-198) || (!(t <= 4.4e-96) && (t <= 1200000000.0))) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(Float64(c * -1.3333333333333333) / t))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 1.35e-305) tmp = 1.0; elseif ((t <= 2.7e-198) || (~((t <= 4.4e-96)) && (t <= 1200000000.0))) tmp = x / (x - (y * (-1.0 - ((c * -1.3333333333333333) / t)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 1.35e-305], 1.0, If[Or[LessEqual[t, 2.7e-198], And[N[Not[LessEqual[t, 4.4e-96]], $MachinePrecision], LessEqual[t, 1200000000.0]]], N[(x / N[(x - N[(y * N[(-1.0 - N[(N[(c * -1.3333333333333333), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.35 \cdot 10^{-305}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-198} \lor \neg \left(t \leq 4.4 \cdot 10^{-96}\right) \land t \leq 1200000000:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - \frac{c \cdot -1.3333333333333333}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < 1.35e-305 or 2.7000000000000002e-198 < t < 4.39999999999999959e-96 or 1.2e9 < t Initial program 97.5%
Taylor expanded in a around inf 67.1%
Taylor expanded in a around 0 38.2%
Taylor expanded in x around inf 60.3%
if 1.35e-305 < t < 2.7000000000000002e-198 or 4.39999999999999959e-96 < t < 1.2e9Initial program 94.6%
Taylor expanded in t around 0 66.3%
Taylor expanded in c around inf 64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in c around 0 69.3%
associate-*r/69.3%
Simplified69.3%
Final simplification62.2%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= y -1.6e+199) (and (not (<= y 1.26e+141)) (<= y 2.05e+173))) (* 0.5 (/ x (* a (* y (- c b))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -1.6e+199) || (!(y <= 1.26e+141) && (y <= 2.05e+173))) {
tmp = 0.5 * (x / (a * (y * (c - b))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((y <= (-1.6d+199)) .or. (.not. (y <= 1.26d+141)) .and. (y <= 2.05d+173)) then
tmp = 0.5d0 * (x / (a * (y * (c - b))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -1.6e+199) || (!(y <= 1.26e+141) && (y <= 2.05e+173))) {
tmp = 0.5 * (x / (a * (y * (c - b))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (y <= -1.6e+199) or (not (y <= 1.26e+141) and (y <= 2.05e+173)): tmp = 0.5 * (x / (a * (y * (c - b)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((y <= -1.6e+199) || (!(y <= 1.26e+141) && (y <= 2.05e+173))) tmp = Float64(0.5 * Float64(x / Float64(a * Float64(y * Float64(c - b))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((y <= -1.6e+199) || (~((y <= 1.26e+141)) && (y <= 2.05e+173))) tmp = 0.5 * (x / (a * (y * (c - b)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[y, -1.6e+199], And[N[Not[LessEqual[y, 1.26e+141]], $MachinePrecision], LessEqual[y, 2.05e+173]]], N[(0.5 * N[(x / N[(a * N[(y * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+199} \lor \neg \left(y \leq 1.26 \cdot 10^{+141}\right) \land y \leq 2.05 \cdot 10^{+173}:\\
\;\;\;\;0.5 \cdot \frac{x}{a \cdot \left(y \cdot \left(c - b\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.60000000000000003e199 or 1.25999999999999994e141 < y < 2.04999999999999988e173Initial program 100.0%
Taylor expanded in a around inf 51.6%
Taylor expanded in a around 0 60.8%
associate-*r*60.8%
Simplified60.8%
Taylor expanded in a around inf 46.2%
associate-*r*49.0%
*-commutative49.0%
associate-*r*58.2%
*-commutative58.2%
Simplified58.2%
if -1.60000000000000003e199 < y < 1.25999999999999994e141 or 2.04999999999999988e173 < y Initial program 96.4%
Taylor expanded in a around inf 63.4%
Taylor expanded in a around 0 40.1%
Taylor expanded in x around inf 58.9%
Final simplification58.8%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= y -1.6e+199) (and (not (<= y 1.36e+141)) (<= y 2.9e+173))) (* (/ 0.5 a) (/ x (* y (- c b)))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -1.6e+199) || (!(y <= 1.36e+141) && (y <= 2.9e+173))) {
tmp = (0.5 / a) * (x / (y * (c - b)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((y <= (-1.6d+199)) .or. (.not. (y <= 1.36d+141)) .and. (y <= 2.9d+173)) then
tmp = (0.5d0 / a) * (x / (y * (c - b)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -1.6e+199) || (!(y <= 1.36e+141) && (y <= 2.9e+173))) {
tmp = (0.5 / a) * (x / (y * (c - b)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (y <= -1.6e+199) or (not (y <= 1.36e+141) and (y <= 2.9e+173)): tmp = (0.5 / a) * (x / (y * (c - b))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((y <= -1.6e+199) || (!(y <= 1.36e+141) && (y <= 2.9e+173))) tmp = Float64(Float64(0.5 / a) * Float64(x / Float64(y * Float64(c - b)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((y <= -1.6e+199) || (~((y <= 1.36e+141)) && (y <= 2.9e+173))) tmp = (0.5 / a) * (x / (y * (c - b))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[y, -1.6e+199], And[N[Not[LessEqual[y, 1.36e+141]], $MachinePrecision], LessEqual[y, 2.9e+173]]], N[(N[(0.5 / a), $MachinePrecision] * N[(x / N[(y * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+199} \lor \neg \left(y \leq 1.36 \cdot 10^{+141}\right) \land y \leq 2.9 \cdot 10^{+173}:\\
\;\;\;\;\frac{0.5}{a} \cdot \frac{x}{y \cdot \left(c - b\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.60000000000000003e199 or 1.36e141 < y < 2.90000000000000007e173Initial program 100.0%
Taylor expanded in a around inf 51.6%
Taylor expanded in a around 0 60.8%
associate-*r*60.8%
Simplified60.8%
Taylor expanded in a around inf 46.2%
associate-*r/46.2%
associate-*r*49.0%
*-commutative49.0%
associate-*r*58.2%
times-frac65.1%
*-commutative65.1%
Simplified65.1%
if -1.60000000000000003e199 < y < 1.36e141 or 2.90000000000000007e173 < y Initial program 96.4%
Taylor expanded in a around inf 63.4%
Taylor expanded in a around 0 40.1%
Taylor expanded in x around inf 58.9%
Final simplification59.7%
(FPCore (x y z t a b c) :precision binary64 1.0)
double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = 1.0d0
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
def code(x, y, z, t, a, b, c): return 1.0
function code(x, y, z, t, a, b, c) return 1.0 end
function tmp = code(x, y, z, t, a, b, c) tmp = 1.0; end
code[x_, y_, z_, t_, a_, b_, c_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 96.8%
Taylor expanded in a around inf 61.9%
Taylor expanded in a around 0 40.2%
Taylor expanded in x around inf 54.9%
Final simplification54.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 2023274
(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)))))))))))