
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0d0 / 6.0d0)) - (2.0d0 / (t * 3.0d0)))))))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))));
}
def code(x, y, z, t, a, b, c): return x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0)))))))))
function code(x, y, z, t, a, b, c) return Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) - Float64(Float64(b - c) * Float64(Float64(a + Float64(5.0 / 6.0)) - Float64(2.0 / Float64(t * 3.0)))))))))) end
function tmp = code(x, y, z, t, a, b, c) tmp = x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(N[(b - c), $MachinePrecision] * N[(N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (sqrt (+ t a))))
(if (<=
(+ (/ (* z t_1) t) (* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0)))))
INFINITY)
(/
x
(*
(fma
y
(/
(exp
(*
2.0
(fma
(/ z t)
t_1
(*
(+ a (+ 0.8333333333333334 (/ -0.6666666666666666 t)))
(- c b)))))
(- x))
-1.0)
(- x)))
1.0)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = sqrt((t + a));
double tmp;
if ((((z * t_1) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))))) <= ((double) INFINITY)) {
tmp = x / (fma(y, (exp((2.0 * fma((z / t), t_1, ((a + (0.8333333333333334 + (-0.6666666666666666 / t))) * (c - b))))) / -x), -1.0) * -x);
} else {
tmp = 1.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = sqrt(Float64(t + a)) tmp = 0.0 if (Float64(Float64(Float64(z * t_1) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + Float64(5.0 / 6.0))))) <= Inf) tmp = Float64(x / Float64(fma(y, Float64(exp(Float64(2.0 * fma(Float64(z / t), t_1, Float64(Float64(a + Float64(0.8333333333333334 + Float64(-0.6666666666666666 / t))) * Float64(c - b))))) / Float64(-x)), -1.0) * Float64(-x))); else tmp = 1.0; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(z * t$95$1), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x / N[(N[(y * N[(N[Exp[N[(2.0 * N[(N[(z / t), $MachinePrecision] * t$95$1 + N[(N[(a + N[(0.8333333333333334 + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(c - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-x)), $MachinePrecision] + -1.0), $MachinePrecision] * (-x)), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{t + a}\\
\mathbf{if}\;\frac{z \cdot t\_1}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right) \leq \infty:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, \frac{e^{2 \cdot \mathsf{fma}\left(\frac{z}{t}, t\_1, \left(a + \left(0.8333333333333334 + \frac{-0.6666666666666666}{t}\right)\right) \cdot \left(c - b\right)\right)}}{-x}, -1\right) \cdot \left(-x\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\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)))))) < +inf.0Initial program 98.8%
Taylor expanded in x around -inf
Applied rewrites99.2%
if +inf.0 < (-.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 0.0%
Taylor expanded in x around -inf
Applied rewrites18.2%
Taylor expanded in x around inf
Applied rewrites91.2%
Final simplification98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (+ a 0.8333333333333334) (+ a 0.8333333333333334)))
(t_2
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0))))))
(t_3 (+ 0.8333333333333334 (- a (/ 0.6666666666666666 t)))))
(if (<= t_2 -1e+52)
1.0
(if (<= t_2 5e+98)
(/
x
(+
x
(*
y
(exp
(*
2.0
(* c (+ a (+ 0.8333333333333334 (/ -0.6666666666666666 t)))))))))
(if (<= t_2 4e+284)
(/
x
(fma
y
(fma
b
(fma
b
(fma
2.0
t_1
(* (* b -1.3333333333333333) (* (+ a 0.8333333333333334) t_1)))
(+ -1.6666666666666667 (* a -2.0)))
1.0)
x))
(if (<= t_2 INFINITY)
(/ x (+ x (fma c (* 2.0 (fma c (* y (* t_3 t_3)) (* y t_3))) y)))
1.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a + 0.8333333333333334) * (a + 0.8333333333333334);
double t_2 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))));
double t_3 = 0.8333333333333334 + (a - (0.6666666666666666 / t));
double tmp;
if (t_2 <= -1e+52) {
tmp = 1.0;
} else if (t_2 <= 5e+98) {
tmp = x / (x + (y * exp((2.0 * (c * (a + (0.8333333333333334 + (-0.6666666666666666 / t))))))));
} else if (t_2 <= 4e+284) {
tmp = x / fma(y, fma(b, fma(b, fma(2.0, t_1, ((b * -1.3333333333333333) * ((a + 0.8333333333333334) * t_1))), (-1.6666666666666667 + (a * -2.0))), 1.0), x);
} else if (t_2 <= ((double) INFINITY)) {
tmp = x / (x + fma(c, (2.0 * fma(c, (y * (t_3 * t_3)), (y * t_3))), y));
} else {
tmp = 1.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a + 0.8333333333333334) * Float64(a + 0.8333333333333334)) t_2 = Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + Float64(5.0 / 6.0))))) t_3 = Float64(0.8333333333333334 + Float64(a - Float64(0.6666666666666666 / t))) tmp = 0.0 if (t_2 <= -1e+52) tmp = 1.0; elseif (t_2 <= 5e+98) tmp = Float64(x / Float64(x + Float64(y * exp(Float64(2.0 * Float64(c * Float64(a + Float64(0.8333333333333334 + Float64(-0.6666666666666666 / t))))))))); elseif (t_2 <= 4e+284) tmp = Float64(x / fma(y, fma(b, fma(b, fma(2.0, t_1, Float64(Float64(b * -1.3333333333333333) * Float64(Float64(a + 0.8333333333333334) * t_1))), Float64(-1.6666666666666667 + Float64(a * -2.0))), 1.0), x)); elseif (t_2 <= Inf) tmp = Float64(x / Float64(x + fma(c, Float64(2.0 * fma(c, Float64(y * Float64(t_3 * t_3)), Float64(y * t_3))), y))); else tmp = 1.0; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(0.8333333333333334 + N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+52], 1.0, If[LessEqual[t$95$2, 5e+98], N[(x / N[(x + N[(y * N[Exp[N[(2.0 * N[(c * N[(a + N[(0.8333333333333334 + N[(-0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+284], N[(x / N[(y * N[(b * N[(b * N[(2.0 * t$95$1 + N[(N[(b * -1.3333333333333333), $MachinePrecision] * N[(N[(a + 0.8333333333333334), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.6666666666666667 + N[(a * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(x / N[(x + N[(c * N[(2.0 * N[(c * N[(y * N[(t$95$3 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(y * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 0.8333333333333334\right) \cdot \left(a + 0.8333333333333334\right)\\
t_2 := \frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\\
t_3 := 0.8333333333333334 + \left(a - \frac{0.6666666666666666}{t}\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+52}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+98}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \left(c \cdot \left(a + \left(0.8333333333333334 + \frac{-0.6666666666666666}{t}\right)\right)\right)}}\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+284}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(2, t\_1, \left(b \cdot -1.3333333333333333\right) \cdot \left(\left(a + 0.8333333333333334\right) \cdot t\_1\right)\right), -1.6666666666666667 + a \cdot -2\right), 1\right), x\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{x}{x + \mathsf{fma}\left(c, 2 \cdot \mathsf{fma}\left(c, y \cdot \left(t\_3 \cdot t\_3\right), y \cdot t\_3\right), y\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\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)))))) < -9.9999999999999999e51 or +inf.0 < (-.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.1%
Taylor expanded in x around -inf
Applied rewrites91.8%
Taylor expanded in x around inf
Applied rewrites98.2%
if -9.9999999999999999e51 < (-.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.9999999999999998e98Initial program 100.0%
Taylor expanded in c around inf
lower-*.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6493.6
Applied rewrites93.6%
if 4.9999999999999998e98 < (-.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.00000000000000032e284Initial program 100.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f6470.0
Applied rewrites70.0%
Taylor expanded in t around inf
+-commutativeN/A
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f6457.1
Applied rewrites57.1%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites75.8%
if 4.00000000000000032e284 < (-.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)))))) < +inf.0Initial program 97.1%
Taylor expanded in c around inf
lower-*.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6466.0
Applied rewrites66.0%
Taylor expanded in c around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites79.6%
Final simplification88.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (+ a 0.8333333333333334) (+ a 0.8333333333333334)))
(t_2 (+ 0.8333333333333334 (- a (/ 0.6666666666666666 t))))
(t_3
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0)))))))
(if (<= t_3 -1e+52)
1.0
(if (<= t_3 5e+98)
(/ x (fma y (exp (* 2.0 (* c (+ a 0.8333333333333334)))) x))
(if (<= t_3 4e+284)
(/
x
(fma
y
(fma
b
(fma
b
(fma
2.0
t_1
(* (* b -1.3333333333333333) (* (+ a 0.8333333333333334) t_1)))
(+ -1.6666666666666667 (* a -2.0)))
1.0)
x))
(if (<= t_3 INFINITY)
(/ x (+ x (fma c (* 2.0 (fma c (* y (* t_2 t_2)) (* y t_2))) y)))
1.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a + 0.8333333333333334) * (a + 0.8333333333333334);
double t_2 = 0.8333333333333334 + (a - (0.6666666666666666 / t));
double t_3 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))));
double tmp;
if (t_3 <= -1e+52) {
tmp = 1.0;
} else if (t_3 <= 5e+98) {
tmp = x / fma(y, exp((2.0 * (c * (a + 0.8333333333333334)))), x);
} else if (t_3 <= 4e+284) {
tmp = x / fma(y, fma(b, fma(b, fma(2.0, t_1, ((b * -1.3333333333333333) * ((a + 0.8333333333333334) * t_1))), (-1.6666666666666667 + (a * -2.0))), 1.0), x);
} else if (t_3 <= ((double) INFINITY)) {
tmp = x / (x + fma(c, (2.0 * fma(c, (y * (t_2 * t_2)), (y * t_2))), y));
} else {
tmp = 1.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a + 0.8333333333333334) * Float64(a + 0.8333333333333334)) t_2 = Float64(0.8333333333333334 + Float64(a - Float64(0.6666666666666666 / t))) t_3 = Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + Float64(5.0 / 6.0))))) tmp = 0.0 if (t_3 <= -1e+52) tmp = 1.0; elseif (t_3 <= 5e+98) tmp = Float64(x / fma(y, exp(Float64(2.0 * Float64(c * Float64(a + 0.8333333333333334)))), x)); elseif (t_3 <= 4e+284) tmp = Float64(x / fma(y, fma(b, fma(b, fma(2.0, t_1, Float64(Float64(b * -1.3333333333333333) * Float64(Float64(a + 0.8333333333333334) * t_1))), Float64(-1.6666666666666667 + Float64(a * -2.0))), 1.0), x)); elseif (t_3 <= Inf) tmp = Float64(x / Float64(x + fma(c, Float64(2.0 * fma(c, Float64(y * Float64(t_2 * t_2)), Float64(y * t_2))), y))); else tmp = 1.0; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.8333333333333334 + N[(a - N[(0.6666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+52], 1.0, If[LessEqual[t$95$3, 5e+98], N[(x / N[(y * N[Exp[N[(2.0 * N[(c * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 4e+284], N[(x / N[(y * N[(b * N[(b * N[(2.0 * t$95$1 + N[(N[(b * -1.3333333333333333), $MachinePrecision] * N[(N[(a + 0.8333333333333334), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.6666666666666667 + N[(a * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(x / N[(x + N[(c * N[(2.0 * N[(c * N[(y * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 0.8333333333333334\right) \cdot \left(a + 0.8333333333333334\right)\\
t_2 := 0.8333333333333334 + \left(a - \frac{0.6666666666666666}{t}\right)\\
t_3 := \frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{+52}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+98}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, e^{2 \cdot \left(c \cdot \left(a + 0.8333333333333334\right)\right)}, x\right)}\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+284}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(2, t\_1, \left(b \cdot -1.3333333333333333\right) \cdot \left(\left(a + 0.8333333333333334\right) \cdot t\_1\right)\right), -1.6666666666666667 + a \cdot -2\right), 1\right), x\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{x}{x + \mathsf{fma}\left(c, 2 \cdot \mathsf{fma}\left(c, y \cdot \left(t\_2 \cdot t\_2\right), y \cdot t\_2\right), y\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\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)))))) < -9.9999999999999999e51 or +inf.0 < (-.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.1%
Taylor expanded in x around -inf
Applied rewrites91.8%
Taylor expanded in x around inf
Applied rewrites98.2%
if -9.9999999999999999e51 < (-.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.9999999999999998e98Initial program 100.0%
Taylor expanded in c around inf
lower-*.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6493.6
Applied rewrites93.6%
Taylor expanded in t around inf
+-commutativeN/A
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f6485.0
Applied rewrites85.0%
if 4.9999999999999998e98 < (-.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.00000000000000032e284Initial program 100.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f6470.0
Applied rewrites70.0%
Taylor expanded in t around inf
+-commutativeN/A
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f6457.1
Applied rewrites57.1%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites75.8%
if 4.00000000000000032e284 < (-.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)))))) < +inf.0Initial program 97.1%
Taylor expanded in c around inf
lower-*.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6466.0
Applied rewrites66.0%
Taylor expanded in c around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites79.6%
Final simplification87.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0)))))))
(if (<= t_1 -4e+19)
1.0
(if (<= t_1 5e+48)
(/ x (+ x (fma 2.0 (* (+ a 0.8333333333333334) (* c y)) y)))
(if (<= t_1 2e+303)
(* (- x y) (/ x (* (+ x y) (- x y))))
(if (<= t_1 INFINITY)
(/ x (* y (fma -1.3333333333333333 (/ c t) 1.0)))
1.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))));
double tmp;
if (t_1 <= -4e+19) {
tmp = 1.0;
} else if (t_1 <= 5e+48) {
tmp = x / (x + fma(2.0, ((a + 0.8333333333333334) * (c * y)), y));
} else if (t_1 <= 2e+303) {
tmp = (x - y) * (x / ((x + y) * (x - y)));
} else if (t_1 <= ((double) INFINITY)) {
tmp = x / (y * fma(-1.3333333333333333, (c / t), 1.0));
} else {
tmp = 1.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + Float64(5.0 / 6.0))))) tmp = 0.0 if (t_1 <= -4e+19) tmp = 1.0; elseif (t_1 <= 5e+48) tmp = Float64(x / Float64(x + fma(2.0, Float64(Float64(a + 0.8333333333333334) * Float64(c * y)), y))); elseif (t_1 <= 2e+303) tmp = Float64(Float64(x - y) * Float64(x / Float64(Float64(x + y) * Float64(x - y)))); elseif (t_1 <= Inf) tmp = Float64(x / Float64(y * fma(-1.3333333333333333, Float64(c / t), 1.0))); else tmp = 1.0; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+19], 1.0, If[LessEqual[t$95$1, 5e+48], N[(x / N[(x + N[(2.0 * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(c * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+303], N[(N[(x - y), $MachinePrecision] * N[(x / N[(N[(x + y), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(x / N[(y * N[(-1.3333333333333333 * N[(c / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+19}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+48}:\\
\;\;\;\;\frac{x}{x + \mathsf{fma}\left(2, \left(a + 0.8333333333333334\right) \cdot \left(c \cdot y\right), y\right)}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{x}{\left(x + y\right) \cdot \left(x - y\right)}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(-1.3333333333333333, \frac{c}{t}, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\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)))))) < -4e19 or +inf.0 < (-.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.5%
Taylor expanded in x around -inf
Applied rewrites92.1%
Taylor expanded in x around inf
Applied rewrites98.3%
if -4e19 < (-.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.99999999999999973e48Initial program 99.9%
Taylor expanded in c around inf
lower-*.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6494.8
Applied rewrites94.8%
Taylor expanded in c around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6484.9
Applied rewrites84.9%
Taylor expanded in t around inf
lower-+.f6484.9
Applied rewrites84.9%
if 4.99999999999999973e48 < (-.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)))))) < 2e303Initial program 100.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f6461.7
Applied rewrites61.7%
Taylor expanded in b around 0
lower-+.f6418.4
Applied rewrites18.4%
flip-+N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f64N/A
difference-of-squaresN/A
lift-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6458.7
Applied rewrites58.7%
if 2e303 < (-.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)))))) < +inf.0Initial program 96.5%
Taylor expanded in c around inf
lower-*.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6463.9
Applied rewrites63.9%
Taylor expanded in c around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6459.2
Applied rewrites59.2%
Taylor expanded in t around 0
lower-/.f6453.8
Applied rewrites53.8%
Taylor expanded in y around inf
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f6465.8
Applied rewrites65.8%
Final simplification80.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0)))))))
(if (<= t_1 -4e+19)
1.0
(if (<= t_1 5e+48)
(/ x (+ x (* y (fma 2.0 (* a c) 1.0))))
(if (<= t_1 2e+303)
(* (- x y) (/ x (* (+ x y) (- x y))))
(if (<= t_1 INFINITY)
(/ x (* y (fma -1.3333333333333333 (/ c t) 1.0)))
1.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))));
double tmp;
if (t_1 <= -4e+19) {
tmp = 1.0;
} else if (t_1 <= 5e+48) {
tmp = x / (x + (y * fma(2.0, (a * c), 1.0)));
} else if (t_1 <= 2e+303) {
tmp = (x - y) * (x / ((x + y) * (x - y)));
} else if (t_1 <= ((double) INFINITY)) {
tmp = x / (y * fma(-1.3333333333333333, (c / t), 1.0));
} else {
tmp = 1.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + Float64(5.0 / 6.0))))) tmp = 0.0 if (t_1 <= -4e+19) tmp = 1.0; elseif (t_1 <= 5e+48) tmp = Float64(x / Float64(x + Float64(y * fma(2.0, Float64(a * c), 1.0)))); elseif (t_1 <= 2e+303) tmp = Float64(Float64(x - y) * Float64(x / Float64(Float64(x + y) * Float64(x - y)))); elseif (t_1 <= Inf) tmp = Float64(x / Float64(y * fma(-1.3333333333333333, Float64(c / t), 1.0))); else tmp = 1.0; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(z * N[Sqrt[N[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+19], 1.0, If[LessEqual[t$95$1, 5e+48], N[(x / N[(x + N[(y * N[(2.0 * N[(a * c), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+303], N[(N[(x - y), $MachinePrecision] * N[(x / N[(N[(x + y), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(x / N[(y * N[(-1.3333333333333333 * N[(c / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+19}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+48}:\\
\;\;\;\;\frac{x}{x + y \cdot \mathsf{fma}\left(2, a \cdot c, 1\right)}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{x}{\left(x + y\right) \cdot \left(x - y\right)}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{x}{y \cdot \mathsf{fma}\left(-1.3333333333333333, \frac{c}{t}, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\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)))))) < -4e19 or +inf.0 < (-.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.5%
Taylor expanded in x around -inf
Applied rewrites92.1%
Taylor expanded in x around inf
Applied rewrites98.3%
if -4e19 < (-.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.99999999999999973e48Initial program 99.9%
Taylor expanded in c around inf
lower-*.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6494.8
Applied rewrites94.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6490.8
Applied rewrites90.8%
Taylor expanded in a around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f6484.9
Applied rewrites84.9%
if 4.99999999999999973e48 < (-.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)))))) < 2e303Initial program 100.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f6461.7
Applied rewrites61.7%
Taylor expanded in b around 0
lower-+.f6418.4
Applied rewrites18.4%
flip-+N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f64N/A
difference-of-squaresN/A
lift-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6458.7
Applied rewrites58.7%
if 2e303 < (-.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)))))) < +inf.0Initial program 96.5%
Taylor expanded in c around inf
lower-*.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6463.9
Applied rewrites63.9%
Taylor expanded in c around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6459.2
Applied rewrites59.2%
Taylor expanded in t around 0
lower-/.f6453.8
Applied rewrites53.8%
Taylor expanded in y around inf
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f6465.8
Applied rewrites65.8%
Final simplification80.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0)))))))
(if (<= t_1 -4e+19)
1.0
(if (<= t_1 5e+101)
(/ x (+ x y))
(if (<= t_1 INFINITY) (/ x (+ x (* 2.0 (* a (* c y))))) 1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))));
double tmp;
if (t_1 <= -4e+19) {
tmp = 1.0;
} else if (t_1 <= 5e+101) {
tmp = x / (x + y);
} else if (t_1 <= ((double) INFINITY)) {
tmp = x / (x + (2.0 * (a * (c * y))));
} else {
tmp = 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((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))));
double tmp;
if (t_1 <= -4e+19) {
tmp = 1.0;
} else if (t_1 <= 5e+101) {
tmp = x / (x + y);
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = x / (x + (2.0 * (a * (c * y))));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((z * math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))) tmp = 0 if t_1 <= -4e+19: tmp = 1.0 elif t_1 <= 5e+101: tmp = x / (x + y) elif t_1 <= math.inf: tmp = x / (x + (2.0 * (a * (c * y)))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + Float64(5.0 / 6.0))))) tmp = 0.0 if (t_1 <= -4e+19) tmp = 1.0; elseif (t_1 <= 5e+101) tmp = Float64(x / Float64(x + y)); elseif (t_1 <= Inf) tmp = Float64(x / Float64(x + Float64(2.0 * Float64(a * Float64(c * y))))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))); tmp = 0.0; if (t_1 <= -4e+19) tmp = 1.0; elseif (t_1 <= 5e+101) tmp = x / (x + y); elseif (t_1 <= Inf) tmp = x / (x + (2.0 * (a * (c * y)))); else tmp = 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[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+19], 1.0, If[LessEqual[t$95$1, 5e+101], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(x / N[(x + N[(2.0 * N[(a * N[(c * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+19}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+101}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{x}{x + 2 \cdot \left(a \cdot \left(c \cdot y\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;1\\
\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)))))) < -4e19 or +inf.0 < (-.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.5%
Taylor expanded in x around -inf
Applied rewrites92.1%
Taylor expanded in x around inf
Applied rewrites98.3%
if -4e19 < (-.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.99999999999999989e101Initial program 100.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f6473.0
Applied rewrites73.0%
Taylor expanded in b around 0
lower-+.f6464.0
Applied rewrites64.0%
if 4.99999999999999989e101 < (-.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)))))) < +inf.0Initial program 98.2%
Taylor expanded in c around inf
lower-*.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6464.4
Applied rewrites64.4%
Taylor expanded in c around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6453.5
Applied rewrites53.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6445.7
Applied rewrites45.7%
Final simplification71.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0)))))))
(if (<= t_1 -4e+19)
1.0
(if (<= t_1 1e+115)
(/ x (+ x y))
(if (<= t_1 INFINITY) (* -0.75 (* t (/ x (* c y)))) 1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))));
double tmp;
if (t_1 <= -4e+19) {
tmp = 1.0;
} else if (t_1 <= 1e+115) {
tmp = x / (x + y);
} else if (t_1 <= ((double) INFINITY)) {
tmp = -0.75 * (t * (x / (c * y)));
} else {
tmp = 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((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0))));
double tmp;
if (t_1 <= -4e+19) {
tmp = 1.0;
} else if (t_1 <= 1e+115) {
tmp = x / (x + y);
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = -0.75 * (t * (x / (c * y)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((z * math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))) tmp = 0 if t_1 <= -4e+19: tmp = 1.0 elif t_1 <= 1e+115: tmp = x / (x + y) elif t_1 <= math.inf: tmp = -0.75 * (t * (x / (c * y))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(z * sqrt(Float64(t + a))) / t) + Float64(Float64(b - c) * Float64(Float64(2.0 / Float64(t * 3.0)) - Float64(a + Float64(5.0 / 6.0))))) tmp = 0.0 if (t_1 <= -4e+19) tmp = 1.0; elseif (t_1 <= 1e+115) tmp = Float64(x / Float64(x + y)); elseif (t_1 <= Inf) tmp = Float64(-0.75 * Float64(t * Float64(x / Float64(c * y)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))); tmp = 0.0; if (t_1 <= -4e+19) tmp = 1.0; elseif (t_1 <= 1e+115) tmp = x / (x + y); elseif (t_1 <= Inf) tmp = -0.75 * (t * (x / (c * y))); else tmp = 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[(t + a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(N[(b - c), $MachinePrecision] * N[(N[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+19], 1.0, If[LessEqual[t$95$1, 1e+115], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(-0.75 * N[(t * N[(x / N[(c * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+19}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_1 \leq 10^{+115}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;-0.75 \cdot \left(t \cdot \frac{x}{c \cdot y}\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\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)))))) < -4e19 or +inf.0 < (-.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.5%
Taylor expanded in x around -inf
Applied rewrites92.1%
Taylor expanded in x around inf
Applied rewrites98.3%
if -4e19 < (-.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)))))) < 1e115Initial program 100.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f6474.6
Applied rewrites74.6%
Taylor expanded in b around 0
lower-+.f6463.3
Applied rewrites63.3%
if 1e115 < (-.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)))))) < +inf.0Initial program 98.2%
Taylor expanded in c around inf
lower-*.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6464.6
Applied rewrites64.6%
Taylor expanded in c around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6453.6
Applied rewrites53.6%
Taylor expanded in t around 0
lower-/.f6448.4
Applied rewrites48.4%
Taylor expanded in c around inf
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6445.4
Applied rewrites45.4%
Final simplification71.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<=
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0))))))))))
2e-36)
(/
x
(fma
y
(fma
b
(fma
(* b 2.0)
(* (+ a 0.8333333333333334) (+ a 0.8333333333333334))
(+ -1.6666666666666667 (* a -2.0)))
1.0)
x))
1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) {
tmp = x / fma(y, fma(b, fma((b * 2.0), ((a + 0.8333333333333334) * (a + 0.8333333333333334)), (-1.6666666666666667 + (a * -2.0))), 1.0), x);
} else {
tmp = 1.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (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(2.0 / Float64(t * 3.0)) - Float64(a + Float64(5.0 / 6.0)))))))))) <= 2e-36) tmp = Float64(x / fma(y, fma(b, fma(Float64(b * 2.0), Float64(Float64(a + 0.8333333333333334) * Float64(a + 0.8333333333333334)), Float64(-1.6666666666666667 + Float64(a * -2.0))), 1.0), x)); else tmp = 1.0; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[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[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e-36], N[(x / N[(y * N[(b * N[(N[(b * 2.0), $MachinePrecision] * N[(N[(a + 0.8333333333333334), $MachinePrecision] * N[(a + 0.8333333333333334), $MachinePrecision]), $MachinePrecision] + N[(-1.6666666666666667 + N[(a * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\right)}} \leq 2 \cdot 10^{-36}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(b, \mathsf{fma}\left(b \cdot 2, \left(a + 0.8333333333333334\right) \cdot \left(a + 0.8333333333333334\right), -1.6666666666666667 + a \cdot -2\right), 1\right), x\right)}\\
\mathbf{else}:\\
\;\;\;\;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))))))))))) < 1.9999999999999999e-36Initial program 98.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f6466.1
Applied rewrites66.1%
Taylor expanded in t around inf
+-commutativeN/A
lower-fma.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f6454.6
Applied rewrites54.6%
Taylor expanded in b around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-+.f64N/A
lower-+.f64N/A
distribute-lft-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-*.f6468.4
Applied rewrites68.4%
if 1.9999999999999999e-36 < (/.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 90.2%
Taylor expanded in x around -inf
Applied rewrites92.6%
Taylor expanded in x around inf
Applied rewrites98.4%
Final simplification82.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<=
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0))))))))))
2e-36)
(/ x (+ x (fma a (* (* a 2.0) (* y (* b b))) y)))
1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) {
tmp = x / (x + fma(a, ((a * 2.0) * (y * (b * b))), y));
} else {
tmp = 1.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (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(2.0 / Float64(t * 3.0)) - Float64(a + Float64(5.0 / 6.0)))))))))) <= 2e-36) tmp = Float64(x / Float64(x + fma(a, Float64(Float64(a * 2.0) * Float64(y * Float64(b * b))), y))); else tmp = 1.0; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[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[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e-36], N[(x / N[(x + N[(a * N[(N[(a * 2.0), $MachinePrecision] * N[(y * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\right)}} \leq 2 \cdot 10^{-36}:\\
\;\;\;\;\frac{x}{x + \mathsf{fma}\left(a, \left(a \cdot 2\right) \cdot \left(y \cdot \left(b \cdot b\right)\right), y\right)}\\
\mathbf{else}:\\
\;\;\;\;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))))))))))) < 1.9999999999999999e-36Initial program 98.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f6466.1
Applied rewrites66.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6443.4
Applied rewrites43.4%
Taylor expanded in a around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6457.2
Applied rewrites57.2%
Taylor expanded in b around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6463.2
Applied rewrites63.2%
if 1.9999999999999999e-36 < (/.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 90.2%
Taylor expanded in x around -inf
Applied rewrites92.6%
Taylor expanded in x around inf
Applied rewrites98.4%
Final simplification80.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<=
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0))))))))))
2e-36)
(* (- x y) (/ x (* (+ x y) (- x y))))
1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) {
tmp = (x - y) * (x / ((x + y) * (x - y)));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0d0 / (t * 3.0d0)) - (a + (5.0d0 / 6.0d0)))))))))) <= 2d-36) then
tmp = (x - y) * (x / ((x + y) * (x - y)))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) {
tmp = (x - y) * (x / ((x + y) * (x - y)));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36: tmp = (x - y) * (x / ((x + y) * (x - y))) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (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(2.0 / Float64(t * 3.0)) - Float64(a + Float64(5.0 / 6.0)))))))))) <= 2e-36) tmp = Float64(Float64(x - y) * Float64(x / Float64(Float64(x + y) * Float64(x - y)))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) tmp = (x - y) * (x / ((x + y) * (x - y))); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[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[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e-36], N[(N[(x - y), $MachinePrecision] * N[(x / N[(N[(x + y), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\right)}} \leq 2 \cdot 10^{-36}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{x}{\left(x + y\right) \cdot \left(x - y\right)}\\
\mathbf{else}:\\
\;\;\;\;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))))))))))) < 1.9999999999999999e-36Initial program 98.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f6466.1
Applied rewrites66.1%
Taylor expanded in b around 0
lower-+.f6427.6
Applied rewrites27.6%
flip-+N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f64N/A
difference-of-squaresN/A
lift-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6454.9
Applied rewrites54.9%
if 1.9999999999999999e-36 < (/.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 90.2%
Taylor expanded in x around -inf
Applied rewrites92.6%
Taylor expanded in x around inf
Applied rewrites98.4%
Final simplification75.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<=
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0))))))))))
2e-36)
(/ 1.0 (/ (+ x y) x))
1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) {
tmp = 1.0 / ((x + y) / x);
} 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 ((x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0d0 / (t * 3.0d0)) - (a + (5.0d0 / 6.0d0)))))))))) <= 2d-36) then
tmp = 1.0d0 / ((x + y) / x)
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 ((x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) {
tmp = 1.0 / ((x + y) / x);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36: tmp = 1.0 / ((x + y) / x) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (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(2.0 / Float64(t * 3.0)) - Float64(a + Float64(5.0 / 6.0)))))))))) <= 2e-36) tmp = Float64(1.0 / Float64(Float64(x + y) / x)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) tmp = 1.0 / ((x + y) / x); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[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[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e-36], N[(1.0 / N[(N[(x + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\right)}} \leq 2 \cdot 10^{-36}:\\
\;\;\;\;\frac{1}{\frac{x + y}{x}}\\
\mathbf{else}:\\
\;\;\;\;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))))))))))) < 1.9999999999999999e-36Initial program 98.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f6466.1
Applied rewrites66.1%
Taylor expanded in b around 0
lower-+.f6427.6
Applied rewrites27.6%
lift-+.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6428.4
Applied rewrites28.4%
if 1.9999999999999999e-36 < (/.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 90.2%
Taylor expanded in x around -inf
Applied rewrites92.6%
Taylor expanded in x around inf
Applied rewrites98.4%
Final simplification61.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<=
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0))))))))))
2e-36)
(/ x (+ x y))
1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) {
tmp = x / (x + y);
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0d0 / (t * 3.0d0)) - (a + (5.0d0 / 6.0d0)))))))))) <= 2d-36) then
tmp = x / (x + y)
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) {
tmp = x / (x + y);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36: tmp = x / (x + y) else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (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(2.0 / Float64(t * 3.0)) - Float64(a + Float64(5.0 / 6.0)))))))))) <= 2e-36) tmp = Float64(x / Float64(x + y)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) tmp = x / (x + y); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[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[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e-36], N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\right)}} \leq 2 \cdot 10^{-36}:\\
\;\;\;\;\frac{x}{x + y}\\
\mathbf{else}:\\
\;\;\;\;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))))))))))) < 1.9999999999999999e-36Initial program 98.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f6466.1
Applied rewrites66.1%
Taylor expanded in b around 0
lower-+.f6427.6
Applied rewrites27.6%
if 1.9999999999999999e-36 < (/.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 90.2%
Taylor expanded in x around -inf
Applied rewrites92.6%
Taylor expanded in x around inf
Applied rewrites98.4%
Final simplification61.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<=
(/
x
(+
x
(*
y
(exp
(*
2.0
(+
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (/ 2.0 (* t 3.0)) (+ a (/ 5.0 6.0))))))))))
2e-36)
(/ x y)
1.0))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) {
tmp = x / y;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((x / (x + (y * exp((2.0d0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0d0 / (t * 3.0d0)) - (a + (5.0d0 / 6.0d0)))))))))) <= 2d-36) then
tmp = x / y
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x / (x + (y * Math.exp((2.0 * (((z * Math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) {
tmp = x / y;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x / (x + (y * math.exp((2.0 * (((z * math.sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36: tmp = x / y else: tmp = 1.0 return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (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(2.0 / Float64(t * 3.0)) - Float64(a + Float64(5.0 / 6.0)))))))))) <= 2e-36) tmp = Float64(x / y); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) + ((b - c) * ((2.0 / (t * 3.0)) - (a + (5.0 / 6.0)))))))))) <= 2e-36) tmp = x / y; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[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[(2.0 / N[(t * 3.0), $MachinePrecision]), $MachinePrecision] - N[(a + N[(5.0 / 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e-36], N[(x / y), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\frac{2}{t \cdot 3} - \left(a + \frac{5}{6}\right)\right)\right)}} \leq 2 \cdot 10^{-36}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;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))))))))))) < 1.9999999999999999e-36Initial program 98.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f6466.1
Applied rewrites66.1%
Taylor expanded in b around 0
lower-+.f6427.6
Applied rewrites27.6%
Taylor expanded in x around 0
lower-/.f6427.2
Applied rewrites27.2%
if 1.9999999999999999e-36 < (/.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 90.2%
Taylor expanded in x around -inf
Applied rewrites92.6%
Taylor expanded in x around inf
Applied rewrites98.4%
Final simplification61.1%
(FPCore (x y z t a b c) :precision binary64 1.0)
double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = 1.0d0
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return 1.0;
}
def code(x, y, z, t, a, b, c): return 1.0
function code(x, y, z, t, a, b, c) return 1.0 end
function tmp = code(x, y, z, t, a, b, c) tmp = 1.0; end
code[x_, y_, z_, t_, a_, b_, c_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 94.6%
Taylor expanded in x around -inf
Applied rewrites95.7%
Taylor expanded in x around inf
Applied rewrites49.3%
(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 2024219
(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)))))))))))