
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* z (sqrt (+ 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
(+
(* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))
1.0)))))))
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 * ((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)) + 1.0)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((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 * ((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)) + 1.0)));
}
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 * ((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)) + 1.0))) 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 * Float64(Float64(2.0 * Float64(Float64(Float64(z * sqrt(a)) + Float64(-0.6666666666666666 * Float64(c - b))) / t)) + 1.0)))); 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 * ((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)) + 1.0))); 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[(N[(2.0 * N[(N[(N[(z * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] + N[(-0.6666666666666666 * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $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 \left(2 \cdot \frac{z \cdot \sqrt{a} + -0.6666666666666666 \cdot \left(c - b\right)}{t} + 1\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.2%
if +inf.0 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 5 6)) (/.f64 2 (*.f64 t 3))))) Initial program 0.0%
Taylor expanded in t around 0 70.9%
Taylor expanded in t around inf 70.9%
Final simplification98.1%
(FPCore (x y z t a b c)
:precision binary64
(/
x
(fma
y
(pow
(exp 2.0)
(fma
(+ (+ a 0.8333333333333334) (/ -0.6666666666666666 t))
(- c b)
(* (/ z t) (sqrt (+ a 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(((a + 0.8333333333333334) + (-0.6666666666666666 / t)), (c - b), ((z / t) * sqrt((a + t))))), x);
}
function code(x, y, z, t, a, b, c) return Float64(x / fma(y, (exp(2.0) ^ fma(Float64(Float64(a + 0.8333333333333334) + Float64(-0.6666666666666666 / t)), Float64(c - b), Float64(Float64(z / t) * sqrt(Float64(a + t))))), x)) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(y * N[Power[N[Exp[2.0], $MachinePrecision], N[(N[(N[(a + 0.8333333333333334), $MachinePrecision] + N[(-0.6666666666666666 / t), $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}
\\
\frac{x}{\mathsf{fma}\left(y, {\left(e^{2}\right)}^{\left(\mathsf{fma}\left(\left(a + 0.8333333333333334\right) + \frac{-0.6666666666666666}{t}, c - b, \frac{z}{t} \cdot \sqrt{a + t}\right)\right)}, x\right)}
\end{array}
Initial program 95.3%
Simplified96.6%
Final simplification96.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -3.3e-32)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 2e-200)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 1.35e+156)
(/
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 <= -3.3e-32) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 2e-200) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1.35e+156) {
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 <= (-3.3d-32)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 2d-200) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 1.35d+156) 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 <= -3.3e-32) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 2e-200) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 1.35e+156) {
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 <= -3.3e-32: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 2e-200: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 1.35e+156: 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 <= -3.3e-32) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 2e-200) 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.35e+156) 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 <= -3.3e-32) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 2e-200) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 1.35e+156) 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, -3.3e-32], 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-200], 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.35e+156], 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 -3.3 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-200}:\\
\;\;\;\;\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.35 \cdot 10^{+156}:\\
\;\;\;\;\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 < -3.30000000000000025e-32Initial program 88.9%
Taylor expanded in a around inf 96.6%
if -3.30000000000000025e-32 < t < 2e-200Initial program 90.5%
Taylor expanded in t around 0 96.1%
if 2e-200 < t < 1.35e156Initial program 100.0%
Taylor expanded in a around 0 97.9%
*-commutative97.9%
*-commutative97.9%
cancel-sign-sub-inv97.9%
metadata-eval97.9%
associate-*r/97.9%
metadata-eval97.9%
Simplified97.9%
if 1.35e156 < t Initial program 96.9%
Taylor expanded in t around inf 98.5%
mul-1-neg98.5%
distribute-rgt-neg-in98.5%
+-commutative98.5%
neg-sub098.5%
associate--r-98.5%
neg-sub098.5%
+-commutative98.5%
sub-neg98.5%
Simplified98.5%
Final simplification97.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -3.2e-32)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 8.2e-128)
(/
x
(+
x
(*
y
(exp
(* 2.0 (/ (+ (* z (sqrt a)) (* -0.6666666666666666 (- c b))) t))))))
(if (<= t 2000000000.0)
(/ 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 <= -3.2e-32) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 8.2e-128) {
tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 2000000000.0) {
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 <= (-3.2d-32)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 8.2d-128) then
tmp = x / (x + (y * exp((2.0d0 * (((z * sqrt(a)) + ((-0.6666666666666666d0) * (c - b))) / t)))))
else if (t <= 2000000000.0d0) 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 <= -3.2e-32) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 8.2e-128) {
tmp = x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t)))));
} else if (t <= 2000000000.0) {
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 <= -3.2e-32: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 8.2e-128: tmp = x / (x + (y * math.exp((2.0 * (((z * math.sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))) elif t <= 2000000000.0: 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 <= -3.2e-32) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 8.2e-128) 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 <= 2000000000.0) 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 <= -3.2e-32) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 8.2e-128) tmp = x / (x + (y * exp((2.0 * (((z * sqrt(a)) + (-0.6666666666666666 * (c - b))) / t))))); elseif (t <= 2000000000.0) 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, -3.2e-32], 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, 8.2e-128], 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, 2000000000.0], 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 -3.2 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-128}:\\
\;\;\;\;\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 2000000000:\\
\;\;\;\;\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 < -3.2000000000000002e-32Initial program 88.9%
Taylor expanded in a around inf 96.6%
if -3.2000000000000002e-32 < t < 8.1999999999999999e-128Initial program 91.6%
Taylor expanded in t around 0 94.1%
if 8.1999999999999999e-128 < t < 2e9Initial program 100.0%
Taylor expanded in t around 0 38.0%
Taylor expanded in a around 0 73.9%
if 2e9 < t Initial program 98.2%
Taylor expanded in t around inf 94.7%
mul-1-neg94.7%
distribute-rgt-neg-in94.7%
+-commutative94.7%
neg-sub094.7%
associate--r-94.7%
neg-sub094.7%
+-commutative94.7%
sub-neg94.7%
Simplified94.7%
Final simplification91.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 1.6666666666666667 (- c b))))))))
(if (<= t -1.08e-99)
t_1
(if (<= t -1.8e-178)
1.0
(if (<= t -1e-310)
t_1
(if (<= t 0.017)
(/
x
(+
x
(-
y
(*
2.0
(*
b
(*
y
(- a (+ (/ 0.6666666666666666 t) -0.8333333333333334))))))))
(if (or (<= t 7.6e+198) (not (<= t 1.45e+228))) t_1 1.0)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((1.6666666666666667 * (c - b)))));
double tmp;
if (t <= -1.08e-99) {
tmp = t_1;
} else if (t <= -1.8e-178) {
tmp = 1.0;
} else if (t <= -1e-310) {
tmp = t_1;
} else if (t <= 0.017) {
tmp = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334)))))));
} else if ((t <= 7.6e+198) || !(t <= 1.45e+228)) {
tmp = t_1;
} 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) :: tmp
t_1 = x / (x + (y * exp((1.6666666666666667d0 * (c - b)))))
if (t <= (-1.08d-99)) then
tmp = t_1
else if (t <= (-1.8d-178)) then
tmp = 1.0d0
else if (t <= (-1d-310)) then
tmp = t_1
else if (t <= 0.017d0) then
tmp = x / (x + (y - (2.0d0 * (b * (y * (a - ((0.6666666666666666d0 / t) + (-0.8333333333333334d0))))))))
else if ((t <= 7.6d+198) .or. (.not. (t <= 1.45d+228))) then
tmp = t_1
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 * Math.exp((1.6666666666666667 * (c - b)))));
double tmp;
if (t <= -1.08e-99) {
tmp = t_1;
} else if (t <= -1.8e-178) {
tmp = 1.0;
} else if (t <= -1e-310) {
tmp = t_1;
} else if (t <= 0.017) {
tmp = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334)))))));
} else if ((t <= 7.6e+198) || !(t <= 1.45e+228)) {
tmp = t_1;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((1.6666666666666667 * (c - b))))) tmp = 0 if t <= -1.08e-99: tmp = t_1 elif t <= -1.8e-178: tmp = 1.0 elif t <= -1e-310: tmp = t_1 elif t <= 0.017: tmp = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334))))))) elif (t <= 7.6e+198) or not (t <= 1.45e+228): tmp = t_1 else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(1.6666666666666667 * Float64(c - b)))))) tmp = 0.0 if (t <= -1.08e-99) tmp = t_1; elseif (t <= -1.8e-178) tmp = 1.0; elseif (t <= -1e-310) tmp = t_1; elseif (t <= 0.017) tmp = Float64(x / Float64(x + Float64(y - Float64(2.0 * Float64(b * Float64(y * Float64(a - Float64(Float64(0.6666666666666666 / t) + -0.8333333333333334)))))))); elseif ((t <= 7.6e+198) || !(t <= 1.45e+228)) tmp = t_1; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((1.6666666666666667 * (c - b))))); tmp = 0.0; if (t <= -1.08e-99) tmp = t_1; elseif (t <= -1.8e-178) tmp = 1.0; elseif (t <= -1e-310) tmp = t_1; elseif (t <= 0.017) tmp = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334))))))); elseif ((t <= 7.6e+198) || ~((t <= 1.45e+228))) tmp = t_1; 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[Exp[N[(1.6666666666666667 * N[(c - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.08e-99], t$95$1, If[LessEqual[t, -1.8e-178], 1.0, If[LessEqual[t, -1e-310], t$95$1, If[LessEqual[t, 0.017], 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], If[Or[LessEqual[t, 7.6e+198], N[Not[LessEqual[t, 1.45e+228]], $MachinePrecision]], t$95$1, 1.0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{1.6666666666666667 \cdot \left(c - b\right)}}\\
\mathbf{if}\;t \leq -1.08 \cdot 10^{-99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{-178}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.017:\\
\;\;\;\;\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)}\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+198} \lor \neg \left(t \leq 1.45 \cdot 10^{+228}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.08000000000000006e-99 or -1.79999999999999997e-178 < t < -9.999999999999969e-311 or 0.017000000000000001 < t < 7.59999999999999976e198 or 1.45000000000000001e228 < t Initial program 95.8%
Taylor expanded in t around inf 92.4%
mul-1-neg92.4%
distribute-rgt-neg-in92.4%
+-commutative92.4%
neg-sub092.4%
associate--r-92.4%
neg-sub092.4%
+-commutative92.4%
sub-neg92.4%
Simplified92.4%
Taylor expanded in a around 0 85.9%
if -1.08000000000000006e-99 < t < -1.79999999999999997e-178 or 7.59999999999999976e198 < t < 1.45000000000000001e228Initial program 92.6%
Taylor expanded in t around inf 82.0%
mul-1-neg82.0%
distribute-rgt-neg-in82.0%
+-commutative82.0%
neg-sub082.0%
associate--r-82.0%
neg-sub082.0%
+-commutative82.0%
sub-neg82.0%
Simplified82.0%
Taylor expanded in a around 0 49.7%
Taylor expanded in x around inf 85.6%
if -9.999999999999969e-311 < t < 0.017000000000000001Initial program 95.4%
Taylor expanded in b around inf 67.3%
associate-*r/67.3%
metadata-eval67.3%
+-commutative67.3%
Simplified67.3%
Taylor expanded in b around 0 55.5%
associate--r+55.5%
sub-neg55.5%
associate-*r/55.5%
metadata-eval55.5%
metadata-eval55.5%
Simplified55.5%
Final simplification78.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))))
(if (<= t -2e-37)
t_1
(if (<= t 0.2)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (or (<= t 5.8e+209) (not (<= t 1.85e+230)))
(/ x (+ x (* y (exp (* 1.6666666666666667 (- c b))))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((2.0 * (a * (c - b))))));
double tmp;
if (t <= -2e-37) {
tmp = t_1;
} else if (t <= 0.2) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 5.8e+209) || !(t <= 1.85e+230)) {
tmp = x / (x + (y * exp((1.6666666666666667 * (c - b)))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
if (t <= (-2d-37)) then
tmp = t_1
else if (t <= 0.2d0) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if ((t <= 5.8d+209) .or. (.not. (t <= 1.85d+230))) then
tmp = x / (x + (y * exp((1.6666666666666667d0 * (c - b)))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
double tmp;
if (t <= -2e-37) {
tmp = t_1;
} else if (t <= 0.2) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 5.8e+209) || !(t <= 1.85e+230)) {
tmp = x / (x + (y * Math.exp((1.6666666666666667 * (c - b)))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) tmp = 0 if t <= -2e-37: tmp = t_1 elif t <= 0.2: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif (t <= 5.8e+209) or not (t <= 1.85e+230): tmp = x / (x + (y * math.exp((1.6666666666666667 * (c - b))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))) tmp = 0.0 if (t <= -2e-37) tmp = t_1; elseif (t <= 0.2) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif ((t <= 5.8e+209) || !(t <= 1.85e+230)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.6666666666666667 * Float64(c - b)))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((2.0 * (a * (c - b)))))); tmp = 0.0; if (t <= -2e-37) tmp = t_1; elseif (t <= 0.2) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif ((t <= 5.8e+209) || ~((t <= 1.85e+230))) tmp = x / (x + (y * exp((1.6666666666666667 * (c - b))))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-37], t$95$1, If[LessEqual[t, 0.2], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 5.8e+209], N[Not[LessEqual[t, 1.85e+230]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(1.6666666666666667 * N[(c - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{if}\;t \leq -2 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.2:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+209} \lor \neg \left(t \leq 1.85 \cdot 10^{+230}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.6666666666666667 \cdot \left(c - b\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.00000000000000013e-37 or 5.79999999999999999e209 < t < 1.84999999999999996e230Initial program 92.5%
Taylor expanded in a around inf 95.3%
if -2.00000000000000013e-37 < t < 0.20000000000000001Initial program 93.8%
Taylor expanded in t around 0 77.8%
Taylor expanded in a around 0 81.9%
if 0.20000000000000001 < t < 5.79999999999999999e209 or 1.84999999999999996e230 < t Initial program 98.1%
Taylor expanded in t around inf 92.6%
mul-1-neg92.6%
distribute-rgt-neg-in92.6%
+-commutative92.6%
neg-sub092.6%
associate--r-92.6%
neg-sub092.6%
+-commutative92.6%
sub-neg92.6%
Simplified92.6%
Taylor expanded in a around 0 87.9%
Final simplification86.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 1.6666666666666667 (- c b))))))))
(if (<= t -1e-310)
t_1
(if (<= t 0.0145)
(/
x
(+
x
(-
y
(*
2.0
(*
b
(* y (- a (+ (/ 0.6666666666666666 t) -0.8333333333333334))))))))
(if (or (<= t 7.2e+209) (not (<= t 3.6e+229)))
t_1
(/ x (+ x (* y (exp (* 2.0 (* a c)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((1.6666666666666667 * (c - b)))));
double tmp;
if (t <= -1e-310) {
tmp = t_1;
} else if (t <= 0.0145) {
tmp = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334)))))));
} else if ((t <= 7.2e+209) || !(t <= 3.6e+229)) {
tmp = t_1;
} else {
tmp = x / (x + (y * exp((2.0 * (a * 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((1.6666666666666667d0 * (c - b)))))
if (t <= (-1d-310)) then
tmp = t_1
else if (t <= 0.0145d0) then
tmp = x / (x + (y - (2.0d0 * (b * (y * (a - ((0.6666666666666666d0 / t) + (-0.8333333333333334d0))))))))
else if ((t <= 7.2d+209) .or. (.not. (t <= 3.6d+229))) then
tmp = t_1
else
tmp = x / (x + (y * exp((2.0d0 * (a * 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((1.6666666666666667 * (c - b)))));
double tmp;
if (t <= -1e-310) {
tmp = t_1;
} else if (t <= 0.0145) {
tmp = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334)))))));
} else if ((t <= 7.2e+209) || !(t <= 3.6e+229)) {
tmp = t_1;
} else {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((1.6666666666666667 * (c - b))))) tmp = 0 if t <= -1e-310: tmp = t_1 elif t <= 0.0145: tmp = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334))))))) elif (t <= 7.2e+209) or not (t <= 3.6e+229): tmp = t_1 else: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(1.6666666666666667 * Float64(c - b)))))) tmp = 0.0 if (t <= -1e-310) tmp = t_1; elseif (t <= 0.0145) tmp = Float64(x / Float64(x + Float64(y - Float64(2.0 * Float64(b * Float64(y * Float64(a - Float64(Float64(0.6666666666666666 / t) + -0.8333333333333334)))))))); elseif ((t <= 7.2e+209) || !(t <= 3.6e+229)) tmp = t_1; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((1.6666666666666667 * (c - b))))); tmp = 0.0; if (t <= -1e-310) tmp = t_1; elseif (t <= 0.0145) tmp = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334))))))); elseif ((t <= 7.2e+209) || ~((t <= 3.6e+229))) tmp = t_1; else tmp = x / (x + (y * exp((2.0 * (a * 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[(1.6666666666666667 * N[(c - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e-310], t$95$1, If[LessEqual[t, 0.0145], 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], If[Or[LessEqual[t, 7.2e+209], N[Not[LessEqual[t, 3.6e+229]], $MachinePrecision]], t$95$1, N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{1.6666666666666667 \cdot \left(c - b\right)}}\\
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.0145:\\
\;\;\;\;\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)}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+209} \lor \neg \left(t \leq 3.6 \cdot 10^{+229}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\end{array}
\end{array}
if t < -9.999999999999969e-311 or 0.0145000000000000007 < t < 7.20000000000000023e209 or 3.59999999999999986e229 < t Initial program 95.0%
Taylor expanded in t around inf 90.9%
mul-1-neg90.9%
distribute-rgt-neg-in90.9%
+-commutative90.9%
neg-sub090.9%
associate--r-90.9%
neg-sub090.9%
+-commutative90.9%
sub-neg90.9%
Simplified90.9%
Taylor expanded in a around 0 83.9%
if -9.999999999999969e-311 < t < 0.0145000000000000007Initial program 95.4%
Taylor expanded in b around inf 67.3%
associate-*r/67.3%
metadata-eval67.3%
+-commutative67.3%
Simplified67.3%
Taylor expanded in b around 0 55.5%
associate--r+55.5%
sub-neg55.5%
associate-*r/55.5%
metadata-eval55.5%
metadata-eval55.5%
Simplified55.5%
if 7.20000000000000023e209 < t < 3.59999999999999986e229Initial program 100.0%
Taylor expanded in a around inf 91.2%
Taylor expanded in c around inf 82.4%
*-commutative82.4%
Simplified82.4%
Final simplification76.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ x (+ x (* y (exp (* 1.6666666666666667 (- c b))))))))
(if (<= t -4.2e-304)
t_1
(if (<= t 0.52)
(/ x (+ x (* y (exp (/ (* c -1.3333333333333333) t)))))
(if (or (<= t 7.2e+209) (not (<= t 5.5e+229)))
t_1
(/ x (+ x (* y (exp (* 2.0 (* a c)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / (x + (y * exp((1.6666666666666667 * (c - b)))));
double tmp;
if (t <= -4.2e-304) {
tmp = t_1;
} else if (t <= 0.52) {
tmp = x / (x + (y * exp(((c * -1.3333333333333333) / t))));
} else if ((t <= 7.2e+209) || !(t <= 5.5e+229)) {
tmp = t_1;
} else {
tmp = x / (x + (y * exp((2.0 * (a * 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((1.6666666666666667d0 * (c - b)))))
if (t <= (-4.2d-304)) then
tmp = t_1
else if (t <= 0.52d0) then
tmp = x / (x + (y * exp(((c * (-1.3333333333333333d0)) / t))))
else if ((t <= 7.2d+209) .or. (.not. (t <= 5.5d+229))) then
tmp = t_1
else
tmp = x / (x + (y * exp((2.0d0 * (a * 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((1.6666666666666667 * (c - b)))));
double tmp;
if (t <= -4.2e-304) {
tmp = t_1;
} else if (t <= 0.52) {
tmp = x / (x + (y * Math.exp(((c * -1.3333333333333333) / t))));
} else if ((t <= 7.2e+209) || !(t <= 5.5e+229)) {
tmp = t_1;
} else {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / (x + (y * math.exp((1.6666666666666667 * (c - b))))) tmp = 0 if t <= -4.2e-304: tmp = t_1 elif t <= 0.52: tmp = x / (x + (y * math.exp(((c * -1.3333333333333333) / t)))) elif (t <= 7.2e+209) or not (t <= 5.5e+229): tmp = t_1 else: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(x + Float64(y * exp(Float64(1.6666666666666667 * Float64(c - b)))))) tmp = 0.0 if (t <= -4.2e-304) tmp = t_1; elseif (t <= 0.52) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(Float64(c * -1.3333333333333333) / t))))); elseif ((t <= 7.2e+209) || !(t <= 5.5e+229)) tmp = t_1; else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / (x + (y * exp((1.6666666666666667 * (c - b))))); tmp = 0.0; if (t <= -4.2e-304) tmp = t_1; elseif (t <= 0.52) tmp = x / (x + (y * exp(((c * -1.3333333333333333) / t)))); elseif ((t <= 7.2e+209) || ~((t <= 5.5e+229))) tmp = t_1; else tmp = x / (x + (y * exp((2.0 * (a * 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[(1.6666666666666667 * N[(c - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e-304], t$95$1, If[LessEqual[t, 0.52], N[(x / N[(x + N[(y * N[Exp[N[(N[(c * -1.3333333333333333), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 7.2e+209], N[Not[LessEqual[t, 5.5e+229]], $MachinePrecision]], t$95$1, N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + y \cdot e^{1.6666666666666667 \cdot \left(c - b\right)}}\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.52:\\
\;\;\;\;\frac{x}{x + y \cdot e^{\frac{c \cdot -1.3333333333333333}{t}}}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+209} \lor \neg \left(t \leq 5.5 \cdot 10^{+229}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\end{array}
\end{array}
if t < -4.20000000000000016e-304 or 0.52000000000000002 < t < 7.20000000000000023e209 or 5.5000000000000002e229 < t Initial program 95.0%
Taylor expanded in t around inf 91.3%
mul-1-neg91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
neg-sub091.3%
associate--r-91.3%
neg-sub091.3%
+-commutative91.3%
sub-neg91.3%
Simplified91.3%
Taylor expanded in a around 0 84.2%
if -4.20000000000000016e-304 < t < 0.52000000000000002Initial program 95.6%
Taylor expanded in t around 0 64.8%
Taylor expanded in a around 0 78.7%
Taylor expanded in b around 0 67.3%
associate-*r/67.3%
Simplified67.3%
if 7.20000000000000023e209 < t < 5.5000000000000002e229Initial program 100.0%
Taylor expanded in a around inf 91.2%
Taylor expanded in c around inf 82.4%
*-commutative82.4%
Simplified82.4%
Final simplification79.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t 0.053)
(/ x (+ x (* y (exp (* 1.3333333333333333 (/ (- b c) t))))))
(if (or (<= t 7e+209) (not (<= t 3.6e+229)))
(/ x (+ x (* y (exp (* 1.6666666666666667 (- c b))))))
(/ x (+ x (* y (exp (* 2.0 (* a c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 0.053) {
tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 7e+209) || !(t <= 3.6e+229)) {
tmp = x / (x + (y * exp((1.6666666666666667 * (c - b)))));
} else {
tmp = x / (x + (y * exp((2.0 * (a * c)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 0.053d0) then
tmp = x / (x + (y * exp((1.3333333333333333d0 * ((b - c) / t)))))
else if ((t <= 7d+209) .or. (.not. (t <= 3.6d+229))) then
tmp = x / (x + (y * exp((1.6666666666666667d0 * (c - b)))))
else
tmp = x / (x + (y * exp((2.0d0 * (a * c)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 0.053) {
tmp = x / (x + (y * Math.exp((1.3333333333333333 * ((b - c) / t)))));
} else if ((t <= 7e+209) || !(t <= 3.6e+229)) {
tmp = x / (x + (y * Math.exp((1.6666666666666667 * (c - b)))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * (a * c)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 0.053: tmp = x / (x + (y * math.exp((1.3333333333333333 * ((b - c) / t))))) elif (t <= 7e+209) or not (t <= 3.6e+229): tmp = x / (x + (y * math.exp((1.6666666666666667 * (c - b))))) else: tmp = x / (x + (y * math.exp((2.0 * (a * c))))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 0.053) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.3333333333333333 * Float64(Float64(b - c) / t)))))); elseif ((t <= 7e+209) || !(t <= 3.6e+229)) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(1.6666666666666667 * Float64(c - b)))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * c)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 0.053) tmp = x / (x + (y * exp((1.3333333333333333 * ((b - c) / t))))); elseif ((t <= 7e+209) || ~((t <= 3.6e+229))) tmp = x / (x + (y * exp((1.6666666666666667 * (c - b))))); else tmp = x / (x + (y * exp((2.0 * (a * c))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 0.053], N[(x / N[(x + N[(y * N[Exp[N[(1.3333333333333333 * N[(N[(b - c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 7e+209], N[Not[LessEqual[t, 3.6e+229]], $MachinePrecision]], N[(x / N[(x + N[(y * N[Exp[N[(1.6666666666666667 * N[(c - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.053:\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.3333333333333333 \cdot \frac{b - c}{t}}}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+209} \lor \neg \left(t \leq 3.6 \cdot 10^{+229}\right):\\
\;\;\;\;\frac{x}{x + y \cdot e^{1.6666666666666667 \cdot \left(c - b\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot c\right)}}\\
\end{array}
\end{array}
if t < 0.0529999999999999985Initial program 92.9%
Taylor expanded in t around 0 77.8%
Taylor expanded in a around 0 80.8%
if 0.0529999999999999985 < t < 7.0000000000000005e209 or 3.59999999999999986e229 < t Initial program 98.1%
Taylor expanded in t around inf 92.6%
mul-1-neg92.6%
distribute-rgt-neg-in92.6%
+-commutative92.6%
neg-sub092.6%
associate--r-92.6%
neg-sub092.6%
+-commutative92.6%
sub-neg92.6%
Simplified92.6%
Taylor expanded in a around 0 87.9%
if 7.0000000000000005e209 < t < 3.59999999999999986e229Initial program 100.0%
Taylor expanded in a around inf 91.2%
Taylor expanded in c around inf 82.4%
*-commutative82.4%
Simplified82.4%
Final simplification83.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -5.8e-40)
(/ x (+ x (* y (exp (* 2.0 (* a (- c b)))))))
(if (<= t 2000000000.0)
(/ 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 <= -5.8e-40) {
tmp = x / (x + (y * exp((2.0 * (a * (c - b))))));
} else if (t <= 2000000000.0) {
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 <= (-5.8d-40)) then
tmp = x / (x + (y * exp((2.0d0 * (a * (c - b))))))
else if (t <= 2000000000.0d0) 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 <= -5.8e-40) {
tmp = x / (x + (y * Math.exp((2.0 * (a * (c - b))))));
} else if (t <= 2000000000.0) {
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 <= -5.8e-40: tmp = x / (x + (y * math.exp((2.0 * (a * (c - b)))))) elif t <= 2000000000.0: 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 <= -5.8e-40) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(a * Float64(c - b))))))); elseif (t <= 2000000000.0) 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 <= -5.8e-40) tmp = x / (x + (y * exp((2.0 * (a * (c - b)))))); elseif (t <= 2000000000.0) 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, -5.8e-40], 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, 2000000000.0], 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 -5.8 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(a \cdot \left(c - b\right)\right)}}\\
\mathbf{elif}\;t \leq 2000000000:\\
\;\;\;\;\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.7999999999999998e-40Initial program 89.7%
Taylor expanded in a around inf 96.9%
if -5.7999999999999998e-40 < t < 2e9Initial program 94.1%
Taylor expanded in t around 0 76.4%
Taylor expanded in a around 0 80.3%
if 2e9 < t Initial program 98.2%
Taylor expanded in t around inf 94.7%
mul-1-neg94.7%
distribute-rgt-neg-in94.7%
+-commutative94.7%
neg-sub094.7%
associate--r-94.7%
neg-sub094.7%
+-commutative94.7%
sub-neg94.7%
Simplified94.7%
Final simplification88.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (- b c) -10000000000.0)
(/ x (* y (exp (* 1.6666666666666667 (- c b)))))
(if (<= (- b c) -1e-193)
(/
x
(+
x
(-
y
(*
2.0
(* b (* y (- a (+ (/ 0.6666666666666666 t) -0.8333333333333334))))))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -10000000000.0) {
tmp = x / (y * exp((1.6666666666666667 * (c - b))));
} else if ((b - c) <= -1e-193) {
tmp = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334)))))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b - c) <= (-10000000000.0d0)) then
tmp = x / (y * exp((1.6666666666666667d0 * (c - b))))
else if ((b - c) <= (-1d-193)) then
tmp = x / (x + (y - (2.0d0 * (b * (y * (a - ((0.6666666666666666d0 / t) + (-0.8333333333333334d0))))))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -10000000000.0) {
tmp = x / (y * Math.exp((1.6666666666666667 * (c - b))));
} else if ((b - c) <= -1e-193) {
tmp = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334)))))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b - c) <= -10000000000.0: tmp = x / (y * math.exp((1.6666666666666667 * (c - b)))) elif (b - c) <= -1e-193: tmp = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334))))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b - c) <= -10000000000.0) tmp = Float64(x / Float64(y * exp(Float64(1.6666666666666667 * Float64(c - b))))); elseif (Float64(b - c) <= -1e-193) tmp = Float64(x / Float64(x + Float64(y - Float64(2.0 * Float64(b * Float64(y * Float64(a - Float64(Float64(0.6666666666666666 / t) + -0.8333333333333334)))))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b - c) <= -10000000000.0) tmp = x / (y * exp((1.6666666666666667 * (c - b)))); elseif ((b - c) <= -1e-193) tmp = x / (x + (y - (2.0 * (b * (y * (a - ((0.6666666666666666 / t) + -0.8333333333333334))))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b - c), $MachinePrecision], -10000000000.0], N[(x / N[(y * N[Exp[N[(1.6666666666666667 * N[(c - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - c), $MachinePrecision], -1e-193], 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], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - c \leq -10000000000:\\
\;\;\;\;\frac{x}{y \cdot e^{1.6666666666666667 \cdot \left(c - b\right)}}\\
\mathbf{elif}\;b - c \leq -1 \cdot 10^{-193}:\\
\;\;\;\;\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)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 b c) < -1e10Initial program 92.5%
Taylor expanded in t around inf 73.4%
mul-1-neg73.4%
distribute-rgt-neg-in73.4%
+-commutative73.4%
neg-sub073.4%
associate--r-73.4%
neg-sub073.4%
+-commutative73.4%
sub-neg73.4%
Simplified73.4%
Taylor expanded in a around 0 69.7%
Taylor expanded in x around 0 69.7%
if -1e10 < (-.f64 b c) < -1e-193Initial program 100.0%
Taylor expanded in b around inf 62.6%
associate-*r/62.6%
metadata-eval62.6%
+-commutative62.6%
Simplified62.6%
Taylor expanded in b around 0 59.7%
associate--r+59.7%
sub-neg59.7%
associate-*r/59.7%
metadata-eval59.7%
metadata-eval59.7%
Simplified59.7%
if -1e-193 < (-.f64 b c) Initial program 95.9%
Taylor expanded in t around inf 73.3%
mul-1-neg73.3%
distribute-rgt-neg-in73.3%
+-commutative73.3%
neg-sub073.3%
associate--r-73.3%
neg-sub073.3%
+-commutative73.3%
sub-neg73.3%
Simplified73.3%
Taylor expanded in a around 0 64.0%
Taylor expanded in x around inf 69.1%
Final simplification68.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -10000000000.0)
(/ x (* y (exp (* b -1.6666666666666667))))
(if (<= b -1.8e-277)
1.0
(if (<= b 8.2e-98)
(/ x (+ x (+ y (* 1.3333333333333333 (/ y (/ t (- b c)))))))
1.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -10000000000.0) {
tmp = x / (y * exp((b * -1.6666666666666667)));
} else if (b <= -1.8e-277) {
tmp = 1.0;
} else if (b <= 8.2e-98) {
tmp = x / (x + (y + (1.3333333333333333 * (y / (t / (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 (b <= (-10000000000.0d0)) then
tmp = x / (y * exp((b * (-1.6666666666666667d0))))
else if (b <= (-1.8d-277)) then
tmp = 1.0d0
else if (b <= 8.2d-98) then
tmp = x / (x + (y + (1.3333333333333333d0 * (y / (t / (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 (b <= -10000000000.0) {
tmp = x / (y * Math.exp((b * -1.6666666666666667)));
} else if (b <= -1.8e-277) {
tmp = 1.0;
} else if (b <= 8.2e-98) {
tmp = x / (x + (y + (1.3333333333333333 * (y / (t / (b - c))))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -10000000000.0: tmp = x / (y * math.exp((b * -1.6666666666666667))) elif b <= -1.8e-277: tmp = 1.0 elif b <= 8.2e-98: tmp = x / (x + (y + (1.3333333333333333 * (y / (t / (b - c)))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -10000000000.0) tmp = Float64(x / Float64(y * exp(Float64(b * -1.6666666666666667)))); elseif (b <= -1.8e-277) tmp = 1.0; elseif (b <= 8.2e-98) tmp = Float64(x / Float64(x + Float64(y + Float64(1.3333333333333333 * Float64(y / Float64(t / 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 (b <= -10000000000.0) tmp = x / (y * exp((b * -1.6666666666666667))); elseif (b <= -1.8e-277) tmp = 1.0; elseif (b <= 8.2e-98) tmp = x / (x + (y + (1.3333333333333333 * (y / (t / (b - c)))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -10000000000.0], N[(x / N[(y * N[Exp[N[(b * -1.6666666666666667), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.8e-277], 1.0, If[LessEqual[b, 8.2e-98], N[(x / N[(x + N[(y + N[(1.3333333333333333 * N[(y / N[(t / N[(b - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -10000000000:\\
\;\;\;\;\frac{x}{y \cdot e^{b \cdot -1.6666666666666667}}\\
\mathbf{elif}\;b \leq -1.8 \cdot 10^{-277}:\\
\;\;\;\;1\\
\mathbf{elif}\;b \leq 8.2 \cdot 10^{-98}:\\
\;\;\;\;\frac{x}{x + \left(y + 1.3333333333333333 \cdot \frac{y}{\frac{t}{b - c}}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if b < -1e10Initial program 89.3%
Taylor expanded in t around inf 74.1%
mul-1-neg74.1%
distribute-rgt-neg-in74.1%
+-commutative74.1%
neg-sub074.1%
associate--r-74.1%
neg-sub074.1%
+-commutative74.1%
sub-neg74.1%
Simplified74.1%
Taylor expanded in a around 0 68.9%
Taylor expanded in x around 0 58.3%
Taylor expanded in c around 0 65.4%
if -1e10 < b < -1.79999999999999992e-277 or 8.1999999999999996e-98 < b Initial program 96.8%
Taylor expanded in t around inf 73.0%
mul-1-neg73.0%
distribute-rgt-neg-in73.0%
+-commutative73.0%
neg-sub073.0%
associate--r-73.0%
neg-sub073.0%
+-commutative73.0%
sub-neg73.0%
Simplified73.0%
Taylor expanded in a around 0 64.2%
Taylor expanded in x around inf 64.6%
if -1.79999999999999992e-277 < b < 8.1999999999999996e-98Initial program 97.8%
Taylor expanded in t around 0 61.1%
Taylor expanded in a around 0 68.8%
Taylor expanded in t around inf 56.5%
associate-/l*58.5%
Simplified58.5%
Final simplification63.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -2.35e-304)
1.0
(if (or (<= t 5.4e-163) (and (not (<= t 1.32e+103)) (<= t 2.3e+195)))
(/ x (+ x (+ y (* 1.3333333333333333 (/ y (/ t (- b c)))))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -2.35e-304) {
tmp = 1.0;
} else if ((t <= 5.4e-163) || (!(t <= 1.32e+103) && (t <= 2.3e+195))) {
tmp = x / (x + (y + (1.3333333333333333 * (y / (t / (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 (t <= (-2.35d-304)) then
tmp = 1.0d0
else if ((t <= 5.4d-163) .or. (.not. (t <= 1.32d+103)) .and. (t <= 2.3d+195)) then
tmp = x / (x + (y + (1.3333333333333333d0 * (y / (t / (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 (t <= -2.35e-304) {
tmp = 1.0;
} else if ((t <= 5.4e-163) || (!(t <= 1.32e+103) && (t <= 2.3e+195))) {
tmp = x / (x + (y + (1.3333333333333333 * (y / (t / (b - c))))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -2.35e-304: tmp = 1.0 elif (t <= 5.4e-163) or (not (t <= 1.32e+103) and (t <= 2.3e+195)): tmp = x / (x + (y + (1.3333333333333333 * (y / (t / (b - c)))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -2.35e-304) tmp = 1.0; elseif ((t <= 5.4e-163) || (!(t <= 1.32e+103) && (t <= 2.3e+195))) tmp = Float64(x / Float64(x + Float64(y + Float64(1.3333333333333333 * Float64(y / Float64(t / 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 (t <= -2.35e-304) tmp = 1.0; elseif ((t <= 5.4e-163) || (~((t <= 1.32e+103)) && (t <= 2.3e+195))) tmp = x / (x + (y + (1.3333333333333333 * (y / (t / (b - c)))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -2.35e-304], 1.0, If[Or[LessEqual[t, 5.4e-163], And[N[Not[LessEqual[t, 1.32e+103]], $MachinePrecision], LessEqual[t, 2.3e+195]]], N[(x / N[(x + N[(y + N[(1.3333333333333333 * N[(y / N[(t / N[(b - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{-304}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-163} \lor \neg \left(t \leq 1.32 \cdot 10^{+103}\right) \land t \leq 2.3 \cdot 10^{+195}:\\
\;\;\;\;\frac{x}{x + \left(y + 1.3333333333333333 \cdot \frac{y}{\frac{t}{b - c}}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -2.35e-304 or 5.40000000000000029e-163 < t < 1.31999999999999999e103 or 2.3000000000000001e195 < t Initial program 95.7%
Taylor expanded in t around inf 78.7%
mul-1-neg78.7%
distribute-rgt-neg-in78.7%
+-commutative78.7%
neg-sub078.7%
associate--r-78.7%
neg-sub078.7%
+-commutative78.7%
sub-neg78.7%
Simplified78.7%
Taylor expanded in a around 0 69.3%
Taylor expanded in x around inf 62.7%
if -2.35e-304 < t < 5.40000000000000029e-163 or 1.31999999999999999e103 < t < 2.3000000000000001e195Initial program 94.3%
Taylor expanded in t around 0 50.5%
Taylor expanded in a around 0 62.9%
Taylor expanded in t around inf 61.6%
associate-/l*64.4%
Simplified64.4%
Final simplification63.2%
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -3.4e-304)
1.0
(if (or (<= t 1.9e-167) (and (not (<= t 4.5e+100)) (<= t 5.2e+195)))
(/ x (+ x (+ y (* 1.3333333333333333 (/ b (/ t y))))))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -3.4e-304) {
tmp = 1.0;
} else if ((t <= 1.9e-167) || (!(t <= 4.5e+100) && (t <= 5.2e+195))) {
tmp = x / (x + (y + (1.3333333333333333 * (b / (t / y)))));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-3.4d-304)) then
tmp = 1.0d0
else if ((t <= 1.9d-167) .or. (.not. (t <= 4.5d+100)) .and. (t <= 5.2d+195)) then
tmp = x / (x + (y + (1.3333333333333333d0 * (b / (t / y)))))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -3.4e-304) {
tmp = 1.0;
} else if ((t <= 1.9e-167) || (!(t <= 4.5e+100) && (t <= 5.2e+195))) {
tmp = x / (x + (y + (1.3333333333333333 * (b / (t / y)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -3.4e-304: tmp = 1.0 elif (t <= 1.9e-167) or (not (t <= 4.5e+100) and (t <= 5.2e+195)): tmp = x / (x + (y + (1.3333333333333333 * (b / (t / y))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -3.4e-304) tmp = 1.0; elseif ((t <= 1.9e-167) || (!(t <= 4.5e+100) && (t <= 5.2e+195))) tmp = Float64(x / Float64(x + Float64(y + Float64(1.3333333333333333 * Float64(b / Float64(t / y)))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -3.4e-304) tmp = 1.0; elseif ((t <= 1.9e-167) || (~((t <= 4.5e+100)) && (t <= 5.2e+195))) tmp = x / (x + (y + (1.3333333333333333 * (b / (t / y))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -3.4e-304], 1.0, If[Or[LessEqual[t, 1.9e-167], And[N[Not[LessEqual[t, 4.5e+100]], $MachinePrecision], LessEqual[t, 5.2e+195]]], N[(x / N[(x + N[(y + N[(1.3333333333333333 * N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{-304}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-167} \lor \neg \left(t \leq 4.5 \cdot 10^{+100}\right) \land t \leq 5.2 \cdot 10^{+195}:\\
\;\;\;\;\frac{x}{x + \left(y + 1.3333333333333333 \cdot \frac{b}{\frac{t}{y}}\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -3.3999999999999999e-304 or 1.89999999999999984e-167 < t < 4.50000000000000036e100 or 5.20000000000000004e195 < t Initial program 95.7%
Taylor expanded in t around inf 78.7%
mul-1-neg78.7%
distribute-rgt-neg-in78.7%
+-commutative78.7%
neg-sub078.7%
associate--r-78.7%
neg-sub078.7%
+-commutative78.7%
sub-neg78.7%
Simplified78.7%
Taylor expanded in a around 0 69.3%
Taylor expanded in x around inf 62.7%
if -3.3999999999999999e-304 < t < 1.89999999999999984e-167 or 4.50000000000000036e100 < t < 5.20000000000000004e195Initial program 94.3%
Taylor expanded in b around inf 79.5%
associate-*r/79.5%
metadata-eval79.5%
+-commutative79.5%
Simplified79.5%
Taylor expanded in b around 0 57.6%
Taylor expanded in t around 0 57.4%
associate-/l*61.6%
Simplified61.6%
Taylor expanded in b around 0 57.4%
associate-/l*61.6%
Simplified61.6%
Final simplification62.4%
(FPCore (x y z t a b c) :precision binary64 (if (<= (- b c) -2e+260) (/ x (+ x (+ y (* 1.3333333333333333 (/ (* y (- b c)) t))))) (if (<= (- b c) -1e-193) (/ x (+ x (- y (* 2.0 (* b (* y a)))))) 1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b - c) <= -2e+260) {
tmp = x / (x + (y + (1.3333333333333333 * ((y * (b - c)) / t))));
} else if ((b - c) <= -1e-193) {
tmp = x / (x + (y - (2.0 * (b * (y * 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 - c) <= (-2d+260)) then
tmp = x / (x + (y + (1.3333333333333333d0 * ((y * (b - c)) / t))))
else if ((b - c) <= (-1d-193)) then
tmp = x / (x + (y - (2.0d0 * (b * (y * 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 - c) <= -2e+260) {
tmp = x / (x + (y + (1.3333333333333333 * ((y * (b - c)) / t))));
} else if ((b - c) <= -1e-193) {
tmp = x / (x + (y - (2.0 * (b * (y * a)))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b - c) <= -2e+260: tmp = x / (x + (y + (1.3333333333333333 * ((y * (b - c)) / t)))) elif (b - c) <= -1e-193: tmp = x / (x + (y - (2.0 * (b * (y * a))))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b - c) <= -2e+260) tmp = Float64(x / Float64(x + Float64(y + Float64(1.3333333333333333 * Float64(Float64(y * Float64(b - c)) / t))))); elseif (Float64(b - c) <= -1e-193) tmp = Float64(x / Float64(x + Float64(y - Float64(2.0 * Float64(b * Float64(y * 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 - c) <= -2e+260) tmp = x / (x + (y + (1.3333333333333333 * ((y * (b - c)) / t)))); elseif ((b - c) <= -1e-193) tmp = x / (x + (y - (2.0 * (b * (y * a))))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b - c), $MachinePrecision], -2e+260], N[(x / N[(x + N[(y + N[(1.3333333333333333 * N[(N[(y * N[(b - c), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - c), $MachinePrecision], -1e-193], N[(x / N[(x + N[(y - N[(2.0 * N[(b * N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - c \leq -2 \cdot 10^{+260}:\\
\;\;\;\;\frac{x}{x + \left(y + 1.3333333333333333 \cdot \frac{y \cdot \left(b - c\right)}{t}\right)}\\
\mathbf{elif}\;b - c \leq -1 \cdot 10^{-193}:\\
\;\;\;\;\frac{x}{x + \left(y - 2 \cdot \left(b \cdot \left(y \cdot a\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (-.f64 b c) < -2.00000000000000013e260Initial program 88.2%
Taylor expanded in t around 0 42.2%
Taylor expanded in a around 0 54.5%
Taylor expanded in t around inf 65.9%
if -2.00000000000000013e260 < (-.f64 b c) < -1e-193Initial program 95.7%
Taylor expanded in b around inf 62.4%
associate-*r/62.4%
metadata-eval62.4%
+-commutative62.4%
Simplified62.4%
Taylor expanded in b around 0 46.7%
Taylor expanded in a around inf 47.2%
associate-*r*47.2%
neg-mul-147.2%
Simplified47.2%
if -1e-193 < (-.f64 b c) Initial program 95.9%
Taylor expanded in t around inf 73.3%
mul-1-neg73.3%
distribute-rgt-neg-in73.3%
+-commutative73.3%
neg-sub073.3%
associate--r-73.3%
neg-sub073.3%
+-commutative73.3%
sub-neg73.3%
Simplified73.3%
Taylor expanded in a around 0 64.0%
Taylor expanded in x around inf 69.1%
Final simplification60.8%
(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 95.3%
Taylor expanded in t around inf 73.5%
mul-1-neg73.5%
distribute-rgt-neg-in73.5%
+-commutative73.5%
neg-sub073.5%
associate--r-73.5%
neg-sub073.5%
+-commutative73.5%
sub-neg73.5%
Simplified73.5%
Taylor expanded in a around 0 64.9%
Taylor expanded in x around inf 55.2%
Final simplification55.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* z (sqrt (+ t a)))) (t_2 (- a (/ 5.0 6.0))))
(if (< t -2.118326644891581e-50)
(/
x
(+
x
(* y (exp (* 2.0 (- (+ (* a c) (* 0.8333333333333334 c)) (* a b)))))))
(if (< t 5.196588770651547e-123)
(/
x
(+
x
(*
y
(exp
(*
2.0
(/
(-
(* t_1 (* (* 3.0 t) t_2))
(*
(- (* (+ (/ 5.0 6.0) a) (* 3.0 t)) 2.0)
(* t_2 (* (- b c) t))))
(* (* (* t t) 3.0) t_2)))))))
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ t_1 t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = z * sqrt((t + a));
double t_2 = a - (5.0 / 6.0);
double tmp;
if (t < -2.118326644891581e-50) {
tmp = x / (x + (y * exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b))))));
} else if (t < 5.196588770651547e-123) {
tmp = x / (x + (y * exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2))))));
} else {
tmp = x / (x + (y * exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * sqrt((t + a))
t_2 = a - (5.0d0 / 6.0d0)
if (t < (-2.118326644891581d-50)) then
tmp = x / (x + (y * exp((2.0d0 * (((a * c) + (0.8333333333333334d0 * c)) - (a * b))))))
else if (t < 5.196588770651547d-123) then
tmp = x / (x + (y * exp((2.0d0 * (((t_1 * ((3.0d0 * t) * t_2)) - (((((5.0d0 / 6.0d0) + a) * (3.0d0 * t)) - 2.0d0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0d0) * t_2))))))
else
tmp = x / (x + (y * exp((2.0d0 * ((t_1 / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = z * Math.sqrt((t + a));
double t_2 = a - (5.0 / 6.0);
double tmp;
if (t < -2.118326644891581e-50) {
tmp = x / (x + (y * Math.exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b))))));
} else if (t < 5.196588770651547e-123) {
tmp = x / (x + (y * Math.exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2))))));
} else {
tmp = x / (x + (y * Math.exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = z * math.sqrt((t + a)) t_2 = a - (5.0 / 6.0) tmp = 0 if t < -2.118326644891581e-50: tmp = x / (x + (y * math.exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b)))))) elif t < 5.196588770651547e-123: tmp = x / (x + (y * math.exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2)))))) else: tmp = x / (x + (y * math.exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(z * sqrt(Float64(t + a))) t_2 = Float64(a - Float64(5.0 / 6.0)) tmp = 0.0 if (t < -2.118326644891581e-50) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(a * c) + Float64(0.8333333333333334 * c)) - Float64(a * b))))))); elseif (t < 5.196588770651547e-123) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(t_1 * Float64(Float64(3.0 * t) * t_2)) - Float64(Float64(Float64(Float64(Float64(5.0 / 6.0) + a) * Float64(3.0 * t)) - 2.0) * Float64(t_2 * Float64(Float64(b - c) * t)))) / Float64(Float64(Float64(t * t) * 3.0) * t_2))))))); else tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(t_1 / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = z * sqrt((t + a)); t_2 = a - (5.0 / 6.0); tmp = 0.0; if (t < -2.118326644891581e-50) tmp = x / (x + (y * exp((2.0 * (((a * c) + (0.8333333333333334 * c)) - (a * b)))))); elseif (t < 5.196588770651547e-123) tmp = x / (x + (y * exp((2.0 * (((t_1 * ((3.0 * t) * t_2)) - (((((5.0 / 6.0) + a) * (3.0 * t)) - 2.0) * (t_2 * ((b - c) * t)))) / (((t * t) * 3.0) * t_2)))))); else tmp = x / (x + (y * exp((2.0 * ((t_1 / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a - N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -2.118326644891581e-50], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(a * c), $MachinePrecision] + N[(0.8333333333333334 * c), $MachinePrecision]), $MachinePrecision] - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[t, 5.196588770651547e-123], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(t$95$1 * N[(N[(3.0 * t), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(N[(5.0 / 6.0), $MachinePrecision] + a), $MachinePrecision] * N[(3.0 * t), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision] * N[(t$95$2 * N[(N[(b - c), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(t * t), $MachinePrecision] * 3.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(t$95$1 / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \sqrt{t + a}\\
t_2 := a - \frac{5}{6}\\
\mathbf{if}\;t < -2.118326644891581 \cdot 10^{-50}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\left(a \cdot c + 0.8333333333333334 \cdot c\right) - a \cdot b\right)}}\\
\mathbf{elif}\;t < 5.196588770651547 \cdot 10^{-123}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{t\_1 \cdot \left(\left(3 \cdot t\right) \cdot t\_2\right) - \left(\left(\frac{5}{6} + a\right) \cdot \left(3 \cdot t\right) - 2\right) \cdot \left(t\_2 \cdot \left(\left(b - c\right) \cdot t\right)\right)}{\left(\left(t \cdot t\right) \cdot 3\right) \cdot t\_2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{t\_1}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\\
\end{array}
\end{array}
herbie shell --seed 2024031
(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)))))))))))