
(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 11 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
(/
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}
Initial program 93.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))
(t_2 (* y t_1)))
(if (<= (/ x (+ x t_2)) 5e-11) (/ x t_2) t_1)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))));
double t_2 = y * t_1;
double tmp;
if ((x / (x + t_2)) <= 5e-11) {
tmp = x / t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))
t_2 = y * t_1
if ((x / (x + t_2)) <= 5d-11) then
tmp = x / t_2
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 = Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))));
double t_2 = y * t_1;
double tmp;
if ((x / (x + t_2)) <= 5e-11) {
tmp = x / t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))) t_2 = y * t_1 tmp = 0 if (x / (x + t_2)) <= 5e-11: tmp = x / t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = 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))))))) t_2 = Float64(y * t_1) tmp = 0.0 if (Float64(x / Float64(x + t_2)) <= 5e-11) tmp = Float64(x / t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))); t_2 = y * t_1; tmp = 0.0; if ((x / (x + t_2)) <= 5e-11) tmp = x / t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(y * t$95$1), $MachinePrecision]}, If[LessEqual[N[(x / N[(x + t$95$2), $MachinePrecision]), $MachinePrecision], 5e-11], N[(x / t$95$2), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 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)}\\
t_2 := y \cdot t\_1\\
\mathbf{if}\;\frac{x}{x + t\_2} \leq 5 \cdot 10^{-11}:\\
\;\;\;\;\frac{x}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 x (+.f64 x (*.f64 y (exp.f64 (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))))))) < 5.00000000000000018e-11Initial program 99.2%
Taylor expanded in x around 0
Applied rewrites52.8%
Taylor expanded in x around 0
Applied rewrites16.5%
Taylor expanded in x around -inf
Applied rewrites98.9%
if 5.00000000000000018e-11 < (/.f64 x (+.f64 x (*.f64 y (exp.f64 (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))))))) Initial program 89.3%
Taylor expanded in x around 0
Applied rewrites8.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))
(if (<= (/ x (+ x (* y t_1))) 5e-121) (/ x t_1) t_1)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))));
double tmp;
if ((x / (x + (y * t_1))) <= 5e-121) {
tmp = x / t_1;
} 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 = exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))
if ((x / (x + (y * t_1))) <= 5d-121) then
tmp = x / t_1
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 = Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))));
double tmp;
if ((x / (x + (y * t_1))) <= 5e-121) {
tmp = x / t_1;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))) tmp = 0 if (x / (x + (y * t_1))) <= 5e-121: tmp = x / t_1 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = 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))))))) tmp = 0.0 if (Float64(x / Float64(x + Float64(y * t_1))) <= 5e-121) tmp = Float64(x / t_1); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))); tmp = 0.0; if ((x / (x + (y * t_1))) <= 5e-121) tmp = x / t_1; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = 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]}, If[LessEqual[N[(x / N[(x + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e-121], N[(x / t$95$1), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 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)}\\
\mathbf{if}\;\frac{x}{x + y \cdot t\_1} \leq 5 \cdot 10^{-121}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 x (+.f64 x (*.f64 y (exp.f64 (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))))))) < 4.99999999999999989e-121Initial program 99.2%
Taylor expanded in x around 0
Applied rewrites53.2%
Taylor expanded in x around -inf
Applied rewrites94.2%
if 4.99999999999999989e-121 < (/.f64 x (+.f64 x (*.f64 y (exp.f64 (*.f64 #s(literal 2 binary64) (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64))))))))))) Initial program 89.3%
Taylor expanded in x around 0
Applied rewrites8.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* z (sqrt (+ t a))) t))
(t_2 (- t_1 (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))
(if (<= t_2 0.0001)
(exp (* 2.0 t_2))
(if (<= t_2 1e+153) (/ x (/ x t_1)) (/ x t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (z * sqrt((t + a))) / t;
double t_2 = t_1 - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))));
double tmp;
if (t_2 <= 0.0001) {
tmp = exp((2.0 * t_2));
} else if (t_2 <= 1e+153) {
tmp = x / (x / t_1);
} else {
tmp = x / t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z * sqrt((t + a))) / t
t_2 = t_1 - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0))))
if (t_2 <= 0.0001d0) then
tmp = exp((2.0d0 * t_2))
else if (t_2 <= 1d+153) then
tmp = x / (x / t_1)
else
tmp = x / t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (z * Math.sqrt((t + a))) / t;
double t_2 = t_1 - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))));
double tmp;
if (t_2 <= 0.0001) {
tmp = Math.exp((2.0 * t_2));
} else if (t_2 <= 1e+153) {
tmp = x / (x / t_1);
} else {
tmp = x / t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (z * math.sqrt((t + a))) / t t_2 = t_1 - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))) tmp = 0 if t_2 <= 0.0001: tmp = math.exp((2.0 * t_2)) elif t_2 <= 1e+153: tmp = x / (x / t_1) else: tmp = x / t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(z * sqrt(Float64(t + a))) / t) t_2 = Float64(t_1 - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0))))) tmp = 0.0 if (t_2 <= 0.0001) tmp = exp(Float64(2.0 * t_2)); elseif (t_2 <= 1e+153) tmp = Float64(x / Float64(x / t_1)); else tmp = Float64(x / t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (z * sqrt((t + a))) / t; t_2 = t_1 - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))); tmp = 0.0; if (t_2 <= 0.0001) tmp = exp((2.0 * t_2)); elseif (t_2 <= 1e+153) tmp = x / (x / t_1); else tmp = x / t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - 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]}, If[LessEqual[t$95$2, 0.0001], N[Exp[N[(2.0 * t$95$2), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 1e+153], N[(x / N[(x / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x / t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \sqrt{t + a}}{t}\\
t_2 := t\_1 - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\\
\mathbf{if}\;t\_2 \leq 0.0001:\\
\;\;\;\;e^{2 \cdot t\_2}\\
\mathbf{elif}\;t\_2 \leq 10^{+153}:\\
\;\;\;\;\frac{x}{\frac{x}{t\_1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t\_2}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < 1.00000000000000005e-4Initial program 98.5%
Taylor expanded in x around 0
Applied rewrites9.5%
if 1.00000000000000005e-4 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < 1e153Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites11.8%
Taylor expanded in x around inf
Applied rewrites34.4%
if 1e153 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) Initial program 86.0%
Taylor expanded in x around 0
Applied rewrites58.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (sqrt (+ t a)))
(t_2 (/ (* z t_1) t))
(t_3 (- t_2 (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))
(if (<= t_3 0.0001) t_1 (if (<= t_3 1e+153) (/ x (/ x t_2)) (/ x t_3)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = sqrt((t + a));
double t_2 = (z * t_1) / t;
double t_3 = t_2 - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))));
double tmp;
if (t_3 <= 0.0001) {
tmp = t_1;
} else if (t_3 <= 1e+153) {
tmp = x / (x / t_2);
} else {
tmp = x / t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = sqrt((t + a))
t_2 = (z * t_1) / t
t_3 = t_2 - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0))))
if (t_3 <= 0.0001d0) then
tmp = t_1
else if (t_3 <= 1d+153) then
tmp = x / (x / t_2)
else
tmp = x / t_3
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 = Math.sqrt((t + a));
double t_2 = (z * t_1) / t;
double t_3 = t_2 - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))));
double tmp;
if (t_3 <= 0.0001) {
tmp = t_1;
} else if (t_3 <= 1e+153) {
tmp = x / (x / t_2);
} else {
tmp = x / t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = math.sqrt((t + a)) t_2 = (z * t_1) / t t_3 = t_2 - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))) tmp = 0 if t_3 <= 0.0001: tmp = t_1 elif t_3 <= 1e+153: tmp = x / (x / t_2) else: tmp = x / t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = sqrt(Float64(t + a)) t_2 = Float64(Float64(z * t_1) / t) t_3 = Float64(t_2 - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0))))) tmp = 0.0 if (t_3 <= 0.0001) tmp = t_1; elseif (t_3 <= 1e+153) tmp = Float64(x / Float64(x / t_2)); else tmp = Float64(x / t_3); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = sqrt((t + a)); t_2 = (z * t_1) / t; t_3 = t_2 - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))); tmp = 0.0; if (t_3 <= 0.0001) tmp = t_1; elseif (t_3 <= 1e+153) tmp = x / (x / t_2); else tmp = x / t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * t$95$1), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 - 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]}, If[LessEqual[t$95$3, 0.0001], t$95$1, If[LessEqual[t$95$3, 1e+153], N[(x / N[(x / t$95$2), $MachinePrecision]), $MachinePrecision], N[(x / t$95$3), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{t + a}\\
t_2 := \frac{z \cdot t\_1}{t}\\
t_3 := t\_2 - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\\
\mathbf{if}\;t\_3 \leq 0.0001:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq 10^{+153}:\\
\;\;\;\;\frac{x}{\frac{x}{t\_2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t\_3}\\
\end{array}
\end{array}
if (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < 1.00000000000000005e-4Initial program 98.5%
Taylor expanded in x around 0
Applied rewrites4.6%
Taylor expanded in x around inf
Applied rewrites6.7%
if 1.00000000000000005e-4 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) < 1e153Initial program 99.9%
Taylor expanded in x around 0
Applied rewrites11.8%
Taylor expanded in x around inf
Applied rewrites34.4%
if 1e153 < (-.f64 (/.f64 (*.f64 z (sqrt.f64 (+.f64 t a))) t) (*.f64 (-.f64 b c) (-.f64 (+.f64 a (/.f64 #s(literal 5 binary64) #s(literal 6 binary64))) (/.f64 #s(literal 2 binary64) (*.f64 t #s(literal 3 binary64)))))) Initial program 86.0%
Taylor expanded in x around 0
Applied rewrites58.6%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (/ x (/ (* z (sqrt (+ t a))) t)))) (if (<= z -1.22e-63) t_1 (if (<= z 2.1e+19) (/ x t_1) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / ((z * sqrt((t + a))) / t);
double tmp;
if (z <= -1.22e-63) {
tmp = t_1;
} else if (z <= 2.1e+19) {
tmp = x / t_1;
} 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 / ((z * sqrt((t + a))) / t)
if (z <= (-1.22d-63)) then
tmp = t_1
else if (z <= 2.1d+19) then
tmp = x / t_1
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 / ((z * Math.sqrt((t + a))) / t);
double tmp;
if (z <= -1.22e-63) {
tmp = t_1;
} else if (z <= 2.1e+19) {
tmp = x / t_1;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / ((z * math.sqrt((t + a))) / t) tmp = 0 if z <= -1.22e-63: tmp = t_1 elif z <= 2.1e+19: tmp = x / t_1 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(Float64(z * sqrt(Float64(t + a))) / t)) tmp = 0.0 if (z <= -1.22e-63) tmp = t_1; elseif (z <= 2.1e+19) tmp = Float64(x / t_1); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / ((z * sqrt((t + a))) / t); tmp = 0.0; if (z <= -1.22e-63) tmp = t_1; elseif (z <= 2.1e+19) tmp = x / t_1; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.22e-63], t$95$1, If[LessEqual[z, 2.1e+19], N[(x / t$95$1), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z \cdot \sqrt{t + a}}{t}}\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+19}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.2199999999999999e-63 or 2.1e19 < z Initial program 87.9%
Taylor expanded in x around 0
Applied rewrites22.8%
if -1.2199999999999999e-63 < z < 2.1e19Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites27.5%
Taylor expanded in x around inf
Applied rewrites15.5%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (/ x (/ (* z (sqrt (+ t a))) t)))) (if (<= z -0.68) t_1 (if (<= z 5.1e+39) (/ x (+ t a)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / ((z * sqrt((t + a))) / t);
double tmp;
if (z <= -0.68) {
tmp = t_1;
} else if (z <= 5.1e+39) {
tmp = x / (t + a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x / ((z * sqrt((t + a))) / t)
if (z <= (-0.68d0)) then
tmp = t_1
else if (z <= 5.1d+39) then
tmp = x / (t + a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x / ((z * Math.sqrt((t + a))) / t);
double tmp;
if (z <= -0.68) {
tmp = t_1;
} else if (z <= 5.1e+39) {
tmp = x / (t + a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x / ((z * math.sqrt((t + a))) / t) tmp = 0 if z <= -0.68: tmp = t_1 elif z <= 5.1e+39: tmp = x / (t + a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x / Float64(Float64(z * sqrt(Float64(t + a))) / t)) tmp = 0.0 if (z <= -0.68) tmp = t_1; elseif (z <= 5.1e+39) tmp = Float64(x / Float64(t + a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x / ((z * sqrt((t + a))) / t); tmp = 0.0; if (z <= -0.68) tmp = t_1; elseif (z <= 5.1e+39) tmp = x / (t + a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x / N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.68], t$95$1, If[LessEqual[z, 5.1e+39], N[(x / N[(t + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z \cdot \sqrt{t + a}}{t}}\\
\mathbf{if}\;z \leq -0.68:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+39}:\\
\;\;\;\;\frac{x}{t + a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.680000000000000049 or 5.0999999999999998e39 < z Initial program 86.3%
Taylor expanded in x around 0
Applied rewrites24.6%
if -0.680000000000000049 < z < 5.0999999999999998e39Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites28.0%
Taylor expanded in x around inf
Applied rewrites14.2%
(FPCore (x y z t a b c) :precision binary64 (if (<= t 1.5e-35) (/ x (/ 2.0 (* t 3.0))) (/ x (+ t a))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.5e-35) {
tmp = x / (2.0 / (t * 3.0));
} else {
tmp = x / (t + a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= 1.5d-35) then
tmp = x / (2.0d0 / (t * 3.0d0))
else
tmp = x / (t + a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= 1.5e-35) {
tmp = x / (2.0 / (t * 3.0));
} else {
tmp = x / (t + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= 1.5e-35: tmp = x / (2.0 / (t * 3.0)) else: tmp = x / (t + a) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= 1.5e-35) tmp = Float64(x / Float64(2.0 / Float64(t * 3.0))); else tmp = Float64(x / Float64(t + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= 1.5e-35) tmp = x / (2.0 / (t * 3.0)); else tmp = x / (t + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, 1.5e-35], N[(x / N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.5 \cdot 10^{-35}:\\
\;\;\;\;\frac{x}{\frac{2}{t \cdot 3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t + a}\\
\end{array}
\end{array}
if t < 1.49999999999999994e-35Initial program 91.4%
Taylor expanded in x around 0
Applied rewrites32.7%
Taylor expanded in x around 0
Applied rewrites16.2%
if 1.49999999999999994e-35 < t Initial program 96.2%
Taylor expanded in x around 0
Applied rewrites20.1%
Taylor expanded in x around inf
Applied rewrites14.0%
(FPCore (x y z t a b c) :precision binary64 (/ x (+ t a)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (t + a);
}
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 / (t + a)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (t + a);
}
def code(x, y, z, t, a, b, c): return x / (t + a)
function code(x, y, z, t, a, b, c) return Float64(x / Float64(t + a)) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (t + a); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(t + a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{t + a}
\end{array}
Initial program 93.8%
Taylor expanded in x around 0
Applied rewrites26.4%
Taylor expanded in x around inf
Applied rewrites11.8%
(FPCore (x y z t a b c) :precision binary64 (sqrt (+ t a)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return sqrt((t + a));
}
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 = sqrt((t + a))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return Math.sqrt((t + a));
}
def code(x, y, z, t, a, b, c): return math.sqrt((t + a))
function code(x, y, z, t, a, b, c) return sqrt(Float64(t + a)) end
function tmp = code(x, y, z, t, a, b, c) tmp = sqrt((t + a)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{t + a}
\end{array}
Initial program 93.8%
Taylor expanded in x around 0
Applied rewrites26.4%
Taylor expanded in x around inf
Applied rewrites5.0%
(FPCore (x y z t a b c) :precision binary64 (+ t a))
double code(double x, double y, double z, double t, double a, double b, double c) {
return t + a;
}
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 = t + a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return t + a;
}
def code(x, y, z, t, a, b, c): return t + a
function code(x, y, z, t, a, b, c) return Float64(t + a) end
function tmp = code(x, y, z, t, a, b, c) tmp = t + a; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(t + a), $MachinePrecision]
\begin{array}{l}
\\
t + a
\end{array}
Initial program 93.8%
Taylor expanded in x around 0
Applied rewrites26.4%
Taylor expanded in x around -inf
Applied rewrites43.8%
Taylor expanded in x around inf
Applied rewrites4.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 2024313
(FPCore (x y z t a b c)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, I"
:precision binary64
:alt
(! :herbie-platform default (if (< t -2118326644891581/100000000000000000000000000000000000000000000000000000000000000000) (/ x (+ x (* y (exp (* 2 (- (+ (* a c) (* 4166666666666667/5000000000000000 c)) (* a b))))))) (if (< t 5196588770651547/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ x (+ x (* y (exp (* 2 (/ (- (* (* z (sqrt (+ t a))) (* (* 3 t) (- a (/ 5 6)))) (* (- (* (+ (/ 5 6) a) (* 3 t)) 2) (* (- a (/ 5 6)) (* (- b c) t)))) (* (* (* t t) 3) (- a (/ 5 6))))))))) (/ x (+ x (* y (exp (* 2 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5 6)) (/ 2 (* t 3)))))))))))))
(/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))