
(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 15 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 (* (- c b) (- (+ 0.8333333333333334 a) (/ 2.0 (* t 3.0)))))
(t_2 (sqrt (+ a t))))
(if (<= (+ (/ (* t_2 z) t) t_1) INFINITY)
(/ x (+ x (* y (exp (* 2.0 (log (exp (+ (* t_2 (/ z t)) t_1))))))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0)));
double t_2 = sqrt((a + t));
double tmp;
if ((((t_2 * z) / t) + t_1) <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * log(exp(((t_2 * (z / t)) + t_1)))))));
} else {
tmp = 1.0;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0)));
double t_2 = Math.sqrt((a + t));
double tmp;
if ((((t_2 * z) / t) + t_1) <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.exp((2.0 * Math.log(Math.exp(((t_2 * (z / t)) + t_1)))))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0))) t_2 = math.sqrt((a + t)) tmp = 0 if (((t_2 * z) / t) + t_1) <= math.inf: tmp = x / (x + (y * math.exp((2.0 * math.log(math.exp(((t_2 * (z / t)) + t_1))))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(c - b) * Float64(Float64(0.8333333333333334 + a) - Float64(2.0 / Float64(t * 3.0)))) t_2 = sqrt(Float64(a + t)) tmp = 0.0 if (Float64(Float64(Float64(t_2 * z) / t) + t_1) <= Inf) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * log(exp(Float64(Float64(t_2 * Float64(z / t)) + t_1)))))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0))); t_2 = sqrt((a + t)); tmp = 0.0; if ((((t_2 * z) / t) + t_1) <= Inf) tmp = x / (x + (y * exp((2.0 * log(exp(((t_2 * (z / t)) + t_1))))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(c - b), $MachinePrecision] * N[(N[(0.8333333333333334 + a), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(t$95$2 * z), $MachinePrecision] / t), $MachinePrecision] + t$95$1), $MachinePrecision], Infinity], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[Log[N[Exp[N[(N[(t$95$2 * N[(z / t), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c - b\right) \cdot \left(\left(0.8333333333333334 + a\right) - \frac{2}{t \cdot 3}\right)\\
t_2 := \sqrt{a + t}\\
\mathbf{if}\;\frac{t_2 \cdot z}{t} + t_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \log \left(e^{t_2 \cdot \frac{z}{t} + t_1}\right)}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 98.8%
associate-/l*98.7%
metadata-eval98.7%
add-log-exp98.8%
associate-/r/100.0%
*-commutative100.0%
Applied egg-rr100.0%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) Initial program 0.0%
Taylor expanded in a around inf 33.4%
Taylor expanded in x around inf 75.8%
Final simplification98.5%
(FPCore (x y z t a b c)
:precision binary64
(/
x
(fma
y
(pow
(exp 2.0)
(fma
(+ 0.8333333333333334 (- a (/ 0.6666666666666666 t)))
(- c b)
(* (sqrt (+ a t)) (/ z t))))
x)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / fma(y, pow(exp(2.0), fma((0.8333333333333334 + (a - (0.6666666666666666 / t))), (c - b), (sqrt((a + t)) * (z / t)))), x);
}
function code(x, y, z, t, a, b, c) return Float64(x / fma(y, (exp(2.0) ^ fma(Float64(0.8333333333333334 + Float64(a - Float64(0.6666666666666666 / t))), Float64(c - b), Float64(sqrt(Float64(a + t)) * Float64(z / t)))), x)) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(0.8333333333333334 + N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(c - b), $MachinePrecision] + N[(N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\mathsf{fma}\left(y, {\left(e^{2}\right)}^{\left(\mathsf{fma}\left(0.8333333333333334 + \left(a - \frac{0.6666666666666666}{t}\right), c - b, \sqrt{a + t} \cdot \frac{z}{t}\right)\right)}, x\right)}
\end{array}
Initial program 92.6%
+-commutative92.6%
fma-def92.6%
Simplified97.7%
Final simplification97.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* (sqrt (+ a t)) z) t)
(* (- c b) (- (+ 0.8333333333333334 a) (/ 2.0 (* t 3.0)))))))
(if (<= t_1 INFINITY) (/ x (+ x (* y (exp (* 2.0 t_1))))) 1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((sqrt((a + t)) * z) / t) + ((c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0))));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * t_1))));
} else {
tmp = 1.0;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((Math.sqrt((a + t)) * z) / t) + ((c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0))));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.exp((2.0 * t_1))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((math.sqrt((a + t)) * z) / t) + ((c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0)))) tmp = 0 if t_1 <= math.inf: tmp = x / (x + (y * math.exp((2.0 * t_1)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(sqrt(Float64(a + t)) * z) / t) + Float64(Float64(c - b) * Float64(Float64(0.8333333333333334 + a) - Float64(2.0 / Float64(t * 3.0))))) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * t_1))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((sqrt((a + t)) * z) / t) + ((c - b) * ((0.8333333333333334 + a) - (2.0 / (t * 3.0)))); tmp = 0.0; if (t_1 <= Inf) tmp = x / (x + (y * exp((2.0 * t_1)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision] + N[(N[(c - b), $MachinePrecision] * N[(N[(0.8333333333333334 + a), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\sqrt{a + t} \cdot z}{t} + \left(c - b\right) \cdot \left(\left(0.8333333333333334 + a\right) - \frac{2}{t \cdot 3}\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot t_1}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 98.8%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) Initial program 0.0%
Taylor expanded in a around inf 33.4%
Taylor expanded in x around inf 75.8%
Final simplification97.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
c
(+ a (+ 0.8333333333333334 (/ -0.6666666666666666 t)))))))))))
(if (<= c -3e-10)
t_1
(if (<= c -2.3e-212)
(/ x (+ x (* y (exp (* 2.0 (* (sqrt (+ a t)) (/ z t)))))))
(if (<= c 2050.0)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ 0.8333333333333334 a))))))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t))))))));
double tmp;
if (c <= -3e-10) {
tmp = t_1;
} else if (c <= -2.3e-212) {
tmp = x / (x + (y * exp((2.0 * (sqrt((a + t)) * (z / t))))));
} else if (c <= 2050.0) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * (c * (a + (0.8333333333333334d0 + ((-0.6666666666666666d0) / t))))))))
if (c <= (-3d-10)) then
tmp = t_1
else if (c <= (-2.3d-212)) then
tmp = x / (x + (y * exp((2.0d0 * (sqrt((a + t)) * (z / t))))))
else if (c <= 2050.0d0) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (0.8333333333333334d0 + a)))))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t))))))));
double tmp;
if (c <= -3e-10) {
tmp = t_1;
} else if (c <= -2.3e-212) {
tmp = x / (x + (y * Math.exp((2.0 * (Math.sqrt((a + t)) * (z / t))))));
} else if (c <= 2050.0) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t)))))))) tmp = 0 if c <= -3e-10: tmp = t_1 elif c <= -2.3e-212: tmp = x / (x + (y * math.exp((2.0 * (math.sqrt((a + t)) * (z / t)))))) elif c <= 2050.0: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(0.8333333333333334 + Float64(-0.6666666666666666 / t))))))))) tmp = 0.0 if (c <= -3e-10) tmp = t_1; elseif (c <= -2.3e-212) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(sqrt(Float64(a + t)) * Float64(z / t))))))); elseif (c <= 2050.0) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(0.8333333333333334 + a)))))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t)))))))); tmp = 0.0; if (c <= -3e-10) tmp = t_1; elseif (c <= -2.3e-212) tmp = x / (x + (y * exp((2.0 * (sqrt((a + t)) * (z / t)))))); elseif (c <= 2050.0) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(0.8333333333333334 + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3e-10], t$95$1, If[LessEqual[c, -2.3e-212], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2050.0], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(0.8333333333333334 + \frac{-0.6666666666666666}{t}\right)\right)\right)}}\\
\mathbf{if}\;c \leq -3 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -2.3 \cdot 10^{-212}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\sqrt{a + t} \cdot \frac{z}{t}\right)}}\\
\mathbf{elif}\;c \leq 2050:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(0.8333333333333334 + a\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if c < -3e-10 or 2050 < c Initial program 91.0%
Taylor expanded in c around inf 81.1%
associate-*r/81.1%
metadata-eval81.1%
+-commutative81.1%
metadata-eval81.1%
associate-/r*81.1%
*-commutative81.1%
associate--l+81.1%
sub-neg81.1%
sub-neg81.1%
*-commutative81.1%
associate-/r*81.1%
metadata-eval81.1%
sub-neg81.1%
distribute-neg-frac81.1%
metadata-eval81.1%
Simplified81.1%
if -3e-10 < c < -2.3000000000000001e-212Initial program 97.8%
Taylor expanded in z around inf 87.1%
if -2.3000000000000001e-212 < c < 2050Initial program 92.1%
Taylor expanded in b around inf 83.5%
*-commutative83.5%
associate-*r/83.5%
metadata-eval83.5%
Simplified83.5%
Final simplification82.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/ x (+ x (* y (exp (* 2.0 (* (- c b) (+ 0.8333333333333334 a)))))))))
(if (<= t -5e-310)
t_1
(if (<= t 9.4e-149)
(/ x (+ x (* y (exp (* 2.0 (* 0.6666666666666666 (/ b t)))))))
(if (<= t 3.1e-117)
1.0
(if (<= t 1.6e-12)
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
b
(- (/ 0.6666666666666666 t) (+ 0.8333333333333334 a))))))))
(if (<= t 0.082) 1.0 t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
double tmp;
if (t <= -5e-310) {
tmp = t_1;
} else if (t <= 9.4e-149) {
tmp = x / (x + (y * exp((2.0 * (0.6666666666666666 * (b / t))))));
} else if (t <= 3.1e-117) {
tmp = 1.0;
} else if (t <= 1.6e-12) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
} else if (t <= 0.082) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * ((c - b) * (0.8333333333333334d0 + a))))))
if (t <= (-5d-310)) then
tmp = t_1
else if (t <= 9.4d-149) then
tmp = x / (x + (y * exp((2.0d0 * (0.6666666666666666d0 * (b / t))))))
else if (t <= 3.1d-117) then
tmp = 1.0d0
else if (t <= 1.6d-12) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (0.8333333333333334d0 + a)))))))
else if (t <= 0.082d0) then
tmp = 1.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
double tmp;
if (t <= -5e-310) {
tmp = t_1;
} else if (t <= 9.4e-149) {
tmp = x / (x + (y * Math.exp((2.0 * (0.6666666666666666 * (b / t))))));
} else if (t <= 3.1e-117) {
tmp = 1.0;
} else if (t <= 1.6e-12) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
} else if (t <= 0.082) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))) tmp = 0 if t <= -5e-310: tmp = t_1 elif t <= 9.4e-149: tmp = x / (x + (y * math.exp((2.0 * (0.6666666666666666 * (b / t)))))) elif t <= 3.1e-117: tmp = 1.0 elif t <= 1.6e-12: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))) elif t <= 0.082: tmp = 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c - b) * Float64(0.8333333333333334 + a))))))) tmp = 0.0 if (t <= -5e-310) tmp = t_1; elseif (t <= 9.4e-149) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(0.6666666666666666 * Float64(b / t))))))); elseif (t <= 3.1e-117) tmp = 1.0; elseif (t <= 1.6e-12) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(0.8333333333333334 + a)))))))); elseif (t <= 0.082) tmp = 1.0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))); tmp = 0.0; if (t <= -5e-310) tmp = t_1; elseif (t <= 9.4e-149) tmp = x / (x + (y * exp((2.0 * (0.6666666666666666 * (b / t)))))); elseif (t <= 3.1e-117) tmp = 1.0; elseif (t <= 1.6e-12) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))); elseif (t <= 0.082) tmp = 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c - b), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-310], t$95$1, If[LessEqual[t, 9.4e-149], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(0.6666666666666666 * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e-117], 1.0, If[LessEqual[t, 1.6e-12], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.082], 1.0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(0.8333333333333334 + a\right)\right)}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 9.4 \cdot 10^{-149}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(0.6666666666666666 \cdot \frac{b}{t}\right)}}\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-117}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-12}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(0.8333333333333334 + a\right)\right)\right)}}\\
\mathbf{elif}\;t \leq 0.082:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.999999999999985e-310 or 0.0820000000000000034 < t Initial program 92.4%
Taylor expanded in t around inf 84.7%
associate-*r*84.7%
neg-mul-184.7%
neg-sub084.7%
associate--r-84.7%
neg-sub084.7%
+-commutative84.7%
sub-neg84.7%
*-commutative84.7%
Simplified84.7%
if -4.999999999999985e-310 < t < 9.4000000000000002e-149Initial program 89.5%
Taylor expanded in b around inf 70.9%
*-commutative70.9%
associate-*r/70.9%
metadata-eval70.9%
Simplified70.9%
Taylor expanded in t around 0 81.1%
if 9.4000000000000002e-149 < t < 3.10000000000000011e-117 or 1.6e-12 < t < 0.0820000000000000034Initial program 94.1%
Taylor expanded in a around inf 43.1%
Taylor expanded in x around inf 88.6%
if 3.10000000000000011e-117 < t < 1.6e-12Initial program 96.7%
Taylor expanded in b around inf 71.0%
*-commutative71.0%
associate-*r/71.0%
metadata-eval71.0%
Simplified71.0%
Final simplification82.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/ x (+ x (* y (exp (* 2.0 (* (- c b) (+ 0.8333333333333334 a)))))))))
(if (<= t -5e-310)
t_1
(if (<= t 6.8e-151)
(/ x (+ x (* y (exp (* 2.0 (* 0.6666666666666666 (/ b t)))))))
(if (<= t 0.058) 1.0 t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
double tmp;
if (t <= -5e-310) {
tmp = t_1;
} else if (t <= 6.8e-151) {
tmp = x / (x + (y * exp((2.0 * (0.6666666666666666 * (b / t))))));
} else if (t <= 0.058) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * ((c - b) * (0.8333333333333334d0 + a))))))
if (t <= (-5d-310)) then
tmp = t_1
else if (t <= 6.8d-151) then
tmp = x / (x + (y * exp((2.0d0 * (0.6666666666666666d0 * (b / t))))))
else if (t <= 0.058d0) then
tmp = 1.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((2.0 * ((c - b) * (0.8333333333333334 + a))))));
double tmp;
if (t <= -5e-310) {
tmp = t_1;
} else if (t <= 6.8e-151) {
tmp = x / (x + (y * Math.exp((2.0 * (0.6666666666666666 * (b / t))))));
} else if (t <= 0.058) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))) tmp = 0 if t <= -5e-310: tmp = t_1 elif t <= 6.8e-151: tmp = x / (x + (y * math.exp((2.0 * (0.6666666666666666 * (b / t)))))) elif t <= 0.058: tmp = 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(c - b) * Float64(0.8333333333333334 + a))))))) tmp = 0.0 if (t <= -5e-310) tmp = t_1; elseif (t <= 6.8e-151) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(0.6666666666666666 * Float64(b / t))))))); elseif (t <= 0.058) tmp = 1.0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * ((c - b) * (0.8333333333333334 + a)))))); tmp = 0.0; if (t <= -5e-310) tmp = t_1; elseif (t <= 6.8e-151) tmp = x / (x + (y * exp((2.0 * (0.6666666666666666 * (b / t)))))); elseif (t <= 0.058) tmp = 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(c - b), $MachinePrecision] * N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-310], t$95$1, If[LessEqual[t, 6.8e-151], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(0.6666666666666666 * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.058], 1.0, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(\left(c - b\right) \cdot \left(0.8333333333333334 + a\right)\right)}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-151}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(0.6666666666666666 \cdot \frac{b}{t}\right)}}\\
\mathbf{elif}\;t \leq 0.058:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.999999999999985e-310 or 0.0580000000000000029 < t Initial program 92.4%
Taylor expanded in t around inf 84.7%
associate-*r*84.7%
neg-mul-184.7%
neg-sub084.7%
associate--r-84.7%
neg-sub084.7%
+-commutative84.7%
sub-neg84.7%
*-commutative84.7%
Simplified84.7%
if -4.999999999999985e-310 < t < 6.8000000000000005e-151Initial program 89.5%
Taylor expanded in b around inf 70.9%
*-commutative70.9%
associate-*r/70.9%
metadata-eval70.9%
Simplified70.9%
Taylor expanded in t around 0 81.1%
if 6.8000000000000005e-151 < t < 0.0580000000000000029Initial program 95.7%
Taylor expanded in a around inf 50.7%
Taylor expanded in x around inf 63.4%
Final simplification80.2%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= c -2.3e+70) (not (<= c 0.00027)))
(/
x
(+
x
(*
y
(exp
(* 2.0 (* c (+ a (+ 0.8333333333333334 (/ -0.6666666666666666 t)))))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* b (- (/ 0.6666666666666666 t) (+ 0.8333333333333334 a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((c <= -2.3e+70) || !(c <= 0.00027)) {
tmp = x / (x + (y * exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t))))))));
} else {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((c <= (-2.3d+70)) .or. (.not. (c <= 0.00027d0))) then
tmp = x / (x + (y * exp((2.0d0 * (c * (a + (0.8333333333333334d0 + ((-0.6666666666666666d0) / t))))))))
else
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) - (0.8333333333333334d0 + a)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((c <= -2.3e+70) || !(c <= 0.00027)) {
tmp = x / (x + (y * Math.exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t))))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (c <= -2.3e+70) or not (c <= 0.00027): tmp = x / (x + (y * math.exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t)))))))) else: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((c <= -2.3e+70) || !(c <= 0.00027)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(0.8333333333333334 + Float64(-0.6666666666666666 / t))))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) - Float64(0.8333333333333334 + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((c <= -2.3e+70) || ~((c <= 0.00027))) tmp = x / (x + (y * exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t)))))))); else tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) - (0.8333333333333334 + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[c, -2.3e+70], N[Not[LessEqual[c, 0.00027]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(0.8333333333333334 + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] - N[(0.8333333333333334 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.3 \cdot 10^{+70} \lor \neg \left(c \leq 0.00027\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(0.8333333333333334 + \frac{-0.6666666666666666}{t}\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} - \left(0.8333333333333334 + a\right)\right)\right)}}\\
\end{array}
\end{array}
if c < -2.29999999999999994e70 or 2.70000000000000003e-4 < c Initial program 91.4%
Taylor expanded in c around inf 83.2%
associate-*r/83.2%
metadata-eval83.2%
+-commutative83.2%
metadata-eval83.2%
associate-/r*83.2%
*-commutative83.2%
associate--l+83.2%
sub-neg83.2%
sub-neg83.2%
*-commutative83.2%
associate-/r*83.2%
metadata-eval83.2%
sub-neg83.2%
distribute-neg-frac83.2%
metadata-eval83.2%
Simplified83.2%
if -2.29999999999999994e70 < c < 2.70000000000000003e-4Initial program 93.6%
Taylor expanded in b around inf 79.0%
*-commutative79.0%
associate-*r/79.0%
metadata-eval79.0%
Simplified79.0%
Final simplification80.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -1.65e-298)
1.0
(if (<= c 1.32e-219)
(/ x (* y (exp (* (/ b t) 1.3333333333333333))))
(if (<= c 2e+94)
1.0
(if (or (<= c 1.65e+212) (not (<= c 1e+242)))
(/ x (* y (exp (* c 1.6666666666666667))))
1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -1.65e-298) {
tmp = 1.0;
} else if (c <= 1.32e-219) {
tmp = x / (y * exp(((b / t) * 1.3333333333333333)));
} else if (c <= 2e+94) {
tmp = 1.0;
} else if ((c <= 1.65e+212) || !(c <= 1e+242)) {
tmp = x / (y * exp((c * 1.6666666666666667)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= (-1.65d-298)) then
tmp = 1.0d0
else if (c <= 1.32d-219) then
tmp = x / (y * exp(((b / t) * 1.3333333333333333d0)))
else if (c <= 2d+94) then
tmp = 1.0d0
else if ((c <= 1.65d+212) .or. (.not. (c <= 1d+242))) then
tmp = x / (y * exp((c * 1.6666666666666667d0)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -1.65e-298) {
tmp = 1.0;
} else if (c <= 1.32e-219) {
tmp = x / (y * Math.exp(((b / t) * 1.3333333333333333)));
} else if (c <= 2e+94) {
tmp = 1.0;
} else if ((c <= 1.65e+212) || !(c <= 1e+242)) {
tmp = x / (y * Math.exp((c * 1.6666666666666667)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -1.65e-298: tmp = 1.0 elif c <= 1.32e-219: tmp = x / (y * math.exp(((b / t) * 1.3333333333333333))) elif c <= 2e+94: tmp = 1.0 elif (c <= 1.65e+212) or not (c <= 1e+242): tmp = x / (y * math.exp((c * 1.6666666666666667))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -1.65e-298) tmp = 1.0; elseif (c <= 1.32e-219) tmp = Float64(x / Float64(y * exp(Float64(Float64(b / t) * 1.3333333333333333)))); elseif (c <= 2e+94) tmp = 1.0; elseif ((c <= 1.65e+212) || !(c <= 1e+242)) tmp = Float64(x / Float64(y * exp(Float64(c * 1.6666666666666667)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -1.65e-298) tmp = 1.0; elseif (c <= 1.32e-219) tmp = x / (y * exp(((b / t) * 1.3333333333333333))); elseif (c <= 2e+94) tmp = 1.0; elseif ((c <= 1.65e+212) || ~((c <= 1e+242))) tmp = x / (y * exp((c * 1.6666666666666667))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -1.65e-298], 1.0, If[LessEqual[c, 1.32e-219], N[(x / N[(y * N[Exp[N[(N[(b / t), $MachinePrecision] * 1.3333333333333333), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2e+94], 1.0, If[Or[LessEqual[c, 1.65e+212], N[Not[LessEqual[c, 1e+242]], $MachinePrecision]], N[(x / N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.65 \cdot 10^{-298}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 1.32 \cdot 10^{-219}:\\
\;\;\;\;\frac{x}{y \cdot e^{\frac{b}{t} \cdot 1.3333333333333333}}\\
\mathbf{elif}\;c \leq 2 \cdot 10^{+94}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 1.65 \cdot 10^{+212} \lor \neg \left(c \leq 10^{+242}\right):\\
\;\;\;\;\frac{x}{y \cdot e^{c \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if c < -1.6500000000000001e-298 or 1.32e-219 < c < 2e94 or 1.65e212 < c < 1.00000000000000005e242Initial program 91.7%
Taylor expanded in a around inf 61.4%
Taylor expanded in x around inf 60.0%
if -1.6500000000000001e-298 < c < 1.32e-219Initial program 93.8%
Taylor expanded in b around inf 87.9%
*-commutative87.9%
associate-*r/87.9%
metadata-eval87.9%
Simplified87.9%
Taylor expanded in t around 0 81.0%
Taylor expanded in x around 0 55.9%
if 2e94 < c < 1.65e212 or 1.00000000000000005e242 < c Initial program 97.1%
Taylor expanded in t around inf 72.3%
associate-*r*72.3%
neg-mul-172.3%
neg-sub072.3%
associate--r-72.3%
neg-sub072.3%
+-commutative72.3%
sub-neg72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in a around 0 69.6%
Taylor expanded in x around 0 69.4%
Taylor expanded in b around 0 77.9%
Final simplification62.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* (- c b) 1.6666666666666667)))))))
(if (<= t -5e-310)
t_1
(if (<= t 6.5e-149)
(/ x (+ x (* y (exp (* 2.0 (* 0.6666666666666666 (/ b t)))))))
(if (<= t 0.047) 1.0 t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
double tmp;
if (t <= -5e-310) {
tmp = t_1;
} else if (t <= 6.5e-149) {
tmp = x / (x + (y * exp((2.0 * (0.6666666666666666 * (b / t))))));
} else if (t <= 0.047) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
if (t <= (-5d-310)) then
tmp = t_1
else if (t <= 6.5d-149) then
tmp = x / (x + (y * exp((2.0d0 * (0.6666666666666666d0 * (b / t))))))
else if (t <= 0.047d0) then
tmp = 1.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
double tmp;
if (t <= -5e-310) {
tmp = t_1;
} else if (t <= 6.5e-149) {
tmp = x / (x + (y * Math.exp((2.0 * (0.6666666666666666 * (b / t))))));
} else if (t <= 0.047) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) tmp = 0 if t <= -5e-310: tmp = t_1 elif t <= 6.5e-149: tmp = x / (x + (y * math.exp((2.0 * (0.6666666666666666 * (b / t)))))) elif t <= 0.047: tmp = 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))) tmp = 0.0 if (t <= -5e-310) tmp = t_1; elseif (t <= 6.5e-149) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(0.6666666666666666 * Float64(b / t))))))); elseif (t <= 0.047) tmp = 1.0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); tmp = 0.0; if (t <= -5e-310) tmp = t_1; elseif (t <= 6.5e-149) tmp = x / (x + (y * exp((2.0 * (0.6666666666666666 * (b / t)))))); elseif (t <= 0.047) tmp = 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-310], t$95$1, If[LessEqual[t, 6.5e-149], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(0.6666666666666666 * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.047], 1.0, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-149}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(0.6666666666666666 \cdot \frac{b}{t}\right)}}\\
\mathbf{elif}\;t \leq 0.047:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.999999999999985e-310 or 0.047 < t Initial program 92.4%
Taylor expanded in t around inf 84.7%
associate-*r*84.7%
neg-mul-184.7%
neg-sub084.7%
associate--r-84.7%
neg-sub084.7%
+-commutative84.7%
sub-neg84.7%
*-commutative84.7%
Simplified84.7%
Taylor expanded in a around 0 76.9%
if -4.999999999999985e-310 < t < 6.50000000000000019e-149Initial program 89.5%
Taylor expanded in b around inf 70.9%
*-commutative70.9%
associate-*r/70.9%
metadata-eval70.9%
Simplified70.9%
Taylor expanded in t around 0 81.1%
if 6.50000000000000019e-149 < t < 0.047Initial program 95.7%
Taylor expanded in a around inf 50.7%
Taylor expanded in x around inf 63.4%
Final simplification75.0%
(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 4.5e-151)
(/ x (+ x (* y (exp (* 2.0 (* 0.6666666666666666 (/ b t)))))))
(if (<= t 0.04)
1.0
(/ x (+ x (* y (exp (* (- c b) 1.6666666666666667)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -5e-310) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 4.5e-151) {
tmp = x / (x + (y * exp((2.0 * (0.6666666666666666 * (b / t))))));
} else if (t <= 0.04) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-5d-310)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 4.5d-151) then
tmp = x / (x + (y * exp((2.0d0 * (0.6666666666666666d0 * (b / t))))))
else if (t <= 0.04d0) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -5e-310) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 4.5e-151) {
tmp = x / (x + (y * Math.exp((2.0 * (0.6666666666666666 * (b / t))))));
} else if (t <= 0.04) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -5e-310: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 4.5e-151: tmp = x / (x + (y * math.exp((2.0 * (0.6666666666666666 * (b / t)))))) elif t <= 0.04: tmp = 1.0 else: tmp = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -5e-310) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 4.5e-151) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(0.6666666666666666 * Float64(b / t))))))); elseif (t <= 0.04) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -5e-310) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 4.5e-151) tmp = x / (x + (y * exp((2.0 * (0.6666666666666666 * (b / t)))))); elseif (t <= 0.04) tmp = 1.0; else tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -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, 4.5e-151], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(0.6666666666666666 * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.04], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-151}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(0.6666666666666666 \cdot \frac{b}{t}\right)}}\\
\mathbf{elif}\;t \leq 0.04:\\
\;\;\;\;1\\
\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 84.7%
Taylor expanded in a around inf 79.3%
if -4.999999999999985e-310 < t < 4.5000000000000002e-151Initial program 89.5%
Taylor expanded in b around inf 70.9%
*-commutative70.9%
associate-*r/70.9%
metadata-eval70.9%
Simplified70.9%
Taylor expanded in t around 0 81.1%
if 4.5000000000000002e-151 < t < 0.0400000000000000008Initial program 95.7%
Taylor expanded in a around inf 50.7%
Taylor expanded in x around inf 63.4%
if 0.0400000000000000008 < t Initial program 97.2%
Taylor expanded in t around inf 87.8%
associate-*r*87.8%
neg-mul-187.8%
neg-sub087.8%
associate--r-87.8%
neg-sub087.8%
+-commutative87.8%
sub-neg87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in a around 0 77.0%
Final simplification75.7%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -3.7e-181) (not (<= t 0.12))) (/ x (+ x (* y (exp (* (- c b) 1.6666666666666667))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -3.7e-181) || !(t <= 0.12)) {
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((t <= (-3.7d-181)) .or. (.not. (t <= 0.12d0))) then
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -3.7e-181) || !(t <= 0.12)) {
tmp = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -3.7e-181) or not (t <= 0.12): tmp = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -3.7e-181) || !(t <= 0.12)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c - b) * 1.6666666666666667))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -3.7e-181) || ~((t <= 0.12))) tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -3.7e-181], N[Not[LessEqual[t, 0.12]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(N[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{-181} \lor \neg \left(t \leq 0.12\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -3.69999999999999984e-181 or 0.12 < t Initial program 96.0%
Taylor expanded in t around inf 86.7%
associate-*r*86.7%
neg-mul-186.7%
neg-sub086.7%
associate--r-86.7%
neg-sub086.7%
+-commutative86.7%
sub-neg86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in a around 0 78.5%
if -3.69999999999999984e-181 < t < 0.12Initial program 87.9%
Taylor expanded in a around inf 45.0%
Taylor expanded in x around inf 60.4%
Final simplification70.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c 5e+95)
1.0
(if (or (<= c 2e+210) (not (<= c 1e+242)))
(/ x (* y (exp (* c 1.6666666666666667))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 5e+95) {
tmp = 1.0;
} else if ((c <= 2e+210) || !(c <= 1e+242)) {
tmp = x / (y * exp((c * 1.6666666666666667)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= 5d+95) then
tmp = 1.0d0
else if ((c <= 2d+210) .or. (.not. (c <= 1d+242))) then
tmp = x / (y * exp((c * 1.6666666666666667d0)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 5e+95) {
tmp = 1.0;
} else if ((c <= 2e+210) || !(c <= 1e+242)) {
tmp = x / (y * Math.exp((c * 1.6666666666666667)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= 5e+95: tmp = 1.0 elif (c <= 2e+210) or not (c <= 1e+242): tmp = x / (y * math.exp((c * 1.6666666666666667))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 5e+95) tmp = 1.0; elseif ((c <= 2e+210) || !(c <= 1e+242)) tmp = Float64(x / Float64(y * exp(Float64(c * 1.6666666666666667)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= 5e+95) tmp = 1.0; elseif ((c <= 2e+210) || ~((c <= 1e+242))) tmp = x / (y * exp((c * 1.6666666666666667))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 5e+95], 1.0, If[Or[LessEqual[c, 2e+210], N[Not[LessEqual[c, 1e+242]], $MachinePrecision]], N[(x / N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 5 \cdot 10^{+95}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 2 \cdot 10^{+210} \lor \neg \left(c \leq 10^{+242}\right):\\
\;\;\;\;\frac{x}{y \cdot e^{c \cdot 1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if c < 5.00000000000000025e95 or 1.99999999999999985e210 < c < 1.00000000000000005e242Initial program 91.9%
Taylor expanded in a around inf 61.5%
Taylor expanded in x around inf 57.6%
if 5.00000000000000025e95 < c < 1.99999999999999985e210 or 1.00000000000000005e242 < c Initial program 97.1%
Taylor expanded in t around inf 72.3%
associate-*r*72.3%
neg-mul-172.3%
neg-sub072.3%
associate--r-72.3%
neg-sub072.3%
+-commutative72.3%
sub-neg72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in a around 0 69.6%
Taylor expanded in x around 0 69.4%
Taylor expanded in b around 0 77.9%
Final simplification60.4%
(FPCore (x y z t a b c) :precision binary64 (if (<= z 1.08e-212) 1.0 (if (<= z 7e+91) (/ x (+ x (* y (+ 1.0 (* 2.0 (* a c)))))) 1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 1.08e-212) {
tmp = 1.0;
} else if (z <= 7e+91) {
tmp = x / (x + (y * (1.0 + (2.0 * (a * c)))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= 1.08d-212) then
tmp = 1.0d0
else if (z <= 7d+91) then
tmp = x / (x + (y * (1.0d0 + (2.0d0 * (a * c)))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 1.08e-212) {
tmp = 1.0;
} else if (z <= 7e+91) {
tmp = x / (x + (y * (1.0 + (2.0 * (a * c)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= 1.08e-212: tmp = 1.0 elif z <= 7e+91: tmp = x / (x + (y * (1.0 + (2.0 * (a * c))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= 1.08e-212) tmp = 1.0; elseif (z <= 7e+91) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 + Float64(2.0 * Float64(a * c)))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (z <= 1.08e-212) tmp = 1.0; elseif (z <= 7e+91) tmp = x / (x + (y * (1.0 + (2.0 * (a * c))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, 1.08e-212], 1.0, If[LessEqual[z, 7e+91], N[(x / N[(x + N[(y * N[(1.0 + N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.08 \cdot 10^{-212}:\\
\;\;\;\;1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+91}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 + 2 \cdot \left(a \cdot c\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if z < 1.08e-212 or 7.00000000000000001e91 < z Initial program 90.8%
Taylor expanded in a around inf 57.5%
Taylor expanded in x around inf 59.1%
if 1.08e-212 < z < 7.00000000000000001e91Initial program 98.4%
Taylor expanded in a around inf 74.0%
Taylor expanded in b around 0 61.5%
Taylor expanded in c around 0 51.6%
Final simplification57.3%
(FPCore (x y z t a b c) :precision binary64 (if (<= z 1.06e-212) 1.0 (if (<= z 6e+91) (/ x (+ x y)) 1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 1.06e-212) {
tmp = 1.0;
} else if (z <= 6e+91) {
tmp = x / (x + y);
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= 1.06d-212) then
tmp = 1.0d0
else if (z <= 6d+91) then
tmp = x / (x + y)
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= 1.06e-212) {
tmp = 1.0;
} else if (z <= 6e+91) {
tmp = x / (x + y);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= 1.06e-212: tmp = 1.0 elif z <= 6e+91: tmp = x / (x + y) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= 1.06e-212) tmp = 1.0; elseif (z <= 6e+91) tmp = Float64(x / Float64(x + y)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (z <= 1.06e-212) tmp = 1.0; elseif (z <= 6e+91) tmp = x / (x + y); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, 1.06e-212], 1.0, If[LessEqual[z, 6e+91], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.06 \cdot 10^{-212}:\\
\;\;\;\;1\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+91}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if z < 1.06000000000000004e-212 or 6.00000000000000012e91 < z Initial program 90.8%
Taylor expanded in a around inf 57.5%
Taylor expanded in x around inf 59.1%
if 1.06000000000000004e-212 < z < 6.00000000000000012e91Initial program 98.4%
Taylor expanded in a around inf 74.0%
Taylor expanded in a around 0 47.9%
Final simplification56.4%
(FPCore (x y z t a b c) :precision binary64 1.0)
double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = 1.0d0
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
def code(x, y, z, t, a, b, c): return 1.0
function code(x, y, z, t, a, b, c) return 1.0 end
function tmp = code(x, y, z, t, a, b, c) tmp = 1.0; end
code[x_, y_, z_, t_, a_, b_, c_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 92.6%
Taylor expanded in a around inf 61.5%
Taylor expanded in x around inf 53.2%
Final simplification53.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* z (sqrt (+ t a)))) (t_2 (- a (/ 5.0 6.0))))
(if (< t -2.118326644891581e-50)
(/
x
(+
x
(* y (exp (* 2.0 (- (+ (* a c) (* 0.8333333333333334 c)) (* a b)))))))
(if (< t 5.196588770651547e-123)
(/
x
(+
x
(*
y
(exp
(*
2.0
(/
(-
(* t_1 (* (* 3.0 t) t_2))
(*
(- (* (+ (/ 5.0 6.0) a) (* 3.0 t)) 2.0)
(* t_2 (* (- b c) t))))
(* (* (* t t) 3.0) t_2)))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ t_1 t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = z * sqrt((t + a));
double t_2 = a - (5.0 / 6.0);
double tmp;
if (t < -2.118326644891581e-50) {
tmp = x / (x + (y * exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b))))));
} else if (t < 5.196588770651547e-123) {
tmp = x / (x + (y * exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * sqrt((t + a))
t_2 = a - (5.0d0 / 6.0d0)
if (t < (-2.118326644891581d-50)) then
tmp = x / (x + (y * exp((2.0d0 * (((a * c) + (0.8333333333333334d0 * c)) - (a * b))))))
else if (t < 5.196588770651547d-123) then
tmp = x / (x + (y * exp((2.0d0 * (((t_1 * ((3.0d0 * t) * t_2)) - (((((5.0d0 / 6.0d0) + a) * (3.0d0 * t)) - 2.0d0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0d0) * t_2))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((t_1 / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = z * Math.sqrt((t + a));
double t_2 = a - (5.0 / 6.0);
double tmp;
if (t < -2.118326644891581e-50) {
tmp = x / (x + (y * Math.exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b))))));
} else if (t < 5.196588770651547e-123) {
tmp = x / (x + (y * Math.exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = z * math.sqrt((t + a)) t_2 = a - (5.0 / 6.0) tmp = 0 if t < -2.118326644891581e-50: tmp = x / (x + (y * math.exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b)))))) elif t < 5.196588770651547e-123: tmp = x / (x + (y * math.exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2)))))) else: tmp = x / (x + (y * math.exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(z * sqrt(Float64(t + a))) t_2 = Float64(a - Float64(5.0 / 6.0)) tmp = 0.0 if (t < -2.118326644891581e-50) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(a * c) + Float64(0.8333333333333334 * c)) - Float64(a * b))))))); elseif (t < 5.196588770651547e-123) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(t_1 * Float64(Float64(3.0 * t) * t_2)) - Float64(Float64(Float64(Float64(Float64(5.0 / 6.0) + a) * Float64(3.0 * t)) - 2.0) * Float64(t_2 * Float64(Float64(b - c) * t)))) / Float64(Float64(Float64(t * t) * 3.0) * t_2))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(t_1 / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = z * sqrt((t + a)); t_2 = a - (5.0 / 6.0); tmp = 0.0; if (t < -2.118326644891581e-50) tmp = x / (x + (y * exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b)))))); elseif (t < 5.196588770651547e-123) tmp = x / (x + (y * exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2)))))); else tmp = x / (x + (y * exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a - N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -2.118326644891581e-50], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(a * c), $MachinePrecision] + N[(0.8333333333333334 * c), $MachinePrecision]), $MachinePrecision] - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[t, 5.196588770651547e-123], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(t$95$1 * N[(N[(3.0 * t), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(N[(5.0 / 6.0), $MachinePrecision] + a), $MachinePrecision] * N[(3.0 * t), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision] * N[(t$95$2 * N[(N[(b - c), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(t * t), $MachinePrecision] * 3.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(t$95$1 / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \sqrt{t + a}\\
t_2 := a - \frac{5}{6}\\
\mathbf{if}\;t < -2.118326644891581 \cdot 10^{-50}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a \cdot c + 0.8333333333333334 \cdot c\right) - a \cdot b\right)}}\\
\mathbf{elif}\;t < 5.196588770651547 \cdot 10^{-123}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{t_1 \cdot \left(\left(3 \cdot t\right) \cdot t_2\right) - \left(\left(\frac{5}{6} + a\right) \cdot \left(3 \cdot t\right) - 2\right) \cdot \left(t_2 \cdot \left(\left(b - c\right) \cdot t\right)\right)}{\left(\left(t \cdot t\right) \cdot 3\right) \cdot t_2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{t_1}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\\
\end{array}
\end{array}
herbie shell --seed 2023279
(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)))))))))))