
(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 21 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 (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a 0.8333333333333334))))))
(if (<= t_1 INFINITY)
(/ x (+ x (* y (exp (* 2.0 t_1)))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* c (+ a (+ (/ -0.6666666666666666 t) 0.8333333333333334)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
}
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((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((z * math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))) tmp = 0 if t_1 <= math.inf: tmp = x / (x + (y * math.exp((2.0 * t_1)))) else: tmp = x / (x + (y * math.exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334))))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + 0.8333333333333334)))) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * t_1))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(Float64(-0.6666666666666666 / t) + 0.8333333333333334)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))); tmp = 0.0; if (t_1 <= Inf) tmp = x / (x + (y * exp((2.0 * t_1)))); else tmp = x / (x + (y * exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(N[(-0.6666666666666666 / t), $MachinePrecision] + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + 0.8333333333333334\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot t\_1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(\frac{-0.6666666666666666}{t} + 0.8333333333333334\right)\right)\right)}}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 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 c around inf 78.8%
cancel-sign-sub-inv78.8%
+-commutative78.8%
metadata-eval78.8%
associate-*r/78.8%
metadata-eval78.8%
associate-+r+78.8%
Simplified78.8%
Final simplification98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 2.0 (* (/ z t) (sqrt (+ t a)))))))))
(t_2
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
c
(+ a (+ (/ -0.6666666666666666 t) 0.8333333333333334))))))))))
(if (<= t -5e-198)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 1.06e-197)
t_2
(if (<= t 2.45e-172)
t_1
(if (<= t 4.2e-111)
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
b
(- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(if (<= t 2e-82)
t_2
(if (<= t 9000.0)
t_1
(/
x
(+
x
(*
y
(exp (* 2.0 (* (+ a 0.8333333333333334) (- c b)))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((2.0 * ((z / t) * sqrt((t + a)))))));
double t_2 = x / (x + (y * exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
double tmp;
if (t <= -5e-198) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 1.06e-197) {
tmp = t_2;
} else if (t <= 2.45e-172) {
tmp = t_1;
} else if (t <= 4.2e-111) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else if (t <= 2e-82) {
tmp = t_2;
} else if (t <= 9000.0) {
tmp = t_1;
} else {
tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * ((z / t) * sqrt((t + a)))))))
t_2 = x / (x + (y * exp((2.0d0 * (c * (a + (((-0.6666666666666666d0) / t) + 0.8333333333333334d0)))))))
if (t <= (-5d-198)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 1.06d-197) then
tmp = t_2
else if (t <= 2.45d-172) then
tmp = t_1
else if (t <= 4.2d-111) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else if (t <= 2d-82) then
tmp = t_2
else if (t <= 9000.0d0) then
tmp = t_1
else
tmp = x / (x + (y * exp((2.0d0 * ((a + 0.8333333333333334d0) * (c - b))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((2.0 * ((z / t) * Math.sqrt((t + a)))))));
double t_2 = x / (x + (y * Math.exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
double tmp;
if (t <= -5e-198) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 1.06e-197) {
tmp = t_2;
} else if (t <= 2.45e-172) {
tmp = t_1;
} else if (t <= 4.2e-111) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else if (t <= 2e-82) {
tmp = t_2;
} else if (t <= 9000.0) {
tmp = t_1;
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * ((z / t) * math.sqrt((t + a))))))) t_2 = x / (x + (y * math.exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334))))))) tmp = 0 if t <= -5e-198: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 1.06e-197: tmp = t_2 elif t <= 2.45e-172: tmp = t_1 elif t <= 4.2e-111: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) elif t <= 2e-82: tmp = t_2 elif t <= 9000.0: tmp = t_1 else: tmp = x / (x + (y * math.exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(z / t) * sqrt(Float64(t + a)))))))) t_2 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(Float64(-0.6666666666666666 / t) + 0.8333333333333334)))))))) tmp = 0.0 if (t <= -5e-198) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 1.06e-197) tmp = t_2; elseif (t <= 2.45e-172) tmp = t_1; elseif (t <= 4.2e-111) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); elseif (t <= 2e-82) tmp = t_2; elseif (t <= 9000.0) tmp = t_1; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * ((z / t) * sqrt((t + a))))))); t_2 = x / (x + (y * exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334))))))); tmp = 0.0; if (t <= -5e-198) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 1.06e-197) tmp = t_2; elseif (t <= 2.45e-172) tmp = t_1; elseif (t <= 4.2e-111) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); elseif (t <= 2e-82) tmp = t_2; elseif (t <= 9000.0) tmp = t_1; else tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(z / t), $MachinePrecision] * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(N[(-0.6666666666666666 / t), $MachinePrecision] + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-198], 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.06e-197], t$95$2, If[LessEqual[t, 2.45e-172], t$95$1, If[LessEqual[t, 4.2e-111], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-82], t$95$2, If[LessEqual[t, 9000.0], t$95$1, N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z}{t} \cdot \sqrt{t + a}\right)}}\\
t_2 := \frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(\frac{-0.6666666666666666}{t} + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-198}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 1.06 \cdot 10^{-197}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-111}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-82}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 9000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < -4.9999999999999999e-198Initial program 92.1%
Taylor expanded in a around inf 84.9%
if -4.9999999999999999e-198 < t < 1.05999999999999997e-197 or 4.1999999999999997e-111 < t < 2e-82Initial program 91.3%
Taylor expanded in c around inf 83.2%
cancel-sign-sub-inv83.2%
+-commutative83.2%
metadata-eval83.2%
associate-*r/83.2%
metadata-eval83.2%
associate-+r+83.2%
Simplified83.2%
if 1.05999999999999997e-197 < t < 2.45e-172 or 2e-82 < t < 9e3Initial program 97.2%
add-log-exp97.2%
associate-*l/97.2%
*-commutative97.2%
fma-neg97.2%
associate-/r*97.2%
metadata-eval97.2%
div-inv97.2%
metadata-eval97.2%
Applied egg-rr97.2%
Taylor expanded in z around inf 75.9%
if 2.45e-172 < t < 4.1999999999999997e-111Initial program 100.0%
Taylor expanded in b around inf 83.9%
associate-*r/83.9%
metadata-eval83.9%
+-commutative83.9%
Simplified83.9%
if 9e3 < t Initial program 98.3%
Taylor expanded in t around inf 92.7%
+-commutative92.7%
*-commutative92.7%
associate-*r*92.7%
neg-mul-192.7%
neg-sub092.7%
associate--r-92.7%
neg-sub092.7%
+-commutative92.7%
sub-neg92.7%
Simplified92.7%
Final simplification86.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 2.0 (* (/ z t) (sqrt (+ t a)))))))))
(t_2
(/
x
(+
x
(*
y
(exp
(*
2.0
(/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))))
(if (<= t -500.0)
(/ x (+ x (* y (pow (exp (* a 2.0)) (- c b)))))
(if (<= t 3.5e-194)
t_2
(if (<= t 5e-172)
t_1
(if (<= t 1.3e-109)
t_2
(if (<= t 9000.0)
t_1
(/
x
(+
x
(*
y
(exp (* 2.0 (* (+ a 0.8333333333333334) (- c b))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((2.0 * ((z / t) * sqrt((t + a)))))));
double t_2 = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
double tmp;
if (t <= -500.0) {
tmp = x / (x + (y * pow(exp((a * 2.0)), (c - b))));
} else if (t <= 3.5e-194) {
tmp = t_2;
} else if (t <= 5e-172) {
tmp = t_1;
} else if (t <= 1.3e-109) {
tmp = t_2;
} else if (t <= 9000.0) {
tmp = t_1;
} else {
tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * ((z / t) * sqrt((t + a)))))))
t_2 = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
if (t <= (-500.0d0)) then
tmp = x / (x + (y * (exp((a * 2.0d0)) ** (c - b))))
else if (t <= 3.5d-194) then
tmp = t_2
else if (t <= 5d-172) then
tmp = t_1
else if (t <= 1.3d-109) then
tmp = t_2
else if (t <= 9000.0d0) then
tmp = t_1
else
tmp = x / (x + (y * exp((2.0d0 * ((a + 0.8333333333333334d0) * (c - b))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((2.0 * ((z / t) * Math.sqrt((t + a)))))));
double t_2 = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
double tmp;
if (t <= -500.0) {
tmp = x / (x + (y * Math.pow(Math.exp((a * 2.0)), (c - b))));
} else if (t <= 3.5e-194) {
tmp = t_2;
} else if (t <= 5e-172) {
tmp = t_1;
} else if (t <= 1.3e-109) {
tmp = t_2;
} else if (t <= 9000.0) {
tmp = t_1;
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * ((z / t) * math.sqrt((t + a))))))) t_2 = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) tmp = 0 if t <= -500.0: tmp = x / (x + (y * math.pow(math.exp((a * 2.0)), (c - b)))) elif t <= 3.5e-194: tmp = t_2 elif t <= 5e-172: tmp = t_1 elif t <= 1.3e-109: tmp = t_2 elif t <= 9000.0: tmp = t_1 else: tmp = x / (x + (y * math.exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(z / t) * sqrt(Float64(t + a)))))))) t_2 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))) tmp = 0.0 if (t <= -500.0) tmp = Float64(x / Float64(x + Float64(y * (exp(Float64(a * 2.0)) ^ Float64(c - b))))); elseif (t <= 3.5e-194) tmp = t_2; elseif (t <= 5e-172) tmp = t_1; elseif (t <= 1.3e-109) tmp = t_2; elseif (t <= 9000.0) tmp = t_1; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * ((z / t) * sqrt((t + a))))))); t_2 = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); tmp = 0.0; if (t <= -500.0) tmp = x / (x + (y * (exp((a * 2.0)) ^ (c - b)))); elseif (t <= 3.5e-194) tmp = t_2; elseif (t <= 5e-172) tmp = t_1; elseif (t <= 1.3e-109) tmp = t_2; elseif (t <= 9000.0) tmp = t_1; else tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(z / t), $MachinePrecision] * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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, -500.0], N[(x / N[(x + N[(y * N[Power[N[Exp[N[(a * 2.0), $MachinePrecision]], $MachinePrecision], N[(c - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e-194], t$95$2, If[LessEqual[t, 5e-172], t$95$1, If[LessEqual[t, 1.3e-109], t$95$2, If[LessEqual[t, 9000.0], t$95$1, N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z}{t} \cdot \sqrt{t + a}\right)}}\\
t_2 := \frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\mathbf{if}\;t \leq -500:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{a \cdot 2}\right)}^{\left(c - b\right)}}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-194}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-109}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 9000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < -500Initial program 87.5%
Taylor expanded in a around inf 94.3%
associate-*r*94.3%
exp-prod100.0%
Applied egg-rr100.0%
if -500 < t < 3.5000000000000003e-194 or 4.9999999999999999e-172 < t < 1.2999999999999999e-109Initial program 94.9%
Taylor expanded in t around 0 91.2%
if 3.5000000000000003e-194 < t < 4.9999999999999999e-172 or 1.2999999999999999e-109 < t < 9e3Initial program 95.5%
add-log-exp95.5%
associate-*l/95.5%
*-commutative95.5%
fma-neg95.5%
associate-/r*95.5%
metadata-eval95.5%
div-inv95.5%
metadata-eval95.5%
Applied egg-rr95.5%
Taylor expanded in z around inf 73.7%
if 9e3 < t Initial program 98.3%
Taylor expanded in t around inf 92.7%
+-commutative92.7%
*-commutative92.7%
associate-*r*92.7%
neg-mul-192.7%
neg-sub092.7%
associate--r-92.7%
neg-sub092.7%
+-commutative92.7%
sub-neg92.7%
Simplified92.7%
Final simplification89.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -340.0)
(/ x (+ x (* y (pow (exp (* a 2.0)) (- c b)))))
(if (<= t 3.4e-301)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 4e+170)
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(* z (sqrt (/ 1.0 t)))
(* (- b c) (+ (/ -0.6666666666666666 t) 0.8333333333333334))))))))
(/ 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 <= -340.0) {
tmp = x / (x + (y * pow(exp((a * 2.0)), (c - b))));
} else if (t <= 3.4e-301) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 4e+170) {
tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) - ((b - c) * ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
} 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 <= (-340.0d0)) then
tmp = x / (x + (y * (exp((a * 2.0d0)) ** (c - b))))
else if (t <= 3.4d-301) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 4d+170) then
tmp = x / (x + (y * exp((2.0d0 * ((z * sqrt((1.0d0 / t))) - ((b - c) * (((-0.6666666666666666d0) / t) + 0.8333333333333334d0)))))))
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 <= -340.0) {
tmp = x / (x + (y * Math.pow(Math.exp((a * 2.0)), (c - b))));
} else if (t <= 3.4e-301) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 4e+170) {
tmp = x / (x + (y * Math.exp((2.0 * ((z * Math.sqrt((1.0 / t))) - ((b - c) * ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
} 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 <= -340.0: tmp = x / (x + (y * math.pow(math.exp((a * 2.0)), (c - b)))) elif t <= 3.4e-301: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 4e+170: tmp = x / (x + (y * math.exp((2.0 * ((z * math.sqrt((1.0 / t))) - ((b - c) * ((-0.6666666666666666 / t) + 0.8333333333333334))))))) 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 <= -340.0) tmp = Float64(x / Float64(x + Float64(y * (exp(Float64(a * 2.0)) ^ Float64(c - b))))); elseif (t <= 3.4e-301) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); elseif (t <= 4e+170) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(z * sqrt(Float64(1.0 / t))) - Float64(Float64(b - c) * Float64(Float64(-0.6666666666666666 / t) + 0.8333333333333334)))))))); 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 <= -340.0) tmp = x / (x + (y * (exp((a * 2.0)) ^ (c - b)))); elseif (t <= 3.4e-301) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 4e+170) tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) - ((b - c) * ((-0.6666666666666666 / t) + 0.8333333333333334))))))); 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, -340.0], N[(x / N[(x + N[(y * N[Power[N[Exp[N[(a * 2.0), $MachinePrecision]], $MachinePrecision], N[(c - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-301], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+170], 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[(b - c), $MachinePrecision] * N[(N[(-0.6666666666666666 / t), $MachinePrecision] + 0.8333333333333334), $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 -340:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{a \cdot 2}\right)}^{\left(c - b\right)}}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-301}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+170}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(z \cdot \sqrt{\frac{1}{t}} - \left(b - c\right) \cdot \left(\frac{-0.6666666666666666}{t} + 0.8333333333333334\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 < -340Initial program 87.5%
Taylor expanded in a around inf 94.3%
associate-*r*94.3%
exp-prod100.0%
Applied egg-rr100.0%
if -340 < t < 3.4000000000000002e-301Initial program 93.0%
Taylor expanded in t around 0 95.5%
if 3.4000000000000002e-301 < t < 4.00000000000000014e170Initial program 97.2%
Taylor expanded in a around 0 87.6%
*-commutative87.6%
*-commutative87.6%
cancel-sign-sub-inv87.6%
metadata-eval87.6%
associate-*r/87.6%
metadata-eval87.6%
Simplified87.6%
if 4.00000000000000014e170 < t Initial program 98.0%
Taylor expanded in t around inf 98.2%
+-commutative98.2%
*-commutative98.2%
associate-*r*98.2%
neg-mul-198.2%
neg-sub098.2%
associate--r-98.2%
neg-sub098.2%
+-commutative98.2%
sub-neg98.2%
Simplified98.2%
Final simplification91.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 2.0 (* -0.6666666666666666 (/ c t))))))))
(t_2 (/ x (+ x (* y (exp (* (- c b) 1.6666666666666667))))))
(t_3 (/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))))
(if (<= a -0.84)
t_3
(if (<= a -2.7e-191)
t_2
(if (<= a -2.2e-268)
t_1
(if (<= a 8.6e-15) t_2 (if (<= a 5.3e+32) t_1 t_3)))))))
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 * (-0.6666666666666666 * (c / t))))));
double t_2 = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
double t_3 = x / (x + (y * exp((2.0 * (a * (c - b))))));
double tmp;
if (a <= -0.84) {
tmp = t_3;
} else if (a <= -2.7e-191) {
tmp = t_2;
} else if (a <= -2.2e-268) {
tmp = t_1;
} else if (a <= 8.6e-15) {
tmp = t_2;
} else if (a <= 5.3e+32) {
tmp = t_1;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * ((-0.6666666666666666d0) * (c / t))))))
t_2 = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
t_3 = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
if (a <= (-0.84d0)) then
tmp = t_3
else if (a <= (-2.7d-191)) then
tmp = t_2
else if (a <= (-2.2d-268)) then
tmp = t_1
else if (a <= 8.6d-15) then
tmp = t_2
else if (a <= 5.3d+32) then
tmp = t_1
else
tmp = t_3
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 * (-0.6666666666666666 * (c / t))))));
double t_2 = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
double t_3 = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
double tmp;
if (a <= -0.84) {
tmp = t_3;
} else if (a <= -2.7e-191) {
tmp = t_2;
} else if (a <= -2.2e-268) {
tmp = t_1;
} else if (a <= 8.6e-15) {
tmp = t_2;
} else if (a <= 5.3e+32) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * (-0.6666666666666666 * (c / t)))))) t_2 = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) t_3 = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) tmp = 0 if a <= -0.84: tmp = t_3 elif a <= -2.7e-191: tmp = t_2 elif a <= -2.2e-268: tmp = t_1 elif a <= 8.6e-15: tmp = t_2 elif a <= 5.3e+32: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(-0.6666666666666666 * Float64(c / t))))))) t_2 = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))) t_3 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))) tmp = 0.0 if (a <= -0.84) tmp = t_3; elseif (a <= -2.7e-191) tmp = t_2; elseif (a <= -2.2e-268) tmp = t_1; elseif (a <= 8.6e-15) tmp = t_2; elseif (a <= 5.3e+32) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * (-0.6666666666666666 * (c / t)))))); t_2 = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); t_3 = x / (x + (y * exp((2.0 * (a * (c - b)))))); tmp = 0.0; if (a <= -0.84) tmp = t_3; elseif (a <= -2.7e-191) tmp = t_2; elseif (a <= -2.2e-268) tmp = t_1; elseif (a <= 8.6e-15) tmp = t_2; elseif (a <= 5.3e+32) tmp = t_1; else tmp = t_3; 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[(-0.6666666666666666 * N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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[a, -0.84], t$95$3, If[LessEqual[a, -2.7e-191], t$95$2, If[LessEqual[a, -2.2e-268], t$95$1, If[LessEqual[a, 8.6e-15], t$95$2, If[LessEqual[a, 5.3e+32], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(-0.6666666666666666 \cdot \frac{c}{t}\right)}}\\
t_2 := \frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
t_3 := \frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{if}\;a \leq -0.84:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq -2.7 \cdot 10^{-191}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2.2 \cdot 10^{-268}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 8.6 \cdot 10^{-15}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 5.3 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if a < -0.839999999999999969 or 5.2999999999999999e32 < a Initial program 94.2%
Taylor expanded in a around inf 81.6%
if -0.839999999999999969 < a < -2.69999999999999999e-191 or -2.20000000000000004e-268 < a < 8.5999999999999993e-15Initial program 98.9%
Simplified96.9%
Taylor expanded in t around inf 71.3%
Taylor expanded in a around 0 71.3%
if -2.69999999999999999e-191 < a < -2.20000000000000004e-268 or 8.5999999999999993e-15 < a < 5.2999999999999999e32Initial program 95.0%
Taylor expanded in t around 0 55.0%
Taylor expanded in c around inf 69.0%
Final simplification75.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c 1.1e-211)
(/ x (+ x (* (* a -2.0) (* b y))))
(if (<= c 4.6e-150)
(/ x (+ x (* (* a 2.0) (* c y))))
(if (<= c 3e-47)
(/ x (+ x (* y (+ (* (- c b) (* a 2.0)) 1.0))))
(if (<= c 1.65e-16)
(/ x (+ x y))
(if (<= c 520000000.0)
(/
x
(+
x
(*
y
(+
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))
1.0))))
(/ x (* y (exp (* (- c b) 1.6666666666666667))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 1.1e-211) {
tmp = x / (x + ((a * -2.0) * (b * y)));
} else if (c <= 4.6e-150) {
tmp = x / (x + ((a * 2.0) * (c * y)));
} else if (c <= 3e-47) {
tmp = x / (x + (y * (((c - b) * (a * 2.0)) + 1.0)));
} else if (c <= 1.65e-16) {
tmp = x / (x + y);
} else if (c <= 520000000.0) {
tmp = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))) + 1.0)));
} else {
tmp = x / (y * exp(((c - b) * 1.6666666666666667)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= 1.1d-211) then
tmp = x / (x + ((a * (-2.0d0)) * (b * y)))
else if (c <= 4.6d-150) then
tmp = x / (x + ((a * 2.0d0) * (c * y)))
else if (c <= 3d-47) then
tmp = x / (x + (y * (((c - b) * (a * 2.0d0)) + 1.0d0)))
else if (c <= 1.65d-16) then
tmp = x / (x + y)
else if (c <= 520000000.0d0) then
tmp = x / (x + (y * ((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))) + 1.0d0)))
else
tmp = x / (y * exp(((c - b) * 1.6666666666666667d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 1.1e-211) {
tmp = x / (x + ((a * -2.0) * (b * y)));
} else if (c <= 4.6e-150) {
tmp = x / (x + ((a * 2.0) * (c * y)));
} else if (c <= 3e-47) {
tmp = x / (x + (y * (((c - b) * (a * 2.0)) + 1.0)));
} else if (c <= 1.65e-16) {
tmp = x / (x + y);
} else if (c <= 520000000.0) {
tmp = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))) + 1.0)));
} else {
tmp = x / (y * Math.exp(((c - b) * 1.6666666666666667)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 1.1e-211: tmp = x / (x + ((a * -2.0) * (b * y))) elif c <= 4.6e-150: tmp = x / (x + ((a * 2.0) * (c * y))) elif c <= 3e-47: tmp = x / (x + (y * (((c - b) * (a * 2.0)) + 1.0))) elif c <= 1.65e-16: tmp = x / (x + y) elif c <= 520000000.0: tmp = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))) + 1.0))) else: tmp = x / (y * math.exp(((c - b) * 1.6666666666666667))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 1.1e-211) tmp = Float64(x / Float64(x + Float64(Float64(a * -2.0) * Float64(b * y)))); elseif (c <= 4.6e-150) tmp = Float64(x / Float64(x + Float64(Float64(a * 2.0) * Float64(c * y)))); elseif (c <= 3e-47) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(Float64(c - b) * Float64(a * 2.0)) + 1.0)))); elseif (c <= 1.65e-16) tmp = Float64(x / Float64(x + y)); elseif (c <= 520000000.0) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))) + 1.0)))); else tmp = Float64(x / Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 1.1e-211) tmp = x / (x + ((a * -2.0) * (b * y))); elseif (c <= 4.6e-150) tmp = x / (x + ((a * 2.0) * (c * y))); elseif (c <= 3e-47) tmp = x / (x + (y * (((c - b) * (a * 2.0)) + 1.0))); elseif (c <= 1.65e-16) tmp = x / (x + y); elseif (c <= 520000000.0) tmp = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))) + 1.0))); else tmp = x / (y * exp(((c - b) * 1.6666666666666667))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 1.1e-211], N[(x / N[(x + N[(N[(a * -2.0), $MachinePrecision] * N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.6e-150], N[(x / N[(x + N[(N[(a * 2.0), $MachinePrecision] * N[(c * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3e-47], N[(x / N[(x + N[(y * N[(N[(N[(c - b), $MachinePrecision] * N[(a * 2.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.65e-16], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 520000000.0], N[(x / N[(x + N[(y * N[(N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 1.1 \cdot 10^{-211}:\\
\;\;\;\;\frac{x}{x + \left(a \cdot -2\right) \cdot \left(b \cdot y\right)}\\
\mathbf{elif}\;c \leq 4.6 \cdot 10^{-150}:\\
\;\;\;\;\frac{x}{x + \left(a \cdot 2\right) \cdot \left(c \cdot y\right)}\\
\mathbf{elif}\;c \leq 3 \cdot 10^{-47}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(\left(c - b\right) \cdot \left(a \cdot 2\right) + 1\right)}\\
\mathbf{elif}\;c \leq 1.65 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{elif}\;c \leq 520000000:\\
\;\;\;\;\frac{x}{x + y \cdot \left(2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if c < 1.09999999999999999e-211Initial program 97.3%
Taylor expanded in a around inf 65.2%
Taylor expanded in a around 0 42.7%
associate-*r*42.7%
*-commutative42.7%
*-commutative42.7%
Simplified42.7%
Taylor expanded in b around inf 49.1%
associate-*r*49.1%
Simplified49.1%
if 1.09999999999999999e-211 < c < 4.60000000000000006e-150Initial program 88.9%
Taylor expanded in a around inf 51.6%
Taylor expanded in a around 0 30.9%
associate-*r*30.9%
*-commutative30.9%
*-commutative30.9%
Simplified30.9%
Taylor expanded in c around inf 52.0%
associate-*r*52.0%
*-commutative52.0%
Simplified52.0%
if 4.60000000000000006e-150 < c < 3.00000000000000017e-47Initial program 100.0%
Taylor expanded in a around inf 77.7%
Taylor expanded in a around 0 63.2%
associate-*r*63.2%
*-commutative63.2%
*-commutative63.2%
Simplified63.2%
if 3.00000000000000017e-47 < c < 1.64999999999999994e-16Initial program 83.3%
Taylor expanded in a around inf 83.9%
Taylor expanded in a around 0 83.8%
if 1.64999999999999994e-16 < c < 5.2e8Initial program 100.0%
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 51.6%
associate-*r/51.6%
metadata-eval51.6%
+-commutative51.6%
Simplified51.6%
if 5.2e8 < c Initial program 94.9%
Simplified93.3%
Taylor expanded in t around inf 78.3%
Taylor expanded in a around 0 74.9%
Taylor expanded in x around 0 68.2%
Final simplification55.2%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -2.5e-275)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 4.9e-111)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(if (<= t 9000.0)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* c (+ a (+ (/ -0.6666666666666666 t) 0.8333333333333334))))))))
(/ x (+ x (* y (exp (* 2.0 (* (+ a 0.8333333333333334) (- c b)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -2.5e-275) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 4.9e-111) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else if (t <= 9000.0) {
tmp = x / (x + (y * exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-2.5d-275)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 4.9d-111) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
else if (t <= 9000.0d0) then
tmp = x / (x + (y * exp((2.0d0 * (c * (a + (((-0.6666666666666666d0) / t) + 0.8333333333333334d0)))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((a + 0.8333333333333334d0) * (c - b))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -2.5e-275) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 4.9e-111) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} else if (t <= 9000.0) {
tmp = x / (x + (y * Math.exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -2.5e-275: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 4.9e-111: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) elif t <= 9000.0: tmp = x / (x + (y * math.exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334))))))) else: tmp = x / (x + (y * math.exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -2.5e-275) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 4.9e-111) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); elseif (t <= 9000.0) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(Float64(-0.6666666666666666 / t) + 0.8333333333333334)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -2.5e-275) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 4.9e-111) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); elseif (t <= 9000.0) tmp = x / (x + (y * exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334))))))); else tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -2.5e-275], 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, 4.9e-111], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9000.0], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(N[(-0.6666666666666666 / t), $MachinePrecision] + 0.8333333333333334), $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 -2.5 \cdot 10^{-275}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{-111}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{elif}\;t \leq 9000:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(\frac{-0.6666666666666666}{t} + 0.8333333333333334\right)\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 < -2.49999999999999992e-275Initial program 90.4%
Taylor expanded in a around inf 81.5%
if -2.49999999999999992e-275 < t < 4.90000000000000019e-111Initial program 95.9%
Taylor expanded in b around inf 78.3%
associate-*r/78.3%
metadata-eval78.3%
+-commutative78.3%
Simplified78.3%
if 4.90000000000000019e-111 < t < 9e3Initial program 97.3%
Taylor expanded in c around inf 67.6%
cancel-sign-sub-inv67.6%
+-commutative67.6%
metadata-eval67.6%
associate-*r/67.6%
metadata-eval67.6%
associate-+r+67.6%
Simplified67.6%
if 9e3 < t Initial program 98.3%
Taylor expanded in t around inf 92.7%
+-commutative92.7%
*-commutative92.7%
associate-*r*92.7%
neg-mul-192.7%
neg-sub092.7%
associate--r-92.7%
neg-sub092.7%
+-commutative92.7%
sub-neg92.7%
Simplified92.7%
Final simplification84.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -3.8e-277)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 35000.0)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))))))
(/ 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.8e-277) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 35000.0) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} 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.8d-277)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 35000.0d0) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))))))
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.8e-277) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 35000.0) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))))));
} 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.8e-277: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 35000.0: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))) 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.8e-277) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 35000.0) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))))))); 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.8e-277) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 35000.0) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334))))))); 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.8e-277], 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, 35000.0], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $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.8 \cdot 10^{-277}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 35000:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\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.79999999999999986e-277Initial program 90.4%
Taylor expanded in a around inf 81.5%
if -3.79999999999999986e-277 < t < 35000Initial program 96.5%
Taylor expanded in b around inf 67.0%
associate-*r/67.0%
metadata-eval67.0%
+-commutative67.0%
Simplified67.0%
if 35000 < t Initial program 98.3%
Taylor expanded in t around inf 92.7%
+-commutative92.7%
*-commutative92.7%
associate-*r*92.7%
neg-mul-192.7%
neg-sub092.7%
associate--r-92.7%
neg-sub092.7%
+-commutative92.7%
sub-neg92.7%
Simplified92.7%
Final simplification81.8%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -5e-310) (not (<= t 125.0))) (/ x (+ x (* y (exp (* 2.0 (* (+ a 0.8333333333333334) (- c b))))))) (/ x (+ x (* y (exp (* 2.0 (* (- b c) (+ a 0.8333333333333334)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -5e-310) || !(t <= 125.0)) {
tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((b - c) * (a + 0.8333333333333334))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((t <= (-5d-310)) .or. (.not. (t <= 125.0d0))) then
tmp = x / (x + (y * exp((2.0d0 * ((a + 0.8333333333333334d0) * (c - b))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((b - c) * (a + 0.8333333333333334d0))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -5e-310) || !(t <= 125.0)) {
tmp = x / (x + (y * Math.exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((b - c) * (a + 0.8333333333333334))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -5e-310) or not (t <= 125.0): tmp = x / (x + (y * math.exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))) else: tmp = x / (x + (y * math.exp((2.0 * ((b - c) * (a + 0.8333333333333334)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -5e-310) || !(t <= 125.0)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * Float64(c - b))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(b - c) * Float64(a + 0.8333333333333334))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -5e-310) || ~((t <= 125.0))) tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))); else tmp = x / (x + (y * exp((2.0 * ((b - c) * (a + 0.8333333333333334)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -5e-310], N[Not[LessEqual[t, 125.0]], $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], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(b - c), $MachinePrecision] * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310} \lor \neg \left(t \leq 125\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(b - c\right) \cdot \left(a + 0.8333333333333334\right)\right)}}\\
\end{array}
\end{array}
if t < -4.999999999999985e-310 or 125 < t Initial program 96.0%
Taylor expanded in t around inf 88.5%
+-commutative88.5%
*-commutative88.5%
associate-*r*88.5%
neg-mul-188.5%
neg-sub088.5%
associate--r-88.5%
neg-sub088.5%
+-commutative88.5%
sub-neg88.5%
Simplified88.5%
if -4.999999999999985e-310 < t < 125Initial program 96.2%
add-log-exp96.2%
associate-*l/94.9%
*-commutative94.9%
fma-neg94.9%
associate-/r*94.9%
metadata-eval94.9%
div-inv94.9%
metadata-eval94.9%
Applied egg-rr94.9%
Taylor expanded in t around inf 31.8%
distribute-lft-neg-in31.8%
+-commutative31.8%
Simplified31.8%
rem-log-exp31.8%
*-un-lft-identity31.8%
log-prod31.8%
metadata-eval31.8%
add-log-exp31.8%
rem-log-exp31.8%
add-sqr-sqrt0.0%
sqrt-unprod65.3%
sqr-neg65.3%
sqrt-unprod65.3%
add-sqr-sqrt65.3%
Applied egg-rr65.3%
+-lft-identity65.3%
*-commutative65.3%
Simplified65.3%
Final simplification81.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -5e-310)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 125.0)
(/ x (+ x (* y (exp (* 2.0 (* (- b c) (+ a 0.8333333333333334)))))))
(/ x (+ x (* y (exp (* (- c b) 1.6666666666666667))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -5e-310) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 125.0) {
tmp = x / (x + (y * exp((2.0 * ((b - c) * (a + 0.8333333333333334))))));
} else {
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-5d-310)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 125.0d0) then
tmp = x / (x + (y * exp((2.0d0 * ((b - c) * (a + 0.8333333333333334d0))))))
else
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -5e-310) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 125.0) {
tmp = x / (x + (y * Math.exp((2.0 * ((b - c) * (a + 0.8333333333333334))))));
} else {
tmp = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -5e-310: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 125.0: tmp = x / (x + (y * math.exp((2.0 * ((b - c) * (a + 0.8333333333333334)))))) else: tmp = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -5e-310) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 125.0) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(b - c) * Float64(a + 0.8333333333333334))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -5e-310) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 125.0) tmp = x / (x + (y * exp((2.0 * ((b - c) * (a + 0.8333333333333334)))))); else tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -5e-310], 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, 125.0], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(b - c), $MachinePrecision] * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 125:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(b - c\right) \cdot \left(a + 0.8333333333333334\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 91.5%
Taylor expanded in a around inf 78.8%
if -4.999999999999985e-310 < t < 125Initial program 96.2%
add-log-exp96.2%
associate-*l/94.9%
*-commutative94.9%
fma-neg94.9%
associate-/r*94.9%
metadata-eval94.9%
div-inv94.9%
metadata-eval94.9%
Applied egg-rr94.9%
Taylor expanded in t around inf 31.8%
distribute-lft-neg-in31.8%
+-commutative31.8%
Simplified31.8%
rem-log-exp31.8%
*-un-lft-identity31.8%
log-prod31.8%
metadata-eval31.8%
add-log-exp31.8%
rem-log-exp31.8%
add-sqr-sqrt0.0%
sqrt-unprod65.3%
sqr-neg65.3%
sqrt-unprod65.3%
add-sqr-sqrt65.3%
Applied egg-rr65.3%
+-lft-identity65.3%
*-commutative65.3%
Simplified65.3%
if 125 < t Initial program 98.3%
Simplified100.0%
Taylor expanded in t around inf 92.5%
Taylor expanded in a around 0 78.3%
Final simplification74.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -1.02e-172) (not (<= t 9000.0))) (/ x (+ x (* y (exp (* (- c b) 1.6666666666666667))))) (/ x (+ x (* y (exp (* 2.0 (* -0.6666666666666666 (/ c t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.02e-172) || !(t <= 9000.0)) {
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
} else {
tmp = x / (x + (y * exp((2.0 * (-0.6666666666666666 * (c / t))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((t <= (-1.02d-172)) .or. (.not. (t <= 9000.0d0))) then
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
else
tmp = x / (x + (y * exp((2.0d0 * ((-0.6666666666666666d0) * (c / t))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.02e-172) || !(t <= 9000.0)) {
tmp = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (-0.6666666666666666 * (c / t))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -1.02e-172) or not (t <= 9000.0): tmp = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) else: tmp = x / (x + (y * math.exp((2.0 * (-0.6666666666666666 * (c / t)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -1.02e-172) || !(t <= 9000.0)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(-0.6666666666666666 * Float64(c / t))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -1.02e-172) || ~((t <= 9000.0))) tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); else tmp = x / (x + (y * exp((2.0 * (-0.6666666666666666 * (c / t)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -1.02e-172], N[Not[LessEqual[t, 9000.0]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(-0.6666666666666666 * N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.02 \cdot 10^{-172} \lor \neg \left(t \leq 9000\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(-0.6666666666666666 \cdot \frac{c}{t}\right)}}\\
\end{array}
\end{array}
if t < -1.02e-172 or 9e3 < t Initial program 96.7%
Simplified98.1%
Taylor expanded in t around inf 90.7%
Taylor expanded in a around 0 78.5%
if -1.02e-172 < t < 9e3Initial program 95.1%
Taylor expanded in t around 0 72.9%
Taylor expanded in c around inf 60.5%
Final simplification71.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= c -530000000000.0) (not (<= c 2.35e+25))) (/ x (+ x (* y (exp (* (- c b) 1.6666666666666667))))) (/ 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 tmp;
if ((c <= -530000000000.0) || !(c <= 2.35e+25)) {
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
} 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) :: tmp
if ((c <= (-530000000000.0d0)) .or. (.not. (c <= 2.35d+25))) then
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
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 tmp;
if ((c <= -530000000000.0) || !(c <= 2.35e+25)) {
tmp = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
} else {
tmp = x / (x + (y * Math.exp((-2.0 * (a * b)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (c <= -530000000000.0) or not (c <= 2.35e+25): tmp = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) else: tmp = x / (x + (y * math.exp((-2.0 * (a * b))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((c <= -530000000000.0) || !(c <= 2.35e+25)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))); 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) tmp = 0.0; if ((c <= -530000000000.0) || ~((c <= 2.35e+25))) tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); else tmp = x / (x + (y * exp((-2.0 * (a * b))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[c, -530000000000.0], N[Not[LessEqual[c, 2.35e+25]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -530000000000 \lor \neg \left(c \leq 2.35 \cdot 10^{+25}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(a \cdot b\right)}}\\
\end{array}
\end{array}
if c < -5.3e11 or 2.3499999999999999e25 < c Initial program 96.2%
Simplified94.5%
Taylor expanded in t around inf 79.0%
Taylor expanded in a around 0 74.4%
if -5.3e11 < c < 2.3499999999999999e25Initial program 96.0%
Taylor expanded in a around inf 65.1%
Taylor expanded in c around 0 62.8%
Final simplification67.6%
(FPCore (x y z t a b c) :precision binary64 (if (<= c 720.0) (/ x (+ x (* y (exp (* -2.0 (* a b)))))) (/ x (+ x (* y (exp (* c 1.6666666666666667)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 720.0) {
tmp = x / (x + (y * exp((-2.0 * (a * b)))));
} else {
tmp = x / (x + (y * exp((c * 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 (c <= 720.0d0) then
tmp = x / (x + (y * exp(((-2.0d0) * (a * b)))))
else
tmp = x / (x + (y * exp((c * 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 (c <= 720.0) {
tmp = x / (x + (y * Math.exp((-2.0 * (a * b)))));
} else {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 720.0: tmp = x / (x + (y * math.exp((-2.0 * (a * b))))) else: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 720.0) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(a * b)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 720.0) tmp = x / (x + (y * exp((-2.0 * (a * b))))); else tmp = x / (x + (y * exp((c * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 720.0], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 720:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(a \cdot b\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if c < 720Initial program 96.4%
Taylor expanded in a around inf 65.6%
Taylor expanded in c around 0 62.3%
if 720 < c Initial program 95.2%
Simplified93.8%
Taylor expanded in t around inf 76.6%
Taylor expanded in a around 0 71.9%
Taylor expanded in c around inf 68.8%
*-commutative68.8%
Simplified68.8%
Final simplification63.9%
(FPCore (x y z t a b c) :precision binary64 (if (<= c 11500000000.0) (/ x (+ x (* y (exp (* b -1.6666666666666667))))) (/ x (* y (exp (* (- c b) 1.6666666666666667))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 11500000000.0) {
tmp = x / (x + (y * exp((b * -1.6666666666666667))));
} else {
tmp = x / (y * exp(((c - b) * 1.6666666666666667)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= 11500000000.0d0) then
tmp = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
else
tmp = x / (y * exp(((c - b) * 1.6666666666666667d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 11500000000.0) {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
} else {
tmp = x / (y * Math.exp(((c - b) * 1.6666666666666667)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 11500000000.0: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) else: tmp = x / (y * math.exp(((c - b) * 1.6666666666666667))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 11500000000.0) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); else tmp = Float64(x / Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 11500000000.0) tmp = x / (x + (y * exp((b * -1.6666666666666667)))); else tmp = x / (y * exp(((c - b) * 1.6666666666666667))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 11500000000.0], N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 11500000000:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if c < 1.15e10Initial program 96.4%
Simplified98.0%
Taylor expanded in t around inf 69.1%
Taylor expanded in a around 0 59.7%
Taylor expanded in c around 0 57.8%
*-commutative57.8%
Simplified57.8%
if 1.15e10 < c Initial program 94.9%
Simplified93.3%
Taylor expanded in t around inf 78.3%
Taylor expanded in a around 0 74.9%
Taylor expanded in x around 0 68.2%
Final simplification60.2%
(FPCore (x y z t a b c) :precision binary64 (if (<= c 460.0) (/ x (+ x (* y (exp (* b -1.6666666666666667))))) (/ x (+ x (* y (exp (* c 1.6666666666666667)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 460.0) {
tmp = x / (x + (y * exp((b * -1.6666666666666667))));
} else {
tmp = x / (x + (y * exp((c * 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 (c <= 460.0d0) then
tmp = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
else
tmp = x / (x + (y * exp((c * 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 (c <= 460.0) {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
} else {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 460.0: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) else: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 460.0) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 460.0) tmp = x / (x + (y * exp((b * -1.6666666666666667)))); else tmp = x / (x + (y * exp((c * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 460.0], N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 460:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if c < 460Initial program 96.4%
Simplified98.0%
Taylor expanded in t around inf 69.5%
Taylor expanded in a around 0 60.3%
Taylor expanded in c around 0 58.4%
*-commutative58.4%
Simplified58.4%
if 460 < c Initial program 95.2%
Simplified93.8%
Taylor expanded in t around inf 76.6%
Taylor expanded in a around 0 71.9%
Taylor expanded in c around inf 68.8%
*-commutative68.8%
Simplified68.8%
Final simplification60.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b 6.1e-195)
(/ x (+ x (* y (+ (* (- c b) (* a 2.0)) 1.0))))
(if (<= b 2.5e+102)
(/ x (+ x (* (* a -2.0) (* b y))))
(if (<= b 1.9e+270)
(/ x (+ x y))
(/
x
(+
x
(*
y
(+
(* 2.0 (* b (- (/ 0.6666666666666666 t) (+ a 0.8333333333333334))))
1.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= 6.1e-195) {
tmp = x / (x + (y * (((c - b) * (a * 2.0)) + 1.0)));
} else if (b <= 2.5e+102) {
tmp = x / (x + ((a * -2.0) * (b * y)));
} else if (b <= 1.9e+270) {
tmp = x / (x + y);
} else {
tmp = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))) + 1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= 6.1d-195) then
tmp = x / (x + (y * (((c - b) * (a * 2.0d0)) + 1.0d0)))
else if (b <= 2.5d+102) then
tmp = x / (x + ((a * (-2.0d0)) * (b * y)))
else if (b <= 1.9d+270) then
tmp = x / (x + y)
else
tmp = x / (x + (y * ((2.0d0 * (b * ((0.6666666666666666d0 / t) - (a + 0.8333333333333334d0)))) + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= 6.1e-195) {
tmp = x / (x + (y * (((c - b) * (a * 2.0)) + 1.0)));
} else if (b <= 2.5e+102) {
tmp = x / (x + ((a * -2.0) * (b * y)));
} else if (b <= 1.9e+270) {
tmp = x / (x + y);
} else {
tmp = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))) + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= 6.1e-195: tmp = x / (x + (y * (((c - b) * (a * 2.0)) + 1.0))) elif b <= 2.5e+102: tmp = x / (x + ((a * -2.0) * (b * y))) elif b <= 1.9e+270: tmp = x / (x + y) else: tmp = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))) + 1.0))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= 6.1e-195) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(Float64(c - b) * Float64(a * 2.0)) + 1.0)))); elseif (b <= 2.5e+102) tmp = Float64(x / Float64(x + Float64(Float64(a * -2.0) * Float64(b * y)))); elseif (b <= 1.9e+270) tmp = Float64(x / Float64(x + y)); else tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(a + 0.8333333333333334)))) + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= 6.1e-195) tmp = x / (x + (y * (((c - b) * (a * 2.0)) + 1.0))); elseif (b <= 2.5e+102) tmp = x / (x + ((a * -2.0) * (b * y))); elseif (b <= 1.9e+270) tmp = x / (x + y); else tmp = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 / t) - (a + 0.8333333333333334)))) + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, 6.1e-195], N[(x / N[(x + N[(y * N[(N[(N[(c - b), $MachinePrecision] * N[(a * 2.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.5e+102], N[(x / N[(x + N[(N[(a * -2.0), $MachinePrecision] * N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.9e+270], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[(N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 6.1 \cdot 10^{-195}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(\left(c - b\right) \cdot \left(a \cdot 2\right) + 1\right)}\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{x}{x + \left(a \cdot -2\right) \cdot \left(b \cdot y\right)}\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+270}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(a + 0.8333333333333334\right)\right)\right) + 1\right)}\\
\end{array}
\end{array}
if b < 6.1000000000000003e-195Initial program 97.4%
Taylor expanded in a around inf 64.8%
Taylor expanded in a around 0 50.5%
associate-*r*50.5%
*-commutative50.5%
*-commutative50.5%
Simplified50.5%
if 6.1000000000000003e-195 < b < 2.5e102Initial program 94.4%
Taylor expanded in a around inf 59.0%
Taylor expanded in a around 0 37.2%
associate-*r*37.2%
*-commutative37.2%
*-commutative37.2%
Simplified37.2%
Taylor expanded in b around inf 46.6%
associate-*r*46.6%
Simplified46.6%
if 2.5e102 < b < 1.90000000000000009e270Initial program 94.9%
Taylor expanded in a around inf 72.6%
Taylor expanded in a around 0 45.2%
if 1.90000000000000009e270 < b Initial program 85.7%
Taylor expanded in b around inf 86.2%
associate-*r/86.2%
metadata-eval86.2%
+-commutative86.2%
Simplified86.2%
Taylor expanded in b around 0 72.3%
associate-*r/72.3%
metadata-eval72.3%
+-commutative72.3%
Simplified72.3%
Final simplification49.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= b -0.051) (and (not (<= b 5.5e-193)) (<= b 5.3e+101))) (/ x (+ x (* (* a -2.0) (* b y)))) (/ x (+ x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -0.051) || (!(b <= 5.5e-193) && (b <= 5.3e+101))) {
tmp = x / (x + ((a * -2.0) * (b * y)));
} else {
tmp = x / (x + y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b <= (-0.051d0)) .or. (.not. (b <= 5.5d-193)) .and. (b <= 5.3d+101)) then
tmp = x / (x + ((a * (-2.0d0)) * (b * y)))
else
tmp = x / (x + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -0.051) || (!(b <= 5.5e-193) && (b <= 5.3e+101))) {
tmp = x / (x + ((a * -2.0) * (b * y)));
} else {
tmp = x / (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -0.051) or (not (b <= 5.5e-193) and (b <= 5.3e+101)): tmp = x / (x + ((a * -2.0) * (b * y))) else: tmp = x / (x + y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -0.051) || (!(b <= 5.5e-193) && (b <= 5.3e+101))) tmp = Float64(x / Float64(x + Float64(Float64(a * -2.0) * Float64(b * y)))); else tmp = Float64(x / Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b <= -0.051) || (~((b <= 5.5e-193)) && (b <= 5.3e+101))) tmp = x / (x + ((a * -2.0) * (b * y))); else tmp = x / (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -0.051], And[N[Not[LessEqual[b, 5.5e-193]], $MachinePrecision], LessEqual[b, 5.3e+101]]], N[(x / N[(x + N[(N[(a * -2.0), $MachinePrecision] * N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.051 \lor \neg \left(b \leq 5.5 \cdot 10^{-193}\right) \land b \leq 5.3 \cdot 10^{+101}:\\
\;\;\;\;\frac{x}{x + \left(a \cdot -2\right) \cdot \left(b \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y}\\
\end{array}
\end{array}
if b < -0.0509999999999999967 or 5.50000000000000014e-193 < b < 5.30000000000000006e101Initial program 95.9%
Taylor expanded in a around inf 63.7%
Taylor expanded in a around 0 48.6%
associate-*r*48.6%
*-commutative48.6%
*-commutative48.6%
Simplified48.6%
Taylor expanded in b around inf 53.7%
associate-*r*53.7%
Simplified53.7%
if -0.0509999999999999967 < b < 5.50000000000000014e-193 or 5.30000000000000006e101 < b Initial program 96.2%
Taylor expanded in a around inf 66.1%
Taylor expanded in a around 0 40.0%
Final simplification46.6%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= z -4.6e+37) (not (<= z 6.6e-111))) (/ x (+ x (* (* a -2.0) (* b y)))) (/ x (+ x (* (* a 2.0) (* c y))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -4.6e+37) || !(z <= 6.6e-111)) {
tmp = x / (x + ((a * -2.0) * (b * y)));
} else {
tmp = x / (x + ((a * 2.0) * (c * y)));
}
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 ((z <= (-4.6d+37)) .or. (.not. (z <= 6.6d-111))) then
tmp = x / (x + ((a * (-2.0d0)) * (b * y)))
else
tmp = x / (x + ((a * 2.0d0) * (c * y)))
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 ((z <= -4.6e+37) || !(z <= 6.6e-111)) {
tmp = x / (x + ((a * -2.0) * (b * y)));
} else {
tmp = x / (x + ((a * 2.0) * (c * y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -4.6e+37) or not (z <= 6.6e-111): tmp = x / (x + ((a * -2.0) * (b * y))) else: tmp = x / (x + ((a * 2.0) * (c * y))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -4.6e+37) || !(z <= 6.6e-111)) tmp = Float64(x / Float64(x + Float64(Float64(a * -2.0) * Float64(b * y)))); else tmp = Float64(x / Float64(x + Float64(Float64(a * 2.0) * Float64(c * y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((z <= -4.6e+37) || ~((z <= 6.6e-111))) tmp = x / (x + ((a * -2.0) * (b * y))); else tmp = x / (x + ((a * 2.0) * (c * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -4.6e+37], N[Not[LessEqual[z, 6.6e-111]], $MachinePrecision]], N[(x / N[(x + N[(N[(a * -2.0), $MachinePrecision] * N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(N[(a * 2.0), $MachinePrecision] * N[(c * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+37} \lor \neg \left(z \leq 6.6 \cdot 10^{-111}\right):\\
\;\;\;\;\frac{x}{x + \left(a \cdot -2\right) \cdot \left(b \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + \left(a \cdot 2\right) \cdot \left(c \cdot y\right)}\\
\end{array}
\end{array}
if z < -4.60000000000000005e37 or 6.6e-111 < z Initial program 93.2%
Taylor expanded in a around inf 67.1%
Taylor expanded in a around 0 42.3%
associate-*r*42.3%
*-commutative42.3%
*-commutative42.3%
Simplified42.3%
Taylor expanded in b around inf 44.8%
associate-*r*44.8%
Simplified44.8%
if -4.60000000000000005e37 < z < 6.6e-111Initial program 99.9%
Taylor expanded in a around inf 62.1%
Taylor expanded in a around 0 44.0%
associate-*r*44.0%
*-commutative44.0%
*-commutative44.0%
Simplified44.0%
Taylor expanded in c around inf 46.0%
associate-*r*46.0%
*-commutative46.0%
Simplified46.0%
Final simplification45.3%
(FPCore (x y z t a b c) :precision binary64 (if (<= b 1.1e-194) (/ x (+ x (* y (+ (* (- c b) (* a 2.0)) 1.0)))) (if (<= b 3.1e+102) (/ x (+ x (* (* a -2.0) (* b y)))) (/ x (+ x y)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= 1.1e-194) {
tmp = x / (x + (y * (((c - b) * (a * 2.0)) + 1.0)));
} else if (b <= 3.1e+102) {
tmp = x / (x + ((a * -2.0) * (b * y)));
} else {
tmp = x / (x + y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= 1.1d-194) then
tmp = x / (x + (y * (((c - b) * (a * 2.0d0)) + 1.0d0)))
else if (b <= 3.1d+102) then
tmp = x / (x + ((a * (-2.0d0)) * (b * y)))
else
tmp = x / (x + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= 1.1e-194) {
tmp = x / (x + (y * (((c - b) * (a * 2.0)) + 1.0)));
} else if (b <= 3.1e+102) {
tmp = x / (x + ((a * -2.0) * (b * y)));
} else {
tmp = x / (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= 1.1e-194: tmp = x / (x + (y * (((c - b) * (a * 2.0)) + 1.0))) elif b <= 3.1e+102: tmp = x / (x + ((a * -2.0) * (b * y))) else: tmp = x / (x + y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= 1.1e-194) tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(Float64(c - b) * Float64(a * 2.0)) + 1.0)))); elseif (b <= 3.1e+102) tmp = Float64(x / Float64(x + Float64(Float64(a * -2.0) * Float64(b * y)))); else tmp = Float64(x / Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= 1.1e-194) tmp = x / (x + (y * (((c - b) * (a * 2.0)) + 1.0))); elseif (b <= 3.1e+102) tmp = x / (x + ((a * -2.0) * (b * y))); else tmp = x / (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, 1.1e-194], N[(x / N[(x + N[(y * N[(N[(N[(c - b), $MachinePrecision] * N[(a * 2.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.1e+102], N[(x / N[(x + N[(N[(a * -2.0), $MachinePrecision] * N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.1 \cdot 10^{-194}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(\left(c - b\right) \cdot \left(a \cdot 2\right) + 1\right)}\\
\mathbf{elif}\;b \leq 3.1 \cdot 10^{+102}:\\
\;\;\;\;\frac{x}{x + \left(a \cdot -2\right) \cdot \left(b \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y}\\
\end{array}
\end{array}
if b < 1.1000000000000001e-194Initial program 97.4%
Taylor expanded in a around inf 64.8%
Taylor expanded in a around 0 50.5%
associate-*r*50.5%
*-commutative50.5%
*-commutative50.5%
Simplified50.5%
if 1.1000000000000001e-194 < b < 3.09999999999999987e102Initial program 94.4%
Taylor expanded in a around inf 59.0%
Taylor expanded in a around 0 37.2%
associate-*r*37.2%
*-commutative37.2%
*-commutative37.2%
Simplified37.2%
Taylor expanded in b around inf 46.6%
associate-*r*46.6%
Simplified46.6%
if 3.09999999999999987e102 < b Initial program 93.5%
Taylor expanded in a around inf 72.6%
Taylor expanded in a around 0 39.0%
Final simplification47.6%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -5.1e+216) (* -0.5 (/ x (* a (* b y)))) (/ x (+ x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -5.1e+216) {
tmp = -0.5 * (x / (a * (b * y)));
} else {
tmp = x / (x + y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-5.1d+216)) then
tmp = (-0.5d0) * (x / (a * (b * y)))
else
tmp = x / (x + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -5.1e+216) {
tmp = -0.5 * (x / (a * (b * y)));
} else {
tmp = x / (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -5.1e+216: tmp = -0.5 * (x / (a * (b * y))) else: tmp = x / (x + y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -5.1e+216) tmp = Float64(-0.5 * Float64(x / Float64(a * Float64(b * y)))); else tmp = Float64(x / Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -5.1e+216) tmp = -0.5 * (x / (a * (b * y))); else tmp = x / (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -5.1e+216], N[(-0.5 * N[(x / N[(a * N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.1 \cdot 10^{+216}:\\
\;\;\;\;-0.5 \cdot \frac{x}{a \cdot \left(b \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y}\\
\end{array}
\end{array}
if b < -5.1000000000000001e216Initial program 95.8%
Taylor expanded in a around inf 75.8%
Taylor expanded in a around 0 71.9%
associate-*r*71.9%
*-commutative71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in b around inf 64.9%
if -5.1000000000000001e216 < b Initial program 96.1%
Taylor expanded in a around inf 63.8%
Taylor expanded in a around 0 38.2%
Final simplification40.7%
(FPCore (x y z t a b c) :precision binary64 (/ x (+ x y)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + y);
}
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)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + y);
}
def code(x, y, z, t, a, b, c): return x / (x + y)
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + y)) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + y); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y}
\end{array}
Initial program 96.1%
Taylor expanded in a around inf 65.0%
Taylor expanded in a around 0 36.1%
Final simplification36.1%
(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 2024027
(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)))))))))))