
(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 22 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 (* (- b c) (- (/ 2.0 (* t 3.0)) (+ a 0.8333333333333334))))
(t_2 (sqrt (+ t a))))
(if (<= (+ (/ (* t_2 z) t) t_1) INFINITY)
(/ x (+ x (* y (pow (exp 2.0) (+ (/ z (/ t t_2)) t_1)))))
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334));
double t_2 = sqrt((t + a));
double tmp;
if ((((t_2 * z) / t) + t_1) <= ((double) INFINITY)) {
tmp = x / (x + (y * pow(exp(2.0), ((z / (t / t_2)) + t_1))));
} else {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334));
double t_2 = Math.sqrt((t + a));
double tmp;
if ((((t_2 * z) / t) + t_1) <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.pow(Math.exp(2.0), ((z / (t / t_2)) + t_1))));
} else {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)) t_2 = math.sqrt((t + a)) tmp = 0 if (((t_2 * z) / t) + t_1) <= math.inf: tmp = x / (x + (y * math.pow(math.exp(2.0), ((z / (t / t_2)) + t_1)))) else: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + 0.8333333333333334))) t_2 = sqrt(Float64(t + a)) tmp = 0.0 if (Float64(Float64(Float64(t_2 * z) / t) + t_1) <= Inf) tmp = Float64(x / Float64(x + Float64(y * (exp(2.0) ^ Float64(Float64(z / Float64(t / t_2)) + t_1))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)); t_2 = sqrt((t + a)); tmp = 0.0; if ((((t_2 * z) / t) + t_1) <= Inf) tmp = x / (x + (y * (exp(2.0) ^ ((z / (t / t_2)) + t_1)))); else tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(t + a), $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[Power[N[Exp[2.0], $MachinePrecision], N[(N[(z / N[(t / t$95$2), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + 0.8333333333333334\right)\right)\\
t_2 := \sqrt{t + a}\\
\mathbf{if}\;\frac{t_2 \cdot z}{t} + t_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{z}{\frac{t}{t_2}} + t_1\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\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%
exp-prod98.8%
associate-/l*99.2%
metadata-eval99.2%
Simplified99.2%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) Initial program 0.0%
Taylor expanded in t around 0 46.3%
Taylor expanded in a around 0 64.8%
Final simplification97.7%
(FPCore (x y z t a b c)
:precision binary64
(/
x
(fma
y
(pow
(exp 2.0)
(fma
(- b c)
(+ (/ 0.6666666666666666 t) (- -0.8333333333333334 a))
(* (sqrt (+ t a)) (/ 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((b - c), ((0.6666666666666666 / t) + (-0.8333333333333334 - a)), (sqrt((t + a)) * (z / t)))), x);
}
function code(x, y, z, t, a, b, c) return Float64(x / fma(y, (exp(2.0) ^ fma(Float64(b - c), Float64(Float64(0.6666666666666666 / t) + Float64(-0.8333333333333334 - a)), Float64(sqrt(Float64(t + a)) * 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[(b - c), $MachinePrecision] * N[(N[(0.6666666666666666 / t), $MachinePrecision] + N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t + a), $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(b - c, \frac{0.6666666666666666}{t} + \left(-0.8333333333333334 - a\right), \sqrt{t + a} \cdot \frac{z}{t}\right)\right)}, x\right)}
\end{array}
Initial program 94.6%
+-commutative94.6%
fma-def94.6%
Simplified96.6%
Final simplification96.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* (sqrt (+ t a)) z) 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 (* 1.3333333333333333 (/ (- b c) t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((sqrt((t + a)) * z) / 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((1.3333333333333333 * ((b - c) / t)))));
}
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((t + a)) * z) / 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((1.3333333333333333 * ((b - c) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((math.sqrt((t + a)) * z) / 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((1.3333333333333333 * ((b - c) / t))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(sqrt(Float64(t + a)) * z) / 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(1.3333333333333333 * Float64(Float64(b - c) / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((sqrt((t + a)) * z) / 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((1.3333333333333333 * ((b - c) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision] * z), $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[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\sqrt{t + a} \cdot z}{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^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 98.8%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) Initial program 0.0%
Taylor expanded in t around 0 46.3%
Taylor expanded in a around 0 64.8%
Final simplification97.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 5e-288)
(/
x
(+
x
(*
y
(exp (* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 5e+70)
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(* z (sqrt (/ 1.0 t)))
(* (- b c) (- (/ 0.6666666666666666 t) 0.8333333333333334))))))))
(/ x (+ x (* y (exp (* 2.0 (* (- b c) (- -0.8333333333333334 a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 5e-288) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 5e+70) {
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 * ((b - c) * (-0.8333333333333334 - a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 5d-288) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 5d+70) 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 * ((b - c) * ((-0.8333333333333334d0) - a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 5e-288) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 5e+70) {
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 * ((b - c) * (-0.8333333333333334 - a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 5e-288: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 5e+70: 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 * ((b - c) * (-0.8333333333333334 - a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 5e-288) 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 <= 5e+70) 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(b - c) * Float64(-0.8333333333333334 - a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 5e-288) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 5e+70) 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 * ((b - c) * (-0.8333333333333334 - a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 5e-288], 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, 5e+70], 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[(b - c), $MachinePrecision] * N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{-288}:\\
\;\;\;\;\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 5 \cdot 10^{+70}:\\
\;\;\;\;\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(b - c\right) \cdot \left(-0.8333333333333334 - a\right)\right)}}\\
\end{array}
\end{array}
if t < 5.00000000000000011e-288Initial program 94.5%
Taylor expanded in t around 0 95.3%
if 5.00000000000000011e-288 < t < 5.0000000000000002e70Initial program 96.0%
Taylor expanded in a around 0 89.1%
*-commutative89.1%
associate-*r/89.1%
metadata-eval89.1%
Simplified89.1%
if 5.0000000000000002e70 < t Initial program 93.0%
Taylor expanded in t around inf 94.3%
mul-1-neg94.3%
distribute-rgt-neg-in94.3%
distribute-neg-in94.3%
metadata-eval94.3%
sub-neg94.3%
Simplified94.3%
Final simplification92.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 3.3e-278)
(/
x
(+
x
(*
y
(exp (* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 1e-31)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(/ x (+ x (* y (exp (* 2.0 (* (- b c) (- -0.8333333333333334 a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 3.3e-278) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1e-31) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 3.3d-278) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 1d-31) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * ((b - c) * ((-0.8333333333333334d0) - a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 3.3e-278) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1e-31) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 3.3e-278: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 1e-31: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 3.3e-278) 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 <= 1e-31) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(b - c) * Float64(-0.8333333333333334 - a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 3.3e-278) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 1e-31) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 3.3e-278], 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, 1e-31], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(b - c), $MachinePrecision] * N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.3 \cdot 10^{-278}:\\
\;\;\;\;\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 10^{-31}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(b - c\right) \cdot \left(-0.8333333333333334 - a\right)\right)}}\\
\end{array}
\end{array}
if t < 3.2999999999999998e-278Initial program 94.7%
Taylor expanded in t around 0 95.4%
if 3.2999999999999998e-278 < t < 1e-31Initial program 94.0%
Taylor expanded in t around 0 71.9%
Taylor expanded in a around 0 82.8%
if 1e-31 < t Initial program 94.8%
Taylor expanded in t around inf 90.7%
mul-1-neg90.7%
distribute-rgt-neg-in90.7%
distribute-neg-in90.7%
metadata-eval90.7%
sub-neg90.7%
Simplified90.7%
Final simplification90.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -1.12e-181)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 7e-32)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(/ x (+ x (* y (exp (* 2.0 (* (- b c) (- -0.8333333333333334 a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.12e-181) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 7e-32) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-1.12d-181)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 7d-32) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * ((b - c) * ((-0.8333333333333334d0) - a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.12e-181) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 7e-32) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.12e-181: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 7e-32: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.12e-181) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 7e-32) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(b - c) * Float64(-0.8333333333333334 - a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -1.12e-181) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 7e-32) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp((2.0 * ((b - c) * (-0.8333333333333334 - a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.12e-181], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-32], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(b - c), $MachinePrecision] * N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.12 \cdot 10^{-181}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(b - c\right) \cdot \left(-0.8333333333333334 - a\right)\right)}}\\
\end{array}
\end{array}
if t < -1.11999999999999997e-181Initial program 95.9%
Taylor expanded in a around inf 84.2%
if -1.11999999999999997e-181 < t < 6.9999999999999997e-32Initial program 93.5%
Taylor expanded in t around 0 79.8%
Taylor expanded in a around 0 81.3%
if 6.9999999999999997e-32 < t Initial program 94.8%
Taylor expanded in t around inf 90.7%
mul-1-neg90.7%
distribute-rgt-neg-in90.7%
distribute-neg-in90.7%
metadata-eval90.7%
sub-neg90.7%
Simplified90.7%
Final simplification86.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -1.16e-181)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 3.8e-31)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(/ x (+ x (* y (exp (* (- b c) -1.6666666666666667))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.16e-181) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 3.8e-31) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp(((b - 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 (t <= (-1.16d-181)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 3.8d-31) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp(((b - 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 (t <= -1.16e-181) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 3.8e-31) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp(((b - c) * -1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.16e-181: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 3.8e-31: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp(((b - c) * -1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.16e-181) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 3.8e-31) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b - c) * -1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -1.16e-181) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 3.8e-31) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp(((b - c) * -1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.16e-181], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e-31], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(N[(b - c), $MachinePrecision] * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.16 \cdot 10^{-181}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-31}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(b - c\right) \cdot -1.6666666666666667}}\\
\end{array}
\end{array}
if t < -1.15999999999999995e-181Initial program 95.9%
Taylor expanded in a around inf 84.2%
if -1.15999999999999995e-181 < t < 3.8e-31Initial program 93.5%
Taylor expanded in t around 0 79.8%
Taylor expanded in a around 0 81.3%
if 3.8e-31 < t Initial program 94.8%
Taylor expanded in t around inf 90.7%
mul-1-neg90.7%
distribute-rgt-neg-in90.7%
distribute-neg-in90.7%
metadata-eval90.7%
sub-neg90.7%
Simplified90.7%
Taylor expanded in a around 0 80.5%
*-commutative80.5%
Simplified80.5%
Final simplification81.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- a (/ 0.6666666666666666 t)))
(t_2 (/ x (+ x (* y (exp (* b -1.6666666666666667)))))))
(if (<= t -3.5e-155)
t_2
(if (<= t -1.05e-298)
(/
x
(+
x
(+
y
(*
2.0
(*
(* y c)
(/
(- 0.6944444444444444 (* t_1 t_1))
(+ 0.8333333333333334 (- (/ 0.6666666666666666 t) a))))))))
(if (<= t 8e-30) 1.0 t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a - (0.6666666666666666 / t);
double t_2 = x / (x + (y * exp((b * -1.6666666666666667))));
double tmp;
if (t <= -3.5e-155) {
tmp = t_2;
} else if (t <= -1.05e-298) {
tmp = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a)))))));
} else if (t <= 8e-30) {
tmp = 1.0;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a - (0.6666666666666666d0 / t)
t_2 = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
if (t <= (-3.5d-155)) then
tmp = t_2
else if (t <= (-1.05d-298)) then
tmp = x / (x + (y + (2.0d0 * ((y * c) * ((0.6944444444444444d0 - (t_1 * t_1)) / (0.8333333333333334d0 + ((0.6666666666666666d0 / t) - a)))))))
else if (t <= 8d-30) then
tmp = 1.0d0
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a - (0.6666666666666666 / t);
double t_2 = x / (x + (y * Math.exp((b * -1.6666666666666667))));
double tmp;
if (t <= -3.5e-155) {
tmp = t_2;
} else if (t <= -1.05e-298) {
tmp = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a)))))));
} else if (t <= 8e-30) {
tmp = 1.0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = a - (0.6666666666666666 / t) t_2 = x / (x + (y * math.exp((b * -1.6666666666666667)))) tmp = 0 if t <= -3.5e-155: tmp = t_2 elif t <= -1.05e-298: tmp = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a))))))) elif t <= 8e-30: tmp = 1.0 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(a - Float64(0.6666666666666666 / t)) t_2 = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))) tmp = 0.0 if (t <= -3.5e-155) tmp = t_2; elseif (t <= -1.05e-298) tmp = Float64(x / Float64(x + Float64(y + Float64(2.0 * Float64(Float64(y * c) * Float64(Float64(0.6944444444444444 - Float64(t_1 * t_1)) / Float64(0.8333333333333334 + Float64(Float64(0.6666666666666666 / t) - a)))))))); elseif (t <= 8e-30) tmp = 1.0; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = a - (0.6666666666666666 / t); t_2 = x / (x + (y * exp((b * -1.6666666666666667)))); tmp = 0.0; if (t <= -3.5e-155) tmp = t_2; elseif (t <= -1.05e-298) tmp = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a))))))); elseif (t <= 8e-30) tmp = 1.0; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e-155], t$95$2, If[LessEqual[t, -1.05e-298], N[(x / N[(x + N[(y + N[(2.0 * N[(N[(y * c), $MachinePrecision] * N[(N[(0.6944444444444444 - N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(0.8333333333333334 + N[(N[(0.6666666666666666 / t), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-30], 1.0, t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a - \frac{0.6666666666666666}{t}\\
t_2 := \frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{-155}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-298}:\\
\;\;\;\;\frac{x}{x + \left(y + 2 \cdot \left(\left(y \cdot c\right) \cdot \frac{0.6944444444444444 - t_1 \cdot t_1}{0.8333333333333334 + \left(\frac{0.6666666666666666}{t} - a\right)}\right)\right)}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-30}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -3.50000000000000015e-155 or 8.000000000000001e-30 < t Initial program 95.6%
Taylor expanded in t around inf 89.5%
mul-1-neg89.5%
distribute-rgt-neg-in89.5%
distribute-neg-in89.5%
metadata-eval89.5%
sub-neg89.5%
Simplified89.5%
Taylor expanded in a around 0 80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in b around inf 61.5%
*-commutative61.5%
Simplified61.5%
if -3.50000000000000015e-155 < t < -1.05000000000000002e-298Initial program 91.7%
Taylor expanded in c around inf 59.9%
+-commutative59.9%
associate-*r/59.9%
metadata-eval59.9%
associate--l+59.9%
Simplified59.9%
Taylor expanded in c around 0 56.1%
associate-*r*48.2%
associate--l+48.2%
associate-*r/48.2%
metadata-eval48.2%
Simplified48.2%
flip-+79.7%
metadata-eval79.7%
Applied egg-rr79.7%
if -1.05000000000000002e-298 < t < 8.000000000000001e-30Initial program 93.4%
Taylor expanded in c around inf 70.9%
+-commutative70.9%
associate-*r/70.9%
metadata-eval70.9%
associate--l+70.9%
Simplified70.9%
Taylor expanded in c around 0 36.2%
Taylor expanded in x around inf 59.2%
Final simplification62.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- a (/ 0.6666666666666666 t))))
(if (<= t -4.5e-157)
(/ x (+ x (* y (exp (* b -1.6666666666666667)))))
(if (<= t -1e-298)
(/
x
(+
x
(+
y
(*
2.0
(*
(* y c)
(/
(- 0.6944444444444444 (* t_1 t_1))
(+ 0.8333333333333334 (- (/ 0.6666666666666666 t) a))))))))
(if (<= t 1.1e-151)
1.0
(/ x (+ x (* y (exp (* c 1.6666666666666667))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a - (0.6666666666666666 / t);
double tmp;
if (t <= -4.5e-157) {
tmp = x / (x + (y * exp((b * -1.6666666666666667))));
} else if (t <= -1e-298) {
tmp = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a)))))));
} else if (t <= 1.1e-151) {
tmp = 1.0;
} 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) :: t_1
real(8) :: tmp
t_1 = a - (0.6666666666666666d0 / t)
if (t <= (-4.5d-157)) then
tmp = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
else if (t <= (-1d-298)) then
tmp = x / (x + (y + (2.0d0 * ((y * c) * ((0.6944444444444444d0 - (t_1 * t_1)) / (0.8333333333333334d0 + ((0.6666666666666666d0 / t) - a)))))))
else if (t <= 1.1d-151) then
tmp = 1.0d0
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 t_1 = a - (0.6666666666666666 / t);
double tmp;
if (t <= -4.5e-157) {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
} else if (t <= -1e-298) {
tmp = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a)))))));
} else if (t <= 1.1e-151) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = a - (0.6666666666666666 / t) tmp = 0 if t <= -4.5e-157: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) elif t <= -1e-298: tmp = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a))))))) elif t <= 1.1e-151: tmp = 1.0 else: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(a - Float64(0.6666666666666666 / t)) tmp = 0.0 if (t <= -4.5e-157) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); elseif (t <= -1e-298) tmp = Float64(x / Float64(x + Float64(y + Float64(2.0 * Float64(Float64(y * c) * Float64(Float64(0.6944444444444444 - Float64(t_1 * t_1)) / Float64(0.8333333333333334 + Float64(Float64(0.6666666666666666 / t) - a)))))))); elseif (t <= 1.1e-151) tmp = 1.0; 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) t_1 = a - (0.6666666666666666 / t); tmp = 0.0; if (t <= -4.5e-157) tmp = x / (x + (y * exp((b * -1.6666666666666667)))); elseif (t <= -1e-298) tmp = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a))))))); elseif (t <= 1.1e-151) tmp = 1.0; else tmp = x / (x + (y * exp((c * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.5e-157], N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1e-298], N[(x / N[(x + N[(y + N[(2.0 * N[(N[(y * c), $MachinePrecision] * N[(N[(0.6944444444444444 - N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(0.8333333333333334 + N[(N[(0.6666666666666666 / t), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e-151], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a - \frac{0.6666666666666666}{t}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{-157}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-298}:\\
\;\;\;\;\frac{x}{x + \left(y + 2 \cdot \left(\left(y \cdot c\right) \cdot \frac{0.6944444444444444 - t_1 \cdot t_1}{0.8333333333333334 + \left(\frac{0.6666666666666666}{t} - a\right)}\right)\right)}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-151}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if t < -4.49999999999999999e-157Initial program 97.7%
Taylor expanded in t around inf 86.5%
mul-1-neg86.5%
distribute-rgt-neg-in86.5%
distribute-neg-in86.5%
metadata-eval86.5%
sub-neg86.5%
Simplified86.5%
Taylor expanded in a around 0 80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in b around inf 65.1%
*-commutative65.1%
Simplified65.1%
if -4.49999999999999999e-157 < t < -9.99999999999999912e-299Initial program 91.7%
Taylor expanded in c around inf 59.9%
+-commutative59.9%
associate-*r/59.9%
metadata-eval59.9%
associate--l+59.9%
Simplified59.9%
Taylor expanded in c around 0 56.1%
associate-*r*48.2%
associate--l+48.2%
associate-*r/48.2%
metadata-eval48.2%
Simplified48.2%
flip-+79.7%
metadata-eval79.7%
Applied egg-rr79.7%
if -9.99999999999999912e-299 < t < 1.1e-151Initial program 88.6%
Taylor expanded in c around inf 80.3%
+-commutative80.3%
associate-*r/80.3%
metadata-eval80.3%
associate--l+80.3%
Simplified80.3%
Taylor expanded in c around 0 35.5%
Taylor expanded in x around inf 62.6%
if 1.1e-151 < t Initial program 95.9%
Taylor expanded in t around inf 79.4%
mul-1-neg79.4%
distribute-rgt-neg-in79.4%
distribute-neg-in79.4%
metadata-eval79.4%
sub-neg79.4%
Simplified79.4%
Taylor expanded in a around 0 70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in b around 0 63.1%
*-commutative63.1%
Simplified63.1%
Final simplification64.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- a (/ 0.6666666666666666 t))))
(if (<= t -5e-155)
(/ x (+ x (* y (exp (* a (* b -2.0))))))
(if (<= t -1.15e-298)
(/
x
(+
x
(+
y
(*
2.0
(*
(* y c)
(/
(- 0.6944444444444444 (* t_1 t_1))
(+ 0.8333333333333334 (- (/ 0.6666666666666666 t) a))))))))
(if (<= t 6.3e-153)
1.0
(/ x (+ x (* y (exp (* c 1.6666666666666667))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a - (0.6666666666666666 / t);
double tmp;
if (t <= -5e-155) {
tmp = x / (x + (y * exp((a * (b * -2.0)))));
} else if (t <= -1.15e-298) {
tmp = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a)))))));
} else if (t <= 6.3e-153) {
tmp = 1.0;
} 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) :: t_1
real(8) :: tmp
t_1 = a - (0.6666666666666666d0 / t)
if (t <= (-5d-155)) then
tmp = x / (x + (y * exp((a * (b * (-2.0d0))))))
else if (t <= (-1.15d-298)) then
tmp = x / (x + (y + (2.0d0 * ((y * c) * ((0.6944444444444444d0 - (t_1 * t_1)) / (0.8333333333333334d0 + ((0.6666666666666666d0 / t) - a)))))))
else if (t <= 6.3d-153) then
tmp = 1.0d0
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 t_1 = a - (0.6666666666666666 / t);
double tmp;
if (t <= -5e-155) {
tmp = x / (x + (y * Math.exp((a * (b * -2.0)))));
} else if (t <= -1.15e-298) {
tmp = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a)))))));
} else if (t <= 6.3e-153) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = a - (0.6666666666666666 / t) tmp = 0 if t <= -5e-155: tmp = x / (x + (y * math.exp((a * (b * -2.0))))) elif t <= -1.15e-298: tmp = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a))))))) elif t <= 6.3e-153: tmp = 1.0 else: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(a - Float64(0.6666666666666666 / t)) tmp = 0.0 if (t <= -5e-155) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(a * Float64(b * -2.0)))))); elseif (t <= -1.15e-298) tmp = Float64(x / Float64(x + Float64(y + Float64(2.0 * Float64(Float64(y * c) * Float64(Float64(0.6944444444444444 - Float64(t_1 * t_1)) / Float64(0.8333333333333334 + Float64(Float64(0.6666666666666666 / t) - a)))))))); elseif (t <= 6.3e-153) tmp = 1.0; 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) t_1 = a - (0.6666666666666666 / t); tmp = 0.0; if (t <= -5e-155) tmp = x / (x + (y * exp((a * (b * -2.0))))); elseif (t <= -1.15e-298) tmp = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a))))))); elseif (t <= 6.3e-153) tmp = 1.0; else tmp = x / (x + (y * exp((c * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-155], N[(x / N[(x + N[(y * N[Exp[N[(a * N[(b * -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.15e-298], N[(x / N[(x + N[(y + N[(2.0 * N[(N[(y * c), $MachinePrecision] * N[(N[(0.6944444444444444 - N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(0.8333333333333334 + N[(N[(0.6666666666666666 / t), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.3e-153], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a - \frac{0.6666666666666666}{t}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-155}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{a \cdot \left(b \cdot -2\right)}}\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-298}:\\
\;\;\;\;\frac{x}{x + \left(y + 2 \cdot \left(\left(y \cdot c\right) \cdot \frac{0.6944444444444444 - t_1 \cdot t_1}{0.8333333333333334 + \left(\frac{0.6666666666666666}{t} - a\right)}\right)\right)}\\
\mathbf{elif}\;t \leq 6.3 \cdot 10^{-153}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if t < -4.9999999999999999e-155Initial program 97.7%
Taylor expanded in a around inf 86.5%
Taylor expanded in c around 0 69.2%
*-commutative69.2%
associate-*l*69.2%
Simplified69.2%
if -4.9999999999999999e-155 < t < -1.15e-298Initial program 91.7%
Taylor expanded in c around inf 59.9%
+-commutative59.9%
associate-*r/59.9%
metadata-eval59.9%
associate--l+59.9%
Simplified59.9%
Taylor expanded in c around 0 56.1%
associate-*r*48.2%
associate--l+48.2%
associate-*r/48.2%
metadata-eval48.2%
Simplified48.2%
flip-+79.7%
metadata-eval79.7%
Applied egg-rr79.7%
if -1.15e-298 < t < 6.3000000000000004e-153Initial program 88.6%
Taylor expanded in c around inf 80.3%
+-commutative80.3%
associate-*r/80.3%
metadata-eval80.3%
associate--l+80.3%
Simplified80.3%
Taylor expanded in c around 0 35.5%
Taylor expanded in x around inf 62.6%
if 6.3000000000000004e-153 < t Initial program 95.9%
Taylor expanded in t around inf 79.4%
mul-1-neg79.4%
distribute-rgt-neg-in79.4%
distribute-neg-in79.4%
metadata-eval79.4%
sub-neg79.4%
Simplified79.4%
Taylor expanded in a around 0 70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in b around 0 63.1%
*-commutative63.1%
Simplified63.1%
Final simplification65.6%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t 6e-308) (not (<= t 5e-32))) (/ x (+ x (* y (exp (* (- b c) -1.6666666666666667))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= 6e-308) || !(t <= 5e-32)) {
tmp = x / (x + (y * exp(((b - 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 ((t <= 6d-308) .or. (.not. (t <= 5d-32))) then
tmp = x / (x + (y * exp(((b - 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 ((t <= 6e-308) || !(t <= 5e-32)) {
tmp = x / (x + (y * Math.exp(((b - c) * -1.6666666666666667))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= 6e-308) or not (t <= 5e-32): tmp = x / (x + (y * math.exp(((b - c) * -1.6666666666666667)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= 6e-308) || !(t <= 5e-32)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b - 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 ((t <= 6e-308) || ~((t <= 5e-32))) tmp = x / (x + (y * exp(((b - c) * -1.6666666666666667)))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, 6e-308], N[Not[LessEqual[t, 5e-32]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(N[(b - c), $MachinePrecision] * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6 \cdot 10^{-308} \lor \neg \left(t \leq 5 \cdot 10^{-32}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(b - c\right) \cdot -1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < 6.00000000000000044e-308 or 5e-32 < t Initial program 94.6%
Taylor expanded in t around inf 85.9%
mul-1-neg85.9%
distribute-rgt-neg-in85.9%
distribute-neg-in85.9%
metadata-eval85.9%
sub-neg85.9%
Simplified85.9%
Taylor expanded in a around 0 78.3%
*-commutative78.3%
Simplified78.3%
if 6.00000000000000044e-308 < t < 5e-32Initial program 94.4%
Taylor expanded in c around inf 70.2%
+-commutative70.2%
associate-*r/70.2%
metadata-eval70.2%
associate--l+70.2%
Simplified70.2%
Taylor expanded in c around 0 38.4%
Taylor expanded in x around inf 59.1%
Final simplification72.9%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -5e-306) (not (<= t 1e-31))) (/ x (+ x (* y (exp (* (- b c) -1.6666666666666667))))) (/ x (+ x (* y (exp (* 1.3333333333333333 (/ b t))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -5e-306) || !(t <= 1e-31)) {
tmp = x / (x + (y * exp(((b - c) * -1.6666666666666667))));
} else {
tmp = x / (x + (y * exp((1.3333333333333333 * (b / 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 <= (-5d-306)) .or. (.not. (t <= 1d-31))) then
tmp = x / (x + (y * exp(((b - c) * (-1.6666666666666667d0)))))
else
tmp = x / (x + (y * exp((1.3333333333333333d0 * (b / 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 <= -5e-306) || !(t <= 1e-31)) {
tmp = x / (x + (y * Math.exp(((b - c) * -1.6666666666666667))));
} else {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * (b / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -5e-306) or not (t <= 1e-31): tmp = x / (x + (y * math.exp(((b - c) * -1.6666666666666667)))) else: tmp = x / (x + (y * math.exp((1.3333333333333333 * (b / t))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -5e-306) || !(t <= 1e-31)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b - c) * -1.6666666666666667))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(b / t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -5e-306) || ~((t <= 1e-31))) tmp = x / (x + (y * exp(((b - c) * -1.6666666666666667)))); else tmp = x / (x + (y * exp((1.3333333333333333 * (b / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -5e-306], N[Not[LessEqual[t, 1e-31]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(N[(b - c), $MachinePrecision] * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(b / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-306} \lor \neg \left(t \leq 10^{-31}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(b - c\right) \cdot -1.6666666666666667}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b}{t}}}\\
\end{array}
\end{array}
if t < -4.99999999999999998e-306 or 1e-31 < t Initial program 95.1%
Taylor expanded in t around inf 86.8%
mul-1-neg86.8%
distribute-rgt-neg-in86.8%
distribute-neg-in86.8%
metadata-eval86.8%
sub-neg86.8%
Simplified86.8%
Taylor expanded in a around 0 79.1%
*-commutative79.1%
Simplified79.1%
if -4.99999999999999998e-306 < t < 1e-31Initial program 93.2%
Taylor expanded in t around 0 74.2%
Taylor expanded in a around 0 81.5%
Taylor expanded in c around 0 71.0%
Final simplification76.8%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 1.95e-31) (/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t)))))) (/ x (+ x (* y (exp (* (- b c) -1.6666666666666667)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.95e-31) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp(((b - 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 (t <= 1.95d-31) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp(((b - 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 (t <= 1.95e-31) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp(((b - c) * -1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 1.95e-31: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp(((b - c) * -1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 1.95e-31) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b - c) * -1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 1.95e-31) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp(((b - c) * -1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 1.95e-31], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(N[(b - c), $MachinePrecision] * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.95 \cdot 10^{-31}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(b - c\right) \cdot -1.6666666666666667}}\\
\end{array}
\end{array}
if t < 1.9500000000000001e-31Initial program 94.4%
Taylor expanded in t around 0 84.3%
Taylor expanded in a around 0 79.2%
if 1.9500000000000001e-31 < t Initial program 94.8%
Taylor expanded in t around inf 90.7%
mul-1-neg90.7%
distribute-rgt-neg-in90.7%
distribute-neg-in90.7%
metadata-eval90.7%
sub-neg90.7%
Simplified90.7%
Taylor expanded in a around 0 80.5%
*-commutative80.5%
Simplified80.5%
Final simplification79.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- a (/ 0.6666666666666666 t)))
(t_2
(/
x
(+
x
(+
y
(*
2.0
(*
(* y c)
(/
(- 0.6944444444444444 (* t_1 t_1))
(+ 0.8333333333333334 (- (/ 0.6666666666666666 t) a))))))))))
(if (<= (- b c) -1e+68)
(/ x (+ x (* y (- 1.0 (* 2.0 (* (- b c) a))))))
(if (<= (- b c) 1e-158)
t_2
(if (<= (- b c) 4e-85)
1.0
(if (<= (- b c) 1e+24)
t_2
(if (<= (- b c) 2e+160)
1.0
(if (<= (- b c) 2e+236)
(/ x (- x (* y (- -1.0 (* 1.3333333333333333 (/ (- b c) t))))))
1.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a - (0.6666666666666666 / t);
double t_2 = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a)))))));
double tmp;
if ((b - c) <= -1e+68) {
tmp = x / (x + (y * (1.0 - (2.0 * ((b - c) * a)))));
} else if ((b - c) <= 1e-158) {
tmp = t_2;
} else if ((b - c) <= 4e-85) {
tmp = 1.0;
} else if ((b - c) <= 1e+24) {
tmp = t_2;
} else if ((b - c) <= 2e+160) {
tmp = 1.0;
} else if ((b - c) <= 2e+236) {
tmp = x / (x - (y * (-1.0 - (1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a - (0.6666666666666666d0 / t)
t_2 = x / (x + (y + (2.0d0 * ((y * c) * ((0.6944444444444444d0 - (t_1 * t_1)) / (0.8333333333333334d0 + ((0.6666666666666666d0 / t) - a)))))))
if ((b - c) <= (-1d+68)) then
tmp = x / (x + (y * (1.0d0 - (2.0d0 * ((b - c) * a)))))
else if ((b - c) <= 1d-158) then
tmp = t_2
else if ((b - c) <= 4d-85) then
tmp = 1.0d0
else if ((b - c) <= 1d+24) then
tmp = t_2
else if ((b - c) <= 2d+160) then
tmp = 1.0d0
else if ((b - c) <= 2d+236) then
tmp = x / (x - (y * ((-1.0d0) - (1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a - (0.6666666666666666 / t);
double t_2 = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a)))))));
double tmp;
if ((b - c) <= -1e+68) {
tmp = x / (x + (y * (1.0 - (2.0 * ((b - c) * a)))));
} else if ((b - c) <= 1e-158) {
tmp = t_2;
} else if ((b - c) <= 4e-85) {
tmp = 1.0;
} else if ((b - c) <= 1e+24) {
tmp = t_2;
} else if ((b - c) <= 2e+160) {
tmp = 1.0;
} else if ((b - c) <= 2e+236) {
tmp = x / (x - (y * (-1.0 - (1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = a - (0.6666666666666666 / t) t_2 = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a))))))) tmp = 0 if (b - c) <= -1e+68: tmp = x / (x + (y * (1.0 - (2.0 * ((b - c) * a))))) elif (b - c) <= 1e-158: tmp = t_2 elif (b - c) <= 4e-85: tmp = 1.0 elif (b - c) <= 1e+24: tmp = t_2 elif (b - c) <= 2e+160: tmp = 1.0 elif (b - c) <= 2e+236: tmp = x / (x - (y * (-1.0 - (1.3333333333333333 * ((b - c) / t))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(a - Float64(0.6666666666666666 / t)) t_2 = Float64(x / Float64(x + Float64(y + Float64(2.0 * Float64(Float64(y * c) * Float64(Float64(0.6944444444444444 - Float64(t_1 * t_1)) / Float64(0.8333333333333334 + Float64(Float64(0.6666666666666666 / t) - a)))))))) tmp = 0.0 if (Float64(b - c) <= -1e+68) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 - Float64(2.0 * Float64(Float64(b - c) * a)))))); elseif (Float64(b - c) <= 1e-158) tmp = t_2; elseif (Float64(b - c) <= 4e-85) tmp = 1.0; elseif (Float64(b - c) <= 1e+24) tmp = t_2; elseif (Float64(b - c) <= 2e+160) tmp = 1.0; elseif (Float64(b - c) <= 2e+236) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = a - (0.6666666666666666 / t); t_2 = x / (x + (y + (2.0 * ((y * c) * ((0.6944444444444444 - (t_1 * t_1)) / (0.8333333333333334 + ((0.6666666666666666 / t) - a))))))); tmp = 0.0; if ((b - c) <= -1e+68) tmp = x / (x + (y * (1.0 - (2.0 * ((b - c) * a))))); elseif ((b - c) <= 1e-158) tmp = t_2; elseif ((b - c) <= 4e-85) tmp = 1.0; elseif ((b - c) <= 1e+24) tmp = t_2; elseif ((b - c) <= 2e+160) tmp = 1.0; elseif ((b - c) <= 2e+236) tmp = x / (x - (y * (-1.0 - (1.3333333333333333 * ((b - c) / t))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(x + N[(y + N[(2.0 * N[(N[(y * c), $MachinePrecision] * N[(N[(0.6944444444444444 - N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(0.8333333333333334 + N[(N[(0.6666666666666666 / t), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - c), $MachinePrecision], -1e+68], N[(x / N[(x + N[(y * N[(1.0 - N[(2.0 * N[(N[(b - c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - c), $MachinePrecision], 1e-158], t$95$2, If[LessEqual[N[(b - c), $MachinePrecision], 4e-85], 1.0, If[LessEqual[N[(b - c), $MachinePrecision], 1e+24], t$95$2, If[LessEqual[N[(b - c), $MachinePrecision], 2e+160], 1.0, If[LessEqual[N[(b - c), $MachinePrecision], 2e+236], N[(x / N[(x - N[(y * N[(-1.0 - N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a - \frac{0.6666666666666666}{t}\\
t_2 := \frac{x}{x + \left(y + 2 \cdot \left(\left(y \cdot c\right) \cdot \frac{0.6944444444444444 - t_1 \cdot t_1}{0.8333333333333334 + \left(\frac{0.6666666666666666}{t} - a\right)}\right)\right)}\\
\mathbf{if}\;b - c \leq -1 \cdot 10^{+68}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 - 2 \cdot \left(\left(b - c\right) \cdot a\right)\right)}\\
\mathbf{elif}\;b - c \leq 10^{-158}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b - c \leq 4 \cdot 10^{-85}:\\
\;\;\;\;1\\
\mathbf{elif}\;b - c \leq 10^{+24}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b - c \leq 2 \cdot 10^{+160}:\\
\;\;\;\;1\\
\mathbf{elif}\;b - c \leq 2 \cdot 10^{+236}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - 1.3333333333333333 \cdot \frac{b - c}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 b c) < -9.99999999999999953e67Initial program 91.2%
Taylor expanded in a around inf 66.7%
Taylor expanded in a around 0 55.2%
if -9.99999999999999953e67 < (-.f64 b c) < 1.00000000000000006e-158 or 3.9999999999999999e-85 < (-.f64 b c) < 9.9999999999999998e23Initial program 98.6%
Taylor expanded in c around inf 61.0%
+-commutative61.0%
associate-*r/61.0%
metadata-eval61.0%
associate--l+61.0%
Simplified61.0%
Taylor expanded in c around 0 43.0%
associate-*r*39.7%
associate--l+39.7%
associate-*r/39.7%
metadata-eval39.7%
Simplified39.7%
flip-+59.5%
metadata-eval59.5%
Applied egg-rr59.5%
if 1.00000000000000006e-158 < (-.f64 b c) < 3.9999999999999999e-85 or 9.9999999999999998e23 < (-.f64 b c) < 2.00000000000000001e160 or 2.00000000000000011e236 < (-.f64 b c) Initial program 97.0%
Taylor expanded in c around inf 69.7%
+-commutative69.7%
associate-*r/69.7%
metadata-eval69.7%
associate--l+69.7%
Simplified69.7%
Taylor expanded in c around 0 45.7%
Taylor expanded in x around inf 80.6%
if 2.00000000000000001e160 < (-.f64 b c) < 2.00000000000000011e236Initial program 88.9%
Taylor expanded in t around 0 66.9%
Taylor expanded in a around 0 67.7%
Taylor expanded in t around inf 61.0%
Final simplification63.5%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (- b c) -1e-114)
(/ x (- x (* y (- -1.0 (* -2.0 (* b a))))))
(if (<= (- b c) 2e+160)
1.0
(if (<= (- b c) 2e+236)
(/ x (- x (* y (- -1.0 (* 1.3333333333333333 (/ (- b c) t))))))
1.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -1e-114) {
tmp = x / (x - (y * (-1.0 - (-2.0 * (b * a)))));
} else if ((b - c) <= 2e+160) {
tmp = 1.0;
} else if ((b - c) <= 2e+236) {
tmp = x / (x - (y * (-1.0 - (1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b - c) <= (-1d-114)) then
tmp = x / (x - (y * ((-1.0d0) - ((-2.0d0) * (b * a)))))
else if ((b - c) <= 2d+160) then
tmp = 1.0d0
else if ((b - c) <= 2d+236) then
tmp = x / (x - (y * ((-1.0d0) - (1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -1e-114) {
tmp = x / (x - (y * (-1.0 - (-2.0 * (b * a)))));
} else if ((b - c) <= 2e+160) {
tmp = 1.0;
} else if ((b - c) <= 2e+236) {
tmp = x / (x - (y * (-1.0 - (1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b - c) <= -1e-114: tmp = x / (x - (y * (-1.0 - (-2.0 * (b * a))))) elif (b - c) <= 2e+160: tmp = 1.0 elif (b - c) <= 2e+236: tmp = x / (x - (y * (-1.0 - (1.3333333333333333 * ((b - c) / t))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b - c) <= -1e-114) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(-2.0 * Float64(b * a)))))); elseif (Float64(b - c) <= 2e+160) tmp = 1.0; elseif (Float64(b - c) <= 2e+236) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b - c) <= -1e-114) tmp = x / (x - (y * (-1.0 - (-2.0 * (b * a))))); elseif ((b - c) <= 2e+160) tmp = 1.0; elseif ((b - c) <= 2e+236) tmp = x / (x - (y * (-1.0 - (1.3333333333333333 * ((b - c) / t))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b - c), $MachinePrecision], -1e-114], N[(x / N[(x - N[(y * N[(-1.0 - N[(-2.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - c), $MachinePrecision], 2e+160], 1.0, If[LessEqual[N[(b - c), $MachinePrecision], 2e+236], N[(x / N[(x - N[(y * N[(-1.0 - N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - c \leq -1 \cdot 10^{-114}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - -2 \cdot \left(b \cdot a\right)\right)}\\
\mathbf{elif}\;b - c \leq 2 \cdot 10^{+160}:\\
\;\;\;\;1\\
\mathbf{elif}\;b - c \leq 2 \cdot 10^{+236}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - 1.3333333333333333 \cdot \frac{b - c}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 b c) < -1.0000000000000001e-114Initial program 93.0%
Taylor expanded in a around inf 67.7%
Taylor expanded in c around 0 56.1%
*-commutative56.1%
associate-*l*56.1%
Simplified56.1%
Taylor expanded in a around 0 47.9%
*-commutative47.9%
Simplified47.9%
if -1.0000000000000001e-114 < (-.f64 b c) < 2.00000000000000001e160 or 2.00000000000000011e236 < (-.f64 b c) Initial program 98.1%
Taylor expanded in c around inf 63.0%
+-commutative63.0%
associate-*r/63.0%
metadata-eval63.0%
associate--l+63.0%
Simplified63.0%
Taylor expanded in c around 0 41.4%
Taylor expanded in x around inf 64.0%
if 2.00000000000000001e160 < (-.f64 b c) < 2.00000000000000011e236Initial program 88.9%
Taylor expanded in t around 0 66.9%
Taylor expanded in a around 0 67.7%
Taylor expanded in t around inf 61.0%
Final simplification55.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (- b c) -1e-114)
(/ x (+ x (* y (- 1.0 (* 2.0 (* (- b c) a))))))
(if (<= (- b c) 2e+160)
1.0
(if (<= (- b c) 2e+236)
(/ x (- x (* y (- -1.0 (* 1.3333333333333333 (/ (- b c) t))))))
1.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -1e-114) {
tmp = x / (x + (y * (1.0 - (2.0 * ((b - c) * a)))));
} else if ((b - c) <= 2e+160) {
tmp = 1.0;
} else if ((b - c) <= 2e+236) {
tmp = x / (x - (y * (-1.0 - (1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b - c) <= (-1d-114)) then
tmp = x / (x + (y * (1.0d0 - (2.0d0 * ((b - c) * a)))))
else if ((b - c) <= 2d+160) then
tmp = 1.0d0
else if ((b - c) <= 2d+236) then
tmp = x / (x - (y * ((-1.0d0) - (1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -1e-114) {
tmp = x / (x + (y * (1.0 - (2.0 * ((b - c) * a)))));
} else if ((b - c) <= 2e+160) {
tmp = 1.0;
} else if ((b - c) <= 2e+236) {
tmp = x / (x - (y * (-1.0 - (1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b - c) <= -1e-114: tmp = x / (x + (y * (1.0 - (2.0 * ((b - c) * a))))) elif (b - c) <= 2e+160: tmp = 1.0 elif (b - c) <= 2e+236: tmp = x / (x - (y * (-1.0 - (1.3333333333333333 * ((b - c) / t))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b - c) <= -1e-114) tmp = Float64(x / Float64(x + Float64(y * Float64(1.0 - Float64(2.0 * Float64(Float64(b - c) * a)))))); elseif (Float64(b - c) <= 2e+160) tmp = 1.0; elseif (Float64(b - c) <= 2e+236) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b - c) <= -1e-114) tmp = x / (x + (y * (1.0 - (2.0 * ((b - c) * a))))); elseif ((b - c) <= 2e+160) tmp = 1.0; elseif ((b - c) <= 2e+236) tmp = x / (x - (y * (-1.0 - (1.3333333333333333 * ((b - c) / t))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b - c), $MachinePrecision], -1e-114], N[(x / N[(x + N[(y * N[(1.0 - N[(2.0 * N[(N[(b - c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - c), $MachinePrecision], 2e+160], 1.0, If[LessEqual[N[(b - c), $MachinePrecision], 2e+236], N[(x / N[(x - N[(y * N[(-1.0 - N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - c \leq -1 \cdot 10^{-114}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(1 - 2 \cdot \left(\left(b - c\right) \cdot a\right)\right)}\\
\mathbf{elif}\;b - c \leq 2 \cdot 10^{+160}:\\
\;\;\;\;1\\
\mathbf{elif}\;b - c \leq 2 \cdot 10^{+236}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - 1.3333333333333333 \cdot \frac{b - c}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 b c) < -1.0000000000000001e-114Initial program 93.0%
Taylor expanded in a around inf 67.7%
Taylor expanded in a around 0 53.5%
if -1.0000000000000001e-114 < (-.f64 b c) < 2.00000000000000001e160 or 2.00000000000000011e236 < (-.f64 b c) Initial program 98.1%
Taylor expanded in c around inf 63.0%
+-commutative63.0%
associate-*r/63.0%
metadata-eval63.0%
associate--l+63.0%
Simplified63.0%
Taylor expanded in c around 0 41.4%
Taylor expanded in x around inf 64.0%
if 2.00000000000000001e160 < (-.f64 b c) < 2.00000000000000011e236Initial program 88.9%
Taylor expanded in t around 0 66.9%
Taylor expanded in a around 0 67.7%
Taylor expanded in t around inf 61.0%
Final simplification58.5%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -3700000000000.0)
(/ x (- x (* y (- -1.0 (* -2.0 (* b a))))))
(if (<= b -8.2e-221)
1.0
(if (or (<= b 7.3e-286) (and (not (<= b 6.1e-130)) (<= b 1.1e+40)))
(/ x (+ x (+ y (* -1.3333333333333333 (/ c (/ t y))))))
1.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3700000000000.0) {
tmp = x / (x - (y * (-1.0 - (-2.0 * (b * a)))));
} else if (b <= -8.2e-221) {
tmp = 1.0;
} else if ((b <= 7.3e-286) || (!(b <= 6.1e-130) && (b <= 1.1e+40))) {
tmp = x / (x + (y + (-1.3333333333333333 * (c / (t / 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 (b <= (-3700000000000.0d0)) then
tmp = x / (x - (y * ((-1.0d0) - ((-2.0d0) * (b * a)))))
else if (b <= (-8.2d-221)) then
tmp = 1.0d0
else if ((b <= 7.3d-286) .or. (.not. (b <= 6.1d-130)) .and. (b <= 1.1d+40)) then
tmp = x / (x + (y + ((-1.3333333333333333d0) * (c / (t / 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 (b <= -3700000000000.0) {
tmp = x / (x - (y * (-1.0 - (-2.0 * (b * a)))));
} else if (b <= -8.2e-221) {
tmp = 1.0;
} else if ((b <= 7.3e-286) || (!(b <= 6.1e-130) && (b <= 1.1e+40))) {
tmp = x / (x + (y + (-1.3333333333333333 * (c / (t / y)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -3700000000000.0: tmp = x / (x - (y * (-1.0 - (-2.0 * (b * a))))) elif b <= -8.2e-221: tmp = 1.0 elif (b <= 7.3e-286) or (not (b <= 6.1e-130) and (b <= 1.1e+40)): tmp = x / (x + (y + (-1.3333333333333333 * (c / (t / y))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -3700000000000.0) tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(-2.0 * Float64(b * a)))))); elseif (b <= -8.2e-221) tmp = 1.0; elseif ((b <= 7.3e-286) || (!(b <= 6.1e-130) && (b <= 1.1e+40))) tmp = Float64(x / Float64(x + Float64(y + Float64(-1.3333333333333333 * Float64(c / Float64(t / y)))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -3700000000000.0) tmp = x / (x - (y * (-1.0 - (-2.0 * (b * a))))); elseif (b <= -8.2e-221) tmp = 1.0; elseif ((b <= 7.3e-286) || (~((b <= 6.1e-130)) && (b <= 1.1e+40))) tmp = x / (x + (y + (-1.3333333333333333 * (c / (t / y))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -3700000000000.0], N[(x / N[(x - N[(y * N[(-1.0 - N[(-2.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -8.2e-221], 1.0, If[Or[LessEqual[b, 7.3e-286], And[N[Not[LessEqual[b, 6.1e-130]], $MachinePrecision], LessEqual[b, 1.1e+40]]], N[(x / N[(x + N[(y + N[(-1.3333333333333333 * N[(c / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3700000000000:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - -2 \cdot \left(b \cdot a\right)\right)}\\
\mathbf{elif}\;b \leq -8.2 \cdot 10^{-221}:\\
\;\;\;\;1\\
\mathbf{elif}\;b \leq 7.3 \cdot 10^{-286} \lor \neg \left(b \leq 6.1 \cdot 10^{-130}\right) \land b \leq 1.1 \cdot 10^{+40}:\\
\;\;\;\;\frac{x}{x + \left(y + -1.3333333333333333 \cdot \frac{c}{\frac{t}{y}}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -3.7e12Initial program 94.1%
Taylor expanded in a around inf 71.1%
Taylor expanded in c around 0 69.7%
*-commutative69.7%
associate-*l*69.7%
Simplified69.7%
Taylor expanded in a around 0 52.6%
*-commutative52.6%
Simplified52.6%
if -3.7e12 < b < -8.19999999999999962e-221 or 7.29999999999999959e-286 < b < 6.09999999999999996e-130 or 1.0999999999999999e40 < b Initial program 93.7%
Taylor expanded in c around inf 69.3%
+-commutative69.3%
associate-*r/69.3%
metadata-eval69.3%
associate--l+69.3%
Simplified69.3%
Taylor expanded in c around 0 37.9%
Taylor expanded in x around inf 57.6%
if -8.19999999999999962e-221 < b < 7.29999999999999959e-286 or 6.09999999999999996e-130 < b < 1.0999999999999999e40Initial program 96.8%
Taylor expanded in c around inf 86.1%
+-commutative86.1%
associate-*r/86.1%
metadata-eval86.1%
associate--l+86.1%
Simplified86.1%
Taylor expanded in c around 0 55.8%
associate-*r*56.5%
associate--l+56.5%
associate-*r/56.5%
metadata-eval56.5%
Simplified56.5%
Taylor expanded in t around 0 58.6%
Taylor expanded in c around 0 58.6%
associate-/l*61.7%
Simplified61.7%
Final simplification57.3%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= y -1.62e+187) (not (<= y 2.25e+207))) (/ x (+ x (+ y (* -2.0 (* a (* y b)))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -1.62e+187) || !(y <= 2.25e+207)) {
tmp = x / (x + (y + (-2.0 * (a * (y * b)))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((y <= (-1.62d+187)) .or. (.not. (y <= 2.25d+207))) then
tmp = x / (x + (y + ((-2.0d0) * (a * (y * b)))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -1.62e+187) || !(y <= 2.25e+207)) {
tmp = x / (x + (y + (-2.0 * (a * (y * b)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (y <= -1.62e+187) or not (y <= 2.25e+207): tmp = x / (x + (y + (-2.0 * (a * (y * b))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((y <= -1.62e+187) || !(y <= 2.25e+207)) tmp = Float64(x / Float64(x + Float64(y + Float64(-2.0 * Float64(a * Float64(y * b)))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((y <= -1.62e+187) || ~((y <= 2.25e+207))) tmp = x / (x + (y + (-2.0 * (a * (y * b))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[y, -1.62e+187], N[Not[LessEqual[y, 2.25e+207]], $MachinePrecision]], N[(x / N[(x + N[(y + N[(-2.0 * N[(a * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.62 \cdot 10^{+187} \lor \neg \left(y \leq 2.25 \cdot 10^{+207}\right):\\
\;\;\;\;\frac{x}{x + \left(y + -2 \cdot \left(a \cdot \left(y \cdot b\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.61999999999999993e187 or 2.25000000000000002e207 < y Initial program 100.0%
Taylor expanded in a around inf 61.5%
Taylor expanded in c around 0 50.3%
*-commutative50.3%
associate-*l*50.3%
Simplified50.3%
Taylor expanded in a around 0 60.3%
if -1.61999999999999993e187 < y < 2.25000000000000002e207Initial program 93.3%
Taylor expanded in c around inf 67.7%
+-commutative67.7%
associate-*r/67.7%
metadata-eval67.7%
associate--l+67.7%
Simplified67.7%
Taylor expanded in c around 0 35.5%
Taylor expanded in x around inf 51.8%
Final simplification53.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= y -4.2e+192) (not (<= y 2.2e+215))) (/ x (+ y (* -1.3333333333333333 (/ (* y c) t)))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -4.2e+192) || !(y <= 2.2e+215)) {
tmp = x / (y + (-1.3333333333333333 * ((y * c) / t)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((y <= (-4.2d+192)) .or. (.not. (y <= 2.2d+215))) then
tmp = x / (y + ((-1.3333333333333333d0) * ((y * c) / t)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -4.2e+192) || !(y <= 2.2e+215)) {
tmp = x / (y + (-1.3333333333333333 * ((y * c) / t)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (y <= -4.2e+192) or not (y <= 2.2e+215): tmp = x / (y + (-1.3333333333333333 * ((y * c) / t))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((y <= -4.2e+192) || !(y <= 2.2e+215)) tmp = Float64(x / Float64(y + Float64(-1.3333333333333333 * Float64(Float64(y * c) / t)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((y <= -4.2e+192) || ~((y <= 2.2e+215))) tmp = x / (y + (-1.3333333333333333 * ((y * c) / t))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[y, -4.2e+192], N[Not[LessEqual[y, 2.2e+215]], $MachinePrecision]], N[(x / N[(y + N[(-1.3333333333333333 * N[(N[(y * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+192} \lor \neg \left(y \leq 2.2 \cdot 10^{+215}\right):\\
\;\;\;\;\frac{x}{y + -1.3333333333333333 \cdot \frac{y \cdot c}{t}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -4.19999999999999989e192 or 2.2000000000000001e215 < y Initial program 100.0%
Taylor expanded in c around inf 74.4%
+-commutative74.4%
associate-*r/74.4%
metadata-eval74.4%
associate--l+74.4%
Simplified74.4%
Taylor expanded in c around 0 58.4%
associate-*r*61.2%
associate--l+61.2%
associate-*r/61.2%
metadata-eval61.2%
Simplified61.2%
Taylor expanded in t around 0 60.2%
Taylor expanded in x around 0 58.3%
if -4.19999999999999989e192 < y < 2.2000000000000001e215Initial program 93.3%
Taylor expanded in c around inf 67.8%
+-commutative67.8%
associate-*r/67.8%
metadata-eval67.8%
associate--l+67.8%
Simplified67.8%
Taylor expanded in c around 0 35.6%
Taylor expanded in x around inf 51.8%
Final simplification53.0%
(FPCore (x y z t a b c) :precision binary64 (if (<= y -1.45e+187) (/ x (+ x y)) (if (<= y 2.05e+221) 1.0 (* -0.75 (/ (* x t) (* y c))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -1.45e+187) {
tmp = x / (x + y);
} else if (y <= 2.05e+221) {
tmp = 1.0;
} else {
tmp = -0.75 * ((x * t) / (y * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (y <= (-1.45d+187)) then
tmp = x / (x + y)
else if (y <= 2.05d+221) then
tmp = 1.0d0
else
tmp = (-0.75d0) * ((x * t) / (y * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -1.45e+187) {
tmp = x / (x + y);
} else if (y <= 2.05e+221) {
tmp = 1.0;
} else {
tmp = -0.75 * ((x * t) / (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if y <= -1.45e+187: tmp = x / (x + y) elif y <= 2.05e+221: tmp = 1.0 else: tmp = -0.75 * ((x * t) / (y * c)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= -1.45e+187) tmp = Float64(x / Float64(x + y)); elseif (y <= 2.05e+221) tmp = 1.0; else tmp = Float64(-0.75 * Float64(Float64(x * t) / Float64(y * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (y <= -1.45e+187) tmp = x / (x + y); elseif (y <= 2.05e+221) tmp = 1.0; else tmp = -0.75 * ((x * t) / (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -1.45e+187], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.05e+221], 1.0, N[(-0.75 * N[(N[(x * t), $MachinePrecision] / N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+187}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+221}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;-0.75 \cdot \frac{x \cdot t}{y \cdot c}\\
\end{array}
\end{array}
if y < -1.45e187Initial program 100.0%
Taylor expanded in c around inf 74.4%
+-commutative74.4%
associate-*r/74.4%
metadata-eval74.4%
associate--l+74.4%
Simplified74.4%
Taylor expanded in c around 0 46.5%
if -1.45e187 < y < 2.04999999999999985e221Initial program 93.3%
Taylor expanded in c around inf 67.7%
+-commutative67.7%
associate-*r/67.7%
metadata-eval67.7%
associate--l+67.7%
Simplified67.7%
Taylor expanded in c around 0 35.5%
Taylor expanded in x around inf 51.8%
if 2.04999999999999985e221 < y Initial program 100.0%
Taylor expanded in c around inf 74.3%
+-commutative74.3%
associate-*r/74.3%
metadata-eval74.3%
associate--l+74.3%
Simplified74.3%
Taylor expanded in c around 0 58.4%
associate-*r*68.9%
associate--l+68.9%
associate-*r/68.9%
metadata-eval68.9%
Simplified68.9%
Taylor expanded in t around 0 51.8%
Final simplification51.2%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= y -1.55e+187) (not (<= y 1.25e+217))) (/ x (+ x y)) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -1.55e+187) || !(y <= 1.25e+217)) {
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 ((y <= (-1.55d+187)) .or. (.not. (y <= 1.25d+217))) 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 ((y <= -1.55e+187) || !(y <= 1.25e+217)) {
tmp = x / (x + y);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (y <= -1.55e+187) or not (y <= 1.25e+217): tmp = x / (x + y) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((y <= -1.55e+187) || !(y <= 1.25e+217)) 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 ((y <= -1.55e+187) || ~((y <= 1.25e+217))) tmp = x / (x + y); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[y, -1.55e+187], N[Not[LessEqual[y, 1.25e+217]], $MachinePrecision]], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+187} \lor \neg \left(y \leq 1.25 \cdot 10^{+217}\right):\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.55000000000000006e187 or 1.2500000000000001e217 < y Initial program 100.0%
Taylor expanded in c around inf 74.4%
+-commutative74.4%
associate-*r/74.4%
metadata-eval74.4%
associate--l+74.4%
Simplified74.4%
Taylor expanded in c around 0 47.0%
if -1.55000000000000006e187 < y < 1.2500000000000001e217Initial program 93.3%
Taylor expanded in c around inf 67.7%
+-commutative67.7%
associate-*r/67.7%
metadata-eval67.7%
associate--l+67.7%
Simplified67.7%
Taylor expanded in c around 0 35.5%
Taylor expanded in x around inf 51.8%
Final simplification50.9%
(FPCore (x y z t a b c) :precision binary64 1.0)
double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = 1.0d0
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
def code(x, y, z, t, a, b, c): return 1.0
function code(x, y, z, t, a, b, c) return 1.0 end
function tmp = code(x, y, z, t, a, b, c) tmp = 1.0; end
code[x_, y_, z_, t_, a_, b_, c_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 94.6%
Taylor expanded in c around inf 69.0%
+-commutative69.0%
associate-*r/69.0%
metadata-eval69.0%
associate--l+69.0%
Simplified69.0%
Taylor expanded in c around 0 37.7%
Taylor expanded in x around inf 47.6%
Final simplification47.6%
(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 2023200
(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)))))))))))