
(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 14 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
(if (<= c -5e+199)
(/
x
(+
x
(*
y
(exp
(* 2.0 (* c (+ a (+ (/ -0.6666666666666666 t) 0.8333333333333334))))))))
(/
x
(fma
y
(pow
(exp 2.0)
(fma
(+ (/ -0.6666666666666666 t) (+ a 0.8333333333333334))
(- c b)
(* (/ z t) (sqrt (+ a t)))))
x))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -5e+199) {
tmp = x / (x + (y * exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
} else {
tmp = x / fma(y, pow(exp(2.0), fma(((-0.6666666666666666 / t) + (a + 0.8333333333333334)), (c - b), ((z / t) * sqrt((a + t))))), x);
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -5e+199) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(Float64(-0.6666666666666666 / t) + 0.8333333333333334)))))))); else tmp = Float64(x / fma(y, (exp(2.0) ^ fma(Float64(Float64(-0.6666666666666666 / t) + Float64(a + 0.8333333333333334)), Float64(c - b), Float64(Float64(z / t) * sqrt(Float64(a + t))))), x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -5e+199], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(N[(-0.6666666666666666 / t), $MachinePrecision] + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(N[(-0.6666666666666666 / t), $MachinePrecision] + N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision] * N[(c - b), $MachinePrecision] + N[(N[(z / t), $MachinePrecision] * N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -5 \cdot 10^{+199}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(\frac{-0.6666666666666666}{t} + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, {\left(e^{2}\right)}^{\left(\mathsf{fma}\left(\frac{-0.6666666666666666}{t} + \left(a + 0.8333333333333334\right), c - b, \frac{z}{t} \cdot \sqrt{a + t}\right)\right)}, x\right)}\\
\end{array}
\end{array}
if c < -4.9999999999999998e199Initial program 72.2%
Taylor expanded in c around inf 100.0%
cancel-sign-sub-inv100.0%
+-commutative100.0%
metadata-eval100.0%
associate-*r/100.0%
metadata-eval100.0%
associate-+r+100.0%
Simplified100.0%
if -4.9999999999999998e199 < c Initial program 93.3%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (sqrt (+ a t))))
(if (<=
(+
(/ (* z t_1) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a 0.8333333333333334))))
INFINITY)
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(+
(/ z (/ t t_1))
(* (- a (- (/ (/ 2.0 t) 3.0) 0.8333333333333334)) (- c b)))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* c (+ a (+ (/ -0.6666666666666666 t) 0.8333333333333334)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = sqrt((a + t));
double tmp;
if ((((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))) <= ((double) INFINITY)) {
tmp = x / (x + (y * pow(exp(2.0), ((z / (t / t_1)) + ((a - (((2.0 / t) / 3.0) - 0.8333333333333334)) * (c - b))))));
} else {
tmp = x / (x + (y * exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = Math.sqrt((a + t));
double tmp;
if ((((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))) <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.pow(Math.exp(2.0), ((z / (t / t_1)) + ((a - (((2.0 / t) / 3.0) - 0.8333333333333334)) * (c - b))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = math.sqrt((a + t)) tmp = 0 if (((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))) <= math.inf: tmp = x / (x + (y * math.pow(math.exp(2.0), ((z / (t / t_1)) + ((a - (((2.0 / t) / 3.0) - 0.8333333333333334)) * (c - b)))))) else: tmp = x / (x + (y * math.exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334))))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = sqrt(Float64(a + t)) tmp = 0.0 if (Float64(Float64(Float64(z * t_1) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + 0.8333333333333334)))) <= Inf) tmp = Float64(x / Float64(x + Float64(y * (exp(2.0) ^ Float64(Float64(z / Float64(t / t_1)) + Float64(Float64(a - Float64(Float64(Float64(2.0 / t) / 3.0) - 0.8333333333333334)) * Float64(c - b))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(Float64(-0.6666666666666666 / t) + 0.8333333333333334)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = sqrt((a + t)); tmp = 0.0; if ((((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)))) <= Inf) tmp = x / (x + (y * (exp(2.0) ^ ((z / (t / t_1)) + ((a - (((2.0 / t) / 3.0) - 0.8333333333333334)) * (c - b)))))); else tmp = x / (x + (y * exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(z * t$95$1), $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], Infinity], N[(x / N[(x + N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(z / N[(t / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(a - N[(N[(N[(2.0 / t), $MachinePrecision] / 3.0), $MachinePrecision] - 0.8333333333333334), $MachinePrecision]), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(N[(-0.6666666666666666 / t), $MachinePrecision] + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{a + t}\\
\mathbf{if}\;\frac{z \cdot t_1}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + 0.8333333333333334\right)\right) \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{z}{\frac{t}{t_1}} + \left(a - \left(\frac{\frac{2}{t}}{3} - 0.8333333333333334\right)\right) \cdot \left(c - b\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(\frac{-0.6666666666666666}{t} + 0.8333333333333334\right)\right)\right)}}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 98.4%
exp-prod98.4%
associate-/l*99.6%
associate--l+99.6%
metadata-eval99.6%
associate-/r*99.6%
Simplified99.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 65.8%
cancel-sign-sub-inv65.8%
+-commutative65.8%
metadata-eval65.8%
associate-*r/65.8%
metadata-eval65.8%
associate-+r+65.8%
Simplified65.8%
Final simplification97.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* z (sqrt (+ a t))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a 0.8333333333333334))))))
(if (<= t_1 INFINITY)
(/ x (+ x (* y (exp (* 2.0 t_1)))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(* c (+ a (+ (/ -0.6666666666666666 t) 0.8333333333333334)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * sqrt((a + t))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = x / (x + (y * exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * Math.sqrt((a + t))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (y * Math.exp((2.0 * t_1))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((z * math.sqrt((a + t))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))) tmp = 0 if t_1 <= math.inf: tmp = x / (x + (y * math.exp((2.0 * t_1)))) else: tmp = x / (x + (y * math.exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334))))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(z * sqrt(Float64(a + t))) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + 0.8333333333333334)))) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * t_1))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(Float64(-0.6666666666666666 / t) + 0.8333333333333334)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((z * sqrt((a + t))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + 0.8333333333333334))); tmp = 0.0; if (t_1 <= Inf) tmp = x / (x + (y * exp((2.0 * t_1)))); else tmp = x / (x + (y * exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(z * N[Sqrt[N[(a + t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(N[(-0.6666666666666666 / t), $MachinePrecision] + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \sqrt{a + t}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + 0.8333333333333334\right)\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot t_1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(\frac{-0.6666666666666666}{t} + 0.8333333333333334\right)\right)\right)}}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) < +inf.0Initial program 98.4%
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 65.8%
cancel-sign-sub-inv65.8%
+-commutative65.8%
metadata-eval65.8%
associate-*r/65.8%
metadata-eval65.8%
associate-+r+65.8%
Simplified65.8%
Final simplification96.2%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -5e-11)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 2e-245)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 1.12e+49)
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(* z (sqrt (/ 1.0 t)))
(* (+ (/ -0.6666666666666666 t) 0.8333333333333334) (- c b))))))))
(/ x (+ x (* y (exp (* 2.0 (* (+ a 0.8333333333333334) (- c b)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -5e-11) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 2e-245) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1.12e+49) {
tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) + (((-0.6666666666666666 / t) + 0.8333333333333334) * (c - b)))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-5d-11)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 2d-245) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 1.12d+49) then
tmp = x / (x + (y * exp((2.0d0 * ((z * sqrt((1.0d0 / t))) + ((((-0.6666666666666666d0) / t) + 0.8333333333333334d0) * (c - b)))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((a + 0.8333333333333334d0) * (c - b))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -5e-11) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 2e-245) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1.12e+49) {
tmp = x / (x + (y * Math.exp((2.0 * ((z * Math.sqrt((1.0 / t))) + (((-0.6666666666666666 / t) + 0.8333333333333334) * (c - b)))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -5e-11: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 2e-245: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 1.12e+49: tmp = x / (x + (y * math.exp((2.0 * ((z * math.sqrt((1.0 / t))) + (((-0.6666666666666666 / t) + 0.8333333333333334) * (c - b))))))) else: tmp = x / (x + (y * math.exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -5e-11) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 2e-245) 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.12e+49) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(z * sqrt(Float64(1.0 / t))) + Float64(Float64(Float64(-0.6666666666666666 / t) + 0.8333333333333334) * Float64(c - b)))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -5e-11) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 2e-245) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 1.12e+49) tmp = x / (x + (y * exp((2.0 * ((z * sqrt((1.0 / t))) + (((-0.6666666666666666 / t) + 0.8333333333333334) * (c - b))))))); else tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -5e-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, 2e-245], 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.12e+49], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(z * N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(-0.6666666666666666 / t), $MachinePrecision] + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-11}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-245}:\\
\;\;\;\;\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.12 \cdot 10^{+49}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(z \cdot \sqrt{\frac{1}{t}} + \left(\frac{-0.6666666666666666}{t} + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < -5.00000000000000018e-11Initial program 93.3%
Taylor expanded in a around inf 93.5%
if -5.00000000000000018e-11 < t < 1.9999999999999999e-245Initial program 84.1%
Taylor expanded in t around 0 96.9%
if 1.9999999999999999e-245 < t < 1.12000000000000005e49Initial program 97.9%
Taylor expanded in a around 0 86.1%
*-commutative86.1%
*-commutative86.1%
cancel-sign-sub-inv86.1%
metadata-eval86.1%
associate-*r/86.1%
metadata-eval86.1%
Simplified86.1%
if 1.12000000000000005e49 < t Initial program 90.1%
Taylor expanded in t around inf 92.7%
mul-1-neg92.7%
+-commutative92.7%
distribute-rgt-neg-in92.7%
neg-sub092.7%
associate--r-92.7%
neg-sub092.7%
+-commutative92.7%
sub-neg92.7%
*-commutative92.7%
Simplified92.7%
Final simplification91.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -6e-8)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 6.9e-222)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 5e-113)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* c (+ a (+ (/ -0.6666666666666666 t) 0.8333333333333334))))))))
(if (<= t 1.3e-68)
1.0
(if (<= t 4.7e-10)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(/
x
(+
x
(* y (exp (* 2.0 (* (+ a 0.8333333333333334) (- c b)))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -6e-8) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 6.9e-222) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 5e-113) {
tmp = x / (x + (y * exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
} else if (t <= 1.3e-68) {
tmp = 1.0;
} else if (t <= 4.7e-10) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-6d-8)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 6.9d-222) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 5d-113) then
tmp = x / (x + (y * exp((2.0d0 * (c * (a + (((-0.6666666666666666d0) / t) + 0.8333333333333334d0)))))))
else if (t <= 1.3d-68) then
tmp = 1.0d0
else if (t <= 4.7d-10) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * ((a + 0.8333333333333334d0) * (c - b))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -6e-8) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 6.9e-222) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 5e-113) {
tmp = x / (x + (y * Math.exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334)))))));
} else if (t <= 1.3e-68) {
tmp = 1.0;
} else if (t <= 4.7e-10) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -6e-8: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 6.9e-222: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 5e-113: tmp = x / (x + (y * math.exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334))))))) elif t <= 1.3e-68: tmp = 1.0 elif t <= 4.7e-10: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -6e-8) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 6.9e-222) 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-113) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(Float64(-0.6666666666666666 / t) + 0.8333333333333334)))))))); elseif (t <= 1.3e-68) tmp = 1.0; elseif (t <= 4.7e-10) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -6e-8) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 6.9e-222) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 5e-113) tmp = x / (x + (y * exp((2.0 * (c * (a + ((-0.6666666666666666 / t) + 0.8333333333333334))))))); elseif (t <= 1.3e-68) tmp = 1.0; elseif (t <= 4.7e-10) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -6e-8], 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, 6.9e-222], 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-113], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(N[(-0.6666666666666666 / t), $MachinePrecision] + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-68], 1.0, If[LessEqual[t, 4.7e-10], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 6.9 \cdot 10^{-222}:\\
\;\;\;\;\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^{-113}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(\frac{-0.6666666666666666}{t} + 0.8333333333333334\right)\right)\right)}}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-68}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{-10}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < -5.99999999999999946e-8Initial program 93.3%
Taylor expanded in a around inf 93.5%
if -5.99999999999999946e-8 < t < 6.89999999999999976e-222Initial program 84.3%
Taylor expanded in t around 0 94.4%
if 6.89999999999999976e-222 < t < 4.9999999999999997e-113Initial program 96.8%
Taylor expanded in c around inf 81.3%
cancel-sign-sub-inv81.3%
+-commutative81.3%
metadata-eval81.3%
associate-*r/81.3%
metadata-eval81.3%
associate-+r+81.3%
Simplified81.3%
if 4.9999999999999997e-113 < t < 1.2999999999999999e-68Initial program 100.0%
Taylor expanded in a around inf 51.6%
Taylor expanded in x around inf 67.7%
if 1.2999999999999999e-68 < t < 4.7000000000000003e-10Initial program 99.9%
Taylor expanded in t around 0 52.3%
Taylor expanded in a around 0 91.5%
if 4.7000000000000003e-10 < t Initial program 92.0%
Taylor expanded in t around inf 91.2%
mul-1-neg91.2%
+-commutative91.2%
distribute-rgt-neg-in91.2%
neg-sub091.2%
associate--r-91.2%
neg-sub091.2%
+-commutative91.2%
sub-neg91.2%
*-commutative91.2%
Simplified91.2%
Final simplification89.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/
x
(+
x
(-
y
(*
2.0
(*
b
(*
y
(- a (+ (/ 0.6666666666666666 t) -0.8333333333333334)))))))))
(t_2 (/ x (+ x (* y (exp (* c 1.6666666666666667)))))))
(if (<= y -7.6e+58)
t_1
(if (<= y 1.85e-137)
t_2
(if (<= y 6e+161)
1.0
(if (<= y 3.2e+185)
t_1
(if (<= y 1.65e+251)
t_2
(if (<= y 5.7e+288)
(/ x (- y (* 1.3333333333333333 (/ (* y (- c b)) t))))
1.0))))))))
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 * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334)))))));
double t_2 = x / (x + (y * exp((c * 1.6666666666666667))));
double tmp;
if (y <= -7.6e+58) {
tmp = t_1;
} else if (y <= 1.85e-137) {
tmp = t_2;
} else if (y <= 6e+161) {
tmp = 1.0;
} else if (y <= 3.2e+185) {
tmp = t_1;
} else if (y <= 1.65e+251) {
tmp = t_2;
} else if (y <= 5.7e+288) {
tmp = x / (y - (1.3333333333333333 * ((y * (c - b)) / 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 = x / (x + (y - (2.0d0 * (b * (y * (a - ((0.6666666666666666d0 / t) + (-0.8333333333333334d0))))))))
t_2 = x / (x + (y * exp((c * 1.6666666666666667d0))))
if (y <= (-7.6d+58)) then
tmp = t_1
else if (y <= 1.85d-137) then
tmp = t_2
else if (y <= 6d+161) then
tmp = 1.0d0
else if (y <= 3.2d+185) then
tmp = t_1
else if (y <= 1.65d+251) then
tmp = t_2
else if (y <= 5.7d+288) then
tmp = x / (y - (1.3333333333333333d0 * ((y * (c - b)) / 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 = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334)))))));
double t_2 = x / (x + (y * Math.exp((c * 1.6666666666666667))));
double tmp;
if (y <= -7.6e+58) {
tmp = t_1;
} else if (y <= 1.85e-137) {
tmp = t_2;
} else if (y <= 6e+161) {
tmp = 1.0;
} else if (y <= 3.2e+185) {
tmp = t_1;
} else if (y <= 1.65e+251) {
tmp = t_2;
} else if (y <= 5.7e+288) {
tmp = x / (y - (1.3333333333333333 * ((y * (c - b)) / t)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334))))))) t_2 = x / (x + (y * math.exp((c * 1.6666666666666667)))) tmp = 0 if y <= -7.6e+58: tmp = t_1 elif y <= 1.85e-137: tmp = t_2 elif y <= 6e+161: tmp = 1.0 elif y <= 3.2e+185: tmp = t_1 elif y <= 1.65e+251: tmp = t_2 elif y <= 5.7e+288: tmp = x / (y - (1.3333333333333333 * ((y * (c - b)) / t))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y - Float64(2.0 * Float64(b * Float64(y * Float64(a - Float64(Float64(0.6666666666666666 / t) + -0.8333333333333334)))))))) t_2 = Float64(x / Float64(x + Float64(y * exp(Float64(c * 1.6666666666666667))))) tmp = 0.0 if (y <= -7.6e+58) tmp = t_1; elseif (y <= 1.85e-137) tmp = t_2; elseif (y <= 6e+161) tmp = 1.0; elseif (y <= 3.2e+185) tmp = t_1; elseif (y <= 1.65e+251) tmp = t_2; elseif (y <= 5.7e+288) tmp = Float64(x / Float64(y - Float64(1.3333333333333333 * Float64(Float64(y * Float64(c - b)) / t)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334))))))); t_2 = x / (x + (y * exp((c * 1.6666666666666667)))); tmp = 0.0; if (y <= -7.6e+58) tmp = t_1; elseif (y <= 1.85e-137) tmp = t_2; elseif (y <= 6e+161) tmp = 1.0; elseif (y <= 3.2e+185) tmp = t_1; elseif (y <= 1.65e+251) tmp = t_2; elseif (y <= 5.7e+288) tmp = x / (y - (1.3333333333333333 * ((y * (c - b)) / t))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y - N[(2.0 * N[(b * N[(y * N[(a - N[(N[(0.6666666666666666 / t), $MachinePrecision] + -0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(x + N[(y * N[Exp[N[(c * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.6e+58], t$95$1, If[LessEqual[y, 1.85e-137], t$95$2, If[LessEqual[y, 6e+161], 1.0, If[LessEqual[y, 3.2e+185], t$95$1, If[LessEqual[y, 1.65e+251], t$95$2, If[LessEqual[y, 5.7e+288], N[(x / N[(y - N[(1.3333333333333333 * N[(N[(y * N[(c - b), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + \left(y - 2 \cdot \left(b \cdot \left(y \cdot \left(a - \left(\frac{0.6666666666666666}{t} + -0.8333333333333334\right)\right)\right)\right)\right)}\\
t_2 := \frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\mathbf{if}\;y \leq -7.6 \cdot 10^{+58}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-137}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+161}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+185}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+251}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 5.7 \cdot 10^{+288}:\\
\;\;\;\;\frac{x}{y - 1.3333333333333333 \cdot \frac{y \cdot \left(c - b\right)}{t}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -7.5999999999999997e58 or 6.00000000000000023e161 < y < 3.20000000000000006e185Initial program 92.7%
Taylor expanded in b around inf 53.5%
associate-*r/53.5%
metadata-eval53.5%
+-commutative53.5%
Simplified53.5%
Taylor expanded in b around 0 60.6%
associate--r+60.6%
sub-neg60.6%
associate-*r/60.6%
metadata-eval60.6%
metadata-eval60.6%
Simplified60.6%
if -7.5999999999999997e58 < y < 1.85e-137 or 3.20000000000000006e185 < y < 1.65000000000000009e251Initial program 92.4%
Taylor expanded in t around inf 77.8%
mul-1-neg77.8%
+-commutative77.8%
distribute-rgt-neg-in77.8%
neg-sub077.8%
associate--r-77.8%
neg-sub077.8%
+-commutative77.8%
sub-neg77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in a around 0 68.1%
Taylor expanded in c around inf 68.9%
*-commutative68.9%
Simplified68.9%
if 1.85e-137 < y < 6.00000000000000023e161 or 5.7000000000000004e288 < y Initial program 90.3%
Taylor expanded in a around inf 54.8%
Taylor expanded in x around inf 76.6%
if 1.65000000000000009e251 < y < 5.7000000000000004e288Initial program 89.2%
Taylor expanded in t around 0 66.7%
Taylor expanded in a around 0 79.0%
Taylor expanded in x around 0 56.7%
Taylor expanded in t around inf 78.5%
Final simplification69.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -2e-73)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 1.46e-11)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(/ x (+ x (* y (exp (* 2.0 (* (+ a 0.8333333333333334) (- c b))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -2e-73) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 1.46e-11) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-2d-73)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 1.46d-11) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp((2.0d0 * ((a + 0.8333333333333334d0) * (c - b))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -2e-73) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 1.46e-11) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((a + 0.8333333333333334) * (c - b))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -2e-73: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 1.46e-11: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -2e-73) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 1.46e-11) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(a + 0.8333333333333334) * Float64(c - b))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -2e-73) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 1.46e-11) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp((2.0 * ((a + 0.8333333333333334) * (c - b)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -2e-73], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.46e-11], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-73}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 1.46 \cdot 10^{-11}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a + 0.8333333333333334\right) \cdot \left(c - b\right)\right)}}\\
\end{array}
\end{array}
if t < -1.99999999999999999e-73Initial program 92.6%
Taylor expanded in a around inf 89.2%
if -1.99999999999999999e-73 < t < 1.46e-11Initial program 91.5%
Taylor expanded in t around 0 76.4%
Taylor expanded in a around 0 76.1%
if 1.46e-11 < t Initial program 92.0%
Taylor expanded in t around inf 91.2%
mul-1-neg91.2%
+-commutative91.2%
distribute-rgt-neg-in91.2%
neg-sub091.2%
associate--r-91.2%
neg-sub091.2%
+-commutative91.2%
sub-neg91.2%
*-commutative91.2%
Simplified91.2%
Final simplification83.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -1e-135)
1.0
(if (<= t -8.6e-232)
(/ x (+ x (+ y (* 1.3333333333333333 (/ y (/ t (- b c)))))))
(if (<= t 4.5e-12)
1.0
(/ x (+ x (* y (exp (* b -1.6666666666666667)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1e-135) {
tmp = 1.0;
} else if (t <= -8.6e-232) {
tmp = x / (x + (y + (1.3333333333333333 * (y / (t / (b - c))))));
} else if (t <= 4.5e-12) {
tmp = 1.0;
} else {
tmp = x / (x + (y * exp((b * -1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-1d-135)) then
tmp = 1.0d0
else if (t <= (-8.6d-232)) then
tmp = x / (x + (y + (1.3333333333333333d0 * (y / (t / (b - c))))))
else if (t <= 4.5d-12) then
tmp = 1.0d0
else
tmp = x / (x + (y * exp((b * (-1.6666666666666667d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1e-135) {
tmp = 1.0;
} else if (t <= -8.6e-232) {
tmp = x / (x + (y + (1.3333333333333333 * (y / (t / (b - c))))));
} else if (t <= 4.5e-12) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((b * -1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1e-135: tmp = 1.0 elif t <= -8.6e-232: tmp = x / (x + (y + (1.3333333333333333 * (y / (t / (b - c)))))) elif t <= 4.5e-12: tmp = 1.0 else: tmp = x / (x + (y * math.exp((b * -1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1e-135) tmp = 1.0; elseif (t <= -8.6e-232) tmp = Float64(x / Float64(x + Float64(y + Float64(1.3333333333333333 * Float64(y / Float64(t / Float64(b - c))))))); elseif (t <= 4.5e-12) tmp = 1.0; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(b * -1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -1e-135) tmp = 1.0; elseif (t <= -8.6e-232) tmp = x / (x + (y + (1.3333333333333333 * (y / (t / (b - c)))))); elseif (t <= 4.5e-12) tmp = 1.0; else tmp = x / (x + (y * exp((b * -1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1e-135], 1.0, If[LessEqual[t, -8.6e-232], N[(x / N[(x + N[(y + N[(1.3333333333333333 * N[(y / N[(t / N[(b - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-12], 1.0, N[(x / N[(x + N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-135}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq -8.6 \cdot 10^{-232}:\\
\;\;\;\;\frac{x}{x + \left(y + 1.3333333333333333 \cdot \frac{y}{\frac{t}{b - c}}\right)}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-12}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{b \cdot -1.6666666666666667}}\\
\end{array}
\end{array}
if t < -1e-135 or -8.5999999999999994e-232 < t < 4.49999999999999981e-12Initial program 92.2%
Taylor expanded in a around inf 60.5%
Taylor expanded in x around inf 66.6%
if -1e-135 < t < -8.5999999999999994e-232Initial program 85.7%
Taylor expanded in t around 0 100.0%
Taylor expanded in t around inf 86.2%
Taylor expanded in a around 0 59.0%
+-commutative59.0%
associate-/l*65.9%
Simplified65.9%
if 4.49999999999999981e-12 < t Initial program 92.1%
Taylor expanded in t around inf 90.3%
mul-1-neg90.3%
+-commutative90.3%
distribute-rgt-neg-in90.3%
neg-sub090.3%
associate--r-90.3%
neg-sub090.3%
+-commutative90.3%
sub-neg90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in a around 0 69.8%
Taylor expanded in c around 0 60.2%
*-commutative60.2%
Simplified60.2%
Final simplification64.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= c -5e+158)
1.0
(if (<= c 8e-206)
(/ x (+ x (* y (exp (* -2.0 (* a b))))))
(if (<= c 1e+25) 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 tmp;
if (c <= -5e+158) {
tmp = 1.0;
} else if (c <= 8e-206) {
tmp = x / (x + (y * exp((-2.0 * (a * b)))));
} else if (c <= 1e+25) {
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) :: tmp
if (c <= (-5d+158)) then
tmp = 1.0d0
else if (c <= 8d-206) then
tmp = x / (x + (y * exp(((-2.0d0) * (a * b)))))
else if (c <= 1d+25) 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 tmp;
if (c <= -5e+158) {
tmp = 1.0;
} else if (c <= 8e-206) {
tmp = x / (x + (y * Math.exp((-2.0 * (a * b)))));
} else if (c <= 1e+25) {
tmp = 1.0;
} else {
tmp = x / (x + (y * Math.exp((c * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -5e+158: tmp = 1.0 elif c <= 8e-206: tmp = x / (x + (y * math.exp((-2.0 * (a * b))))) elif c <= 1e+25: tmp = 1.0 else: tmp = x / (x + (y * math.exp((c * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -5e+158) tmp = 1.0; elseif (c <= 8e-206) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(-2.0 * Float64(a * b)))))); elseif (c <= 1e+25) 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) tmp = 0.0; if (c <= -5e+158) tmp = 1.0; elseif (c <= 8e-206) tmp = x / (x + (y * exp((-2.0 * (a * b))))); elseif (c <= 1e+25) 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_] := If[LessEqual[c, -5e+158], 1.0, If[LessEqual[c, 8e-206], N[(x / N[(x + N[(y * N[Exp[N[(-2.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1e+25], 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}
\mathbf{if}\;c \leq -5 \cdot 10^{+158}:\\
\;\;\;\;1\\
\mathbf{elif}\;c \leq 8 \cdot 10^{-206}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{-2 \cdot \left(a \cdot b\right)}}\\
\mathbf{elif}\;c \leq 10^{+25}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{c \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if c < -4.9999999999999996e158 or 8.00000000000000023e-206 < c < 1.00000000000000009e25Initial program 85.2%
Taylor expanded in a around inf 64.7%
Taylor expanded in x around inf 62.1%
if -4.9999999999999996e158 < c < 8.00000000000000023e-206Initial program 96.7%
Taylor expanded in a around inf 68.8%
Taylor expanded in c around 0 66.4%
if 1.00000000000000009e25 < c Initial program 90.2%
Taylor expanded in t around inf 68.2%
mul-1-neg68.2%
+-commutative68.2%
distribute-rgt-neg-in68.2%
neg-sub068.2%
associate--r-68.2%
neg-sub068.2%
+-commutative68.2%
sub-neg68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in a around 0 63.5%
Taylor expanded in c around inf 65.1%
*-commutative65.1%
Simplified65.1%
Final simplification64.9%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= a -3.8e-9) (not (<= a 2.3e+25))) (/ x (+ x (* y (exp (* 2.0 (* a (- c b))))))) (/ 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 tmp;
if ((a <= -3.8e-9) || !(a <= 2.3e+25)) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((a <= (-3.8d-9)) .or. (.not. (a <= 2.3d+25))) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -3.8e-9) || !(a <= 2.3e+25)) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a <= -3.8e-9) or not (a <= 2.3e+25): tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) else: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((a <= -3.8e-9) || !(a <= 2.3e+25)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); 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) tmp = 0.0; if ((a <= -3.8e-9) || ~((a <= 2.3e+25))) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); else tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -3.8e-9], N[Not[LessEqual[a, 2.3e+25]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-9} \lor \neg \left(a \leq 2.3 \cdot 10^{+25}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\end{array}
\end{array}
if a < -3.80000000000000011e-9 or 2.2999999999999998e25 < a Initial program 86.0%
Taylor expanded in a around inf 84.1%
if -3.80000000000000011e-9 < a < 2.2999999999999998e25Initial program 97.7%
Taylor expanded in t around 0 55.9%
Taylor expanded in a around 0 70.5%
Final simplification77.3%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -1.9e-251) (not (<= t 9e-14))) (/ x (+ x (* y (exp (* 1.6666666666666667 (- c b)))))) 1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.9e-251) || !(t <= 9e-14)) {
tmp = x / (x + (y * exp((1.6666666666666667 * (c - 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 ((t <= (-1.9d-251)) .or. (.not. (t <= 9d-14))) then
tmp = x / (x + (y * exp((1.6666666666666667d0 * (c - 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 ((t <= -1.9e-251) || !(t <= 9e-14)) {
tmp = x / (x + (y * Math.exp((1.6666666666666667 * (c - b)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -1.9e-251) or not (t <= 9e-14): tmp = x / (x + (y * math.exp((1.6666666666666667 * (c - b))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -1.9e-251) || !(t <= 9e-14)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.6666666666666667 * Float64(c - b)))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -1.9e-251) || ~((t <= 9e-14))) tmp = x / (x + (y * exp((1.6666666666666667 * (c - b))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -1.9e-251], N[Not[LessEqual[t, 9e-14]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(1.6666666666666667 * N[(c - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-251} \lor \neg \left(t \leq 9 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.6666666666666667 \cdot \left(c - b\right)}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.8999999999999999e-251 or 8.9999999999999995e-14 < t Initial program 91.0%
Taylor expanded in t around inf 88.0%
mul-1-neg88.0%
+-commutative88.0%
distribute-rgt-neg-in88.0%
neg-sub088.0%
associate--r-88.0%
neg-sub088.0%
+-commutative88.0%
sub-neg88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in a around 0 71.0%
if -1.8999999999999999e-251 < t < 8.9999999999999995e-14Initial program 93.1%
Taylor expanded in a around inf 49.8%
Taylor expanded in x around inf 65.9%
Final simplification69.0%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 5e-10) (/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t)))))) (/ x (+ x (* y (exp (* (- c b) 1.6666666666666667)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 5e-10) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 5d-10) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else
tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 5e-10) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else {
tmp = x / (x + (y * Math.exp(((c - b) * 1.6666666666666667))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 5e-10: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) else: tmp = x / (x + (y * math.exp(((c - b) * 1.6666666666666667)))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 5e-10) 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(c - b) * 1.6666666666666667))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 5e-10) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); else tmp = x / (x + (y * exp(((c - b) * 1.6666666666666667)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 5e-10], 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[(c - b), $MachinePrecision] * 1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{-10}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\left(c - b\right) \cdot 1.6666666666666667}}\\
\end{array}
\end{array}
if t < 5.00000000000000031e-10Initial program 91.7%
Taylor expanded in t around 0 75.6%
Taylor expanded in a around 0 73.5%
if 5.00000000000000031e-10 < t Initial program 92.0%
Taylor expanded in t around inf 91.2%
mul-1-neg91.2%
+-commutative91.2%
distribute-rgt-neg-in91.2%
neg-sub091.2%
associate--r-91.2%
neg-sub091.2%
+-commutative91.2%
sub-neg91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in a around 0 70.5%
Final simplification72.3%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -7600000000000.0) (/ 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 (b <= -7600000000000.0) {
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 (b <= (-7600000000000.0d0)) 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 (b <= -7600000000000.0) {
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 b <= -7600000000000.0: 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 (b <= -7600000000000.0) 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 (b <= -7600000000000.0) 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[LessEqual[b, -7600000000000.0], 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}\;b \leq -7600000000000:\\
\;\;\;\;\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 b < -7.6e12Initial program 87.6%
Taylor expanded in b around inf 85.9%
associate-*r/85.9%
metadata-eval85.9%
+-commutative85.9%
Simplified85.9%
Taylor expanded in b around 0 45.0%
associate--r+45.0%
sub-neg45.0%
associate-*r/45.0%
metadata-eval45.0%
metadata-eval45.0%
Simplified45.0%
Taylor expanded in a around inf 55.9%
mul-1-neg55.9%
*-commutative55.9%
distribute-rgt-neg-in55.9%
Simplified55.9%
if -7.6e12 < b Initial program 92.8%
Taylor expanded in a around inf 65.6%
Taylor expanded in x around inf 56.4%
Final simplification56.3%
(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 91.8%
Taylor expanded in a around inf 64.5%
Taylor expanded in x around inf 53.6%
Final simplification53.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 2024020
(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)))))))))))