
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* z (sqrt (+ a t))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a 0.8333333333333334))))))
(if (<= t_1 INFINITY)
(/ x (+ x (* y (exp (* 2.0 t_1)))))
(/
x
(-
x
(*
y
(+
-1.0
(*
2.0
(/ (- (* -0.6666666666666666 (- b c)) (* z (sqrt a))) t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * sqrt((a + t))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * t_1))));
} else {
tmp = x / (x - (y * (-1.0 + (2.0 * (((-0.6666666666666666 * (b - c)) - (z * sqrt(a))) / t)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * Math.sqrt((a + t))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.exp((2.0 * t_1))));
} else {
tmp = x / (x - (y * (-1.0 + (2.0 * (((-0.6666666666666666 * (b - c)) - (z * Math.sqrt(a))) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((z * math.sqrt((a + t))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))) tmp = 0 if t_1 <= math.inf: tmp = x / (x + (y * math.exp((2.0 * t_1)))) else: tmp = x / (x - (y * (-1.0 + (2.0 * (((-0.6666666666666666 * (b - c)) - (z * math.sqrt(a))) / t))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(z * sqrt(Float64(a + t))) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + 0.8333333333333334)))) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * t_1))))); else tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 + Float64(2.0 * Float64(Float64(Float64(-0.6666666666666666 * Float64(b - c)) - Float64(z * sqrt(a))) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((z * sqrt((a + t))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))); tmp = 0.0; if (t_1 <= Inf) tmp = x / (x + (y * exp((2.0 * t_1)))); else tmp = x / (x - (y * (-1.0 + (2.0 * (((-0.6666666666666666 * (b - c)) - (z * sqrt(a))) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(z * N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x - N[(y * N[(-1.0 + N[(2.0 * N[(N[(N[(-0.6666666666666666 * N[(b - c), $MachinePrecision]), $MachinePrecision] - N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \sqrt{a + t}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + 0.8333333333333334\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot t\_1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 + 2 \cdot \frac{-0.6666666666666666 \cdot \left(b - c\right) - z \cdot \sqrt{a}}{t}\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.2%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) Initial program 0.0%
Taylor expanded in t around 0 70.9%
Taylor expanded in t around inf 70.9%
Final simplification98.1%
(FPCore (x y z t a b c)
:precision binary64
(/
x
(fma
y
(pow
(exp 2.0)
(fma
(+ (+ a 0.8333333333333334) (/ -0.6666666666666666 t))
(- c b)
(* (/ z t) (sqrt (+ a t)))))
x)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / fma(y, pow(exp(2.0), fma(((a + 0.8333333333333334) + (-0.6666666666666666 / t)), (c - b), ((z / t) * sqrt((a + t))))), x);
}
function code(x, y, z, t, a, b, c) return Float64(x / fma(y, (exp(2.0) ^ fma(Float64(Float64(a + 0.8333333333333334) + Float64(-0.6666666666666666 / t)), Float64(c - b), Float64(Float64(z / t) * sqrt(Float64(a + t))))), x)) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(N[(a + 0.8333333333333334), $MachinePrecision] + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision] * N[(c - b), $MachinePrecision] + N[(N[(z / t), $MachinePrecision] * N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\mathsf{fma}\left(y, {\left(e^{2}\right)}^{\left(\mathsf{fma}\left(\left(a + 0.8333333333333334\right) + \frac{-0.6666666666666666}{t}, c - b, \frac{z}{t} \cdot \sqrt{a + t}\right)\right)}, x\right)}
\end{array}
Initial program 95.3%
Simplified96.6%
Final simplification96.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -3.3e-32)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 2e-200)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 1.35e+156)
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(* z (sqrt (/ 1.0 t)))
(* (+ (/ -0.6666666666666666 t) 0.8333333333333334) (- c b))))))))
(/ x (+ x (* y (exp (* 2.0 (* (+ a 0.8333333333333334) (- c b)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -3.3e-32) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 2e-200) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1.35e+156) {
tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) + (((-0.6666666666666666 / t) + 0.8333333333333334) * (c - b)))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-3.3d-32)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 2d-200) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 1.35d+156) then
tmp = x / (x + (y * exp((2.0d0 * ((z * sqrt((1.0d0 / t))) + ((((-0.6666666666666666d0) / t) + 0.8333333333333334d0) * (c - b)))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((a + 0.8333333333333334d0) * (c - b))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -3.3e-32) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 2e-200) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1.35e+156) {
tmp = x / (x + (y * Math.exp((2.0 * ((z * Math.sqrt((1.0 / t))) + (((-0.6666666666666666 / t) + 0.8333333333333334) * (c - b)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -3.3e-32: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 2e-200: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 1.35e+156: tmp = x / (x + (y * math.exp((2.0 * ((z * math.sqrt((1.0 / t))) + (((-0.6666666666666666 / t) + 0.8333333333333334) * (c - b))))))) else: tmp = x / (x + (y * math.exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -3.3e-32) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 2e-200) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); elseif (t <= 1.35e+156) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(z * sqrt(Float64(1.0 / t))) + Float64(Float64(Float64(-0.6666666666666666 / t) + 0.8333333333333334) * Float64(c - b)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -3.3e-32) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 2e-200) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 1.35e+156) tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) + (((-0.6666666666666666 / t) + 0.8333333333333334) * (c - b))))))); else tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -3.3e-32], 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-200], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+156], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(z * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(-0.6666666666666666 / t), $MachinePrecision] + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-200}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+156}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(z \cdot \sqrt{\frac{1}{t}} + \left(\frac{-0.6666666666666666}{t} + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < -3.30000000000000025e-32Initial program 88.9%
Taylor expanded in a around inf 96.6%
if -3.30000000000000025e-32 < t < 2e-200Initial program 90.5%
Taylor expanded in t around 0 96.1%
if 2e-200 < t < 1.35e156Initial program 100.0%
Taylor expanded in a around 0 97.9%
*-commutative97.9%
*-commutative97.9%
cancel-sign-sub-inv97.9%
metadata-eval97.9%
associate-*r/97.9%
metadata-eval97.9%
Simplified97.9%
if 1.35e156 < t Initial program 96.9%
Taylor expanded in t around inf 98.5%
mul-1-neg98.5%
distribute-rgt-neg-in98.5%
+-commutative98.5%
neg-sub098.5%
associate--r-98.5%
neg-sub098.5%
+-commutative98.5%
sub-neg98.5%
Simplified98.5%
Final simplification97.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -3.2e-32)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 8.2e-128)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 2000000000.0)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(/ x (+ x (* y (exp (* 2.0 (* (+ a 0.8333333333333334) (- c b)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -3.2e-32) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 8.2e-128) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 2000000000.0) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-3.2d-32)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 8.2d-128) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 2000000000.0d0) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * ((a + 0.8333333333333334d0) * (c - b))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -3.2e-32) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 8.2e-128) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 2000000000.0) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -3.2e-32: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 8.2e-128: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 2000000000.0: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -3.2e-32) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 8.2e-128) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); elseif (t <= 2000000000.0) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -3.2e-32) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 8.2e-128) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 2000000000.0) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -3.2e-32], 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, 8.2e-128], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2000000000.0], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-128}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\mathbf{elif}\;t \leq 2000000000:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < -3.2000000000000002e-32Initial program 88.9%
Taylor expanded in a around inf 96.6%
if -3.2000000000000002e-32 < t < 8.1999999999999999e-128Initial program 91.6%
Taylor expanded in t around 0 94.1%
if 8.1999999999999999e-128 < t < 2e9Initial program 100.0%
Taylor expanded in t around 0 38.0%
Taylor expanded in a around 0 73.9%
if 2e9 < t Initial program 98.2%
Taylor expanded in t around inf 94.7%
mul-1-neg94.7%
distribute-rgt-neg-in94.7%
+-commutative94.7%
neg-sub094.7%
associate--r-94.7%
neg-sub094.7%
+-commutative94.7%
sub-neg94.7%
Simplified94.7%
Final simplification91.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 1.6666666666666667 (- c b))))))))
(if (<= t -1.6e-99)
t_1
(if (<= t -1.25e-178)
1.0
(if (<= t -2.35e-304)
t_1
(if (<= t 0.135)
(/ x (+ x (* y (exp (* -1.3333333333333333 (/ c t))))))
(if (or (<= t 1.15e+197) (not (<= t 1.45e+228))) t_1 1.0)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((1.6666666666666667 * (c - b)))));
double tmp;
if (t <= -1.6e-99) {
tmp = t_1;
} else if (t <= -1.25e-178) {
tmp = 1.0;
} else if (t <= -2.35e-304) {
tmp = t_1;
} else if (t <= 0.135) {
tmp = x / (x + (y * exp((-1.3333333333333333 * (c / t)))));
} else if ((t <= 1.15e+197) || !(t <= 1.45e+228)) {
tmp = 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 = x / (x + (y * exp((1.6666666666666667d0 * (c - b)))))
if (t <= (-1.6d-99)) then
tmp = t_1
else if (t <= (-1.25d-178)) then
tmp = 1.0d0
else if (t <= (-2.35d-304)) then
tmp = t_1
else if (t <= 0.135d0) then
tmp = x / (x + (y * exp(((-1.3333333333333333d0) * (c / t)))))
else if ((t <= 1.15d+197) .or. (.not. (t <= 1.45d+228))) then
tmp = 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 = x / (x + (y * Math.exp((1.6666666666666667 * (c - b)))));
double tmp;
if (t <= -1.6e-99) {
tmp = t_1;
} else if (t <= -1.25e-178) {
tmp = 1.0;
} else if (t <= -2.35e-304) {
tmp = t_1;
} else if (t <= 0.135) {
tmp = x / (x + (y * Math.exp((-1.3333333333333333 * (c / t)))));
} else if ((t <= 1.15e+197) || !(t <= 1.45e+228)) {
tmp = t_1;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((1.6666666666666667 * (c - b))))) tmp = 0 if t <= -1.6e-99: tmp = t_1 elif t <= -1.25e-178: tmp = 1.0 elif t <= -2.35e-304: tmp = t_1 elif t <= 0.135: tmp = x / (x + (y * math.exp((-1.3333333333333333 * (c / t))))) elif (t <= 1.15e+197) or not (t <= 1.45e+228): tmp = t_1 else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(1.6666666666666667 * Float64(c - b)))))) tmp = 0.0 if (t <= -1.6e-99) tmp = t_1; elseif (t <= -1.25e-178) tmp = 1.0; elseif (t <= -2.35e-304) tmp = t_1; elseif (t <= 0.135) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-1.3333333333333333 * Float64(c / t)))))); elseif ((t <= 1.15e+197) || !(t <= 1.45e+228)) tmp = t_1; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((1.6666666666666667 * (c - b))))); tmp = 0.0; if (t <= -1.6e-99) tmp = t_1; elseif (t <= -1.25e-178) tmp = 1.0; elseif (t <= -2.35e-304) tmp = t_1; elseif (t <= 0.135) tmp = x / (x + (y * exp((-1.3333333333333333 * (c / t))))); elseif ((t <= 1.15e+197) || ~((t <= 1.45e+228))) tmp = t_1; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(1.6666666666666667 * N[(c - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e-99], t$95$1, If[LessEqual[t, -1.25e-178], 1.0, If[LessEqual[t, -2.35e-304], t$95$1, If[LessEqual[t, 0.135], N[(x / N[(x + N[(y * N[Exp[N[(-1.3333333333333333 * N[(c / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.15e+197], N[Not[LessEqual[t, 1.45e+228]], $MachinePrecision]], t$95$1, 1.0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{1.6666666666666667 \cdot \left(c - b\right)}}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{-99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-178}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq -2.35 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.135:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-1.3333333333333333 \cdot \frac{c}{t}}}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+197} \lor \neg \left(t \leq 1.45 \cdot 10^{+228}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.6e-99 or -1.24999999999999994e-178 < t < -2.35e-304 or 0.13500000000000001 < t < 1.15e197 or 1.45000000000000001e228 < t Initial program 95.7%
Taylor expanded in t around inf 92.8%
mul-1-neg92.8%
distribute-rgt-neg-in92.8%
+-commutative92.8%
neg-sub092.8%
associate--r-92.8%
neg-sub092.8%
+-commutative92.8%
sub-neg92.8%
Simplified92.8%
Taylor expanded in a around 0 86.2%
if -1.6e-99 < t < -1.24999999999999994e-178 or 1.15e197 < t < 1.45000000000000001e228Initial program 92.6%
Taylor expanded in b around inf 49.7%
associate-*r/49.7%
metadata-eval49.7%
+-commutative49.7%
Simplified49.7%
Taylor expanded in b around 0 32.0%
Taylor expanded in x around inf 85.6%
if -2.35e-304 < t < 0.13500000000000001Initial program 95.6%
Taylor expanded in t around 0 64.8%
Taylor expanded in a around 0 78.7%
Taylor expanded in b around 0 67.3%
Final simplification81.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* b -1.6666666666666667)))))))
(if (<= t -1.04e-226)
1.0
(if (<= t -2.35e-304)
t_1
(if (<= t 1.45e-162)
(/ x (+ x (* y (+ (* 1.3333333333333333 (/ (- b c) t)) 1.0))))
(if (<= t 2.2e+44)
1.0
(if (or (<= t 7.6e+198) (not (<= t 2.1e+228))) t_1 1.0)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((b * -1.6666666666666667))));
double tmp;
if (t <= -1.04e-226) {
tmp = 1.0;
} else if (t <= -2.35e-304) {
tmp = t_1;
} else if (t <= 1.45e-162) {
tmp = x / (x + (y * ((1.3333333333333333 * ((b - c) / t)) + 1.0)));
} else if (t <= 2.2e+44) {
tmp = 1.0;
} else if ((t <= 7.6e+198) || !(t <= 2.1e+228)) {
tmp = 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 = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
if (t <= (-1.04d-226)) then
tmp = 1.0d0
else if (t <= (-2.35d-304)) then
tmp = t_1
else if (t <= 1.45d-162) then
tmp = x / (x + (y * ((1.3333333333333333d0 * ((b - c) / t)) + 1.0d0)))
else if (t <= 2.2d+44) then
tmp = 1.0d0
else if ((t <= 7.6d+198) .or. (.not. (t <= 2.1d+228))) then
tmp = 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 = x / (x + (y * Math.exp((b * -1.6666666666666667))));
double tmp;
if (t <= -1.04e-226) {
tmp = 1.0;
} else if (t <= -2.35e-304) {
tmp = t_1;
} else if (t <= 1.45e-162) {
tmp = x / (x + (y * ((1.3333333333333333 * ((b - c) / t)) + 1.0)));
} else if (t <= 2.2e+44) {
tmp = 1.0;
} else if ((t <= 7.6e+198) || !(t <= 2.1e+228)) {
tmp = t_1;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((b * -1.6666666666666667)))) tmp = 0 if t <= -1.04e-226: tmp = 1.0 elif t <= -2.35e-304: tmp = t_1 elif t <= 1.45e-162: tmp = x / (x + (y * ((1.3333333333333333 * ((b - c) / t)) + 1.0))) elif t <= 2.2e+44: tmp = 1.0 elif (t <= 7.6e+198) or not (t <= 2.1e+228): tmp = t_1 else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))) tmp = 0.0 if (t <= -1.04e-226) tmp = 1.0; elseif (t <= -2.35e-304) tmp = t_1; elseif (t <= 1.45e-162) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)) + 1.0)))); elseif (t <= 2.2e+44) tmp = 1.0; elseif ((t <= 7.6e+198) || !(t <= 2.1e+228)) tmp = t_1; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((b * -1.6666666666666667)))); tmp = 0.0; if (t <= -1.04e-226) tmp = 1.0; elseif (t <= -2.35e-304) tmp = t_1; elseif (t <= 1.45e-162) tmp = x / (x + (y * ((1.3333333333333333 * ((b - c) / t)) + 1.0))); elseif (t <= 2.2e+44) tmp = 1.0; elseif ((t <= 7.6e+198) || ~((t <= 2.1e+228))) tmp = t_1; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.04e-226], 1.0, If[LessEqual[t, -2.35e-304], t$95$1, If[LessEqual[t, 1.45e-162], N[(x / N[(x + N[(y * N[(N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e+44], 1.0, If[Or[LessEqual[t, 7.6e+198], N[Not[LessEqual[t, 2.1e+228]], $MachinePrecision]], t$95$1, 1.0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\mathbf{if}\;t \leq -1.04 \cdot 10^{-226}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq -2.35 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-162}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1.3333333333333333 \cdot \frac{b - c}{t} + 1\right)}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+44}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+198} \lor \neg \left(t \leq 2.1 \cdot 10^{+228}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.04000000000000005e-226 or 1.4500000000000001e-162 < t < 2.19999999999999996e44 or 7.59999999999999976e198 < t < 2.09999999999999994e228Initial program 95.1%
Taylor expanded in b around inf 56.5%
associate-*r/56.5%
metadata-eval56.5%
+-commutative56.5%
Simplified56.5%
Taylor expanded in b around 0 35.7%
Taylor expanded in x around inf 68.2%
if -1.04000000000000005e-226 < t < -2.35e-304 or 2.19999999999999996e44 < t < 7.59999999999999976e198 or 2.09999999999999994e228 < t Initial program 97.1%
Taylor expanded in t around inf 94.3%
mul-1-neg94.3%
distribute-rgt-neg-in94.3%
+-commutative94.3%
neg-sub094.3%
associate--r-94.3%
neg-sub094.3%
+-commutative94.3%
sub-neg94.3%
Simplified94.3%
Taylor expanded in a around 0 88.5%
Taylor expanded in c around 0 74.7%
if -2.35e-304 < t < 1.4500000000000001e-162Initial program 90.9%
Taylor expanded in t around 0 91.1%
Taylor expanded in a around 0 82.4%
Taylor expanded in t around inf 67.8%
Final simplification70.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* c 1.6666666666666667)))))))
(if (<= t -1.15e-299)
t_1
(if (<= t 5.3e-166)
(/ x (+ x (* y (+ (* 1.3333333333333333 (/ (- b c) t)) 1.0))))
(if (<= t 2.4e+44)
1.0
(if (<= t 1.15e+197)
t_1
(if (<= t 1.45e+228)
1.0
(/ x (+ x (* y (exp (* b -1.6666666666666667))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((c * 1.6666666666666667))));
double tmp;
if (t <= -1.15e-299) {
tmp = t_1;
} else if (t <= 5.3e-166) {
tmp = x / (x + (y * ((1.3333333333333333 * ((b - c) / t)) + 1.0)));
} else if (t <= 2.4e+44) {
tmp = 1.0;
} else if (t <= 1.15e+197) {
tmp = t_1;
} else if (t <= 1.45e+228) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp((b * -1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((c * 1.6666666666666667d0))))
if (t <= (-1.15d-299)) then
tmp = t_1
else if (t <= 5.3d-166) then
tmp = x / (x + (y * ((1.3333333333333333d0 * ((b - c) / t)) + 1.0d0)))
else if (t <= 2.4d+44) then
tmp = 1.0d0
else if (t <= 1.15d+197) then
tmp = t_1
else if (t <= 1.45d+228) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((c * 1.6666666666666667))));
double tmp;
if (t <= -1.15e-299) {
tmp = t_1;
} else if (t <= 5.3e-166) {
tmp = x / (x + (y * ((1.3333333333333333 * ((b - c) / t)) + 1.0)));
} else if (t <= 2.4e+44) {
tmp = 1.0;
} else if (t <= 1.15e+197) {
tmp = t_1;
} else if (t <= 1.45e+228) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((c * 1.6666666666666667)))) tmp = 0 if t <= -1.15e-299: tmp = t_1 elif t <= 5.3e-166: tmp = x / (x + (y * ((1.3333333333333333 * ((b - c) / t)) + 1.0))) elif t <= 2.4e+44: tmp = 1.0 elif t <= 1.15e+197: tmp = t_1 elif t <= 1.45e+228: tmp = 1.0 else: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))) tmp = 0.0 if (t <= -1.15e-299) tmp = t_1; elseif (t <= 5.3e-166) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)) + 1.0)))); elseif (t <= 2.4e+44) tmp = 1.0; elseif (t <= 1.15e+197) tmp = t_1; elseif (t <= 1.45e+228) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((c * 1.6666666666666667)))); tmp = 0.0; if (t <= -1.15e-299) tmp = t_1; elseif (t <= 5.3e-166) tmp = x / (x + (y * ((1.3333333333333333 * ((b - c) / t)) + 1.0))); elseif (t <= 2.4e+44) tmp = 1.0; elseif (t <= 1.15e+197) tmp = t_1; elseif (t <= 1.45e+228) tmp = 1.0; else tmp = x / (x + (y * exp((b * -1.6666666666666667)))); 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[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e-299], t$95$1, If[LessEqual[t, 5.3e-166], N[(x / N[(x + N[(y * N[(N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e+44], 1.0, If[LessEqual[t, 1.15e+197], t$95$1, If[LessEqual[t, 1.45e+228], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{-299}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.3 \cdot 10^{-166}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1.3333333333333333 \cdot \frac{b - c}{t} + 1\right)}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+44}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+197}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+228}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\end{array}
\end{array}
if t < -1.15e-299 or 2.40000000000000013e44 < t < 1.15e197Initial program 93.5%
Taylor expanded in t around inf 92.2%
mul-1-neg92.2%
distribute-rgt-neg-in92.2%
+-commutative92.2%
neg-sub092.2%
associate--r-92.2%
neg-sub092.2%
+-commutative92.2%
sub-neg92.2%
Simplified92.2%
Taylor expanded in a around 0 82.7%
Taylor expanded in c around inf 71.8%
if -1.15e-299 < t < 5.29999999999999996e-166Initial program 91.7%
Taylor expanded in t around 0 91.8%
Taylor expanded in a around 0 78.5%
Taylor expanded in t around inf 62.6%
if 5.29999999999999996e-166 < t < 2.40000000000000013e44 or 1.15e197 < t < 1.45000000000000001e228Initial program 100.0%
Taylor expanded in b around inf 52.4%
associate-*r/52.4%
metadata-eval52.4%
+-commutative52.4%
Simplified52.4%
Taylor expanded in b around 0 37.5%
Taylor expanded in x around inf 69.6%
if 1.45000000000000001e228 < t Initial program 96.8%
Taylor expanded in t around inf 100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
+-commutative100.0%
neg-sub0100.0%
associate--r-100.0%
neg-sub0100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in a around 0 93.5%
Taylor expanded in c around 0 87.1%
Final simplification71.7%
(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-37)
t_1
(if (<= t 0.2)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (or (<= t 5.8e+209) (not (<= t 1.85e+230)))
(/ x (+ x (* y (exp (* 1.6666666666666667 (- c 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 * (a * (c - b))))));
double tmp;
if (t <= -2e-37) {
tmp = t_1;
} else if (t <= 0.2) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 5.8e+209) || !(t <= 1.85e+230)) {
tmp = x / (x + (y * exp((1.6666666666666667 * (c - 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 * (a * (c - b))))))
if (t <= (-2d-37)) then
tmp = t_1
else if (t <= 0.2d0) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if ((t <= 5.8d+209) .or. (.not. (t <= 1.85d+230))) then
tmp = x / (x + (y * exp((1.6666666666666667d0 * (c - 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 * (a * (c - b))))));
double tmp;
if (t <= -2e-37) {
tmp = t_1;
} else if (t <= 0.2) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 5.8e+209) || !(t <= 1.85e+230)) {
tmp = x / (x + (y * Math.exp((1.6666666666666667 * (c - 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 * (a * (c - b)))))) tmp = 0 if t <= -2e-37: tmp = t_1 elif t <= 0.2: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif (t <= 5.8e+209) or not (t <= 1.85e+230): tmp = x / (x + (y * math.exp((1.6666666666666667 * (c - 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(a * Float64(c - b))))))) tmp = 0.0 if (t <= -2e-37) tmp = t_1; elseif (t <= 0.2) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif ((t <= 5.8e+209) || !(t <= 1.85e+230)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.6666666666666667 * Float64(c - 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 * (a * (c - b)))))); tmp = 0.0; if (t <= -2e-37) tmp = t_1; elseif (t <= 0.2) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif ((t <= 5.8e+209) || ~((t <= 1.85e+230))) tmp = x / (x + (y * exp((1.6666666666666667 * (c - 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[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-37], t$95$1, If[LessEqual[t, 0.2], 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, 5.8e+209], N[Not[LessEqual[t, 1.85e+230]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(1.6666666666666667 * N[(c - 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(a \cdot \left(c - b\right)\right)}}\\
\mathbf{if}\;t \leq -2 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.2:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+209} \lor \neg \left(t \leq 1.85 \cdot 10^{+230}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.6666666666666667 \cdot \left(c - b\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.00000000000000013e-37 or 5.79999999999999999e209 < t < 1.84999999999999996e230Initial program 92.5%
Taylor expanded in a around inf 95.3%
if -2.00000000000000013e-37 < t < 0.20000000000000001Initial program 93.8%
Taylor expanded in t around 0 77.8%
Taylor expanded in a around 0 81.9%
if 0.20000000000000001 < t < 5.79999999999999999e209 or 1.84999999999999996e230 < t Initial program 98.1%
Taylor expanded in t around inf 92.6%
mul-1-neg92.6%
distribute-rgt-neg-in92.6%
+-commutative92.6%
neg-sub092.6%
associate--r-92.6%
neg-sub092.6%
+-commutative92.6%
sub-neg92.6%
Simplified92.6%
Taylor expanded in a around 0 87.9%
Final simplification86.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c 6e-234)
1.0
(if (<= c 7e-70)
(/
x
(+
x
(+
y
(*
2.0
(* b (* y (- (+ (/ 0.6666666666666666 t) -0.8333333333333334) a)))))))
(if (<= c 10000.0)
1.0
(if (or (<= c 2e+109) (not (<= c 5e+190)))
(/ 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 (c <= 6e-234) {
tmp = 1.0;
} else if (c <= 7e-70) {
tmp = x / (x + (y + (2.0 * (b * (y * (((0.6666666666666666 / t) + -0.8333333333333334) - a))))));
} else if (c <= 10000.0) {
tmp = 1.0;
} else if ((c <= 2e+109) || !(c <= 5e+190)) {
tmp = 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 (c <= 6d-234) then
tmp = 1.0d0
else if (c <= 7d-70) then
tmp = x / (x + (y + (2.0d0 * (b * (y * (((0.6666666666666666d0 / t) + (-0.8333333333333334d0)) - a))))))
else if (c <= 10000.0d0) then
tmp = 1.0d0
else if ((c <= 2d+109) .or. (.not. (c <= 5d+190))) then
tmp = 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 (c <= 6e-234) {
tmp = 1.0;
} else if (c <= 7e-70) {
tmp = x / (x + (y + (2.0 * (b * (y * (((0.6666666666666666 / t) + -0.8333333333333334) - a))))));
} else if (c <= 10000.0) {
tmp = 1.0;
} else if ((c <= 2e+109) || !(c <= 5e+190)) {
tmp = 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 c <= 6e-234: tmp = 1.0 elif c <= 7e-70: tmp = x / (x + (y + (2.0 * (b * (y * (((0.6666666666666666 / t) + -0.8333333333333334) - a)))))) elif c <= 10000.0: tmp = 1.0 elif (c <= 2e+109) or not (c <= 5e+190): tmp = 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 (c <= 6e-234) tmp = 1.0; elseif (c <= 7e-70) tmp = Float64(x / Float64(x + Float64(y + Float64(2.0 * Float64(b * Float64(y * Float64(Float64(Float64(0.6666666666666666 / t) + -0.8333333333333334) - a))))))); elseif (c <= 10000.0) tmp = 1.0; elseif ((c <= 2e+109) || !(c <= 5e+190)) tmp = 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 (c <= 6e-234) tmp = 1.0; elseif (c <= 7e-70) tmp = x / (x + (y + (2.0 * (b * (y * (((0.6666666666666666 / t) + -0.8333333333333334) - a)))))); elseif (c <= 10000.0) tmp = 1.0; elseif ((c <= 2e+109) || ~((c <= 5e+190))) tmp = 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[c, 6e-234], 1.0, If[LessEqual[c, 7e-70], N[(x / N[(x + N[(y + N[(2.0 * N[(b * N[(y * N[(N[(N[(0.6666666666666666 / t), $MachinePrecision] + -0.8333333333333334), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 10000.0], 1.0, If[Or[LessEqual[c, 2e+109], N[Not[LessEqual[c, 5e+190]], $MachinePrecision]], N[(x / N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 6 \cdot 10^{-234}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 7 \cdot 10^{-70}:\\
\;\;\;\;\frac{x}{x + \left(y + 2 \cdot \left(b \cdot \left(y \cdot \left(\left(\frac{0.6666666666666666}{t} + -0.8333333333333334\right) - a\right)\right)\right)\right)}\\
\mathbf{elif}\;c \leq 10000:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 2 \cdot 10^{+109} \lor \neg \left(c \leq 5 \cdot 10^{+190}\right):\\
\;\;\;\;\frac{x}{y \cdot e^{c \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if c < 5.99999999999999975e-234 or 6.99999999999999949e-70 < c < 1e4 or 1.99999999999999996e109 < c < 5.00000000000000036e190Initial program 95.6%
Taylor expanded in b around inf 69.4%
associate-*r/69.4%
metadata-eval69.4%
+-commutative69.4%
Simplified69.4%
Taylor expanded in b around 0 41.6%
Taylor expanded in x around inf 64.3%
if 5.99999999999999975e-234 < c < 6.99999999999999949e-70Initial program 95.2%
Taylor expanded in b around inf 79.4%
associate-*r/79.4%
metadata-eval79.4%
+-commutative79.4%
Simplified79.4%
Taylor expanded in b around 0 56.7%
associate--r+56.7%
sub-neg56.7%
associate-*r/56.7%
metadata-eval56.7%
metadata-eval56.7%
Simplified56.7%
if 1e4 < c < 1.99999999999999996e109 or 5.00000000000000036e190 < c Initial program 94.1%
Taylor expanded in t around inf 82.9%
mul-1-neg82.9%
distribute-rgt-neg-in82.9%
+-commutative82.9%
neg-sub082.9%
associate--r-82.9%
neg-sub082.9%
+-commutative82.9%
sub-neg82.9%
Simplified82.9%
Taylor expanded in a around 0 77.2%
Taylor expanded in c around inf 80.1%
Taylor expanded in x around 0 80.1%
Final simplification65.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 1.6666666666666667 (- c b))))))))
(if (<= t -4.2e-304)
t_1
(if (<= t 0.52)
(/ x (+ x (* y (exp (* -1.3333333333333333 (/ c t))))))
(if (or (<= t 7.2e+209) (not (<= t 5.5e+229)))
t_1
(/ x (+ x (* y (exp (* 2.0 (* a c)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((1.6666666666666667 * (c - b)))));
double tmp;
if (t <= -4.2e-304) {
tmp = t_1;
} else if (t <= 0.52) {
tmp = x / (x + (y * exp((-1.3333333333333333 * (c / t)))));
} else if ((t <= 7.2e+209) || !(t <= 5.5e+229)) {
tmp = t_1;
} else {
tmp = x / (x + (y * exp((2.0 * (a * 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) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((1.6666666666666667d0 * (c - b)))))
if (t <= (-4.2d-304)) then
tmp = t_1
else if (t <= 0.52d0) then
tmp = x / (x + (y * exp(((-1.3333333333333333d0) * (c / t)))))
else if ((t <= 7.2d+209) .or. (.not. (t <= 5.5d+229))) then
tmp = t_1
else
tmp = x / (x + (y * exp((2.0d0 * (a * 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 t_1 = x / (x + (y * Math.exp((1.6666666666666667 * (c - b)))));
double tmp;
if (t <= -4.2e-304) {
tmp = t_1;
} else if (t <= 0.52) {
tmp = x / (x + (y * Math.exp((-1.3333333333333333 * (c / t)))));
} else if ((t <= 7.2e+209) || !(t <= 5.5e+229)) {
tmp = t_1;
} else {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((1.6666666666666667 * (c - b))))) tmp = 0 if t <= -4.2e-304: tmp = t_1 elif t <= 0.52: tmp = x / (x + (y * math.exp((-1.3333333333333333 * (c / t))))) elif (t <= 7.2e+209) or not (t <= 5.5e+229): tmp = t_1 else: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(1.6666666666666667 * Float64(c - b)))))) tmp = 0.0 if (t <= -4.2e-304) tmp = t_1; elseif (t <= 0.52) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-1.3333333333333333 * Float64(c / t)))))); elseif ((t <= 7.2e+209) || !(t <= 5.5e+229)) tmp = t_1; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((1.6666666666666667 * (c - b))))); tmp = 0.0; if (t <= -4.2e-304) tmp = t_1; elseif (t <= 0.52) tmp = x / (x + (y * exp((-1.3333333333333333 * (c / t))))); elseif ((t <= 7.2e+209) || ~((t <= 5.5e+229))) tmp = t_1; else tmp = x / (x + (y * exp((2.0 * (a * c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(1.6666666666666667 * N[(c - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e-304], t$95$1, If[LessEqual[t, 0.52], N[(x / N[(x + N[(y * N[Exp[N[(-1.3333333333333333 * N[(c / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 7.2e+209], N[Not[LessEqual[t, 5.5e+229]], $MachinePrecision]], t$95$1, N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{1.6666666666666667 \cdot \left(c - b\right)}}\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.52:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-1.3333333333333333 \cdot \frac{c}{t}}}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+209} \lor \neg \left(t \leq 5.5 \cdot 10^{+229}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\end{array}
\end{array}
if t < -4.20000000000000016e-304 or 0.52000000000000002 < t < 7.20000000000000023e209 or 5.5000000000000002e229 < t Initial program 95.0%
Taylor expanded in t around inf 91.3%
mul-1-neg91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
neg-sub091.3%
associate--r-91.3%
neg-sub091.3%
+-commutative91.3%
sub-neg91.3%
Simplified91.3%
Taylor expanded in a around 0 84.2%
if -4.20000000000000016e-304 < t < 0.52000000000000002Initial program 95.6%
Taylor expanded in t around 0 64.8%
Taylor expanded in a around 0 78.7%
Taylor expanded in b around 0 67.3%
if 7.20000000000000023e209 < t < 5.5000000000000002e229Initial program 100.0%
Taylor expanded in a around inf 91.2%
Taylor expanded in c around inf 82.4%
*-commutative82.4%
Simplified82.4%
Final simplification79.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 0.053)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (or (<= t 7e+209) (not (<= t 3.6e+229)))
(/ x (+ x (* y (exp (* 1.6666666666666667 (- c b))))))
(/ x (+ x (* y (exp (* 2.0 (* a c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 0.053) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 7e+209) || !(t <= 3.6e+229)) {
tmp = x / (x + (y * exp((1.6666666666666667 * (c - b)))));
} else {
tmp = x / (x + (y * exp((2.0 * (a * 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 <= 0.053d0) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if ((t <= 7d+209) .or. (.not. (t <= 3.6d+229))) then
tmp = x / (x + (y * exp((1.6666666666666667d0 * (c - b)))))
else
tmp = x / (x + (y * exp((2.0d0 * (a * 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 <= 0.053) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 7e+209) || !(t <= 3.6e+229)) {
tmp = x / (x + (y * Math.exp((1.6666666666666667 * (c - b)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 0.053: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif (t <= 7e+209) or not (t <= 3.6e+229): tmp = x / (x + (y * math.exp((1.6666666666666667 * (c - b))))) else: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 0.053) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif ((t <= 7e+209) || !(t <= 3.6e+229)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.6666666666666667 * Float64(c - b)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 0.053) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif ((t <= 7e+209) || ~((t <= 3.6e+229))) tmp = x / (x + (y * exp((1.6666666666666667 * (c - b))))); else tmp = x / (x + (y * exp((2.0 * (a * c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 0.053], 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, 7e+209], N[Not[LessEqual[t, 3.6e+229]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(1.6666666666666667 * N[(c - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.053:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+209} \lor \neg \left(t \leq 3.6 \cdot 10^{+229}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.6666666666666667 \cdot \left(c - b\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\end{array}
\end{array}
if t < 0.0529999999999999985Initial program 92.9%
Taylor expanded in t around 0 77.8%
Taylor expanded in a around 0 80.8%
if 0.0529999999999999985 < t < 7.0000000000000005e209 or 3.59999999999999986e229 < t Initial program 98.1%
Taylor expanded in t around inf 92.6%
mul-1-neg92.6%
distribute-rgt-neg-in92.6%
+-commutative92.6%
neg-sub092.6%
associate--r-92.6%
neg-sub092.6%
+-commutative92.6%
sub-neg92.6%
Simplified92.6%
Taylor expanded in a around 0 87.9%
if 7.0000000000000005e209 < t < 3.59999999999999986e229Initial program 100.0%
Taylor expanded in a around inf 91.2%
Taylor expanded in c around inf 82.4%
*-commutative82.4%
Simplified82.4%
Final simplification83.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -5.8e-40)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 2000000000.0)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(/ x (+ x (* y (exp (* 2.0 (* (+ a 0.8333333333333334) (- c b))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -5.8e-40) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 2000000000.0) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-5.8d-40)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 2000000000.0d0) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * ((a + 0.8333333333333334d0) * (c - b))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -5.8e-40) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 2000000000.0) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -5.8e-40: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 2000000000.0: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -5.8e-40) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 2000000000.0) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -5.8e-40) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 2000000000.0) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -5.8e-40], 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, 2000000000.0], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 2000000000:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < -5.7999999999999998e-40Initial program 89.7%
Taylor expanded in a around inf 96.9%
if -5.7999999999999998e-40 < t < 2e9Initial program 94.1%
Taylor expanded in t around 0 76.4%
Taylor expanded in a around 0 80.3%
if 2e9 < t Initial program 98.2%
Taylor expanded in t around inf 94.7%
mul-1-neg94.7%
distribute-rgt-neg-in94.7%
+-commutative94.7%
neg-sub094.7%
associate--r-94.7%
neg-sub094.7%
+-commutative94.7%
sub-neg94.7%
Simplified94.7%
Final simplification88.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 0.05)
(/ x (+ x (* y (exp (* -1.3333333333333333 (/ c t))))))
(if (<= t 3.2e+197)
(/ x (+ x (* y (exp (* c 1.6666666666666667)))))
(if (<= t 1.65e+228)
1.0
(/ x (+ x (* y (exp (* b -1.6666666666666667)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 0.05) {
tmp = x / (x + (y * exp((-1.3333333333333333 * (c / t)))));
} else if (t <= 3.2e+197) {
tmp = x / (x + (y * exp((c * 1.6666666666666667))));
} else if (t <= 1.65e+228) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp((b * -1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 0.05d0) then
tmp = x / (x + (y * exp(((-1.3333333333333333d0) * (c / t)))))
else if (t <= 3.2d+197) then
tmp = x / (x + (y * exp((c * 1.6666666666666667d0))))
else if (t <= 1.65d+228) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 0.05) {
tmp = x / (x + (y * Math.exp((-1.3333333333333333 * (c / t)))));
} else if (t <= 3.2e+197) {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
} else if (t <= 1.65e+228) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 0.05: tmp = x / (x + (y * math.exp((-1.3333333333333333 * (c / t))))) elif t <= 3.2e+197: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) elif t <= 1.65e+228: tmp = 1.0 else: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 0.05) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-1.3333333333333333 * Float64(c / t)))))); elseif (t <= 3.2e+197) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); elseif (t <= 1.65e+228) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 0.05) tmp = x / (x + (y * exp((-1.3333333333333333 * (c / t))))); elseif (t <= 3.2e+197) tmp = x / (x + (y * exp((c * 1.6666666666666667)))); elseif (t <= 1.65e+228) tmp = 1.0; else tmp = x / (x + (y * exp((b * -1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 0.05], N[(x / N[(x + N[(y * N[Exp[N[(-1.3333333333333333 * N[(c / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+197], N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+228], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.05:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-1.3333333333333333 \cdot \frac{c}{t}}}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+197}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+228}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\end{array}
\end{array}
if t < 0.050000000000000003Initial program 92.9%
Taylor expanded in t around 0 77.8%
Taylor expanded in a around 0 80.8%
Taylor expanded in b around 0 67.8%
if 0.050000000000000003 < t < 3.1999999999999998e197Initial program 98.6%
Taylor expanded in t around inf 88.8%
mul-1-neg88.8%
distribute-rgt-neg-in88.8%
+-commutative88.8%
neg-sub088.8%
associate--r-88.8%
neg-sub088.8%
+-commutative88.8%
sub-neg88.8%
Simplified88.8%
Taylor expanded in a around 0 83.2%
Taylor expanded in c around inf 73.5%
if 3.1999999999999998e197 < t < 1.65000000000000003e228Initial program 100.0%
Taylor expanded in b around inf 39.5%
associate-*r/39.5%
metadata-eval39.5%
+-commutative39.5%
Simplified39.5%
Taylor expanded in b around 0 27.8%
Taylor expanded in x around inf 87.9%
if 1.65000000000000003e228 < t Initial program 96.8%
Taylor expanded in t around inf 100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
+-commutative100.0%
neg-sub0100.0%
associate--r-100.0%
neg-sub0100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in a around 0 93.5%
Taylor expanded in c around 0 87.1%
Final simplification72.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -3.8e-253)
1.0
(if (or (<= t 1.95e-167) (and (not (<= t 3.6e+103)) (<= t 1.35e+197)))
(/ x (+ x (* y (+ (* 1.3333333333333333 (/ (- b c) t)) 1.0))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -3.8e-253) {
tmp = 1.0;
} else if ((t <= 1.95e-167) || (!(t <= 3.6e+103) && (t <= 1.35e+197))) {
tmp = x / (x + (y * ((1.3333333333333333 * ((b - c) / t)) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-3.8d-253)) then
tmp = 1.0d0
else if ((t <= 1.95d-167) .or. (.not. (t <= 3.6d+103)) .and. (t <= 1.35d+197)) then
tmp = x / (x + (y * ((1.3333333333333333d0 * ((b - c) / t)) + 1.0d0)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -3.8e-253) {
tmp = 1.0;
} else if ((t <= 1.95e-167) || (!(t <= 3.6e+103) && (t <= 1.35e+197))) {
tmp = x / (x + (y * ((1.3333333333333333 * ((b - c) / t)) + 1.0)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -3.8e-253: tmp = 1.0 elif (t <= 1.95e-167) or (not (t <= 3.6e+103) and (t <= 1.35e+197)): tmp = x / (x + (y * ((1.3333333333333333 * ((b - c) / t)) + 1.0))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -3.8e-253) tmp = 1.0; elseif ((t <= 1.95e-167) || (!(t <= 3.6e+103) && (t <= 1.35e+197))) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)) + 1.0)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -3.8e-253) tmp = 1.0; elseif ((t <= 1.95e-167) || (~((t <= 3.6e+103)) && (t <= 1.35e+197))) tmp = x / (x + (y * ((1.3333333333333333 * ((b - c) / t)) + 1.0))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -3.8e-253], 1.0, If[Or[LessEqual[t, 1.95e-167], And[N[Not[LessEqual[t, 3.6e+103]], $MachinePrecision], LessEqual[t, 1.35e+197]]], N[(x / N[(x + N[(y * N[(N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{-253}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-167} \lor \neg \left(t \leq 3.6 \cdot 10^{+103}\right) \land t \leq 1.35 \cdot 10^{+197}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1.3333333333333333 \cdot \frac{b - c}{t} + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -3.80000000000000012e-253 or 1.94999999999999992e-167 < t < 3.60000000000000017e103 or 1.35e197 < t Initial program 95.4%
Taylor expanded in b around inf 63.7%
associate-*r/63.7%
metadata-eval63.7%
+-commutative63.7%
Simplified63.7%
Taylor expanded in b around 0 37.9%
Taylor expanded in x around inf 63.8%
if -3.80000000000000012e-253 < t < 1.94999999999999992e-167 or 3.60000000000000017e103 < t < 1.35e197Initial program 95.2%
Taylor expanded in t around 0 58.3%
Taylor expanded in a around 0 66.4%
Taylor expanded in t around inf 63.0%
Final simplification63.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c 4.5e-139)
1.0
(if (<= c 6.2e-105)
(/ x (+ x y))
(if (<= c 5.4e+197)
1.0
(/ x (+ x (* y (+ (* c 1.6666666666666667) 1.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 4.5e-139) {
tmp = 1.0;
} else if (c <= 6.2e-105) {
tmp = x / (x + y);
} else if (c <= 5.4e+197) {
tmp = 1.0;
} else {
tmp = x / (x + (y * ((c * 1.6666666666666667) + 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 <= 4.5d-139) then
tmp = 1.0d0
else if (c <= 6.2d-105) then
tmp = x / (x + y)
else if (c <= 5.4d+197) then
tmp = 1.0d0
else
tmp = x / (x + (y * ((c * 1.6666666666666667d0) + 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 <= 4.5e-139) {
tmp = 1.0;
} else if (c <= 6.2e-105) {
tmp = x / (x + y);
} else if (c <= 5.4e+197) {
tmp = 1.0;
} else {
tmp = x / (x + (y * ((c * 1.6666666666666667) + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 4.5e-139: tmp = 1.0 elif c <= 6.2e-105: tmp = x / (x + y) elif c <= 5.4e+197: tmp = 1.0 else: tmp = x / (x + (y * ((c * 1.6666666666666667) + 1.0))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 4.5e-139) tmp = 1.0; elseif (c <= 6.2e-105) tmp = Float64(x / Float64(x + y)); elseif (c <= 5.4e+197) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(c * 1.6666666666666667) + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 4.5e-139) tmp = 1.0; elseif (c <= 6.2e-105) tmp = x / (x + y); elseif (c <= 5.4e+197) tmp = 1.0; else tmp = x / (x + (y * ((c * 1.6666666666666667) + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 4.5e-139], 1.0, If[LessEqual[c, 6.2e-105], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.4e+197], 1.0, N[(x / N[(x + N[(y * N[(N[(c * 1.6666666666666667), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 4.5 \cdot 10^{-139}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 6.2 \cdot 10^{-105}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{elif}\;c \leq 5.4 \cdot 10^{+197}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(c \cdot 1.6666666666666667 + 1\right)}\\
\end{array}
\end{array}
if c < 4.50000000000000023e-139 or 6.20000000000000029e-105 < c < 5.4000000000000001e197Initial program 95.7%
Taylor expanded in b around inf 67.7%
associate-*r/67.7%
metadata-eval67.7%
+-commutative67.7%
Simplified67.7%
Taylor expanded in b around 0 38.7%
Taylor expanded in x around inf 58.8%
if 4.50000000000000023e-139 < c < 6.20000000000000029e-105Initial program 100.0%
Taylor expanded in b around inf 90.3%
associate-*r/90.3%
metadata-eval90.3%
+-commutative90.3%
Simplified90.3%
Taylor expanded in b around 0 90.3%
if 5.4000000000000001e197 < c Initial program 88.2%
Taylor expanded in t around inf 77.2%
mul-1-neg77.2%
distribute-rgt-neg-in77.2%
+-commutative77.2%
neg-sub077.2%
associate--r-77.2%
neg-sub077.2%
+-commutative77.2%
sub-neg77.2%
Simplified77.2%
Taylor expanded in a around 0 71.5%
Taylor expanded in c around inf 82.9%
Taylor expanded in c around 0 66.6%
*-commutative66.6%
Simplified66.6%
Final simplification60.5%
(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 95.3%
Taylor expanded in b around inf 68.1%
associate-*r/68.1%
metadata-eval68.1%
+-commutative68.1%
Simplified68.1%
Taylor expanded in b around 0 40.0%
Taylor expanded in x around inf 55.2%
Final simplification55.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* z (sqrt (+ t a)))) (t_2 (- a (/ 5.0 6.0))))
(if (< t -2.118326644891581e-50)
(/
x
(+
x
(* y (exp (* 2.0 (- (+ (* a c) (* 0.8333333333333334 c)) (* a b)))))))
(if (< t 5.196588770651547e-123)
(/
x
(+
x
(*
y
(exp
(*
2.0
(/
(-
(* t_1 (* (* 3.0 t) t_2))
(*
(- (* (+ (/ 5.0 6.0) a) (* 3.0 t)) 2.0)
(* t_2 (* (- b c) t))))
(* (* (* t t) 3.0) t_2)))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ t_1 t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = z * sqrt((t + a));
double t_2 = a - (5.0 / 6.0);
double tmp;
if (t < -2.118326644891581e-50) {
tmp = x / (x + (y * exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b))))));
} else if (t < 5.196588770651547e-123) {
tmp = x / (x + (y * exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * sqrt((t + a))
t_2 = a - (5.0d0 / 6.0d0)
if (t < (-2.118326644891581d-50)) then
tmp = x / (x + (y * exp((2.0d0 * (((a * c) + (0.8333333333333334d0 * c)) - (a * b))))))
else if (t < 5.196588770651547d-123) then
tmp = x / (x + (y * exp((2.0d0 * (((t_1 * ((3.0d0 * t) * t_2)) - (((((5.0d0 / 6.0d0) + a) * (3.0d0 * t)) - 2.0d0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0d0) * t_2))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((t_1 / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = z * Math.sqrt((t + a));
double t_2 = a - (5.0 / 6.0);
double tmp;
if (t < -2.118326644891581e-50) {
tmp = x / (x + (y * Math.exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b))))));
} else if (t < 5.196588770651547e-123) {
tmp = x / (x + (y * Math.exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = z * math.sqrt((t + a)) t_2 = a - (5.0 / 6.0) tmp = 0 if t < -2.118326644891581e-50: tmp = x / (x + (y * math.exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b)))))) elif t < 5.196588770651547e-123: tmp = x / (x + (y * math.exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2)))))) else: tmp = x / (x + (y * math.exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(z * sqrt(Float64(t + a))) t_2 = Float64(a - Float64(5.0 / 6.0)) tmp = 0.0 if (t < -2.118326644891581e-50) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(a * c) + Float64(0.8333333333333334 * c)) - Float64(a * b))))))); elseif (t < 5.196588770651547e-123) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(t_1 * Float64(Float64(3.0 * t) * t_2)) - Float64(Float64(Float64(Float64(Float64(5.0 / 6.0) + a) * Float64(3.0 * t)) - 2.0) * Float64(t_2 * Float64(Float64(b - c) * t)))) / Float64(Float64(Float64(t * t) * 3.0) * t_2))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(t_1 / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = z * sqrt((t + a)); t_2 = a - (5.0 / 6.0); tmp = 0.0; if (t < -2.118326644891581e-50) tmp = x / (x + (y * exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b)))))); elseif (t < 5.196588770651547e-123) tmp = x / (x + (y * exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2)))))); else tmp = x / (x + (y * exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a - N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -2.118326644891581e-50], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(a * c), $MachinePrecision] + N[(0.8333333333333334 * c), $MachinePrecision]), $MachinePrecision] - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[t, 5.196588770651547e-123], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(t$95$1 * N[(N[(3.0 * t), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(N[(5.0 / 6.0), $MachinePrecision] + a), $MachinePrecision] * N[(3.0 * t), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision] * N[(t$95$2 * N[(N[(b - c), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(t * t), $MachinePrecision] * 3.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(t$95$1 / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \sqrt{t + a}\\
t_2 := a - \frac{5}{6}\\
\mathbf{if}\;t < -2.118326644891581 \cdot 10^{-50}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a \cdot c + 0.8333333333333334 \cdot c\right) - a \cdot b\right)}}\\
\mathbf{elif}\;t < 5.196588770651547 \cdot 10^{-123}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{t\_1 \cdot \left(\left(3 \cdot t\right) \cdot t\_2\right) - \left(\left(\frac{5}{6} + a\right) \cdot \left(3 \cdot t\right) - 2\right) \cdot \left(t\_2 \cdot \left(\left(b - c\right) \cdot t\right)\right)}{\left(\left(t \cdot t\right) \cdot 3\right) \cdot t\_2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{t\_1}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\\
\end{array}
\end{array}
herbie shell --seed 2024031
(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)))))))))))