
(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 17 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
(+
(/ (* (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 (* -1.3333333333333333 (/ (* y 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 + (-1.3333333333333333 * ((y * 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 + (-1.3333333333333333 * ((y * 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 + (-1.3333333333333333 * ((y * 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 + Float64(-1.3333333333333333 * Float64(Float64(y * 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 + (-1.3333333333333333 * ((y * 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[(-1.3333333333333333 * N[(N[(y * c), $MachinePrecision] / t), $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 + \left(y + -1.3333333333333333 \cdot \frac{y \cdot c}{t}\right)}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 99.6%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) Initial program 0.0%
Taylor expanded in c around inf 59.6%
associate-*r/59.6%
metadata-eval59.6%
metadata-eval59.6%
associate-/r*59.6%
*-commutative59.6%
sub-neg59.6%
+-commutative59.6%
associate-+l+59.6%
sub-neg59.6%
*-commutative59.6%
associate-/r*59.6%
metadata-eval59.6%
sub-neg59.6%
distribute-neg-frac59.6%
metadata-eval59.6%
Simplified59.6%
Taylor expanded in t around 0 35.4%
associate-*r/35.4%
metadata-eval35.4%
distribute-lft-neg-in35.4%
*-commutative35.4%
distribute-rgt-neg-in35.4%
metadata-eval35.4%
associate-*r/35.4%
Simplified35.4%
Taylor expanded in c around 0 67.7%
Final simplification98.1%
(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.9%
+-commutative94.9%
fma-def94.9%
Simplified97.7%
Final simplification97.7%
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(+
(/ z (/ t (sqrt (+ t a))))
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a 0.8333333333333334)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * pow(exp(2.0), ((z / (t / sqrt((t + a)))) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))))));
}
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 / (t / sqrt((t + a)))) + ((b - c) * ((2.0d0 / (t * 3.0d0)) - (a + 0.8333333333333334d0)))))))
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.pow(Math.exp(2.0), ((z / (t / Math.sqrt((t + a)))) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.pow(math.exp(2.0), ((z / (t / math.sqrt((t + a)))) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * (exp(2.0) ^ Float64(Float64(z / Float64(t / sqrt(Float64(t + a)))) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + 0.8333333333333334)))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * (exp(2.0) ^ ((z / (t / sqrt((t + a)))) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(z / N[(t / N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{z}{\frac{t}{\sqrt{t + a}}} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + 0.8333333333333334\right)\right)\right)}}
\end{array}
Initial program 94.9%
exp-prod94.9%
associate-/l*96.9%
metadata-eval96.9%
Simplified96.9%
Final simplification96.9%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -1.08e-11)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 7.4e-193)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 0.0001)
(/
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 <= -1.08e-11) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 7.4e-193) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 0.0001) {
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 <= (-1.08d-11)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 7.4d-193) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 0.0001d0) 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 <= -1.08e-11) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 7.4e-193) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 0.0001) {
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 <= -1.08e-11: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 7.4e-193: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 0.0001: 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 <= -1.08e-11) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 7.4e-193) 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 <= 0.0001) 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 <= -1.08e-11) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 7.4e-193) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 0.0001) 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, -1.08e-11], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.4e-193], 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, 0.0001], 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 -1.08 \cdot 10^{-11}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{-193}:\\
\;\;\;\;\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 0.0001:\\
\;\;\;\;\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 < -1.07999999999999992e-11Initial program 93.8%
Taylor expanded in a around inf 100.0%
if -1.07999999999999992e-11 < t < 7.4000000000000004e-193Initial program 93.0%
Taylor expanded in t around 0 95.8%
if 7.4000000000000004e-193 < t < 1.00000000000000005e-4Initial program 96.1%
Taylor expanded in a around 0 86.8%
*-commutative86.8%
associate-*r/86.9%
metadata-eval86.9%
Simplified86.9%
if 1.00000000000000005e-4 < t Initial program 95.8%
Taylor expanded in t around inf 91.7%
mul-1-neg91.7%
distribute-rgt-neg-in91.7%
+-commutative91.7%
distribute-neg-in91.7%
neg-mul-191.7%
metadata-eval91.7%
+-commutative91.7%
neg-mul-191.7%
sub-neg91.7%
Simplified91.7%
Final simplification92.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))))
(if (<= t -2.35e-13)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 4e-192)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 1.2e-50)
t_1
(if (<= t 1.75e-41)
(/ x (+ x (* y (exp (* 2.0 (* z (sqrt (/ 1.0 t))))))))
(if (<= t 1.1e-23)
(/
x
(+
x
(*
y
(exp
(*
2.0
(*
b
(+ (/ 0.6666666666666666 t) (- -0.8333333333333334 a))))))))
(if (<= t 0.66)
t_1
(/
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 t_1 = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
double tmp;
if (t <= -2.35e-13) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 4e-192) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1.2e-50) {
tmp = t_1;
} else if (t <= 1.75e-41) {
tmp = x / (x + (y * exp((2.0 * (z * sqrt((1.0 / t)))))));
} else if (t <= 1.1e-23) {
tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) + (-0.8333333333333334 - a)))))));
} else if (t <= 0.66) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
if (t <= (-2.35d-13)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 4d-192) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 1.2d-50) then
tmp = t_1
else if (t <= 1.75d-41) then
tmp = x / (x + (y * exp((2.0d0 * (z * sqrt((1.0d0 / t)))))))
else if (t <= 1.1d-23) then
tmp = x / (x + (y * exp((2.0d0 * (b * ((0.6666666666666666d0 / t) + ((-0.8333333333333334d0) - a)))))))
else if (t <= 0.66d0) then
tmp = t_1
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 t_1 = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
double tmp;
if (t <= -2.35e-13) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 4e-192) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1.2e-50) {
tmp = t_1;
} else if (t <= 1.75e-41) {
tmp = x / (x + (y * Math.exp((2.0 * (z * Math.sqrt((1.0 / t)))))));
} else if (t <= 1.1e-23) {
tmp = x / (x + (y * Math.exp((2.0 * (b * ((0.6666666666666666 / t) + (-0.8333333333333334 - a)))))));
} else if (t <= 0.66) {
tmp = t_1;
} 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): t_1 = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) tmp = 0 if t <= -2.35e-13: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 4e-192: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 1.2e-50: tmp = t_1 elif t <= 1.75e-41: tmp = x / (x + (y * math.exp((2.0 * (z * math.sqrt((1.0 / t))))))) elif t <= 1.1e-23: tmp = x / (x + (y * math.exp((2.0 * (b * ((0.6666666666666666 / t) + (-0.8333333333333334 - a))))))) elif t <= 0.66: tmp = t_1 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) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))) tmp = 0.0 if (t <= -2.35e-13) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 4e-192) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)))))); elseif (t <= 1.2e-50) tmp = t_1; elseif (t <= 1.75e-41) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(z * sqrt(Float64(1.0 / t)))))))); elseif (t <= 1.1e-23) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 / t) + Float64(-0.8333333333333334 - a)))))))); elseif (t <= 0.66) tmp = t_1; 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) t_1 = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); tmp = 0.0; if (t <= -2.35e-13) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 4e-192) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 1.2e-50) tmp = t_1; elseif (t <= 1.75e-41) tmp = x / (x + (y * exp((2.0 * (z * sqrt((1.0 / t))))))); elseif (t <= 1.1e-23) tmp = x / (x + (y * exp((2.0 * (b * ((0.6666666666666666 / t) + (-0.8333333333333334 - a))))))); elseif (t <= 0.66) tmp = t_1; 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_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.35e-13], 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, 4e-192], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-50], t$95$1, If[LessEqual[t, 1.75e-41], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(z * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e-23], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(b * N[(N[(0.6666666666666666 / t), $MachinePrecision] + N[(-0.8333333333333334 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.66], t$95$1, 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}
t_1 := \frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{if}\;t \leq -2.35 \cdot 10^{-13}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-192}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t}}}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-50}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(z \cdot \sqrt{\frac{1}{t}}\right)}}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-23}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(b \cdot \left(\frac{0.6666666666666666}{t} + \left(-0.8333333333333334 - a\right)\right)\right)}}\\
\mathbf{elif}\;t \leq 0.66:\\
\;\;\;\;t_1\\
\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 < -2.3500000000000001e-13Initial program 93.8%
Taylor expanded in a around inf 100.0%
if -2.3500000000000001e-13 < t < 4.0000000000000004e-192Initial program 93.0%
Taylor expanded in t around 0 95.8%
if 4.0000000000000004e-192 < t < 1.20000000000000001e-50 or 1.1e-23 < t < 0.660000000000000031Initial program 94.9%
Taylor expanded in t around 0 67.6%
Taylor expanded in a around 0 87.8%
if 1.20000000000000001e-50 < t < 1.75e-41Initial program 100.0%
Taylor expanded in a around 0 100.0%
*-commutative100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
if 1.75e-41 < t < 1.1e-23Initial program 100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
associate--r+100.0%
sub-neg100.0%
associate-*r/100.0%
metadata-eval100.0%
metadata-eval100.0%
associate-+r-100.0%
Simplified100.0%
if 0.660000000000000031 < t Initial program 95.8%
Taylor expanded in t around inf 91.7%
mul-1-neg91.7%
distribute-rgt-neg-in91.7%
+-commutative91.7%
distribute-neg-in91.7%
neg-mul-191.7%
metadata-eval91.7%
+-commutative91.7%
neg-mul-191.7%
sub-neg91.7%
Simplified91.7%
Final simplification93.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* (- b c) -1.6666666666666667)))))))
(if (<= t -7.6e-266)
t_1
(if (<= t 4.8e-278)
(/ x (+ x (+ y (* -1.3333333333333333 (/ c (/ t y))))))
(if (<= t 4e-238)
1.0
(if (<= t 1.3e-193)
(* x (/ 1.0 (+ x (- y (* 2.0 (* a (* y (- b c))))))))
(if (<= t 5e-6) 1.0 t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp(((b - c) * -1.6666666666666667))));
double tmp;
if (t <= -7.6e-266) {
tmp = t_1;
} else if (t <= 4.8e-278) {
tmp = x / (x + (y + (-1.3333333333333333 * (c / (t / y)))));
} else if (t <= 4e-238) {
tmp = 1.0;
} else if (t <= 1.3e-193) {
tmp = x * (1.0 / (x + (y - (2.0 * (a * (y * (b - c)))))));
} else if (t <= 5e-6) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp(((b - c) * (-1.6666666666666667d0)))))
if (t <= (-7.6d-266)) then
tmp = t_1
else if (t <= 4.8d-278) then
tmp = x / (x + (y + ((-1.3333333333333333d0) * (c / (t / y)))))
else if (t <= 4d-238) then
tmp = 1.0d0
else if (t <= 1.3d-193) then
tmp = x * (1.0d0 / (x + (y - (2.0d0 * (a * (y * (b - c)))))))
else if (t <= 5d-6) then
tmp = 1.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp(((b - c) * -1.6666666666666667))));
double tmp;
if (t <= -7.6e-266) {
tmp = t_1;
} else if (t <= 4.8e-278) {
tmp = x / (x + (y + (-1.3333333333333333 * (c / (t / y)))));
} else if (t <= 4e-238) {
tmp = 1.0;
} else if (t <= 1.3e-193) {
tmp = x * (1.0 / (x + (y - (2.0 * (a * (y * (b - c)))))));
} else if (t <= 5e-6) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp(((b - c) * -1.6666666666666667)))) tmp = 0 if t <= -7.6e-266: tmp = t_1 elif t <= 4.8e-278: tmp = x / (x + (y + (-1.3333333333333333 * (c / (t / y))))) elif t <= 4e-238: tmp = 1.0 elif t <= 1.3e-193: tmp = x * (1.0 / (x + (y - (2.0 * (a * (y * (b - c))))))) elif t <= 5e-6: tmp = 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(b - c) * -1.6666666666666667))))) tmp = 0.0 if (t <= -7.6e-266) tmp = t_1; elseif (t <= 4.8e-278) tmp = Float64(x / Float64(x + Float64(y + Float64(-1.3333333333333333 * Float64(c / Float64(t / y)))))); elseif (t <= 4e-238) tmp = 1.0; elseif (t <= 1.3e-193) tmp = Float64(x * Float64(1.0 / Float64(x + Float64(y - Float64(2.0 * Float64(a * Float64(y * Float64(b - c)))))))); elseif (t <= 5e-6) tmp = 1.0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp(((b - c) * -1.6666666666666667)))); tmp = 0.0; if (t <= -7.6e-266) tmp = t_1; elseif (t <= 4.8e-278) tmp = x / (x + (y + (-1.3333333333333333 * (c / (t / y))))); elseif (t <= 4e-238) tmp = 1.0; elseif (t <= 1.3e-193) tmp = x * (1.0 / (x + (y - (2.0 * (a * (y * (b - c))))))); elseif (t <= 5e-6) tmp = 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(N[(b - c), $MachinePrecision] * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.6e-266], t$95$1, If[LessEqual[t, 4.8e-278], N[(x / N[(x + N[(y + N[(-1.3333333333333333 * N[(c / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e-238], 1.0, If[LessEqual[t, 1.3e-193], N[(x * N[(1.0 / N[(x + N[(y - N[(2.0 * N[(a * N[(y * N[(b - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-6], 1.0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{\left(b - c\right) \cdot -1.6666666666666667}}\\
\mathbf{if}\;t \leq -7.6 \cdot 10^{-266}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-278}:\\
\;\;\;\;\frac{x}{x + \left(y + -1.3333333333333333 \cdot \frac{c}{\frac{t}{y}}\right)}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-238}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-193}:\\
\;\;\;\;x \cdot \frac{1}{x + \left(y - 2 \cdot \left(a \cdot \left(y \cdot \left(b - c\right)\right)\right)\right)}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-6}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -7.59999999999999988e-266 or 5.00000000000000041e-6 < t Initial program 96.4%
Taylor expanded in t around inf 90.0%
mul-1-neg90.0%
distribute-rgt-neg-in90.0%
+-commutative90.0%
distribute-neg-in90.0%
neg-mul-190.0%
metadata-eval90.0%
+-commutative90.0%
neg-mul-190.0%
sub-neg90.0%
Simplified90.0%
Taylor expanded in a around 0 80.1%
if -7.59999999999999988e-266 < t < 4.8e-278Initial program 85.0%
Taylor expanded in c around inf 61.3%
associate-*r/61.3%
metadata-eval61.3%
metadata-eval61.3%
associate-/r*61.3%
*-commutative61.3%
sub-neg61.3%
+-commutative61.3%
associate-+l+61.3%
sub-neg61.3%
*-commutative61.3%
associate-/r*61.3%
metadata-eval61.3%
sub-neg61.3%
distribute-neg-frac61.3%
metadata-eval61.3%
Simplified61.3%
Taylor expanded in t around 0 61.3%
associate-*r/61.3%
metadata-eval61.3%
distribute-lft-neg-in61.3%
*-commutative61.3%
distribute-rgt-neg-in61.3%
metadata-eval61.3%
associate-*r/61.3%
Simplified61.3%
Taylor expanded in c around 0 61.2%
associate-/l*61.4%
Simplified61.4%
if 4.8e-278 < t < 4e-238 or 1.30000000000000004e-193 < t < 5.00000000000000041e-6Initial program 95.0%
Taylor expanded in t around inf 30.8%
mul-1-neg30.8%
distribute-rgt-neg-in30.8%
+-commutative30.8%
distribute-neg-in30.8%
neg-mul-130.8%
metadata-eval30.8%
+-commutative30.8%
neg-mul-130.8%
sub-neg30.8%
Simplified30.8%
Taylor expanded in x around inf 66.2%
if 4e-238 < t < 1.30000000000000004e-193Initial program 90.9%
Taylor expanded in a around inf 47.2%
div-inv47.2%
exp-prod47.2%
Applied egg-rr47.2%
Taylor expanded in a around 0 73.7%
Final simplification75.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* -2.0 (* b a))))))))
(if (<= c -2.4e+101)
1.0
(if (<= c -1.65e-38)
t_1
(if (<= c -4.5e-82)
1.0
(if (<= c 6e+14)
t_1
(/
x
(- x (* y (- -1.0 (* 2.0 (+ (* c a) (* (* a a) (* c c))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((-2.0 * (b * a)))));
double tmp;
if (c <= -2.4e+101) {
tmp = 1.0;
} else if (c <= -1.65e-38) {
tmp = t_1;
} else if (c <= -4.5e-82) {
tmp = 1.0;
} else if (c <= 6e+14) {
tmp = t_1;
} else {
tmp = x / (x - (y * (-1.0 - (2.0 * ((c * a) + ((a * a) * (c * c)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp(((-2.0d0) * (b * a)))))
if (c <= (-2.4d+101)) then
tmp = 1.0d0
else if (c <= (-1.65d-38)) then
tmp = t_1
else if (c <= (-4.5d-82)) then
tmp = 1.0d0
else if (c <= 6d+14) then
tmp = t_1
else
tmp = x / (x - (y * ((-1.0d0) - (2.0d0 * ((c * a) + ((a * a) * (c * c)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((-2.0 * (b * a)))));
double tmp;
if (c <= -2.4e+101) {
tmp = 1.0;
} else if (c <= -1.65e-38) {
tmp = t_1;
} else if (c <= -4.5e-82) {
tmp = 1.0;
} else if (c <= 6e+14) {
tmp = t_1;
} else {
tmp = x / (x - (y * (-1.0 - (2.0 * ((c * a) + ((a * a) * (c * c)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((-2.0 * (b * a))))) tmp = 0 if c <= -2.4e+101: tmp = 1.0 elif c <= -1.65e-38: tmp = t_1 elif c <= -4.5e-82: tmp = 1.0 elif c <= 6e+14: tmp = t_1 else: tmp = x / (x - (y * (-1.0 - (2.0 * ((c * a) + ((a * a) * (c * c))))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(b * a)))))) tmp = 0.0 if (c <= -2.4e+101) tmp = 1.0; elseif (c <= -1.65e-38) tmp = t_1; elseif (c <= -4.5e-82) tmp = 1.0; elseif (c <= 6e+14) tmp = t_1; else tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(2.0 * Float64(Float64(c * a) + Float64(Float64(a * a) * Float64(c * c)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((-2.0 * (b * a))))); tmp = 0.0; if (c <= -2.4e+101) tmp = 1.0; elseif (c <= -1.65e-38) tmp = t_1; elseif (c <= -4.5e-82) tmp = 1.0; elseif (c <= 6e+14) tmp = t_1; else tmp = x / (x - (y * (-1.0 - (2.0 * ((c * a) + ((a * a) * (c * c))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.4e+101], 1.0, If[LessEqual[c, -1.65e-38], t$95$1, If[LessEqual[c, -4.5e-82], 1.0, If[LessEqual[c, 6e+14], t$95$1, N[(x / N[(x - N[(y * N[(-1.0 - N[(2.0 * N[(N[(c * a), $MachinePrecision] + N[(N[(a * a), $MachinePrecision] * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{-2 \cdot \left(b \cdot a\right)}}\\
\mathbf{if}\;c \leq -2.4 \cdot 10^{+101}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq -1.65 \cdot 10^{-38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -4.5 \cdot 10^{-82}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 6 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - 2 \cdot \left(c \cdot a + \left(a \cdot a\right) \cdot \left(c \cdot c\right)\right)\right)}\\
\end{array}
\end{array}
if c < -2.39999999999999988e101 or -1.6500000000000001e-38 < c < -4.4999999999999998e-82Initial program 92.9%
Taylor expanded in t around inf 77.5%
mul-1-neg77.5%
distribute-rgt-neg-in77.5%
+-commutative77.5%
distribute-neg-in77.5%
neg-mul-177.5%
metadata-eval77.5%
+-commutative77.5%
neg-mul-177.5%
sub-neg77.5%
Simplified77.5%
Taylor expanded in x around inf 67.1%
if -2.39999999999999988e101 < c < -1.6500000000000001e-38 or -4.4999999999999998e-82 < c < 6e14Initial program 94.7%
Taylor expanded in a around inf 66.3%
Taylor expanded in c around 0 67.0%
if 6e14 < c Initial program 98.0%
Taylor expanded in a around inf 56.6%
Taylor expanded in b around 0 54.6%
Taylor expanded in c around 0 54.8%
distribute-lft-out54.8%
*-commutative54.8%
*-commutative54.8%
unpow254.8%
unpow254.8%
Simplified54.8%
Final simplification64.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -6.6e-66)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 0.02)
(/ 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 <= -6.6e-66) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 0.02) {
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 <= (-6.6d-66)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 0.02d0) 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 <= -6.6e-66) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 0.02) {
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 <= -6.6e-66: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 0.02: 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 <= -6.6e-66) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 0.02) 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 <= -6.6e-66) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 0.02) 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, -6.6e-66], 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, 0.02], 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 -6.6 \cdot 10^{-66}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 0.02:\\
\;\;\;\;\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 < -6.5999999999999998e-66Initial program 96.0%
Taylor expanded in a around inf 96.1%
if -6.5999999999999998e-66 < t < 0.0200000000000000004Initial program 93.8%
Taylor expanded in t around 0 80.8%
Taylor expanded in a around 0 77.9%
if 0.0200000000000000004 < t Initial program 95.8%
Taylor expanded in t around inf 91.7%
mul-1-neg91.7%
distribute-rgt-neg-in91.7%
+-commutative91.7%
distribute-neg-in91.7%
neg-mul-191.7%
metadata-eval91.7%
+-commutative91.7%
neg-mul-191.7%
sub-neg91.7%
Simplified91.7%
Final simplification86.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -2e-74)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 0.8)
(/ 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 <= -2e-74) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 0.8) {
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 <= (-2d-74)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 0.8d0) 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 <= -2e-74) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 0.8) {
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 <= -2e-74: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 0.8: 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 <= -2e-74) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 0.8) 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 <= -2e-74) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 0.8) 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, -2e-74], 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, 0.8], 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 -2 \cdot 10^{-74}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 0.8:\\
\;\;\;\;\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.99999999999999992e-74Initial program 96.0%
Taylor expanded in a around inf 96.1%
if -1.99999999999999992e-74 < t < 0.80000000000000004Initial program 93.8%
Taylor expanded in t around 0 80.8%
Taylor expanded in a around 0 77.9%
if 0.80000000000000004 < t Initial program 95.8%
Taylor expanded in t around inf 91.7%
mul-1-neg91.7%
distribute-rgt-neg-in91.7%
+-commutative91.7%
distribute-neg-in91.7%
neg-mul-191.7%
metadata-eval91.7%
+-commutative91.7%
neg-mul-191.7%
sub-neg91.7%
Simplified91.7%
Taylor expanded in a around 0 81.0%
Final simplification81.1%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -3.8e+104) (/ x (+ x (* y (exp (* -2.0 (* b a)))))) (if (<= b 2.1e-22) (/ x (+ x (* y (exp (* 2.0 (* c a)))))) 1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.8e+104) {
tmp = x / (x + (y * exp((-2.0 * (b * a)))));
} else if (b <= 2.1e-22) {
tmp = x / (x + (y * exp((2.0 * (c * a)))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-3.8d+104)) then
tmp = x / (x + (y * exp(((-2.0d0) * (b * a)))))
else if (b <= 2.1d-22) then
tmp = x / (x + (y * exp((2.0d0 * (c * a)))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.8e+104) {
tmp = x / (x + (y * Math.exp((-2.0 * (b * a)))));
} else if (b <= 2.1e-22) {
tmp = x / (x + (y * Math.exp((2.0 * (c * a)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -3.8e+104: tmp = x / (x + (y * math.exp((-2.0 * (b * a))))) elif b <= 2.1e-22: tmp = x / (x + (y * math.exp((2.0 * (c * a))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -3.8e+104) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(b * a)))))); elseif (b <= 2.1e-22) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * a)))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -3.8e+104) tmp = x / (x + (y * exp((-2.0 * (b * a))))); elseif (b <= 2.1e-22) tmp = x / (x + (y * exp((2.0 * (c * a))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -3.8e+104], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.1e-22], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.8 \cdot 10^{+104}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(b \cdot a\right)}}\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{-22}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot a\right)}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -3.79999999999999969e104Initial program 91.3%
Taylor expanded in a around inf 66.7%
Taylor expanded in c around 0 64.6%
if -3.79999999999999969e104 < b < 2.10000000000000008e-22Initial program 99.3%
Taylor expanded in a around inf 62.6%
Taylor expanded in b around 0 62.6%
if 2.10000000000000008e-22 < b Initial program 88.8%
Taylor expanded in t around inf 70.0%
mul-1-neg70.0%
distribute-rgt-neg-in70.0%
+-commutative70.0%
distribute-neg-in70.0%
neg-mul-170.0%
metadata-eval70.0%
+-commutative70.0%
neg-mul-170.0%
sub-neg70.0%
Simplified70.0%
Taylor expanded in x around inf 59.1%
Final simplification62.0%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 0.15) (/ 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 <= 0.15) {
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 <= 0.15d0) 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 <= 0.15) {
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 <= 0.15: 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 <= 0.15) 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 <= 0.15) 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, 0.15], 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 0.15:\\
\;\;\;\;\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 < 0.149999999999999994Initial program 94.2%
Taylor expanded in t around 0 78.0%
Taylor expanded in a around 0 77.0%
if 0.149999999999999994 < t Initial program 95.8%
Taylor expanded in t around inf 91.7%
mul-1-neg91.7%
distribute-rgt-neg-in91.7%
+-commutative91.7%
distribute-neg-in91.7%
neg-mul-191.7%
metadata-eval91.7%
+-commutative91.7%
neg-mul-191.7%
sub-neg91.7%
Simplified91.7%
Taylor expanded in a around 0 81.0%
Final simplification78.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/
x
(+
x
(*
y
(+
(*
2.0
(*
b
(- (* 0.6666666666666666 (/ 1.0 t)) (+ a 0.8333333333333334))))
1.0))))))
(if (<= c -1.15e+100)
1.0
(if (<= c -2.9e-37)
t_1
(if (<= c -1.15e-97)
1.0
(if (<= c -2.4e-174)
t_1
(if (<= c 2.5e-76)
1.0
(/
x
(-
x
(* y (- -1.0 (* 2.0 (+ (* c a) (* (* a a) (* c c)))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 * (1.0 / t)) - (a + 0.8333333333333334)))) + 1.0)));
double tmp;
if (c <= -1.15e+100) {
tmp = 1.0;
} else if (c <= -2.9e-37) {
tmp = t_1;
} else if (c <= -1.15e-97) {
tmp = 1.0;
} else if (c <= -2.4e-174) {
tmp = t_1;
} else if (c <= 2.5e-76) {
tmp = 1.0;
} else {
tmp = x / (x - (y * (-1.0 - (2.0 * ((c * a) + ((a * a) * (c * c)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * ((2.0d0 * (b * ((0.6666666666666666d0 * (1.0d0 / t)) - (a + 0.8333333333333334d0)))) + 1.0d0)))
if (c <= (-1.15d+100)) then
tmp = 1.0d0
else if (c <= (-2.9d-37)) then
tmp = t_1
else if (c <= (-1.15d-97)) then
tmp = 1.0d0
else if (c <= (-2.4d-174)) then
tmp = t_1
else if (c <= 2.5d-76) then
tmp = 1.0d0
else
tmp = x / (x - (y * ((-1.0d0) - (2.0d0 * ((c * a) + ((a * a) * (c * c)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 * (1.0 / t)) - (a + 0.8333333333333334)))) + 1.0)));
double tmp;
if (c <= -1.15e+100) {
tmp = 1.0;
} else if (c <= -2.9e-37) {
tmp = t_1;
} else if (c <= -1.15e-97) {
tmp = 1.0;
} else if (c <= -2.4e-174) {
tmp = t_1;
} else if (c <= 2.5e-76) {
tmp = 1.0;
} else {
tmp = x / (x - (y * (-1.0 - (2.0 * ((c * a) + ((a * a) * (c * c)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 * (1.0 / t)) - (a + 0.8333333333333334)))) + 1.0))) tmp = 0 if c <= -1.15e+100: tmp = 1.0 elif c <= -2.9e-37: tmp = t_1 elif c <= -1.15e-97: tmp = 1.0 elif c <= -2.4e-174: tmp = t_1 elif c <= 2.5e-76: tmp = 1.0 else: tmp = x / (x - (y * (-1.0 - (2.0 * ((c * a) + ((a * a) * (c * c))))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * Float64(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 * Float64(1.0 / t)) - Float64(a + 0.8333333333333334)))) + 1.0)))) tmp = 0.0 if (c <= -1.15e+100) tmp = 1.0; elseif (c <= -2.9e-37) tmp = t_1; elseif (c <= -1.15e-97) tmp = 1.0; elseif (c <= -2.4e-174) tmp = t_1; elseif (c <= 2.5e-76) tmp = 1.0; else tmp = Float64(x / Float64(x - Float64(y * Float64(-1.0 - Float64(2.0 * Float64(Float64(c * a) + Float64(Float64(a * a) * Float64(c * c)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 * (1.0 / t)) - (a + 0.8333333333333334)))) + 1.0))); tmp = 0.0; if (c <= -1.15e+100) tmp = 1.0; elseif (c <= -2.9e-37) tmp = t_1; elseif (c <= -1.15e-97) tmp = 1.0; elseif (c <= -2.4e-174) tmp = t_1; elseif (c <= 2.5e-76) tmp = 1.0; else tmp = x / (x - (y * (-1.0 - (2.0 * ((c * a) + ((a * a) * (c * c))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[(N[(2.0 * N[(b * N[(N[(0.6666666666666666 * N[(1.0 / t), $MachinePrecision]), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.15e+100], 1.0, If[LessEqual[c, -2.9e-37], t$95$1, If[LessEqual[c, -1.15e-97], 1.0, If[LessEqual[c, -2.4e-174], t$95$1, If[LessEqual[c, 2.5e-76], 1.0, N[(x / N[(x - N[(y * N[(-1.0 - N[(2.0 * N[(N[(c * a), $MachinePrecision] + N[(N[(a * a), $MachinePrecision] * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot \left(2 \cdot \left(b \cdot \left(0.6666666666666666 \cdot \frac{1}{t} - \left(a + 0.8333333333333334\right)\right)\right) + 1\right)}\\
\mathbf{if}\;c \leq -1.15 \cdot 10^{+100}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq -2.9 \cdot 10^{-37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -1.15 \cdot 10^{-97}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq -2.4 \cdot 10^{-174}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 2.5 \cdot 10^{-76}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x - y \cdot \left(-1 - 2 \cdot \left(c \cdot a + \left(a \cdot a\right) \cdot \left(c \cdot c\right)\right)\right)}\\
\end{array}
\end{array}
if c < -1.14999999999999995e100 or -2.90000000000000005e-37 < c < -1.14999999999999997e-97 or -2.4e-174 < c < 2.4999999999999999e-76Initial program 94.9%
Taylor expanded in t around inf 70.4%
mul-1-neg70.4%
distribute-rgt-neg-in70.4%
+-commutative70.4%
distribute-neg-in70.4%
neg-mul-170.4%
metadata-eval70.4%
+-commutative70.4%
neg-mul-170.4%
sub-neg70.4%
Simplified70.4%
Taylor expanded in x around inf 62.5%
if -1.14999999999999995e100 < c < -2.90000000000000005e-37 or -1.14999999999999997e-97 < c < -2.4e-174Initial program 91.7%
Taylor expanded in b around inf 77.8%
*-commutative77.8%
associate--r+77.8%
sub-neg77.8%
associate-*r/77.8%
metadata-eval77.8%
metadata-eval77.8%
associate-+r-77.8%
Simplified77.8%
Taylor expanded in b around 0 63.9%
if 2.4999999999999999e-76 < c Initial program 97.2%
Taylor expanded in a around inf 59.1%
Taylor expanded in b around 0 55.0%
Taylor expanded in c around 0 57.8%
distribute-lft-out57.8%
*-commutative57.8%
*-commutative57.8%
unpow257.8%
unpow257.8%
Simplified57.8%
Final simplification61.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/
x
(+
x
(*
y
(+
(*
2.0
(*
b
(- (* 0.6666666666666666 (/ 1.0 t)) (+ a 0.8333333333333334))))
1.0))))))
(if (<= c -3.3e+99)
1.0
(if (<= c -7.6e-36)
t_1
(if (<= c -1.7e-98)
1.0
(if (<= c -1.65e-176)
t_1
(if (<= c 2e-16)
1.0
(* x (/ 1.0 (+ x (- y (* 2.0 (* a (* y (- b c)))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 * (1.0 / t)) - (a + 0.8333333333333334)))) + 1.0)));
double tmp;
if (c <= -3.3e+99) {
tmp = 1.0;
} else if (c <= -7.6e-36) {
tmp = t_1;
} else if (c <= -1.7e-98) {
tmp = 1.0;
} else if (c <= -1.65e-176) {
tmp = t_1;
} else if (c <= 2e-16) {
tmp = 1.0;
} else {
tmp = x * (1.0 / (x + (y - (2.0 * (a * (y * (b - c)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * ((2.0d0 * (b * ((0.6666666666666666d0 * (1.0d0 / t)) - (a + 0.8333333333333334d0)))) + 1.0d0)))
if (c <= (-3.3d+99)) then
tmp = 1.0d0
else if (c <= (-7.6d-36)) then
tmp = t_1
else if (c <= (-1.7d-98)) then
tmp = 1.0d0
else if (c <= (-1.65d-176)) then
tmp = t_1
else if (c <= 2d-16) then
tmp = 1.0d0
else
tmp = x * (1.0d0 / (x + (y - (2.0d0 * (a * (y * (b - c)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 * (1.0 / t)) - (a + 0.8333333333333334)))) + 1.0)));
double tmp;
if (c <= -3.3e+99) {
tmp = 1.0;
} else if (c <= -7.6e-36) {
tmp = t_1;
} else if (c <= -1.7e-98) {
tmp = 1.0;
} else if (c <= -1.65e-176) {
tmp = t_1;
} else if (c <= 2e-16) {
tmp = 1.0;
} else {
tmp = x * (1.0 / (x + (y - (2.0 * (a * (y * (b - c)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 * (1.0 / t)) - (a + 0.8333333333333334)))) + 1.0))) tmp = 0 if c <= -3.3e+99: tmp = 1.0 elif c <= -7.6e-36: tmp = t_1 elif c <= -1.7e-98: tmp = 1.0 elif c <= -1.65e-176: tmp = t_1 elif c <= 2e-16: tmp = 1.0 else: tmp = x * (1.0 / (x + (y - (2.0 * (a * (y * (b - c))))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * Float64(Float64(2.0 * Float64(b * Float64(Float64(0.6666666666666666 * Float64(1.0 / t)) - Float64(a + 0.8333333333333334)))) + 1.0)))) tmp = 0.0 if (c <= -3.3e+99) tmp = 1.0; elseif (c <= -7.6e-36) tmp = t_1; elseif (c <= -1.7e-98) tmp = 1.0; elseif (c <= -1.65e-176) tmp = t_1; elseif (c <= 2e-16) tmp = 1.0; else tmp = Float64(x * Float64(1.0 / Float64(x + Float64(y - Float64(2.0 * Float64(a * Float64(y * Float64(b - c)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * ((2.0 * (b * ((0.6666666666666666 * (1.0 / t)) - (a + 0.8333333333333334)))) + 1.0))); tmp = 0.0; if (c <= -3.3e+99) tmp = 1.0; elseif (c <= -7.6e-36) tmp = t_1; elseif (c <= -1.7e-98) tmp = 1.0; elseif (c <= -1.65e-176) tmp = t_1; elseif (c <= 2e-16) tmp = 1.0; else tmp = x * (1.0 / (x + (y - (2.0 * (a * (y * (b - c))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[(N[(2.0 * N[(b * N[(N[(0.6666666666666666 * N[(1.0 / t), $MachinePrecision]), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.3e+99], 1.0, If[LessEqual[c, -7.6e-36], t$95$1, If[LessEqual[c, -1.7e-98], 1.0, If[LessEqual[c, -1.65e-176], t$95$1, If[LessEqual[c, 2e-16], 1.0, N[(x * N[(1.0 / N[(x + N[(y - N[(2.0 * N[(a * N[(y * N[(b - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot \left(2 \cdot \left(b \cdot \left(0.6666666666666666 \cdot \frac{1}{t} - \left(a + 0.8333333333333334\right)\right)\right) + 1\right)}\\
\mathbf{if}\;c \leq -3.3 \cdot 10^{+99}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq -7.6 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -1.7 \cdot 10^{-98}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq -1.65 \cdot 10^{-176}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 2 \cdot 10^{-16}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{x + \left(y - 2 \cdot \left(a \cdot \left(y \cdot \left(b - c\right)\right)\right)\right)}\\
\end{array}
\end{array}
if c < -3.2999999999999999e99 or -7.59999999999999942e-36 < c < -1.7000000000000001e-98 or -1.65000000000000006e-176 < c < 2e-16Initial program 94.7%
Taylor expanded in t around inf 69.7%
mul-1-neg69.7%
distribute-rgt-neg-in69.7%
+-commutative69.7%
distribute-neg-in69.7%
neg-mul-169.7%
metadata-eval69.7%
+-commutative69.7%
neg-mul-169.7%
sub-neg69.7%
Simplified69.7%
Taylor expanded in x around inf 62.5%
if -3.2999999999999999e99 < c < -7.59999999999999942e-36 or -1.7000000000000001e-98 < c < -1.65000000000000006e-176Initial program 91.7%
Taylor expanded in b around inf 77.8%
*-commutative77.8%
associate--r+77.8%
sub-neg77.8%
associate-*r/77.8%
metadata-eval77.8%
metadata-eval77.8%
associate-+r-77.8%
Simplified77.8%
Taylor expanded in b around 0 63.9%
if 2e-16 < c Initial program 98.3%
Taylor expanded in a around inf 56.7%
div-inv56.6%
exp-prod56.6%
Applied egg-rr56.6%
Taylor expanded in a around 0 50.1%
Final simplification60.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -9.5e-100)
1.0
(if (or (<= c -1.95e-174) (not (<= c 1.15e-13)))
(* x (/ 1.0 (+ x (- y (* 2.0 (* a (* y (- b c))))))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -9.5e-100) {
tmp = 1.0;
} else if ((c <= -1.95e-174) || !(c <= 1.15e-13)) {
tmp = x * (1.0 / (x + (y - (2.0 * (a * (y * (b - c)))))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= (-9.5d-100)) then
tmp = 1.0d0
else if ((c <= (-1.95d-174)) .or. (.not. (c <= 1.15d-13))) then
tmp = x * (1.0d0 / (x + (y - (2.0d0 * (a * (y * (b - c)))))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -9.5e-100) {
tmp = 1.0;
} else if ((c <= -1.95e-174) || !(c <= 1.15e-13)) {
tmp = x * (1.0 / (x + (y - (2.0 * (a * (y * (b - c)))))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -9.5e-100: tmp = 1.0 elif (c <= -1.95e-174) or not (c <= 1.15e-13): tmp = x * (1.0 / (x + (y - (2.0 * (a * (y * (b - c))))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -9.5e-100) tmp = 1.0; elseif ((c <= -1.95e-174) || !(c <= 1.15e-13)) tmp = Float64(x * Float64(1.0 / Float64(x + Float64(y - Float64(2.0 * Float64(a * Float64(y * Float64(b - c)))))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -9.5e-100) tmp = 1.0; elseif ((c <= -1.95e-174) || ~((c <= 1.15e-13))) tmp = x * (1.0 / (x + (y - (2.0 * (a * (y * (b - c))))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -9.5e-100], 1.0, If[Or[LessEqual[c, -1.95e-174], N[Not[LessEqual[c, 1.15e-13]], $MachinePrecision]], N[(x * N[(1.0 / N[(x + N[(y - N[(2.0 * N[(a * N[(y * N[(b - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -9.5 \cdot 10^{-100}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq -1.95 \cdot 10^{-174} \lor \neg \left(c \leq 1.15 \cdot 10^{-13}\right):\\
\;\;\;\;x \cdot \frac{1}{x + \left(y - 2 \cdot \left(a \cdot \left(y \cdot \left(b - c\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if c < -9.4999999999999992e-100 or -1.9499999999999999e-174 < c < 1.1499999999999999e-13Initial program 93.8%
Taylor expanded in t around inf 71.6%
mul-1-neg71.6%
distribute-rgt-neg-in71.6%
+-commutative71.6%
distribute-neg-in71.6%
neg-mul-171.6%
metadata-eval71.6%
+-commutative71.6%
neg-mul-171.6%
sub-neg71.6%
Simplified71.6%
Taylor expanded in x around inf 60.0%
if -9.4999999999999992e-100 < c < -1.9499999999999999e-174 or 1.1499999999999999e-13 < c Initial program 97.5%
Taylor expanded in a around inf 58.5%
div-inv58.5%
exp-prod58.5%
Applied egg-rr58.5%
Taylor expanded in a around 0 50.1%
Final simplification57.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -1.6e-99)
1.0
(if (<= c -3.8e-168)
(/ x (+ x (+ y (* -1.3333333333333333 (/ c (/ t y))))))
(if (<= c 8.5e-73) 1.0 (/ x (+ x (* y (+ (* 2.0 (* c a)) 1.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -1.6e-99) {
tmp = 1.0;
} else if (c <= -3.8e-168) {
tmp = x / (x + (y + (-1.3333333333333333 * (c / (t / y)))));
} else if (c <= 8.5e-73) {
tmp = 1.0;
} else {
tmp = x / (x + (y * ((2.0 * (c * a)) + 1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= (-1.6d-99)) then
tmp = 1.0d0
else if (c <= (-3.8d-168)) then
tmp = x / (x + (y + ((-1.3333333333333333d0) * (c / (t / y)))))
else if (c <= 8.5d-73) then
tmp = 1.0d0
else
tmp = x / (x + (y * ((2.0d0 * (c * a)) + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -1.6e-99) {
tmp = 1.0;
} else if (c <= -3.8e-168) {
tmp = x / (x + (y + (-1.3333333333333333 * (c / (t / y)))));
} else if (c <= 8.5e-73) {
tmp = 1.0;
} else {
tmp = x / (x + (y * ((2.0 * (c * a)) + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -1.6e-99: tmp = 1.0 elif c <= -3.8e-168: tmp = x / (x + (y + (-1.3333333333333333 * (c / (t / y))))) elif c <= 8.5e-73: tmp = 1.0 else: tmp = x / (x + (y * ((2.0 * (c * a)) + 1.0))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -1.6e-99) tmp = 1.0; elseif (c <= -3.8e-168) tmp = Float64(x / Float64(x + Float64(y + Float64(-1.3333333333333333 * Float64(c / Float64(t / y)))))); elseif (c <= 8.5e-73) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * Float64(Float64(2.0 * Float64(c * a)) + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -1.6e-99) tmp = 1.0; elseif (c <= -3.8e-168) tmp = x / (x + (y + (-1.3333333333333333 * (c / (t / y))))); elseif (c <= 8.5e-73) tmp = 1.0; else tmp = x / (x + (y * ((2.0 * (c * a)) + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -1.6e-99], 1.0, If[LessEqual[c, -3.8e-168], N[(x / N[(x + N[(y + N[(-1.3333333333333333 * N[(c / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8.5e-73], 1.0, N[(x / N[(x + N[(y * N[(N[(2.0 * N[(c * a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.6 \cdot 10^{-99}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq -3.8 \cdot 10^{-168}:\\
\;\;\;\;\frac{x}{x + \left(y + -1.3333333333333333 \cdot \frac{c}{\frac{t}{y}}\right)}\\
\mathbf{elif}\;c \leq 8.5 \cdot 10^{-73}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot \left(2 \cdot \left(c \cdot a\right) + 1\right)}\\
\end{array}
\end{array}
if c < -1.6e-99 or -3.8e-168 < c < 8.4999999999999996e-73Initial program 93.9%
Taylor expanded in t around inf 72.3%
mul-1-neg72.3%
distribute-rgt-neg-in72.3%
+-commutative72.3%
distribute-neg-in72.3%
neg-mul-172.3%
metadata-eval72.3%
+-commutative72.3%
neg-mul-172.3%
sub-neg72.3%
Simplified72.3%
Taylor expanded in x around inf 59.8%
if -1.6e-99 < c < -3.8e-168Initial program 95.2%
Taylor expanded in c around inf 54.1%
associate-*r/54.1%
metadata-eval54.1%
metadata-eval54.1%
associate-/r*54.1%
*-commutative54.1%
sub-neg54.1%
+-commutative54.1%
associate-+l+54.1%
sub-neg54.1%
*-commutative54.1%
associate-/r*54.1%
metadata-eval54.1%
sub-neg54.1%
distribute-neg-frac54.1%
metadata-eval54.1%
Simplified54.1%
Taylor expanded in t around 0 49.5%
associate-*r/49.5%
metadata-eval49.5%
distribute-lft-neg-in49.5%
*-commutative49.5%
distribute-rgt-neg-in49.5%
metadata-eval49.5%
associate-*r/49.5%
Simplified49.5%
Taylor expanded in c around 0 49.5%
associate-/l*49.5%
Simplified49.5%
if 8.4999999999999996e-73 < c Initial program 97.2%
Taylor expanded in a around inf 59.1%
Taylor expanded in b around 0 55.0%
Taylor expanded in c around 0 49.7%
Final simplification56.2%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b 1.65e-253)
1.0
(if (<= b 3.1e-22)
(/ x (+ 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 (b <= 1.65e-253) {
tmp = 1.0;
} else if (b <= 3.1e-22) {
tmp = x / (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 (b <= 1.65d-253) then
tmp = 1.0d0
else if (b <= 3.1d-22) then
tmp = x / (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 (b <= 1.65e-253) {
tmp = 1.0;
} else if (b <= 3.1e-22) {
tmp = x / (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 b <= 1.65e-253: tmp = 1.0 elif b <= 3.1e-22: tmp = x / (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 (b <= 1.65e-253) tmp = 1.0; elseif (b <= 3.1e-22) tmp = Float64(x / 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 (b <= 1.65e-253) tmp = 1.0; elseif (b <= 3.1e-22) tmp = x / (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[LessEqual[b, 1.65e-253], 1.0, If[LessEqual[b, 3.1e-22], N[(x / N[(x + N[(y + N[(-1.3333333333333333 * N[(N[(y * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.65 \cdot 10^{-253}:\\
\;\;\;\;1\\
\mathbf{elif}\;b \leq 3.1 \cdot 10^{-22}:\\
\;\;\;\;\frac{x}{x + \left(y + -1.3333333333333333 \cdot \frac{y \cdot c}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < 1.65e-253 or 3.10000000000000013e-22 < b Initial program 93.7%
Taylor expanded in t around inf 71.0%
mul-1-neg71.0%
distribute-rgt-neg-in71.0%
+-commutative71.0%
distribute-neg-in71.0%
neg-mul-171.0%
metadata-eval71.0%
+-commutative71.0%
neg-mul-171.0%
sub-neg71.0%
Simplified71.0%
Taylor expanded in x around inf 52.7%
if 1.65e-253 < b < 3.10000000000000013e-22Initial program 100.0%
Taylor expanded in c around inf 74.4%
associate-*r/74.4%
metadata-eval74.4%
metadata-eval74.4%
associate-/r*74.4%
*-commutative74.4%
sub-neg74.4%
+-commutative74.4%
associate-+l+74.4%
sub-neg74.4%
*-commutative74.4%
associate-/r*74.4%
metadata-eval74.4%
sub-neg74.4%
distribute-neg-frac74.4%
metadata-eval74.4%
Simplified74.4%
Taylor expanded in t around 0 60.8%
associate-*r/60.8%
metadata-eval60.8%
distribute-lft-neg-in60.8%
*-commutative60.8%
distribute-rgt-neg-in60.8%
metadata-eval60.8%
associate-*r/60.8%
Simplified60.8%
Taylor expanded in c around 0 57.2%
Final simplification53.6%
(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.9%
Taylor expanded in t around inf 69.8%
mul-1-neg69.8%
distribute-rgt-neg-in69.8%
+-commutative69.8%
distribute-neg-in69.8%
neg-mul-169.8%
metadata-eval69.8%
+-commutative69.8%
neg-mul-169.8%
sub-neg69.8%
Simplified69.8%
Taylor expanded in x around inf 50.4%
Final simplification50.4%
(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 2023242
(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)))))))))))